]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'dev/pwm-backlight' into for-next
authorKukjin Kim <kgene.kim@samsung.com>
Fri, 11 Mar 2011 06:48:52 +0000 (15:48 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Fri, 11 Mar 2011 06:48:52 +0000 (15:48 +0900)
Conflicts:
arch/arm/mach-s3c64xx/mach-smdk6410.c

14 files changed:
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s5p64x0/Kconfig
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5pc100/Kconfig
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pv210/Kconfig
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/plat-s3c24xx/Kconfig
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/Makefile
arch/arm/plat-samsung/dev-pwm.c [new file with mode: 0644]
arch/arm/plat-samsung/pwm.c

index 579d2f0f4dd0ec3c536262f2d52706ae81c4bac7..e4177e22557b5eac7e9638c0de3c93b2ae689f7e 100644 (file)
@@ -143,6 +143,7 @@ config MACH_SMDK6410
        select S3C_DEV_USB_HSOTG
        select S3C_DEV_WDT
        select SAMSUNG_DEV_KEYPAD
+       select SAMSUNG_DEV_PWM
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select S3C64XX_SETUP_SDHCI
        select S3C64XX_SETUP_I2C1
@@ -231,7 +232,7 @@ config MACH_HMT
        select S3C_DEV_NAND
        select S3C_DEV_USB_HOST
        select S3C64XX_SETUP_FB_24BPP
-       select HAVE_PWM
+       select SAMSUNG_DEV_PWM
        help
          Machine support for the Airgoo HMT
 
@@ -249,8 +250,8 @@ config MACH_SMARTQ
        select S3C64XX_SETUP_SDHCI
        select S3C64XX_SETUP_FB_24BPP
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
-       select HAVE_PWM
        help
            Shared machine support for SmartQ 5/7
 
index a80a3163dd3034bbd55136432aca0d2372f77421..686a4f270b123d6d1d2372298cfde9e8f69b248f 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/smsc911x.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
+#include <linux/pwm_backlight.h>
 
 #ifdef CONFIG_SMDK6410_WM1190_EV1
 #include <linux/mfd/wm8350/core.h>
@@ -49,6 +50,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-fb.h>
 #include <mach/map.h>
+#include <mach/gpio-bank-f.h>
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
@@ -119,7 +121,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
 {
        if (power) {
                gpio_direction_output(S3C64XX_GPF(13), 1);
-               gpio_direction_output(S3C64XX_GPF(15), 1);
 
                /* fire nRESET on power up */
                gpio_direction_output(S3C64XX_GPN(5), 0);
@@ -127,7 +128,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
                gpio_direction_output(S3C64XX_GPN(5), 1);
                msleep(1);
        } else {
-               gpio_direction_output(S3C64XX_GPF(15), 0);
                gpio_direction_output(S3C64XX_GPF(13), 0);
        }
 }
@@ -270,6 +270,45 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
        .cols           = 8,
 };
 
