Merge branch 'next-exynos4-pm' into for-next
authorKukjin Kim <kgene.kim@samsung.com>
Sat, 12 Mar 2011 01:20:07 +0000 (10:20 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Sat, 12 Mar 2011 01:20:07 +0000 (10:20 +0900)
Conflicts:
arch/arm/mach-exynos4/include/mach/regs-pmu.h

46 files changed:
arch/arm/Kconfig
arch/arm/configs/s5p64x0_defconfig
arch/arm/configs/s5pv210_defconfig
arch/arm/mach-exynos4/Kconfig
arch/arm/mach-exynos4/Makefile
arch/arm/mach-exynos4/cpu.c
arch/arm/mach-exynos4/include/mach/irqs.h
arch/arm/mach-exynos4/include/mach/map.h
arch/arm/mach-exynos4/include/mach/regs-clock.h
arch/arm/mach-exynos4/include/mach/regs-pmu.h
arch/arm/mach-exynos4/setup-fimc.c [new file with mode: 0644]
arch/arm/mach-s3c2440/mach-gta02.c
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/Makefile
arch/arm/mach-s5pv210/include/mach/regs-clock.h
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-goni.c
arch/arm/mach-s5pv210/mach-smdkc110.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-s5pv210/mach-torbreck.c
arch/arm/mach-s5pv210/setup-fimc.c [new file with mode: 0644]
arch/arm/plat-s3c24xx/Kconfig
arch/arm/plat-s5p/Kconfig
arch/arm/plat-s5p/Makefile
arch/arm/plat-s5p/dev-csis0.c
arch/arm/plat-s5p/dev-csis1.c
arch/arm/plat-s5p/dev-fimc3.c [new file with mode: 0644]
arch/arm/plat-s5p/include/plat/camport.h [new file with mode: 0644]
arch/arm/plat-s5p/include/plat/csis.h [deleted file]
arch/arm/plat-s5p/include/plat/mipi_csis.h [new file with mode: 0644]
arch/arm/plat-s5p/include/plat/s5p-time.h [new file with mode: 0644]
arch/arm/plat-s5p/s5p-time.c [new file with mode: 0644]
arch/arm/plat-s5p/setup-mipiphy.c [new file with mode: 0644]
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/include/plat/devs.h
arch/arm/plat-samsung/include/plat/fimc-core.h
arch/arm/plat-samsung/pwm.c

index b4db99bb4f8593d1d7aaf95eb4f13aff9350dc24..eed07eac3a5f353837ef086a3539162b253741bc 100644 (file)
@@ -715,7 +715,8 @@ config ARCH_S5P64X0
        select GENERIC_GPIO
        select HAVE_CLK
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
-       select ARCH_USES_GETTIMEOFFSET
+       select GENERIC_CLOCKEVENTS
+       select HAVE_SCHED_CLOCK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        help
@@ -753,7 +754,8 @@ config ARCH_S5PV210
        select HAVE_CLK
        select ARM_L1_CACHE_SHIFT_6
        select ARCH_HAS_CPUFREQ
-       select ARCH_USES_GETTIMEOFFSET
+       select GENERIC_CLOCKEVENTS
+       select HAVE_SCHED_CLOCK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
index 2993ecd35145265d0cf2566bbf227158cd07a5c5..ad6b61b0bd1187d02cd65500cce8dbebf0cec2c3 100644 (file)
@@ -10,6 +10,8 @@ CONFIG_S3C_BOOT_ERROR_RESET=y
 CONFIG_S3C_LOWLEVEL_UART_PORT=1
 CONFIG_MACH_SMDK6440=y
 CONFIG_MACH_SMDK6450=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_CPU_32v6K=y
 CONFIG_AEABI=y
 CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
index 0488a1eb4d7dd9c67f0c24a0fd837eed29f020cd..fa989902236db028b98ffffa7d8fcd8d77250048 100644 (file)
@@ -13,6 +13,8 @@ CONFIG_MACH_AQUILA=y
 CONFIG_MACH_GONI=y
 CONFIG_MACH_SMDKC110=y
 CONFIG_MACH_SMDKV210=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_VMSPLIT_2G=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
index 82195a9a4c6140ea4a2ec9628635777704a3daf0..8d7398fdd05cb92537f11018184ddbd1a8733169 100644 (file)
@@ -76,6 +76,11 @@ config EXYNOS4_SETUP_SDHCI_GPIO
        help
          Common setup code for SDHCI gpio.
 
+config EXYNOS4_SETUP_FIMC
+       bool
+       help
+         Common setup code for the camera interfaces.
+
 # machine support
 
 menu "EXYNOS4 Machines"
index 991a4c5f46773b715d48a9ef24cd9fd392848ed8..9473adbb6c19f8f2c42fcb3f41448c1ad0482051 100644 (file)
@@ -42,6 +42,7 @@ obj-y                                 += dev-audio.o
 obj-$(CONFIG_EXYNOS4_DEV_PD)           += dev-pd.o
 obj-$(CONFIG_EXYNOS4_DEV_SYSMMU)       += dev-sysmmu.o
 
+obj-$(CONFIG_EXYNOS4_SETUP_FIMC)       += setup-fimc.o
 obj-$(CONFIG_EXYNOS4_SETUP_I2C1)       += setup-i2c1.o
 obj-$(CONFIG_EXYNOS4_SETUP_I2C2)       += setup-i2c2.o
 obj-$(CONFIG_EXYNOS4_SETUP_I2C3)       += setup-i2c3.o
index 479dfa1951c8ef25c1cdaa09564d851b95d6fcdd..793011391943b222a61008d53fbd1975bf7fc702 100644 (file)
@@ -21,6 +21,8 @@
 #include <plat/clock.h>
 #include <plat/exynos4.h>
 #include <plat/sdhci.h>
+#include <plat/devs.h>
+#include <plat/fimc-core.h>
 
 #include <mach/regs-irq.h>
 
@@ -120,6 +122,11 @@ void __init exynos4_map_io(void)
        exynos4_default_sdhci1();
        exynos4_default_sdhci2();
        exynos4_default_sdhci3();
+
+       s3c_fimc_setname(0, "exynos4-fimc");
+       s3c_fimc_setname(1, "exynos4-fimc");
+       s3c_fimc_setname(2, "exynos4-fimc");
+       s3c_fimc_setname(3, "exynos4-fimc");
 }
 
 void __init exynos4_init_clocks(int xtal)
index e3556d45c75b5de2fa375bab2ff65e2a78033811..1db1de8e3e81f58758437a033f783a935c31293f 100644 (file)
 #define IRQ_MIPI_CSIS0         COMBINER_IRQ(30, 0)
 #define IRQ_MIPI_CSIS1         COMBINER_IRQ(30, 1)
 
+#define IRQ_FIMC0              COMBINER_IRQ(32, 0)
+#define IRQ_FIMC1              COMBINER_IRQ(32, 1)
+#define IRQ_FIMC2              COMBINER_IRQ(33, 0)
+#define IRQ_FIMC3              COMBINER_IRQ(33, 1)
+
 #define IRQ_ONENAND_AUDI       COMBINER_IRQ(34, 0)
 
 #define IRQ_MCT_L1             COMBINER_IRQ(35, 3)
index 89ab6f75776c64894fd064f65b6dbb69aef1fae0..4f50b07a376a1753b1b884f95d0e1b63f2587b28 100644 (file)
 
 #define EXYNOS4_PA_SYSRAM              0x02020000
 
+#define EXYNOS4_PA_FIMC0               0x11800000
+#define EXYNOS4_PA_FIMC1               0x11810000
+#define EXYNOS4_PA_FIMC2               0x11820000
+#define EXYNOS4_PA_FIMC3               0x11830000
+
 #define EXYNOS4_PA_I2S0                        0x03830000
 #define EXYNOS4_PA_I2S1                        0xE3100000
 #define EXYNOS4_PA_I2S2                        0xE2A00000
 #define S3C_PA_WDT                     EXYNOS4_PA_WATCHDOG
 
 #define S5P_PA_CHIPID                  EXYNOS4_PA_CHIPID
