aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5p64x0
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-17 22:08:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-17 22:08:06 -0400
commit411f5c7a502769ccc0377c5ba36cb0b283847ba8 (patch)
tree2c3a29671e3f923de48c55f94194849264a7bf53 /arch/arm/mach-s5p64x0
parent6d7ed21d17e640b120b902a314143e5ef4917a70 (diff)
parent9ced9f03d12d7539e86b0bff5bc750153c976c34 (diff)
Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (289 commits) davinci: DM644x EVM: register MUSB device earlier davinci: add spi devices on tnetv107x evm davinci: add ssp config for tnetv107x evm board davinci: add tnetv107x ssp platform device spi: add ti-ssp spi master driver mfd: add driver for sequencer serial port ARM: EXYNOS4: Implement Clock gating for System MMU ARM: EXYNOS4: Enhancement of System MMU driver ARM: EXYNOS4: Add support for gpio interrupts ARM: S5P: Add function to register gpio interrupt bank data ARM: S5P: Cleanup S5P gpio interrupt code ARM: EXYNOS4: Add missing GPYx banks ARM: S3C64XX: Fix section mismatch from cpufreq init ARM: EXYNOS4: Add keypad device to the SMDKV310 ARM: EXYNOS4: Update clocks for keypad ARM: EXYNOS4: Update keypad base address ARM: EXYNOS4: Add keypad device helpers ARM: EXYNOS4: Add support for SATA on ARMLEX4210 plat-nomadik: make GPIO interrupts work with cpuidle ApSleep mach-u300: define a dummy filter function for coh901318 ... Fix up various conflicts in - arch/arm/mach-exynos4/cpufreq.c - arch/arm/mach-mxs/gpio.c - drivers/net/Kconfig - drivers/tty/serial/Kconfig - drivers/tty/serial/Makefile - drivers/usb/gadget/fsl_mxc_udc.c - drivers/video/Kconfig
Diffstat (limited to 'arch/arm/mach-s5p64x0')
-rw-r--r--arch/arm/mach-s5p64x0/Kconfig4
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c47
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c47
3 files changed, 96 insertions, 2 deletions
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index 164d2783d381..017af4c4293c 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -10,12 +10,14 @@ if ARCH_S5P64X0
10config CPU_S5P6440 10config CPU_S5P6440
11 bool 11 bool
12 select S3C_PL330_DMA 12 select S3C_PL330_DMA
13 select S5P_HRT
13 help 14 help
14 Enable S5P6440 CPU support 15 Enable S5P6440 CPU support
15 16
16config CPU_S5P6450 17config CPU_S5P6450
17 bool 18 bool
18 select S3C_PL330_DMA 19 select S3C_PL330_DMA
20 select S5P_HRT
19 help 21 help
20 Enable S5P6450 CPU support 22 Enable S5P6450 CPU support
21 23
@@ -34,6 +36,7 @@ config MACH_SMDK6440
34 select S3C_DEV_WDT 36 select S3C_DEV_WDT
35 select S3C64XX_DEV_SPI 37 select S3C64XX_DEV_SPI
36 select SAMSUNG_DEV_ADC 38 select SAMSUNG_DEV_ADC
39 select SAMSUNG_DEV_PWM
37 select SAMSUNG_DEV_TS 40 select SAMSUNG_DEV_TS
38 select S5P64X0_SETUP_I2C1 41 select S5P64X0_SETUP_I2C1
39 help 42 help
@@ -47,6 +50,7 @@ config MACH_SMDK6450
47 select S3C_DEV_WDT 50 select S3C_DEV_WDT
48 select S3C64XX_DEV_SPI 51 select S3C64XX_DEV_SPI
49 select SAMSUNG_DEV_ADC 52 select SAMSUNG_DEV_ADC
53 select SAMSUNG_DEV_PWM
50 select SAMSUNG_DEV_TS 54 select SAMSUNG_DEV_TS
51 select S5P64X0_SETUP_I2C1 55 select S5P64X0_SETUP_I2C1
52 help 56 help
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index e5beb84e2393..2d559f10fd47 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -22,6 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/pwm_backlight.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -32,6 +33,7 @@
32#include <mach/map.h> 33#include <mach/map.h>
33#include <mach/regs-clock.h> 34#include <mach/regs-clock.h>
34#include <mach/i2c.h> 35#include <mach/i2c.h>
36#include <mach/regs-gpio.h>
35 37
36#include <plat/regs-serial.h> 38#include <plat/regs-serial.h>
37#include <plat/gpio-cfg.h> 39#include <plat/gpio-cfg.h>
@@ -43,6 +45,7 @@
43#include <plat/pll.h> 45#include <plat/pll.h>
44#include <plat/adc.h> 46#include <plat/adc.h>
45#include <plat/ts.h> 47#include <plat/ts.h>
48#include <plat/s5p-time.h>
46 49
47#define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 50#define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
48 S3C2410_UCON_RXILEVEL | \ 51 S3C2410_UCON_RXILEVEL | \
@@ -88,6 +91,45 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
88 }, 91 },
89}; 92};
90 93
94static int smdk6440_backlight_init(struct device *dev)
95{
96 int ret;
97
98 ret = gpio_request(S5P6440_GPF(15), "Backlight");
99 if (ret) {
100 printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
101 return ret;
102 }
103
104 /* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */
105 s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_SFN(2));
106
107 return 0;
108}
109
110static void smdk6440_backlight_exit(struct device *dev)
111{
112 s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_OUTPUT);
113 gpio_free(S5P6440_GPF(15));
114}
115
116static struct platform_pwm_backlight_data smdk6440_backlight_data = {
117 .pwm_id = 1,
118 .max_brightness = 255,
119 .dft_brightness = 255,
120 .pwm_period_ns = 78770,
121 .init = smdk6440_backlight_init,
122 .exit = smdk6440_backlight_exit,
123};
124
125static struct platform_device smdk6440_backlight_device = {
126 .name = "pwm-backlight",
127 .dev = {
128 .parent = &s3c_device_timer[1].dev,
129 .platform_data = &smdk6440_backlight_data,
130 },
131};
132
91static struct platform_device *smdk6440_devices[] __initdata = { 133static struct platform_device *smdk6440_devices[] __initdata = {
92 &s3c_device_adc, 134 &s3c_device_adc,
93 &s3c_device_rtc, 135 &s3c_device_rtc,
@@ -97,6 +139,8 @@ static struct platform_device *smdk6440_devices[] __initdata = {
97 &s3c_device_wdt, 139 &s3c_device_wdt,
98 &samsung_asoc_dma, 140 &samsung_asoc_dma,
99 &s5p6440_device_iis, 141 &s5p6440_device_iis,
142 &s3c_device_timer[1],
143 &smdk6440_backlight_device,
100}; 144};
101 145
102static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { 146static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
@@ -136,6 +180,7 @@ static void __init smdk6440_map_io(void)
136 s5p_init_io(NULL, 0, S5P64X0_SYS_ID); 180 s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
137 s3c24xx_init_clocks(12000000); 181 s3c24xx_init_clocks(12000000);
138 s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs)); 182 s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs));
183 s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
139} 184}
140 185
141static void __init smdk6440_machine_init(void) 186static void __init smdk6440_machine_init(void)
@@ -159,5 +204,5 @@ MACHINE_START(SMDK6440, "SMDK6440")
159 .init_irq = s5p6440_init_irq, 204 .init_irq = s5p6440_init_irq,
160 .map_io = smdk6440_map_io, 205 .map_io = smdk6440_map_io,
161 .init_machine = smdk6440_machine_init, 206 .init_machine = smdk6440_machine_init,
162 .timer = &s3c24xx_timer, 207 .timer = &s5p_timer,
163MACHINE_END 208MACHINE_END
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 3a20de0a9264..d19c4690ee97 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -22,6 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/pwm_backlight.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -32,6 +33,7 @@
32#include <mach/map.h> 33#include <mach/map.h>
33#include <mach/regs-clock.h> 34#include <mach/regs-clock.h>
34#include <mach/i2c.h> 35#include <mach/i2c.h>
36#include <mach/regs-gpio.h>
35 37
36#include <plat/regs-serial.h> 38#include <plat/regs-serial.h>
37#include <plat/gpio-cfg.h> 39#include <plat/gpio-cfg.h>
@@ -43,6 +45,7 @@
43#include <plat/pll.h> 45#include <plat/pll.h>
44#include <plat/adc.h> 46#include <plat/adc.h>
45#include <plat/ts.h> 47#include <plat/ts.h>
48#include <plat/s5p-time.h>
46 49
47#define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 50#define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
48 S3C2410_UCON_RXILEVEL | \ 51 S3C2410_UCON_RXILEVEL | \
@@ -106,6 +109,45 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
106#endif 109#endif
107}; 110};
108 111
112static int smdk6450_backlight_init(struct device *dev)
113{
114 int ret;
115
116 ret = gpio_request(S5P6450_GPF(15), "Backlight");
117 if (ret) {
118 printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
119 return ret;
120 }
121
122 /* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */
123 s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_SFN(2));
124
125 return 0;
126}
127
128static void smdk6450_backlight_exit(struct device *dev)
129{
130 s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_OUTPUT);
131 gpio_free(S5P6450_GPF(15));
132}
133
134static struct platform_pwm_backlight_data smdk6450_backlight_data = {
135 .pwm_id = 1,
136 .max_brightness = 255,
137 .dft_brightness = 255,
138 .pwm_period_ns = 78770,
139 .init = smdk6450_backlight_init,
140 .exit = smdk6450_backlight_exit,
141};
142
143static struct platform_device smdk6450_backlight_device = {
144 .name = "pwm-backlight",
145 .dev = {
146 .parent = &s3c_device_timer[1].dev,
147 .platform_data = &smdk6450_backlight_data,
148 },
149};
150
109static struct platform_device *smdk6450_devices[] __initdata = { 151static struct platform_device *smdk6450_devices[] __initdata = {
110 &s3c_device_adc, 152 &s3c_device_adc,
111 &s3c_device_rtc, 153 &s3c_device_rtc,
@@ -115,6 +157,8 @@ static struct platform_device *smdk6450_devices[] __initdata = {
115 &s3c_device_wdt, 157 &s3c_device_wdt,
116 &samsung_asoc_dma, 158 &samsung_asoc_dma,
117 &s5p6450_device_iis0, 159 &s5p6450_device_iis0,
160 &s3c_device_timer[1],
161 &smdk6450_backlight_device,
118 /* s5p6450_device_spi0 will be added */ 162 /* s5p6450_device_spi0 will be added */
119}; 163};
120 164
@@ -155,6 +199,7 @@ static void __init smdk6450_map_io(void)
155 s5p_init_io(NULL, 0, S5P64X0_SYS_ID); 199 s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
156 s3c24xx_init_clocks(19200000); 200 s3c24xx_init_clocks(19200000);
157 s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs)); 201 s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs));
202 s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
158} 203}
159 204
160static void __init smdk6450_machine_init(void) 205static void __init smdk6450_machine_init(void)
@@ -178,5 +223,5 @@ MACHINE_START(SMDK6450, "SMDK6450")
178 .init_irq = s5p6450_init_irq, 223 .init_irq = s5p6450_init_irq,
179 .map_io = smdk6450_map_io, 224 .map_io = smdk6450_map_io,
180 .init_machine = smdk6450_machine_init, 225 .init_machine = smdk6450_machine_init,
181 .timer = &s3c24xx_timer, 226 .timer = &s5p_timer,
182MACHINE_END 227MACHINE_END