+static int smdk6410_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(S3C64XX_GPF(15), "Backlight");
+       if (ret) {
+               printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
+               return ret;
+       }
+
+       /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
+       s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));
+
+       return 0;
+}
+
+static void smdk6410_backlight_exit(struct device *dev)
+{
+       s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT);
+       gpio_free(S3C64XX_GPF(15));
+}
+
+static struct platform_pwm_backlight_data smdk6410_backlight_data = {
+       .pwm_id         = 1,
+       .max_brightness = 255,
+       .dft_brightness = 255,
+       .pwm_period_ns  = 78770,
+       .init           = smdk6410_backlight_init,
+       .exit           = smdk6410_backlight_exit,
+};
+
+static struct platform_device smdk6410_backlight_device = {
+       .name           = "pwm-backlight",
+       .dev            = {
+               .parent         = &s3c_device_timer[1].dev,
+               .platform_data  = &smdk6410_backlight_data,
+       },
+};
+
 static struct map_desc smdk6410_iodesc[] = {};
 
 static struct platform_device *smdk6410_devices[] __initdata = {
@@ -299,6 +338,8 @@ static struct platform_device *smdk6410_devices[] __initdata = {
        &s3c_device_rtc,
        &s3c_device_ts,
        &s3c_device_wdt,
+       &s3c_device_timer[1],
+       &smdk6410_backlight_device,
 };
 
 #ifdef CONFIG_REGULATOR
@@ -694,7 +735,6 @@ static void __init smdk6410_machine_init(void)
 
        gpio_request(S3C64XX_GPN(5), "LCD power");
        gpio_request(S3C64XX_GPF(13), "LCD power");
-       gpio_request(S3C64XX_GPF(15), "LCD power");
 
        i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
        i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
index 164d2783d3818da2e5f90ccfe8af769df3ee8db1..08b0a5bf1d60f6c465515de6cc63bc9e4626dbd4 100644 (file)
@@ -34,6 +34,7 @@ config MACH_SMDK6440
        select S3C_DEV_WDT
        select S3C64XX_DEV_SPI
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
        select S5P64X0_SETUP_I2C1
        help
@@ -47,6 +48,7 @@ config MACH_SMDK6450
        select S3C_DEV_WDT
        select S3C64XX_DEV_SPI
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
        select S5P64X0_SETUP_I2C1
        help
index e5beb84e2393b94a9a7c57ff9ea7c193eccb3a46..366dca4ec79472f7ce33e3de73494eb2bb26e76b 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/gpio.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -32,6 +33,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <mach/i2c.h>
+#include <mach/regs-gpio.h>
 
 #include <plat/regs-serial.h>
 #include <plat/gpio-cfg.h>
@@ -88,6 +90,45 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
        },
 };
 
+static int smdk6440_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(S5P6440_GPF(15), "Backlight");
+       if (ret) {
+               printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
+               return ret;
+       }
+
+       /* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */
+       s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_SFN(2));
+
+       return 0;
+}
+
+static void smdk6440_backlight_exit(struct device *dev)
+{
+       s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_OUTPUT);
+       gpio_free(S5P6440_GPF(15));
+}
+
+static struct platform_pwm_backlight_data smdk6440_backlight_data = {
+       .pwm_id         = 1,
+       .max_brightness = 255,
+       .dft_brightness = 255,
+       .pwm_period_ns  = 78770,
+       .init           = smdk6440_backlight_init,
+       .exit           = smdk6440_backlight_exit,
+};
+
+static struct platform_device smdk6440_backlight_device = {
+       .name           = "pwm-backlight",
+       .dev            = {
+               .parent         = &s3c_device_timer[1].dev,
+               .platform_data  = &smdk6440_backlight_data,
+       },
+};
+
 static struct platform_device *smdk6440_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_rtc,
@@ -97,6 +138,8 @@ static struct platform_device *smdk6440_devices[] __initdata = {
        &s3c_device_wdt,
        &samsung_asoc_dma,
        &s5p6440_device_iis,
+       &s3c_device_timer[1],
+       &smdk6440_backlight_device,
 };
 
 static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
index 3a20de0a9264c16b5509eb4d9861592c4c07e405..1d8f9fd5af3af27dbd1c362c870a77be068a8cad 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/gpio.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -32,6 +33,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <mach/i2c.h>
+#include <mach/regs-gpio.h>
 
 #include <plat/regs-serial.h>
 #include <plat/gpio-cfg.h>
@@ -106,6 +108,45 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
 #endif
 };
 