+#define S5P_PA_FIMC0                   EXYNOS4_PA_FIMC0
+#define S5P_PA_FIMC1                   EXYNOS4_PA_FIMC1
+#define S5P_PA_FIMC2                   EXYNOS4_PA_FIMC2
+#define S5P_PA_FIMC3                   EXYNOS4_PA_FIMC3
 #define S5P_PA_MIPI_CSIS0              EXYNOS4_PA_MIPI_CSIS0
 #define S5P_PA_MIPI_CSIS1              EXYNOS4_PA_MIPI_CSIS1
 #define S5P_PA_ONENAND                 EXYNOS4_PA_ONENAND
index 084c3f05c0937af6308cf4a2b40eadb72c514d20..c91f93054589fb514ec379e98b49d259b485c76f 100644 (file)
 #define S5P_CLKDIV_BUS_GPLR_SHIFT      (4)
 #define S5P_CLKDIV_BUS_GPLR_MASK       (0x7 << S5P_CLKDIV_BUS_GPLR_SHIFT)
 
-/* Compatibility defines */
+/* Compatibility defines and inclusion */
+
+#include <mach/regs-pmu.h>
 
 #define S5P_EPLL_CON                   S5P_EPLL_CON0
 
index 84aa17bd4dd83684c1f3a38da09af91301d2e117..fa1da94516892e1452ee4a6252bc094d77c6bc80 100644 (file)
 #define S5P_EINT_WAKEUP_MASK                   S5P_PMUREG(0x0604)
 #define S5P_WAKEUP_MASK                                S5P_PMUREG(0x0608)
 
+#define S5P_MIPI_DPHY_CONTROL(n)               S5P_PMUREG(0x0710 + (n) * 4)
+#define S5P_MIPI_DPHY_ENABLE                   (1 << 0)
+#define S5P_MIPI_DPHY_SRESETN                  (1 << 1)
+#define S5P_MIPI_DPHY_MRESETN                  (1 << 2)
+
 #define S5P_INFORM0                            S5P_PMUREG(0x0800)
 #define S5P_INFORM1                            S5P_PMUREG(0x0804)
 #define S5P_INFORM2                            S5P_PMUREG(0x0808)
diff --git a/arch/arm/mach-exynos4/setup-fimc.c b/arch/arm/mach-exynos4/setup-fimc.c
new file mode 100644 (file)
index 0000000..6a45078
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics Co., Ltd.
+ *
+ * Exynos4 camera interface GPIO configuration.
+ *
+ * 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/gpio.h>
+#include <plat/gpio-cfg.h>
+#include <plat/camport.h>
+
+int exynos4_fimc_setup_gpio(enum s5p_camport_id id)
+{
+       u32 gpio8, gpio5;
+       u32 sfn;
+       int ret;
+
+       switch (id) {
+       case S5P_CAMPORT_A:
+               gpio8 = EXYNOS4_GPJ0(0); /* PCLK, VSYNC, HREF, DATA[0:4] */
+               gpio5 = EXYNOS4_GPJ1(0); /* DATA[5:7], CLKOUT, FIELD */
+               sfn = S3C_GPIO_SFN(2);
+               break;
+
+       case S5P_CAMPORT_B:
+               gpio8 = EXYNOS4_GPE0(0); /* DATA[0:7] */
+               gpio5 = EXYNOS4_GPE1(0); /* PCLK, VSYNC, HREF, CLKOUT, FIELD */
+               sfn = S3C_GPIO_SFN(3);
+               break;
+
+       default:
+               WARN(1, "Wrong camport id: %d\n", id);
+               return -EINVAL;
+       }
+
+       ret = s3c_gpio_cfgall_range(gpio8, 8, sfn, S3C_GPIO_PULL_UP);
+       if (ret)
+               return ret;
+
+       return s3c_gpio_cfgall_range(gpio5, 5, sfn, S3C_GPIO_PULL_UP);
+}
index 9f2c14ec71819f89b7f327f5c97bf70370211b92..d217ef3cd86a736a559e75e8005e6bb2fd81469a 100644 (file)
@@ -58,6 +58,9 @@
 #include <linux/mfd/pcf50633/pmic.h>
 #include <linux/mfd/pcf50633/backlight.h>
 
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
@@ -86,6 +89,8 @@
 #include <plat/udc.h>
 #include <plat/gpio-cfg.h>
 #include <plat/iic.h>
+#include <plat/ts.h>
+
 
 static struct pcf50633 *gta02_pcf;
 
@@ -280,9 +285,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
                                .always_on = 1,
                                .apply_uV = 1,
-                               .state_mem = {
-                                       .enabled = 1,
-                               },
                        },
                },
                [PCF50633_REGULATOR_DOWN1] = {
@@ -301,9 +303,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
                                .apply_uV = 1,
                                .always_on = 1,
-                               .state_mem = {
-                                       .enabled = 1,
-                               },
                        },
                },
                [PCF50633_REGULATOR_HCLDO] = {
@@ -311,8 +310,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .min_uV = 2000000,
                                .max_uV = 3300000,
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
-                               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
-                               .always_on = 1,
+                               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+                                               REGULATOR_CHANGE_STATUS,
                        },
                },
                [PCF50633_REGULATOR_LDO1] = {
@@ -320,10 +319,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .min_uV = 3300000,
                                .max_uV = 3300000,
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
+                               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                                .apply_uV = 1,
-                               .state_mem = {
-                                       .enabled = 0,
-                               },
                        },
                },
                [PCF50633_REGULATOR_LDO2] = {
@@ -347,6 +344,7 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .min_uV = 3200000,
                                .max_uV = 3200000,
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
+                               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                                .apply_uV = 1,
                        },
                },
@@ -355,10 +353,8 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .min_uV = 3000000,
                                .max_uV = 3000000,
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
+                               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                                .apply_uV = 1,
-                               .state_mem = {
-                                       .enabled = 1,
-                               },
                        },
                },
                [PCF50633_REGULATOR_LDO6] = {
@@ -373,9 +369,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
                                .min_uV = 1800000,
                                .max_uV = 1800000,
                                .valid_modes_mask = REGULATOR_MODE_NORMAL,
-                               .state_mem = {
-                                       .enabled = 1,
-                               },
                        },
                },
 
@@ -489,6 +482,43 @@ static struct s3c2410_hcd_info gta02_usb_info __initdata = {
        },
 };
 
+/* Touchscreen */
+static struct s3c2410_ts_mach_info gta02_ts_info = {
+       .delay                  = 10000,
+       .presc                  = 0xff, /* slow as we can go */
+       .oversampling_shift     = 2,
+};
+
+/* Buttons */
+static struct gpio_keys_button gta02_buttons[] = {
+       {
+               .gpio = GTA02_GPIO_AUX_KEY,
+               .code = KEY_PHONE,
+               .desc = "Aux",
+               .type = EV_KEY,
+               .debounce_interval = 100,
+       },
+       {
+               .gpio = GTA02_GPIO_HOLD_KEY,
+               .code = KEY_PAUSE,
+               .desc = "Hold",
+               .type = EV_KEY,
+               .debounce_interval = 100,
+       },
+};
+
+static struct gpio_keys_platform_data gta02_buttons_pdata = {
+       .buttons = gta02_buttons,
+       .nbuttons = ARRAY_SIZE(gta02_buttons),
+};
+
+static struct platform_device gta02_buttons_device = {
+       .name = "gpio-keys",
+       .id = -1,
+       .dev = {
+               .platform_data = &gta02_buttons_pdata,
+       },
+};
 
 static void __init gta02_map_io(void)
 {
@@ -509,7 +539,11 @@ static struct platform_device *gta02_devices[] __initdata = {
        &gta02_nor_flash,
        &s3c24xx_pwm_device,
        &s3c_device_iis,
+       &samsung_asoc_dma,
        &s3c_device_i2c0,
+       &gta02_buttons_device,
+       &s3c_device_adc,
+       &s3c_device_ts,
 };
 
 /* These guys DO need to be children of PMU. */
@@ -559,6 +593,7 @@ static void __init gta02_machine_init(void)
 #endif
 
        s3c24xx_udc_set_platdata(&gta02_udc_cfg);
+       s3c24xx_ts_set_platdata(&gta02_ts_info);
        s3c_ohci_set_platdata(&gta02_usb_info);
        s3c_nand_set_platdata(&gta02_nand_info);
        s3c_i2c0_set_platdata(NULL);
@@ -567,6 +602,8 @@ static void __init gta02_machine_init(void)
 
        platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
        pm_power_off = gta02_poweroff;
+
+       regulator_has_full_constraints();
 }
 
 
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..017af4c4293c763757cd780aa63758682e3e6c88 100644 (file)
@@ -10,12 +10,14 @@ if ARCH_S5P64X0
 config CPU_S5P6440
        bool
        select S3C_PL330_DMA
