diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-smdk2413.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-rx3715.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-smdk2440.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2443/mach-smdk2443.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6400.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p6440/include/mach/pwm-clock.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/include/mach/pwm-clock.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/pwm-clock.h | 21 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/devs.c | 11 |
12 files changed, 60 insertions, 44 deletions
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index fbedd0760941..03028b98f362 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -162,8 +162,8 @@ static struct s3c2410fb_display h1940_lcd __initdata = { | |||
162 | .xres = 240, | 162 | .xres = 240, |
163 | .yres = 320, | 163 | .yres = 320, |
164 | .bpp = 16, | 164 | .bpp = 16, |
165 | .left_margin = 20, | 165 | .left_margin = 8, |
166 | .right_margin = 8, | 166 | .right_margin = 20, |
167 | .hsync_len = 4, | 167 | .hsync_len = 4, |
168 | .upper_margin = 8, | 168 | .upper_margin = 8, |
169 | .lower_margin = 7, | 169 | .lower_margin = 7, |
@@ -271,7 +271,6 @@ static struct platform_device h1940_lcd_powerdev = { | |||
271 | }; | 271 | }; |
272 | 272 | ||
273 | static struct platform_device *h1940_devices[] __initdata = { | 273 | static struct platform_device *h1940_devices[] __initdata = { |
274 | &s3c_device_ts, | ||
275 | &s3c_device_ohci, | 274 | &s3c_device_ohci, |
276 | &s3c_device_lcd, | 275 | &s3c_device_lcd, |
277 | &s3c_device_wdt, | 276 | &s3c_device_wdt, |
@@ -285,6 +284,8 @@ static struct platform_device *h1940_devices[] __initdata = { | |||
285 | &s3c_device_timer[0], | 284 | &s3c_device_timer[0], |
286 | &h1940_backlight, | 285 | &h1940_backlight, |
287 | &h1940_lcd_powerdev, | 286 | &h1940_lcd_powerdev, |
287 | &s3c_device_adc, | ||
288 | &s3c_device_ts, | ||
288 | }; | 289 | }; |
289 | 290 | ||
290 | static void __init h1940_map_io(void) | 291 | static void __init h1940_map_io(void) |
@@ -337,7 +338,7 @@ static void __init h1940_init(void) | |||
337 | } | 338 | } |
338 | 339 | ||
339 | MACHINE_START(H1940, "IPAQ-H1940") | 340 | MACHINE_START(H1940, "IPAQ-H1940") |
340 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 341 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
341 | .phys_io = S3C2410_PA_UART, | 342 | .phys_io = S3C2410_PA_UART, |
342 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 343 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
343 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 344 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 14f4798291aa..20647f09aed6 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -674,7 +674,7 @@ static void __init jive_machine_init(void) | |||
674 | } | 674 | } |
675 | 675 | ||
676 | MACHINE_START(JIVE, "JIVE") | 676 | MACHINE_START(JIVE, "JIVE") |
677 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 677 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
678 | .phys_io = S3C2410_PA_UART, | 678 | .phys_io = S3C2410_PA_UART, |
679 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 679 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
680 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 680 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index 0392065af1af..3d41aa74c362 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -150,7 +150,7 @@ static void __init smdk2413_machine_init(void) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | MACHINE_START(S3C2413, "S3C2413") | 152 | MACHINE_START(S3C2413, "S3C2413") |
153 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 153 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
154 | .phys_io = S3C2410_PA_UART, | 154 | .phys_io = S3C2410_PA_UART, |
155 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 155 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
156 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 156 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
@@ -163,7 +163,7 @@ MACHINE_START(S3C2413, "S3C2413") | |||
163 | MACHINE_END | 163 | MACHINE_END |
164 | 164 | ||
165 | MACHINE_START(SMDK2412, "SMDK2412") | 165 | MACHINE_START(SMDK2412, "SMDK2412") |
166 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 166 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
167 | .phys_io = S3C2410_PA_UART, | 167 | .phys_io = S3C2410_PA_UART, |
168 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 168 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
169 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 169 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
@@ -176,7 +176,7 @@ MACHINE_START(SMDK2412, "SMDK2412") | |||
176 | MACHINE_END | 176 | MACHINE_END |
177 | 177 | ||
178 | MACHINE_START(SMDK2413, "SMDK2413") | 178 | MACHINE_START(SMDK2413, "SMDK2413") |
179 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 179 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
180 | .phys_io = S3C2410_PA_UART, | 180 | .phys_io = S3C2410_PA_UART, |
181 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 181 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
182 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 182 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 1e836e506f8b..d2946de3f365 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -209,7 +209,7 @@ static void __init rx3715_init_machine(void) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | MACHINE_START(RX3715, "IPAQ-RX3715") | 211 | MACHINE_START(RX3715, "IPAQ-RX3715") |
212 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 212 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
213 | .phys_io = S3C2410_PA_UART, | 213 | .phys_io = S3C2410_PA_UART, |
214 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 214 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
215 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 215 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c index 3ac3d636d615..df83276d85ae 100644 --- a/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/arch/arm/mach-s3c2440/mach-smdk2440.c | |||
@@ -174,7 +174,7 @@ static void __init smdk2440_machine_init(void) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | MACHINE_START(S3C2440, "SMDK2440") | 176 | MACHINE_START(S3C2440, "SMDK2440") |
177 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 177 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
178 | .phys_io = S3C2410_PA_UART, | 178 | .phys_io = S3C2410_PA_UART, |
179 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 179 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
180 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 180 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c index e2e362bda9b7..4c863d3a52f4 100644 --- a/arch/arm/mach-s3c2443/mach-smdk2443.c +++ b/arch/arm/mach-s3c2443/mach-smdk2443.c | |||
@@ -131,7 +131,7 @@ static void __init smdk2443_machine_init(void) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | MACHINE_START(SMDK2443, "SMDK2443") | 133 | MACHINE_START(SMDK2443, "SMDK2443") |
134 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 134 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
135 | .phys_io = S3C2410_PA_UART, | 135 | .phys_io = S3C2410_PA_UART, |
136 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 136 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
137 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 137 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index f7b18983950c..59916676d8d2 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
@@ -84,7 +84,7 @@ static void __init smdk6400_machine_init(void) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | MACHINE_START(SMDK6400, "SMDK6400") | 86 | MACHINE_START(SMDK6400, "SMDK6400") |
87 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 87 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
88 | .phys_io = S3C_PA_UART & 0xfff00000, | 88 | .phys_io = S3C_PA_UART & 0xfff00000, |
89 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | 89 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, |
90 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | 90 | .boot_params = S3C64XX_PA_SDRAM + 0x100, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 2d5afd221d77..9d51455feb31 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -656,7 +656,7 @@ static void __init smdk6410_machine_init(void) | |||
656 | } | 656 | } |
657 | 657 | ||
658 | MACHINE_START(SMDK6410, "SMDK6410") | 658 | MACHINE_START(SMDK6410, "SMDK6410") |
659 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 659 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
660 | .phys_io = S3C_PA_UART & 0xfff00000, | 660 | .phys_io = S3C_PA_UART & 0xfff00000, |
661 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | 661 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, |
662 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | 662 | .boot_params = S3C64XX_PA_SDRAM + 0x100, |
diff --git a/arch/arm/mach-s5p6440/include/mach/pwm-clock.h b/arch/arm/mach-s5p6440/include/mach/pwm-clock.h index c4bb7c555477..6a2a02fdf12a 100644 --- a/arch/arm/mach-s5p6440/include/mach/pwm-clock.h +++ b/arch/arm/mach-s5p6440/include/mach/pwm-clock.h | |||
@@ -1,11 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5p6440/include/mach/pwm-clock.h | 1 | /* linux/arch/arm/mach-s5p6440/include/mach/pwm-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | 7 | * Copyright 2008 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 8 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 9 | * http://armlinux.simtec.co.uk/ |
6 | * | 10 | * |
7 | * Copyright 2009 Samsung Electronics Co., Ltd. | 11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h |
8 | * http://www.samsung.com/ | ||
9 | * | 12 | * |
10 | * S5P6440 - pwm clock and timer support | 13 | * S5P6440 - pwm clock and timer support |
11 | * | 14 | * |
@@ -14,16 +17,19 @@ | |||
14 | * published by the Free Software Foundation. | 17 | * published by the Free Software Foundation. |
15 | */ | 18 | */ |
16 | 19 | ||
20 | #ifndef __ASM_ARCH_PWMCLK_H | ||
21 | #define __ASM_ARCH_PWMCLK_H __FILE__ | ||
22 | |||
17 | /** | 23 | /** |
18 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | 24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk |
19 | * @cfg: The timer TCFG1 register bits shifted down to 0. | 25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. |
20 | * | 26 | * |
21 | * Return true if the given configuration from TCFG1 is a TCLK instead | 27 | * Return true if the given configuration from TCFG1 is a TCLK instead |
22 | * any of the TDIV clocks. | 28 | * any of the TDIV clocks. |
23 | */ | 29 | */ |
24 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | 30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) |
25 | { | 31 | { |
26 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | 32 | return 0; |
27 | } | 33 | } |
28 | 34 | ||
29 | /** | 35 | /** |
@@ -35,7 +41,7 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | |||
35 | */ | 41 | */ |
36 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | 42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) |
37 | { | 43 | { |
38 | return 1 << (1 + tcfg1); | 44 | return 1 << tcfg1; |
39 | } | 45 | } |
40 | 46 | ||
41 | /** | 47 | /** |
@@ -45,7 +51,7 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | |||
45 | */ | 51 | */ |
46 | static inline unsigned int pwm_tdiv_has_div1(void) | 52 | static inline unsigned int pwm_tdiv_has_div1(void) |
47 | { | 53 | { |
48 | return 0; | 54 | return 1; |
49 | } | 55 | } |
50 | 56 | ||
51 | /** | 57 | /** |
@@ -56,7 +62,9 @@ static inline unsigned int pwm_tdiv_has_div1(void) | |||
56 | */ | 62 | */ |
57 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | 63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) |
58 | { | 64 | { |
59 | return ilog2(div) - 1; | 65 | return ilog2(div); |
60 | } | 66 | } |
61 | 67 | ||
62 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | 68 | #define S3C_TCFG1_MUX_TCLK 0 |
69 | |||
70 | #endif /* __ASM_ARCH_PWMCLK_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/pwm-clock.h b/arch/arm/mach-s5p6442/include/mach/pwm-clock.h index 15e8525da0f1..2724b37def31 100644 --- a/arch/arm/mach-s5p6442/include/mach/pwm-clock.h +++ b/arch/arm/mach-s5p6442/include/mach/pwm-clock.h | |||
@@ -1,13 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/pwm-clock.h | 1 | /* linux/arch/arm/mach-s5p6442/include/mach/pwm-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | 7 | * Copyright 2008 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 8 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 9 | * http://armlinux.simtec.co.uk/ |
6 | * | 10 | * |
7 | * Copyright 2010 Samsung Electronics Co., Ltd. | 11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h |
8 | * http://www.samsung.com/ | ||
9 | * | ||
10 | * Based on arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | ||
11 | * | 12 | * |
12 | * S5P6442 - pwm clock and timer support | 13 | * S5P6442 - pwm clock and timer support |
13 | * | 14 | * |
@@ -21,14 +22,14 @@ | |||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | 24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk |
24 | * @cfg: The timer TCFG1 register bits shifted down to 0. | 25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. |
25 | * | 26 | * |
26 | * Return true if the given configuration from TCFG1 is a TCLK instead | 27 | * Return true if the given configuration from TCFG1 is a TCLK instead |
27 | * any of the TDIV clocks. | 28 | * any of the TDIV clocks. |
28 | */ | 29 | */ |
29 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | 30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) |
30 | { | 31 | { |
31 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | 32 | return tcfg == S3C64XX_TCFG1_MUX_TCLK; |
32 | } | 33 | } |
33 | 34 | ||
34 | /** | 35 | /** |
@@ -40,7 +41,7 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | |||
40 | */ | 41 | */ |
41 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | 42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) |
42 | { | 43 | { |
43 | return 1 << (1 + tcfg1); | 44 | return 1 << tcfg1; |
44 | } | 45 | } |
45 | 46 | ||
46 | /** | 47 | /** |
@@ -50,7 +51,7 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | |||
50 | */ | 51 | */ |
51 | static inline unsigned int pwm_tdiv_has_div1(void) | 52 | static inline unsigned int pwm_tdiv_has_div1(void) |
52 | { | 53 | { |
53 | return 0; | 54 | return 1; |
54 | } | 55 | } |
55 | 56 | ||
56 | /** | 57 | /** |
@@ -61,9 +62,9 @@ static inline unsigned int pwm_tdiv_has_div1(void) | |||
61 | */ | 62 | */ |
62 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | 63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) |
63 | { | 64 | { |
64 | return ilog2(div) - 1; | 65 | return ilog2(div); |
65 | } | 66 | } |
66 | 67 | ||
67 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | 68 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK |
68 | 69 | ||
69 | #endif /* __ASM_ARCH_PWMCLK_H */ | 70 | #endif /* __ASM_ARCH_PWMCLK_H */ |
diff --git a/arch/arm/mach-s5pv210/include/mach/pwm-clock.h b/arch/arm/mach-s5pv210/include/mach/pwm-clock.h index 69027fea987a..f8a9f1b330e0 100644 --- a/arch/arm/mach-s5pv210/include/mach/pwm-clock.h +++ b/arch/arm/mach-s5pv210/include/mach/pwm-clock.h | |||
@@ -1,13 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/pwm-clock.h | 1 | /* linux/arch/arm/mach-s5pv210/include/mach/pwm-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | 7 | * Copyright 2008 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 8 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 9 | * http://armlinux.simtec.co.uk/ |
6 | * | 10 | * |
7 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | 11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h |
8 | * http://www.samsung.com/ | ||
9 | * | ||
10 | * Based on arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | ||
11 | * | 12 | * |
12 | * S5PV210 - pwm clock and timer support | 13 | * S5PV210 - pwm clock and timer support |
13 | * | 14 | * |
@@ -21,14 +22,14 @@ | |||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | 24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk |
24 | * @cfg: The timer TCFG1 register bits shifted down to 0. | 25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. |
25 | * | 26 | * |
26 | * Return true if the given configuration from TCFG1 is a TCLK instead | 27 | * Return true if the given configuration from TCFG1 is a TCLK instead |
27 | * any of the TDIV clocks. | 28 | * any of the TDIV clocks. |
28 | */ | 29 | */ |
29 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | 30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) |
30 | { | 31 | { |
31 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | 32 | return tcfg == S3C64XX_TCFG1_MUX_TCLK; |
32 | } | 33 | } |
33 | 34 | ||
34 | /** | 35 | /** |
@@ -40,7 +41,7 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | |||
40 | */ | 41 | */ |
41 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | 42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) |
42 | { | 43 | { |
43 | return 1 << (1 + tcfg1); | 44 | return 1 << tcfg1; |
44 | } | 45 | } |
45 | 46 | ||
46 | /** | 47 | /** |
@@ -50,7 +51,7 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | |||
50 | */ | 51 | */ |
51 | static inline unsigned int pwm_tdiv_has_div1(void) | 52 | static inline unsigned int pwm_tdiv_has_div1(void) |
52 | { | 53 | { |
53 | return 0; | 54 | return 1; |
54 | } | 55 | } |
55 | 56 | ||
56 | /** | 57 | /** |
@@ -61,9 +62,9 @@ static inline unsigned int pwm_tdiv_has_div1(void) | |||
61 | */ | 62 | */ |
62 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | 63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) |
63 | { | 64 | { |
64 | return ilog2(div) - 1; | 65 | return ilog2(div); |
65 | } | 66 | } |
66 | 67 | ||
67 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | 68 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK |
68 | 69 | ||
69 | #endif /* __ASM_ARCH_PWMCLK_H */ | 70 | #endif /* __ASM_ARCH_PWMCLK_H */ |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 9265f09bfa58..b9565c1eb410 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/string.h> | ||
24 | 25 | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
@@ -149,10 +150,14 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) | |||
149 | { | 150 | { |
150 | struct s3c2410fb_mach_info *npd; | 151 | struct s3c2410fb_mach_info *npd; |
151 | 152 | ||
152 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | 153 | npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL); |
153 | if (npd) { | 154 | if (npd) { |
154 | memcpy(npd, pd, sizeof(*npd)); | ||
155 | s3c_device_lcd.dev.platform_data = npd; | 155 | s3c_device_lcd.dev.platform_data = npd; |
156 | npd->displays = kmemdup(pd->displays, | ||
157 | sizeof(struct s3c2410fb_display) * npd->num_displays, | ||
158 | GFP_KERNEL); | ||
159 | if (!npd->displays) | ||
160 | printk(KERN_ERR "no memory for LCD display data\n"); | ||
156 | } else { | 161 | } else { |
157 | printk(KERN_ERR "no memory for LCD platform data\n"); | 162 | printk(KERN_ERR "no memory for LCD platform data\n"); |
158 | } | 163 | } |
@@ -371,7 +376,7 @@ struct platform_device s3c_device_sdi = { | |||
371 | 376 | ||
372 | EXPORT_SYMBOL(s3c_device_sdi); | 377 | EXPORT_SYMBOL(s3c_device_sdi); |
373 | 378 | ||
374 | void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) | 379 | void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) |
375 | { | 380 | { |
376 | struct s3c24xx_mci_pdata *npd; | 381 | struct s3c24xx_mci_pdata *npd; |
377 | 382 | ||