+static int smdk6450_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(S5P6450_GPF(15), "Backlight");
+       if (ret) {
+               printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
+               return ret;
+       }
+
+       /* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */
+       s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_SFN(2));
+
+       return 0;
+}
+
+static void smdk6450_backlight_exit(struct device *dev)
+{
+       s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_OUTPUT);
+       gpio_free(S5P6450_GPF(15));
+}
+
+static struct platform_pwm_backlight_data smdk6450_backlight_data = {
+       .pwm_id         = 1,
+       .max_brightness = 255,
+       .dft_brightness = 255,
+       .pwm_period_ns  = 78770,
+       .init           = smdk6450_backlight_init,
+       .exit           = smdk6450_backlight_exit,
+};
+
+static struct platform_device smdk6450_backlight_device = {
+       .name           = "pwm-backlight",
+       .dev            = {
+               .parent         = &s3c_device_timer[1].dev,
+               .platform_data  = &smdk6450_backlight_data,
+       },
+};
+
 static struct platform_device *smdk6450_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_rtc,
@@ -115,6 +156,8 @@ static struct platform_device *smdk6450_devices[] __initdata = {
        &s3c_device_wdt,
        &samsung_asoc_dma,
        &s5p6450_device_iis0,
+       &s3c_device_timer[1],
+       &smdk6450_backlight_device,
        /* s5p6450_device_spi0 will be added */
 };
 
index b8fbf2fcba6f68b0c3a5f12f7fa424b177213744..608722ff4f2856d04d3bae15117b738350a9834f 100644 (file)
@@ -58,6 +58,7 @@ config MACH_SMDKC100
        select SAMSUNG_DEV_ADC
        select SAMSUNG_DEV_IDE
        select SAMSUNG_DEV_KEYPAD
+       select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
        select S5PC100_SETUP_FB_24BPP
        select S5PC100_SETUP_I2C1
index dd192a27524d1eec316d9465e263d3f2c7a3c154..0525cb3ef406cfd40b104fe32a5be2bc54930df3 100644 (file)
 #include <linux/fb.h>
 #include <linux/delay.h>
 #include <linux/input.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
 #include <mach/map.h>
 #include <mach/regs-fb.h>
+#include <mach/regs-gpio.h>
+
 #include <video/platform_lcd.h>
 
 #include <asm/irq.h>
@@ -107,9 +110,6 @@ static struct i2c_board_info i2c_devs1[] __initdata = {
 static void smdkc100_lcd_power_set(struct plat_lcd_data *pd,
                                   unsigned int power)
 {
-       /* backlight */
-       gpio_direction_output(S5PC100_GPD(0), power);
-
        if (power) {
                /* module reset */
                gpio_direction_output(S5PC100_GPH0(6), 1);
@@ -179,6 +179,45 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = {
        .cols           = 8,
 };
 
+static int smdkc100_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(S5PC100_GPD(0), "Backlight");
+       if (ret) {
+               printk(KERN_ERR "failed to request GPF for PWM-OUT0\n");
+               return ret;
+       }
+
+       /* Configure GPIO pin with S5PC100_GPD_TOUT_0 */
+       s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_SFN(2));
+
+       return 0;
+}
+
+static void smdkc100_backlight_exit(struct device *dev)
+{
+       s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_OUTPUT);
+       gpio_free(S5PC100_GPD(0));
+}
+
+static struct platform_pwm_backlight_data smdkc100_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = 255,
+       .dft_brightness = 255,
+       .pwm_period_ns  = 78770,
+       .init           = smdkc100_backlight_init,
+       .exit           = smdkc100_backlight_exit,
+};
+
+static struct platform_device smdkc100_backlight_device = {
+       .name           = "pwm-backlight",
+       .dev            = {
+               .parent         = &s3c_device_timer[0].dev,
+               .platform_data  = &smdkc100_backlight_data,
+       },
+};
+
 static struct platform_device *smdkc100_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_cfcon,
@@ -200,6 +239,8 @@ static struct platform_device *smdkc100_devices[] __initdata = {
        &s5p_device_fimc1,
        &s5p_device_fimc2,
        &s5pc100_device_spdif,
+       &s3c_device_timer[0],
+       &smdkc100_backlight_device,
 };
 
 static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
@@ -233,7 +274,6 @@ static void __init smdkc100_machine_init(void)
        s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD);
 
        /* LCD init */
-       gpio_request(S5PC100_GPD(0), "GPD");
        gpio_request(S5PC100_GPH0(6), "GPH0");
        smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
        platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