+       select S5P_HRT
        help
          Enable S5P6440 CPU support
 
 config CPU_S5P6450
        bool
        select S3C_PL330_DMA
+       select S5P_HRT
        help
          Enable S5P6450 CPU support
 
@@ -34,6 +36,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 +50,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..2d559f10fd473c4fc976d9aac45fa29e2262af2e 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>
@@ -43,6 +45,7 @@
 #include <plat/pll.h>
 #include <plat/adc.h>
 #include <plat/ts.h>
+#include <plat/s5p-time.h>
 
 #define SMDK6440_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
                                S3C2410_UCON_RXILEVEL |         \
@@ -88,6 +91,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 +139,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 = {
@@ -136,6 +180,7 @@ static void __init smdk6440_map_io(void)
        s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
        s3c24xx_init_clocks(12000000);
        s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs));
+       s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
 static void __init smdk6440_machine_init(void)
@@ -159,5 +204,5 @@ MACHINE_START(SMDK6440, "SMDK6440")
        .init_irq       = s5p6440_init_irq,
        .map_io         = smdk6440_map_io,
        .init_machine   = smdk6440_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
index 3a20de0a9264c16b5509eb4d9861592c4c07e405..d19c4690ee97cf2740c9a9aee8c4fd083868e25b 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>
@@ -43,6 +45,7 @@
 #include <plat/pll.h>
 #include <plat/adc.h>
 #include <plat/ts.h>
+#include <plat/s5p-time.h>
 
 #define SMDK6450_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
                                S3C2410_UCON_RXILEVEL |         \
@@ -106,6 +109,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 +157,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 */
 };
 
@@ -155,6 +199,7 @@ static void __init smdk6450_map_io(void)
        s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
        s3c24xx_init_clocks(19200000);
        s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs));
+       s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
 static void __init smdk6450_machine_init(void)
@@ -178,5 +223,5 @@ MACHINE_START(SMDK6450, "SMDK6450")
        .init_irq       = s5p6450_init_irq,
        .map_io         = smdk6450_map_io,
        .init_machine   = smdk6450_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
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..37b5a97594a50670ab7fda31f79a2c58d3887bfa 100644 (file)
@@ -13,6 +13,7 @@ config CPU_S5PV210
        bool
        select S3C_PL330_DMA
        select S5P_EXT_INT
+       select S5P_HRT
        select S5PV210_PM if PM
        help
          Enable S5PV210 CPU support
@@ -53,6 +54,11 @@ config S5PV210_SETUP_SDHCI_GPIO
        help
          Common setup code for SDHCI gpio.
 
+config S5PV210_SETUP_FIMC
+       bool
+       help
+         Common setup code for the camera interfaces.
+
 menu "S5PC110 Machines"
 
 config MACH_AQUILA
@@ -130,6 +136,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 ff1a0db57a2fc976d1d09ed388ed3a62660559bb..11f17907b4e8ff7024400975851f74fc04f5617b 100644 (file)
@@ -31,6 +31,7 @@ obj-y                         += dev-audio.o
 obj-$(CONFIG_S3C64XX_DEV_SPI)  += dev-spi.o
 
 obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)   += setup-fb-24bpp.o
+obj-$(CONFIG_S5PV210_SETUP_FIMC)       += setup-fimc.o
 obj-$(CONFIG_S5PV210_SETUP_I2C1)       += setup-i2c1.o
 obj-$(CONFIG_S5PV210_SETUP_I2C2)       += setup-i2c2.o
 obj-$(CONFIG_S5PV210_SETUP_IDE)                += setup-ide.o
index 4c45b74def5f0fb5063edf1a7bcbea615f54099b..78925c5163469f380d7c057625285c5c21570da9 100644 (file)
 #define S5P_OM_STAT            S5P_CLKREG(0xE100)
 #define S5P_USB_PHY_CONTROL    S5P_CLKREG(0xE80C)
 #define S5P_DAC_CONTROL                S5P_CLKREG(0xE810)
+#define S5P_MIPI_DPHY_CONTROL(x) S5P_CLKREG(0xE814)
+#define S5P_MIPI_DPHY_ENABLE   (1 << 0)
+#define S5P_MIPI_DPHY_SRESETN  (1 << 1)
+#define S5P_MIPI_DPHY_MRESETN  (1 << 2)
 
 #define S5P_INFORM0            S5P_CLKREG(0xF000)
 #define S5P_INFORM1            S5P_CLKREG(0xF004)
 #define S5P_MDNIE_SEL          S5P_CLKREG(0x7008)
 #define S5P_MIPI_PHY_CON0      S5P_CLKREG(0x7200)
 #define S5P_MIPI_PHY_CON1      S5P_CLKREG(0x7204)
-#define S5P_MIPI_DPHY_CONTROL  S5P_CLKREG(0xE814)
 
 #define S5P_IDLE_CFG_TL_MASK   (3 << 30)
 #define S5P_IDLE_CFG_TM_MASK   (3 << 28)
index 557add4fc56cdad3d8d953733c25c73844e6d9c8..4e1d8ff5ae59f8c5f294a5e965e3de29ae592250 100644 (file)
@@ -39,6 +39,7 @@
 #include <plat/fb.h>
 #include <plat/fimc-core.h>
 #include <plat/sdhci.h>
+#include <plat/s5p-time.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define AQUILA_UCON_DEFAULT    (S3C2410_UCON_TXILEVEL |        \
@@ -296,13 +297,11 @@ static struct regulator_init_data aquila_ldo17_data = {
 };
 
 /* BUCK */
-static struct regulator_consumer_supply buck1_consumer[] = {
-       {       .supply = "vddarm", },
-};
+static struct regulator_consumer_supply buck1_consumer =
+       REGULATOR_SUPPLY("vddarm", NULL);
 