index 53aabef1e9cee70db39946003b096d102a410650..d7fd031f6015938e82cf1625a9ce98516ea78e45 100644 (file)
@@ -130,6 +130,7 @@ config MACH_SMDKV210
        select SAMSUNG_DEV_ADC
        select SAMSUNG_DEV_IDE
        select SAMSUNG_DEV_KEYPAD
+       select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
        select S5PV210_SETUP_FB_24BPP
        select S5PV210_SETUP_I2C1
index bc9fdb52a020c9f09c45bf30fc9baaf9ead5a54a..2b5f48806c570a3478de7678f551bf141653fa10 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/fb.h>
 #include <linux/gpio.h>
 #include <linux/delay.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -43,6 +44,7 @@
 #include <plat/keypad.h>
 #include <plat/pm.h>
 #include <plat/fb.h>
+#include <plat/gpio-cfg.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define SMDKV210_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
@@ -208,6 +210,45 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
        .setup_gpio     = s5pv210_fb_gpio_setup_24bpp,
 };
 
+static int smdkv210_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(S5PV210_GPD0(3), "Backlight");
+       if (ret) {
+               printk(KERN_ERR "failed to request GPD for PWM-OUT 3\n");
+               return ret;
+       }
+
+       /* Configure GPIO pin with S5PV210_GPD_0_3_TOUT_3 */
+       s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_SFN(2));
+
+       return 0;
+}
+
+static void smdkv210_backlight_exit(struct device *dev)
+{
+       s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_OUTPUT);
+       gpio_free(S5PV210_GPD0(3));
+}
+
+static struct platform_pwm_backlight_data smdkv210_backlight_data = {
+       .pwm_id         = 3,
+       .max_brightness = 255,
+       .dft_brightness = 255,
+       .pwm_period_ns  = 78770,
+       .init           = smdkv210_backlight_init,
+       .exit           = smdkv210_backlight_exit,
+};
+
+static struct platform_device smdkv210_backlight_device = {
+       .name           = "pwm-backlight",
+       .dev            = {
+               .parent         = &s3c_device_timer[3].dev,
+               .platform_data  = &smdkv210_backlight_data,
+       },
+};
+
 static struct platform_device *smdkv210_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_cfcon,
@@ -229,6 +270,8 @@ static struct platform_device *smdkv210_devices[] __initdata = {
        &samsung_device_keypad,
        &smdkv210_dm9000,
        &smdkv210_lcd_lte480wv,
+       &s3c_device_timer[3],
+       &smdkv210_backlight_device,
 };
 
 static void __init smdkv210_dm9000_init(void)
index eb105e61c746750f716cb0f8d392da560f8f1332..d9c4096ebf45e9830f3ca973b7c6b01ac3f6f751 100644 (file)
@@ -56,13 +56,6 @@ config S3C24XX_DCLK
        help
          Clock code for supporting DCLK/CLKOUT on S3C24XX architectures
 
-config S3C24XX_PWM
-       bool "PWM device support"
-       select HAVE_PWM
-       help
-         Support for exporting the PWM timer blocks via the pwm device
-         system.
-
 # gpio configurations
 
 config S3C24XX_GPIO_EXTRA
index 32be05cf82a32db3bb5062fdbdbec2403b656087..be72100b81b4b86fceb6d9699256f577790126ac 100644 (file)
@@ -273,6 +273,19 @@ config SAMSUNG_DEV_KEYPAD
        help
          Compile in platform device definitions for keypad
 
+config SAMSUNG_DEV_PWM
+       bool
+       default y if ARCH_S3C2410
+       help
+         Compile in platform device definition for PWM Timer
+
+config S3C24XX_PWM
+       bool "PWM device support"
+       select HAVE_PWM
+       help
+         Support for exporting the PWM timer blocks via the pwm device
+         system
+
 # DMA
 
 config S3C_DMA
index 29932f88a8d6fe89bbc4e28ad1ae9074b2660b1e..e9de58a2e2944eddba6a1b4df0fe27ee7684d825 100644 (file)
@@ -59,6 +59,7 @@ obj-$(CONFIG_SAMSUNG_DEV_ADC) += dev-adc.o
 obj-$(CONFIG_SAMSUNG_DEV_IDE)  += dev-ide.o
 obj-$(CONFIG_SAMSUNG_DEV_TS)   += dev-ts.o
 obj-$(CONFIG_SAMSUNG_DEV_KEYPAD)       += dev-keypad.o
+obj-$(CONFIG_SAMSUNG_DEV_PWM)  += dev-pwm.o
 
 # DMA support
 
diff --git a/arch/arm/plat-samsung/dev-pwm.c b/arch/arm/plat-samsung/dev-pwm.c
new file mode 100644 (file)
index 0000000..dab47b0
--- /dev/null
@@ -0,0 +1,53 @@
+/* linux/arch/arm/plat-samsung/dev-pwm.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com
+ *
+ * Copyright (c) 2007 Ben Dooks
+ * Copyright (c) 2008 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
+ *
+ * S3C series device definition for the PWM timer
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+
+#include <plat/devs.h>
+
+#define TIMER_RESOURCE_SIZE (1)
+
+#define TIMER_RESOURCE(_tmr, _irq)                     \
+       (struct resource [TIMER_RESOURCE_SIZE]) {       \
+               [0] = {                                 \
+                       .start  = _irq,                 \
+                       .end    = _irq,                 \
+                       .flags  = IORESOURCE_IRQ        \
+               }                                       \
+       }
+
+#define DEFINE_S3C_TIMER(_tmr_no, _irq)                        \
+       .name           = "s3c24xx-pwm",                \
+       .id             = _tmr_no,                      \
+       .num_resources  = TIMER_RESOURCE_SIZE,          \
+       .resource       = TIMER_RESOURCE(_tmr_no, _irq),        \
+
+/*
+ * since we already have an static mapping for the timer,
+ * we do not bother setting any IO resource for the base.
+ */
+
+struct platform_device s3c_device_timer[] = {
+       [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) },
+       [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) },
+       [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) },
+       [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) },
+       [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) },
+};
+EXPORT_SYMBOL(s3c_device_timer);
index 2eeb49fa056d6413c1963abc6113fa0eff76caf8..f37457c52064f77b5e58139a2eb0008f695d905c 100644 (file)
 #include <linux/io.h>
 #include <linux/pwm.h>
 
-#include <mach/irqs.h>
 #include <mach/map.h>
 
-#include <plat/devs.h>
 #include <plat/regs-timer.h>
 
 struct pwm_device {
@@ -47,37 +45,6 @@ struct pwm_device {
 
 static struct clk *clk_scaler[2];
 
-/* Standard setup for a timer block. */
-
-#define TIMER_RESOURCE_SIZE (1)
-
-#define TIMER_RESOURCE(_tmr, _irq)                     \
-       (struct resource [TIMER_RESOURCE_SIZE]) {       \
-               [0] = {                                 \
-                       .start  = _irq,                 \
-                       .end    = _irq,                 \
-                       .flags  = IORESOURCE_IRQ        \
-               }                                       \
-       }
-
-#define DEFINE_S3C_TIMER(_tmr_no, _irq)                        \
-       .name           = "s3c24xx-pwm",                \
-       .id             = _tmr_no,                      \
-       .num_resources  = TIMER_RESOURCE_SIZE,          \
-       .resource       = TIMER_RESOURCE(_tmr_no, _irq),        \
-
-/* since we already have an static mapping for the timer, we do not
- * bother setting any IO resource for the base.
- */
-
-struct platform_device s3c_device_timer[] = {
-       [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) },
-       [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) },
-       [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) },
-       [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) },
-       [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) },
-};
-
 static inline int pwm_is_tdiv(struct pwm_device *pwm)
 {
        return clk_get_parent(pwm->clk) == pwm->clk_div;