-static struct regulator_consumer_supply buck2_consumer[] = {
-       {       .supply = "vddint", },
-};
+static struct regulator_consumer_supply buck2_consumer =
+       REGULATOR_SUPPLY("vddint", NULL);
 
 static struct regulator_init_data aquila_buck1_data = {
        .constraints    = {
@@ -313,8 +312,8 @@ static struct regulator_init_data aquila_buck1_data = {
                .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
                                  REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = ARRAY_SIZE(buck1_consumer),
-       .consumer_supplies      = buck1_consumer,
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &buck1_consumer,
 };
 
 static struct regulator_init_data aquila_buck2_data = {
@@ -326,8 +325,8 @@ static struct regulator_init_data aquila_buck2_data = {
                .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
                                  REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = ARRAY_SIZE(buck2_consumer),
-       .consumer_supplies      = buck2_consumer,
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &buck2_consumer,
 };
 
 static struct regulator_init_data aquila_buck3_data = {
@@ -391,26 +390,14 @@ static struct max8998_platform_data aquila_max8998_pdata = {
 #endif
 
 static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = {
-       {
-               .dev_name       = "5-001a",
-               .supply         = "DBVDD",
-       }, {
-               .dev_name       = "5-001a",
-               .supply         = "AVDD2",
-       }, {
-               .dev_name       = "5-001a",
-               .supply         = "CPVDD",
-       },
+       REGULATOR_SUPPLY("DBVDD", "5-001a"),
+       REGULATOR_SUPPLY("AVDD2", "5-001a"),
+       REGULATOR_SUPPLY("CPVDD", "5-001a"),
 };
 
 static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = {
-       {
-               .dev_name       = "5-001a",
-               .supply         = "SPKVDD1",
-       }, {
-               .dev_name       = "5-001a",
-               .supply         = "SPKVDD2",
-       },
+       REGULATOR_SUPPLY("SPKVDD1", "5-001a"),
+       REGULATOR_SUPPLY("SPKVDD2", "5-001a"),
 };
 
 static struct regulator_init_data wm8994_fixed_voltage0_init_data = {
@@ -459,15 +446,11 @@ static struct platform_device wm8994_fixed_voltage1 = {
        },
 };
 
-static struct regulator_consumer_supply wm8994_avdd1_supply = {
-       .dev_name       = "5-001a",
-       .supply         = "AVDD1",
-};
+static struct regulator_consumer_supply wm8994_avdd1_supply =
+       REGULATOR_SUPPLY("AVDD1", "5-001a");
 
-static struct regulator_consumer_supply wm8994_dcvdd_supply = {
-       .dev_name       = "5-001a",
-       .supply         = "DCVDD",
-};
+static struct regulator_consumer_supply wm8994_dcvdd_supply =
+       REGULATOR_SUPPLY("DCVDD", "5-001a");
 
 static struct regulator_init_data wm8994_ldo1_data = {
        .constraints    = {
@@ -664,6 +647,7 @@ static void __init aquila_map_io(void)
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
        s3c24xx_init_clocks(24000000);
        s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs));
+       s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
 static void __init aquila_machine_init(void)
@@ -698,5 +682,5 @@ MACHINE_START(AQUILA, "Aquila")
        .init_irq       = s5pv210_init_irq,
        .map_io         = aquila_map_io,
        .init_machine   = aquila_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
index 056f5c769b0a262e71575241a2e2f7350052616d..243291722c667484a22ec85337cc17b3f521f89e 100644 (file)
@@ -45,6 +45,7 @@
 #include <plat/keypad.h>
 #include <plat/sdhci.h>
 #include <plat/clock.h>
+#include <plat/s5p-time.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define GONI_UCON_DEFAULT      (S3C2410_UCON_TXILEVEL |        \
@@ -108,6 +109,8 @@ static struct s3c_fb_pd_win goni_fb_win0 = {
        },
        .max_bpp        = 32,
        .default_bpp    = 16,
+       .virtual_x      = 480,
+       .virtual_y      = 2 * 800,
 };
 
 static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
@@ -269,10 +272,30 @@ static void __init goni_tsp_init(void)
 /* MAX8998 regulators */
 #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
 
+static struct regulator_consumer_supply goni_ldo3_consumers[] = {
+       REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
+};
+
 static struct regulator_consumer_supply goni_ldo5_consumers[] = {
        REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
 };
 
+static struct regulator_consumer_supply goni_ldo8_consumers[] = {
+       REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
+};
+
+static struct regulator_consumer_supply goni_ldo11_consumers[] = {
+       REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */
+};
+
+static struct regulator_consumer_supply goni_ldo13_consumers[] = {
+       REGULATOR_SUPPLY("vdda", "0-0030"), /* "CAM_A_2.8V" */
+};
+
+static struct regulator_consumer_supply goni_ldo14_consumers[] = {
+       REGULATOR_SUPPLY("vdd_core", "0-0030"), /* "CAM_CIF_1.8V" */
+};
+
 static struct regulator_init_data goni_ldo2_data = {
        .constraints    = {
                .name           = "VALIVE_1.1V",
@@ -292,8 +315,10 @@ static struct regulator_init_data goni_ldo3_data = {
                .min_uV         = 1100000,
                .max_uV         = 1100000,
                .apply_uV       = 1,
-               .always_on      = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies = ARRAY_SIZE(goni_ldo3_consumers),
+       .consumer_supplies = goni_ldo3_consumers,
 };
 
 static struct regulator_init_data goni_ldo4_data = {
@@ -311,6 +336,7 @@ static struct regulator_init_data goni_ldo5_data = {
                .min_uV         = 2800000,
                .max_uV         = 2800000,
                .apply_uV       = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
        .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers),
        .consumer_supplies = goni_ldo5_consumers,
@@ -341,8 +367,10 @@ static struct regulator_init_data goni_ldo8_data = {
                .min_uV         = 3300000,
                .max_uV         = 3300000,
                .apply_uV       = 1,
-               .always_on      = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies = ARRAY_SIZE(goni_ldo8_consumers),
+       .consumer_supplies = goni_ldo8_consumers,
 };
 
 static struct regulator_init_data goni_ldo9_data = {
@@ -351,7 +379,6 @@ static struct regulator_init_data goni_ldo9_data = {
                .min_uV         = 2800000,
                .max_uV         = 2800000,
                .apply_uV       = 1,
-               .always_on      = 1,
        },
 };
 
@@ -371,8 +398,10 @@ static struct regulator_init_data goni_ldo11_data = {
                .min_uV         = 2800000,
                .max_uV         = 2800000,
                .apply_uV       = 1,
-               .always_on      = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = ARRAY_SIZE(goni_ldo11_consumers),
+       .consumer_supplies      = goni_ldo11_consumers,
 };
 
 static struct regulator_init_data goni_ldo12_data = {
@@ -381,7 +410,6 @@ static struct regulator_init_data goni_ldo12_data = {
                .min_uV         = 1200000,
                .max_uV         = 1200000,
                .apply_uV       = 1,
-               .always_on      = 1,
        },
 };
 
@@ -391,8 +419,10 @@ static struct regulator_init_data goni_ldo13_data = {
                .min_uV         = 2800000,
                .max_uV         = 2800000,
                .apply_uV       = 1,
-               .always_on      = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = ARRAY_SIZE(goni_ldo13_consumers),
+       .consumer_supplies      = goni_ldo13_consumers,
 };
 
 static struct regulator_init_data goni_ldo14_data = {
@@ -401,8 +431,10 @@ static struct regulator_init_data goni_ldo14_data = {
                .min_uV         = 1800000,
                .max_uV         = 1800000,
                .apply_uV       = 1,
-               .always_on      = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = ARRAY_SIZE(goni_ldo14_consumers),
+       .consumer_supplies      = goni_ldo14_consumers,
 };
 
 static struct regulator_init_data goni_ldo15_data = {
@@ -411,7 +443,6 @@ static struct regulator_init_data goni_ldo15_data = {
                .min_uV         = 3300000,
                .max_uV         = 3300000,
                .apply_uV       = 1,
-               .always_on      = 1,
        },
 };
 
@@ -421,7 +452,6 @@ static struct regulator_init_data goni_ldo16_data = {
                .min_uV         = 1800000,
                .max_uV         = 1800000,
                .apply_uV       = 1,
-               .always_on      = 1,
        },
 };
 
@@ -436,13 +466,11 @@ static struct regulator_init_data goni_ldo17_data = {
 };
 
 /* BUCK */
-static struct regulator_consumer_supply buck1_consumer[] = {
-       {       .supply = "vddarm", },
-};
+static struct regulator_consumer_supply buck1_consumer =
+       REGULATOR_SUPPLY("vddarm", NULL);
 
-static struct regulator_consumer_supply buck2_consumer[] = {
-       {       .supply = "vddint", },
-};
+static struct regulator_consumer_supply buck2_consumer =
+       REGULATOR_SUPPLY("vddint", NULL);
 
 static struct regulator_init_data goni_buck1_data = {
        .constraints    = {
@@ -453,8 +481,8 @@ static struct regulator_init_data goni_buck1_data = {
                .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
                                  REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = ARRAY_SIZE(buck1_consumer),
-       .consumer_supplies      = buck1_consumer,
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &buck1_consumer,
 };
 
 static struct regulator_init_data goni_buck2_data = {
@@ -466,8 +494,8 @@ static struct regulator_init_data goni_buck2_data = {
                .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
                                  REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = ARRAY_SIZE(buck2_consumer),
-       .consumer_supplies      = buck2_consumer,
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &buck2_consumer,
 };
 
 static struct regulator_init_data goni_buck3_data = {
@@ -531,26 +559,14 @@ static struct max8998_platform_data goni_max8998_pdata = {
 #endif
 
 static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = {
-       {
-               .dev_name       = "5-001a",
-               .supply         = "DBVDD",
-       }, {
-               .dev_name       = "5-001a",
-               .supply         = "AVDD2",
-       }, {
-               .dev_name       = "5-001a",
-               .supply         = "CPVDD",
-       },
+       REGULATOR_SUPPLY("DBVDD", "5-001a"),
+       REGULATOR_SUPPLY("AVDD2", "5-001a"),
+       REGULATOR_SUPPLY("CPVDD", "5-001a"),
 };
 
 static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = {
-       {
-               .dev_name       = "5-001a",
-               .supply         = "SPKVDD1",
-       }, {
-               .dev_name       = "5-001a",
-               .supply         = "SPKVDD2",
-       },
+       REGULATOR_SUPPLY("SPKVDD1", "5-001a"),
+       REGULATOR_SUPPLY("SPKVDD2", "5-001a"),
 };
 
 static struct regulator_init_data wm8994_fixed_voltage0_init_data = {
@@ -599,15 +615,11 @@ static struct platform_device wm8994_fixed_voltage1 = {
        },
 };
 
-static struct regulator_consumer_supply wm8994_avdd1_supply = {
-       .dev_name       = "5-001a",
-       .supply         = "AVDD1",
-};
+static struct regulator_consumer_supply wm8994_avdd1_supply =
+       REGULATOR_SUPPLY("AVDD1", "5-001a");
 
-static struct regulator_consumer_supply wm8994_dcvdd_supply = {
-       .dev_name       = "5-001a",
-       .supply         = "DCVDD",
-};
+static struct regulator_consumer_supply wm8994_dcvdd_supply =
+       REGULATOR_SUPPLY("DCVDD", "5-001a");
 
 static struct regulator_init_data wm8994_ldo1_data = {
        .constraints    = {
@@ -794,6 +806,7 @@ static struct platform_device *goni_devices[] __initdata = {
        &goni_i2c_gpio5,
        &mmc2_fixed_voltage,
        &goni_device_gpiokeys,
+       &s3c_device_i2c0,
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s5p_device_fimc2,
@@ -823,6 +836,7 @@ static void __init goni_map_io(void)
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
        s3c24xx_init_clocks(24000000);
        s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs));
+       s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
 static void __init goni_machine_init(void)
@@ -830,6 +844,9 @@ static void __init goni_machine_init(void)
        /* Radio: call before I2C 1 registeration */
        goni_radio_init();
 
+       /* I2C0 */
+       s3c_i2c0_set_platdata(NULL);
+
        /* I2C1 */
        s3c_i2c1_set_platdata(NULL);
        i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
@@ -873,5 +890,5 @@ MACHINE_START(GONI, "GONI")
        .init_irq       = s5pv210_init_irq,
        .map_io         = goni_map_io,
        .init_machine   = goni_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
index ce11a02eabf3faaac102f6135899e4477ccc2e06..6c412c8ceccc2949ec71d15fecc39125643a7927 100644 (file)
@@ -30,6 +30,7 @@
 #include <plat/ata.h>
 #include <plat/iic.h>
 #include <plat/pm.h>
+#include <plat/s5p-time.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define SMDKC110_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
@@ -111,6 +112,7 @@ static void __init smdkc110_map_io(void)
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
        s3c24xx_init_clocks(24000000);
        s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
+       s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
 static void __init smdkc110_machine_init(void)
@@ -138,5 +140,5 @@ MACHINE_START(SMDKC110, "SMDKC110")
        .init_irq       = s5pv210_init_irq,
        .map_io         = smdkc110_map_io,
        .init_machine   = smdkc110_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
index bc9fdb52a020c9f09c45bf30fc9baaf9ead5a54a..bc08ac42e7cc7bcd41b29d46cf7837656b236c9c 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,8 @@
 #include <plat/keypad.h>
 #include <plat/pm.h>
 #include <plat/fb.h>
+#include <plat/gpio-cfg.h>
+#include <plat/s5p-time.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define SMDKV210_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
@@ -208,6 +211,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 +271,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)
@@ -272,6 +316,7 @@ static void __init smdkv210_map_io(void)
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
        s3c24xx_init_clocks(24000000);
        s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
+       s5p_set_timer_source(S5P_PWM2, S5P_PWM4);
 }
 
 static void __init smdkv210_machine_init(void)
@@ -306,5 +351,5 @@ MACHINE_START(SMDKV210, "SMDKV210")
        .init_irq       = s5pv210_init_irq,
        .map_io         = smdkv210_map_io,
        .init_machine   = smdkv210_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
index 043c938806b071aed8147dff7e3a60ce0844c38d..925fc0dc62529046e88082c247b0976b06a6d316 100644 (file)
@@ -27,6 +27,7 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/iic.h>
+#include <plat/s5p-time.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define TORBRECK_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
@@ -104,6 +105,7 @@ static void __init torbreck_map_io(void)
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
        s3c24xx_init_clocks(24000000);
        s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs));
+       s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
 }
 
 static void __init torbreck_machine_init(void)
@@ -127,5 +129,5 @@ MACHINE_START(TORBRECK, "TORBRECK")
        .init_irq       = s5pv210_init_irq,
        .map_io         = torbreck_map_io,
        .init_machine   = torbreck_machine_init,
-       .timer          = &s3c24xx_timer,
+       .timer          = &s5p_timer,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv210/setup-fimc.c b/arch/arm/mach-s5pv210/setup-fimc.c
new file mode 100644 (file)
index 0000000..54cc5b1
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics Co., Ltd.
+ *
+ * S5PV210 camera interface GPIO configuration.
+ *
+ * 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/gpio.h>
+#include <plat/gpio-cfg.h>
+#include <plat/camport.h>
+
+int s5pv210_fimc_setup_gpio(enum s5p_camport_id id)
+{
+       u32 gpio8, gpio5;
+       int ret;
+
+       switch (id) {
+       case S5P_CAMPORT_A:
+               gpio8 = S5PV210_GPE0(0);
+               gpio5 = S5PV210_GPE1(0);
+               break;
+
+       case S5P_CAMPORT_B:
+               gpio8 = S5PV210_GPJ0(0);
+               gpio5 = S5PV210_GPJ1(0);
+               break;
+
+       default:
+               WARN(1, "Wrong camport id: %d\n", id);
+               return -EINVAL;
+       }
+
+       ret = s3c_gpio_cfgall_range(gpio8, 8, S3C_GPIO_SFN(2),
+                                   S3C_GPIO_PULL_UP);
+       if (ret)
+               return ret;
+
+       return s3c_gpio_cfgall_range(gpio5, 5, S3C_GPIO_SFN(2),
+                                    S3C_GPIO_PULL_UP);
+}
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 6390ac728b35723c89effcfc93cc93e6c976acd3..849229716586c152a2ac1ebee0533e685f97c9ca 100644 (file)
@@ -37,6 +37,11 @@ config S5P_GPIO_INT
        help
          Common code for the GPIO interrupts (other than external interrupts.)
 
+config S5P_HRT
+       bool
+       help
+         Use the High Resolution timer support
+
 comment "System MMU"
 
 config S5P_SYSTEM_MMU
@@ -60,6 +65,11 @@ config S5P_DEV_FIMC2
        help
          Compile in platform device definitions for FIMC controller 2
 
+config S5P_DEV_FIMC3
+       bool
+       help
+         Compile in platform device definitions for FIMC controller 3
+
 config S5P_DEV_ONENAND
        bool
        help
@@ -74,3 +84,8 @@ config S5P_DEV_CSIS1
        bool
        help
          Compile in platform device definitions for MIPI-CSIS channel 1
+
+config S5P_SETUP_MIPIPHY
+       bool
+       help
+         Compile in common setup code for MIPI-CSIS and MIPI-DSIM devices
index 4bd5cf908977382a8c15562ab1b664cf2edf4a00..42afff7f60be01eaefa05335caa80387b4b6a9ef 100644 (file)
@@ -22,12 +22,15 @@ obj-$(CONFIG_S5P_GPIO_INT)  += irq-gpioint.o
 obj-$(CONFIG_S5P_SYSTEM_MMU)   += sysmmu.o
 obj-$(CONFIG_PM)               += pm.o
 obj-$(CONFIG_PM)               += irq-pm.o
+obj-$(CONFIG_S5P_HRT)          += s5p-time.o
 
 # devices
 
 obj-$(CONFIG_S5P_DEV_FIMC0)    += dev-fimc0.o
 obj-$(CONFIG_S5P_DEV_FIMC1)    += dev-fimc1.o
 obj-$(CONFIG_S5P_DEV_FIMC2)    += dev-fimc2.o
+obj-$(CONFIG_S5P_DEV_FIMC3)    += dev-fimc3.o
 obj-$(CONFIG_S5P_DEV_ONENAND)  += dev-onenand.o
 obj-$(CONFIG_S5P_DEV_CSIS0)    += dev-csis0.o
 obj-$(CONFIG_S5P_DEV_CSIS1)    += dev-csis1.o
+obj-$(CONFIG_S5P_SETUP_MIPIPHY)        += setup-mipiphy.o
index dfab1c85f54f103a4ba0e69c7c17fd5156748ef2..e3aabef5e347604ba165bf5b1afd614ebb6a896c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Samsung Electronics
+ * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
  *
  * S5P series device definition for MIPI-CSIS channel 0
  *
index e3053f27fbbf86a85b63459055545317cc414fc6..08b91b580207f04cc208cb6e747b86781708a7a5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Samsung Electronics
+ * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
  *
  * S5P series device definition for MIPI-CSIS channel 1
  *
diff --git a/arch/arm/plat-s5p/dev-fimc3.c b/arch/arm/plat-s5p/dev-fimc3.c
new file mode 100644 (file)
index 0000000..ef31bec
--- /dev/null
@@ -0,0 +1,43 @@
+/* linux/arch/arm/plat-s5p/dev-fimc3.c
+ *
+ * Copyright (c) 2010 Samsung Electronics
+ *
+ * Base S5P FIMC3 resource and device definitions
+ *
+ * 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/dma-mapping.h>
+#include <linux/platform_device.h>
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+#include <mach/map.h>
+
+static struct resource s5p_fimc3_resource[] = {
+       [0] = {
+               .start  = S5P_PA_FIMC3,
+               .end    = S5P_PA_FIMC3 + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_FIMC3,
+               .end    = IRQ_FIMC3,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static u64 s5p_fimc3_dma_mask = DMA_BIT_MASK(32);
+
+struct platform_device s5p_device_fimc3 = {
+       .name           = "s5p-fimc",
+       .id             = 3,
+       .num_resources  = ARRAY_SIZE(s5p_fimc3_resource),
+       .resource       = s5p_fimc3_resource,
+       .dev            = {
+               .dma_mask               = &s5p_fimc3_dma_mask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       },
+};
diff --git a/arch/arm/plat-s5p/include/plat/camport.h b/arch/arm/plat-s5p/include/plat/camport.h
new file mode 100644 (file)
index 0000000..71688c8
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics Co., Ltd.
+ *
+ * S5P series camera interface helper functions
+ *
+ * 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.
+ */
+
+#ifndef PLAT_S5P_CAMPORT_H_
+#define PLAT_S5P_CAMPORT_H_ __FILE__
+
+enum s5p_camport_id {
+       S5P_CAMPORT_A,
+       S5P_CAMPORT_B,
+};
+
+/*
+ * The helper functions to configure GPIO for the camera parallel bus.
+ * The camera port can be multiplexed with any FIMC entity, even multiple
+ * FIMC entities are allowed to be attached to a single port simultaneously.
+ * These functions are to be used in the board setup code.
+ */
+int s5pv210_fimc_setup_gpio(enum s5p_camport_id id);
+int exynos4_fimc_setup_gpio(enum s5p_camport_id id);
+
+#endif
diff --git a/arch/arm/plat-s5p/include/plat/csis.h b/arch/arm/plat-s5p/include/plat/csis.h
deleted file mode 100644 (file)
index 51e308c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2010 Samsung Electronics
- *
- * S5P series MIPI CSI slave device support
- *
- * 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.
- */
-
-#ifndef PLAT_S5P_CSIS_H_
-#define PLAT_S5P_CSIS_H_ __FILE__
-
-/**
- * struct s5p_platform_mipi_csis - platform data for MIPI-CSIS
- * @clk_rate: bus clock frequency
- * @lanes: number of data lanes used
- * @alignment: data alignment in bits
- * @hs_settle: HS-RX settle time
- */
-struct s5p_platform_mipi_csis {
-       unsigned long clk_rate;
-       u8 lanes;
-       u8 alignment;
-       u8 hs_settle;
-};
-
-#endif /* PLAT_S5P_CSIS_H_ */
diff --git a/arch/arm/plat-s5p/include/plat/mipi_csis.h b/arch/arm/plat-s5p/include/plat/mipi_csis.h
new file mode 100644 (file)
index 0000000..9bd254c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
+ *
+ * S5P series MIPI CSI slave device support
+ *
+ * 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.
+ */
+
+#ifndef PLAT_S5P_MIPI_CSIS_H_
+#define PLAT_S5P_MIPI_CSIS_H_ __FILE__
+
+struct platform_device;
+
+/**
+ * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
+ * @clk_rate: bus clock frequency
+ * @lanes: number of data lanes used
+ * @alignment: data alignment in bits
+ * @hs_settle: HS-RX settle time
+ * @fixed_phy_vdd: false to enable external D-PHY regulator management in the
+ *                driver or true in case this regulator has no enable function
+ * @phy_enable: pointer to a callback controlling D-PHY enable/reset
+ */
+struct s5p_platform_mipi_csis {
+       unsigned long clk_rate;
+       u8 lanes;
+       u8 alignment;
+       u8 hs_settle;
+       bool fixed_phy_vdd;
+       int (*phy_enable)(struct platform_device *pdev, bool on);
+};
+
+/**
+ * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control
+ * @pdev: MIPI-CSIS platform device
+ * @on: true to enable D-PHY and deassert its reset
+ *     false to disable D-PHY
+ */
+int s5p_csis_phy_enable(struct platform_device *pdev, bool on);
+
+#endif /* PLAT_S5P_MIPI_CSIS_H_ */
diff --git a/arch/arm/plat-s5p/include/plat/s5p-time.h b/arch/arm/plat-s5p/include/plat/s5p-time.h
new file mode 100644 (file)
index 0000000..575e881
--- /dev/null
@@ -0,0 +1,40 @@
+/* linux/arch/arm/plat-s5p/include/plat/s5p-time.h
+ *
+ * Copyright 2011 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com/
+ *
+ * Header file for s5p time support
+ *
+ * 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.
+*/
+
+#ifndef __ASM_PLAT_S5P_TIME_H
+#define __ASM_PLAT_S5P_TIME_H __FILE__
+
+/* S5P HR-Timer Clock mode */
+enum s5p_timer_mode {
+       S5P_PWM0,
+       S5P_PWM1,
+       S5P_PWM2,
+       S5P_PWM3,
+       S5P_PWM4,
+};
+
+struct s5p_timer_source {
+       unsigned int event_id;
+       unsigned int source_id;
+};
+
+/* Be able to sleep for atleast 4 seconds (usually more) */
+#define S5PTIMER_MIN_RANGE     4
+
+#define TCNT_MAX               0xffffffff
+#define NON_PERIODIC           0
+#define PERIODIC               1
+
+extern void __init s5p_set_timer_source(enum s5p_timer_mode event,
+                                       enum s5p_timer_mode source);
+extern struct sys_timer s5p_timer;
+#endif /* __ASM_PLAT_S5P_TIME_H */
diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c
new file mode 100644 (file)
index 0000000..8090403
--- /dev/null
@@ -0,0 +1,448 @@
+/* linux/arch/arm/plat-s5p/s5p-time.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com/
+ *
+ * S5P - Common hr-timer support
+ *
+ * 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/sched.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/clockchips.h>
+#include <linux/platform_device.h>
+
+#include <asm/smp_twd.h>
+#include <asm/mach/time.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/sched_clock.h>
+
+#include <mach/map.h>
+#include <plat/devs.h>
+#include <plat/regs-timer.h>
+#include <plat/s5p-time.h>
+
+static struct clk *tin_event;
+static struct clk *tin_source;
+static struct clk *tdiv_event;
+static struct clk *tdiv_source;
+static struct clk *timerclk;
+static struct s5p_timer_source timer_source;
+static unsigned long clock_count_per_tick;
+static void s5p_timer_resume(void);
+
+static void s5p_time_stop(enum s5p_timer_mode mode)
+{
+       unsigned long tcon;
+
+       tcon = __raw_readl(S3C2410_TCON);
+
+       switch (mode) {
+       case S5P_PWM0:
+               tcon &= ~S3C2410_TCON_T0START;
+               break;
+
+       case S5P_PWM1:
+               tcon &= ~S3C2410_TCON_T1START;
+               break;
+
+       case S5P_PWM2:
+               tcon &= ~S3C2410_TCON_T2START;
+               break;
+
+       case S5P_PWM3:
+               tcon &= ~S3C2410_TCON_T3START;
+               break;
+
+       case S5P_PWM4:
+               tcon &= ~S3C2410_TCON_T4START;
+               break;
+
+       default:
+               printk(KERN_ERR "Invalid Timer %d\n", mode);
+               break;
+       }
+       __raw_writel(tcon, S3C2410_TCON);
+}
+
+static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt)
+{
+       unsigned long tcon;
+
+       tcon = __raw_readl(S3C2410_TCON);
+
+       tcnt--;
+
+       switch (mode) {
+       case S5P_PWM0:
+               tcon &= ~(0x0f << 0);
+               tcon |= S3C2410_TCON_T0MANUALUPD;
+               break;
+
+       case S5P_PWM1:
+               tcon &= ~(0x0f << 8);
+               tcon |= S3C2410_TCON_T1MANUALUPD;
+               break;
+
+       case S5P_PWM2:
+               tcon &= ~(0x0f << 12);
+               tcon |= S3C2410_TCON_T2MANUALUPD;
+               break;
+
+       case S5P_PWM3:
+               tcon &= ~(0x0f << 16);
+               tcon |= S3C2410_TCON_T3MANUALUPD;
+               break;
+
+       case S5P_PWM4:
+               tcon &= ~(0x07 << 20);
+               tcon |= S3C2410_TCON_T4MANUALUPD;
+               break;
+
+       default:
+               printk(KERN_ERR "Invalid Timer %d\n", mode);
+               break;
+       }
+
+       __raw_writel(tcnt, S3C2410_TCNTB(mode));
+       __raw_writel(tcnt, S3C2410_TCMPB(mode));
+       __raw_writel(tcon, S3C2410_TCON);
+}
+
+static void s5p_time_start(enum s5p_timer_mode mode, bool periodic)
+{
+       unsigned long tcon;
+
+       tcon  = __raw_readl(S3C2410_TCON);
+
+       switch (mode) {
+       case S5P_PWM0:
+               tcon |= S3C2410_TCON_T0START;
+               tcon &= ~S3C2410_TCON_T0MANUALUPD;
+
+               if (periodic)
+                       tcon |= S3C2410_TCON_T0RELOAD;
+               else
+                       tcon &= ~S3C2410_TCON_T0RELOAD;
+               break;
+
+       case S5P_PWM1:
+               tcon |= S3C2410_TCON_T1START;
+               tcon &= ~S3C2410_TCON_T1MANUALUPD;
+
+               if (periodic)
+                       tcon |= S3C2410_TCON_T1RELOAD;
+               else
+                       tcon &= ~S3C2410_TCON_T1RELOAD;
+               break;
+
+       case S5P_PWM2:
+               tcon |= S3C2410_TCON_T2START;
+               tcon &= ~S3C2410_TCON_T2MANUALUPD;
+
+               if (periodic)
+                       tcon |= S3C2410_TCON_T2RELOAD;
+               else
+                       tcon &= ~S3C2410_TCON_T2RELOAD;
+               break;
+
+       case S5P_PWM3:
+               tcon |= S3C2410_TCON_T3START;
+               tcon &= ~S3C2410_TCON_T3MANUALUPD;
+
+               if (periodic)
+                       tcon |= S3C2410_TCON_T3RELOAD;
+               else
+                       tcon &= ~S3C2410_TCON_T3RELOAD;
+               break;
+
+       case S5P_PWM4:
+               tcon |= S3C2410_TCON_T4START;
+               tcon &= ~S3C2410_TCON_T4MANUALUPD;
+
+               if (periodic)
+                       tcon |= S3C2410_TCON_T4RELOAD;
+               else
+                       tcon &= ~S3C2410_TCON_T4RELOAD;
+               break;
+
+       default:
+               printk(KERN_ERR "Invalid Timer %d\n", mode);
+               break;
+       }
+       __raw_writel(tcon, S3C2410_TCON);
+}
+
+static int s5p_set_next_event(unsigned long cycles,
+                               struct clock_event_device *evt)
+{
+       s5p_time_setup(timer_source.event_id, cycles);
+       s5p_time_start(timer_source.event_id, NON_PERIODIC);
+
+       return 0;
+}
+
+static void s5p_set_mode(enum clock_event_mode mode,
+                               struct clock_event_device *evt)
+{
+       s5p_time_stop(timer_source.event_id);
+
+       switch (mode) {
+       case CLOCK_EVT_MODE_PERIODIC:
+               s5p_time_setup(timer_source.event_id, clock_count_per_tick);
+               s5p_time_start(timer_source.event_id, PERIODIC);
+               break;
+
+       case CLOCK_EVT_MODE_ONESHOT:
+               break;
+
+       case CLOCK_EVT_MODE_UNUSED:
+       case CLOCK_EVT_MODE_SHUTDOWN:
+               break;
+
+       case CLOCK_EVT_MODE_RESUME:
+               s5p_timer_resume();
+               break;
+       }
+}
+
+static void s5p_timer_resume(void)
+{
+       /* event timer restart */
+       s5p_time_setup(timer_source.event_id, clock_count_per_tick);
+       s5p_time_start(timer_source.event_id, PERIODIC);
+
+       /* source timer restart */
+       s5p_time_setup(timer_source.source_id, TCNT_MAX);
+       s5p_time_start(timer_source.source_id, PERIODIC);
+}
+
+void __init s5p_set_timer_source(enum s5p_timer_mode event,
+                                enum s5p_timer_mode source)
+{
+       s3c_device_timer[event].dev.bus = &platform_bus_type;
+       s3c_device_timer[source].dev.bus = &platform_bus_type;
+
+       timer_source.event_id = event;
+       timer_source.source_id = source;
+}
+
+static struct clock_event_device time_event_device = {
+       .name           = "s5p_event_timer",
+       .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
+       .rating         = 200,
+       .set_next_event = s5p_set_next_event,
+       .set_mode       = s5p_set_mode,
+};
+
+static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id)
+{
+       struct clock_event_device *evt = dev_id;
+
+       evt->event_handler(evt);
+
+       return IRQ_HANDLED;
+}
+
+static struct irqaction s5p_clock_event_irq = {
+       .name           = "s5p_time_irq",
+       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+       .handler        = s5p_clock_event_isr,
+       .dev_id         = &time_event_device,
+};
+
+static void __init s5p_clockevent_init(void)
+{
+       unsigned long pclk;
+       unsigned long clock_rate;
+       unsigned int irq_number;
+       struct clk *tscaler;
+
+       pclk = clk_get_rate(timerclk);
+
+       tscaler = clk_get_parent(tdiv_event);
+
+       clk_set_rate(tscaler, pclk / 2);
+       clk_set_rate(tdiv_event, pclk / 2);
+       clk_set_parent(tin_event, tdiv_event);
+
+       clock_rate = clk_get_rate(tin_event);
+       clock_count_per_tick = clock_rate / HZ;
+
+       clockevents_calc_mult_shift(&time_event_device,
+                                   clock_rate, S5PTIMER_MIN_RANGE);
+       time_event_device.max_delta_ns =
+               clockevent_delta2ns(-1, &time_event_device);
+       time_event_device.min_delta_ns =
+               clockevent_delta2ns(1, &time_event_device);
+
+       time_event_device.cpumask = cpumask_of(0);
+       clockevents_register_device(&time_event_device);
+
+       irq_number = timer_source.event_id + IRQ_TIMER0;
+       setup_irq(irq_number, &s5p_clock_event_irq);
+}
+
+static cycle_t s5p_timer_read(struct clocksource *cs)
+{
+       unsigned long offset = 0;
+
+       switch (timer_source.source_id) {
+       case S5P_PWM0:
+       case S5P_PWM1:
+       case S5P_PWM2:
+       case S5P_PWM3:
+               offset = (timer_source.source_id * 0x0c) + 0x14;
+               break;
+
+       case S5P_PWM4:
+               offset = 0x40;
+               break;
+
+       default:
+               printk(KERN_ERR "Invalid Timer %d\n", timer_source.source_id);
+               return 0;
+       }
+
+       return (cycle_t) ~__raw_readl(S3C_TIMERREG(offset));
+}
+
+/*
+ * Override the global weak sched_clock symbol with this
+ * local implementation which uses the clocksource to get some
+ * better resolution when scheduling the kernel. We accept that
+ * this wraps around for now, since it is just a relative time
+ * stamp. (Inspired by U300 implementation.)
+ */
+static DEFINE_CLOCK_DATA(cd);
+
+unsigned long long notrace sched_clock(void)
+{
+       u32 cyc;
+       unsigned long offset = 0;
+
+       switch (timer_source.source_id) {
+       case S5P_PWM0:
+       case S5P_PWM1:
+       case S5P_PWM2:
+       case S5P_PWM3:
+               offset = (timer_source.source_id * 0x0c) + 0x14;
+               break;
+
+       case S5P_PWM4:
+               offset = 0x40;
+               break;
+
+       default:
+               printk(KERN_ERR "Invalid Timer %d\n", timer_source.source_id);
+               return 0;
+       }
+
+       cyc = ~__raw_readl(S3C_TIMERREG(offset));
+       return cyc_to_sched_clock(&cd, cyc, (u32)~0);
+}
+
+static void notrace s5p_update_sched_clock(void)
+{
+       u32 cyc;
+       unsigned long offset = 0;
+
+       switch (timer_source.source_id) {
+       case S5P_PWM0:
+       case S5P_PWM1:
+       case S5P_PWM2:
+       case S5P_PWM3:
+               offset = (timer_source.source_id * 0x0c) + 0x14;
+               break;
+
+       case S5P_PWM4:
+               offset = 0x40;
+               break;
+
+       default:
+               printk(KERN_ERR "Invalid Timer %d\n", timer_source.source_id);
+       }
+
+       cyc = ~__raw_readl(S3C_TIMERREG(offset));
+       update_sched_clock(&cd, cyc, (u32)~0);
+}
+
+struct clocksource time_clocksource = {
+       .name           = "s5p_clocksource_timer",
+       .rating         = 250,
+       .read           = s5p_timer_read,
+       .mask           = CLOCKSOURCE_MASK(32),
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
+static void __init s5p_clocksource_init(void)
+{
+       unsigned long pclk;
+       unsigned long clock_rate;
+
+       pclk = clk_get_rate(timerclk);
+
+       clk_set_rate(tdiv_source, pclk / 2);
+       clk_set_parent(tin_source, tdiv_source);
+
+       clock_rate = clk_get_rate(tin_source);
+
+       init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate);
+
+       s5p_time_setup(timer_source.source_id, TCNT_MAX);
+       s5p_time_start(timer_source.source_id, PERIODIC);
+
+       if (clocksource_register_hz(&time_clocksource, clock_rate))
+               panic("%s: can't register clocksource\n", time_clocksource.name);
+}
+
+static void __init s5p_timer_resources(void)
+{
+
+       unsigned long event_id = timer_source.event_id;
+       unsigned long source_id = timer_source.source_id;
+
+       timerclk = clk_get(NULL, "timers");
+       if (IS_ERR(timerclk))
+               panic("failed to get timers clock for timer");
+
+       clk_enable(timerclk);
+
+       tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin");
+       if (IS_ERR(tin_event))
+               panic("failed to get pwm-tin clock for event timer");
+
+       tdiv_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tdiv");
+       if (IS_ERR(tdiv_event))
+               panic("failed to get pwm-tdiv clock for event timer");
+
+       clk_enable(tin_event);
+
+       tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin");
+       if (IS_ERR(tin_source))
+               panic("failed to get pwm-tin clock for source timer");
+
+       tdiv_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tdiv");
+       if (IS_ERR(tdiv_source))
+               panic("failed to get pwm-tdiv clock for source timer");
+
+       clk_enable(tin_source);
+}
+
+static void __init s5p_timer_init(void)
+{
+       s5p_timer_resources();
+       s5p_clockevent_init();
+       s5p_clocksource_init();
+}
+
+struct sys_timer s5p_timer = {
+       .init           = s5p_timer_init,
+};
diff --git a/arch/arm/plat-s5p/setup-mipiphy.c b/arch/arm/plat-s5p/setup-mipiphy.c
new file mode 100644 (file)
index 0000000..683c466
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics Co., Ltd.
+ *
+ * S5P - Helper functions for MIPI-CSIS and MIPI-DSIM D-PHY control
+ *
+ * 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 <linux/io.h>
+#include <linux/spinlock.h>
+#include <mach/regs-clock.h>
+
+static int __s5p_mipi_phy_control(struct platform_device *pdev,
+                                 bool on, u32 reset)
+{
+       static DEFINE_SPINLOCK(lock);
+       void __iomem *addr;
+       unsigned long flags;
+       int pid;
+       u32 cfg;
+
+       if (!pdev)
+               return -EINVAL;
+
+       pid = (pdev->id == -1) ? 0 : pdev->id;
+
+       if (pid != 0 && pid != 1)
+               return -EINVAL;
+
+       addr = S5P_MIPI_DPHY_CONTROL(pid);
+
+       spin_lock_irqsave(&lock, flags);
+
+       cfg = __raw_readl(addr);
+       cfg = on ? (cfg | reset) : (cfg & ~reset);
+       __raw_writel(cfg, addr);
+
+       if (on) {
+               cfg |= S5P_MIPI_DPHY_ENABLE;
+       } else if (!(cfg & (S5P_MIPI_DPHY_SRESETN |
+                           S5P_MIPI_DPHY_MRESETN) & ~reset)) {
+               cfg &= ~S5P_MIPI_DPHY_ENABLE;
+       }
+
+       __raw_writel(cfg, addr);
+       spin_unlock_irqrestore(&lock, flags);
+
+       return 0;
+}
+
+int s5p_csis_phy_enable(struct platform_device *pdev, bool on)
+{
+       return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_SRESETN);
+}
+
+int s5p_dsim_phy_enable(struct platform_device *pdev, bool on)
+{
+       return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_MRESETN);
+}
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 e2b3ab997cff82534172626cf977ff87d8386a9c..7231ccf89ebbb72732c2635d23d28d2719bbf2d4 100644 (file)
@@ -136,6 +136,7 @@ extern struct platform_device samsung_device_keypad;
 extern struct platform_device s5p_device_fimc0;
 extern struct platform_device s5p_device_fimc1;
 extern struct platform_device s5p_device_fimc2;
+extern struct platform_device s5p_device_fimc3;
 
 extern struct platform_device s5p_device_mipi_csis0;
 extern struct platform_device s5p_device_mipi_csis1;
index 81a3bfeeccadafc7c45ac44470ac581655d329fd..945a99d59563999829bf6942928c1748c00d78fa 100644 (file)
@@ -37,6 +37,11 @@ static inline void s3c_fimc_setname(int id, char *name)
        case 2:
                s5p_device_fimc2.name = name;
                break;
+#endif
+#ifdef CONFIG_S5P_DEV_FIMC3
+       case 3:
+               s5p_device_fimc3.name = name;
+               break;
 #endif
        }
 }
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;