aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2014-05-08 16:49:19 -0400
committerKukjin Kim <kgene.kim@samsung.com>2014-05-12 19:00:43 -0400
commita28d618e2e424483afd47de6373665cd78352b25 (patch)
treeb4f7242dae355698aa62db85b12bb93765edf125
parent4659c534834c33c698c9400e0aedd1e1aa48e9b6 (diff)
ARM: S3C24XX: convert s3c2440 and s3c2442 to common clock framework
Convert all machines using these cpus to use the ccf clock driver instead of the legacy Samsung clock implementation. Some of the more esotheric machines will probably need a fixup, as they do strange things to the clkout outputs, that I did not really understand nor have the hardware to check. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig8
-rw-r--r--arch/arm/mach-s3c24xx/Makefile4
-rw-r--r--arch/arm/mach-s3c24xx/common.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c8
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c15
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx3715.c10
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2440.c10
12 files changed, 73 insertions, 36 deletions
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 6a0fcb1c3303..56ce1c6a283c 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -73,10 +73,10 @@ config CPU_S3C2416
73 73
74config CPU_S3C2440 74config CPU_S3C2440
75 bool "SAMSUNG S3C2440" 75 bool "SAMSUNG S3C2440"
76 depends on SAMSUNG_CLOCK 76 select COMMON_CLK
77 select CPU_ARM920T 77 select CPU_ARM920T
78 select CPU_LLSERIAL_S3C2440 78 select CPU_LLSERIAL_S3C2440
79 select S3C2410_CLOCK 79 select S3C2410_COMMON_CLK
80 select S3C2410_PM if PM 80 select S3C2410_PM if PM
81 select S3C2440_DMA if S3C24XX_DMA 81 select S3C2440_DMA if S3C24XX_DMA
82 help 82 help
@@ -84,10 +84,10 @@ config CPU_S3C2440
84 84
85config CPU_S3C2442 85config CPU_S3C2442
86 bool "SAMSUNG S3C2442" 86 bool "SAMSUNG S3C2442"
87 depends on SAMSUNG_CLOCK 87 select COMMON_CLK
88 select CPU_ARM920T 88 select CPU_ARM920T
89 select CPU_LLSERIAL_S3C2440 89 select CPU_LLSERIAL_S3C2440
90 select S3C2410_CLOCK 90 select S3C2410_COMMON_CLK
91 select S3C2410_DMA if S3C24XX_DMA 91 select S3C2410_DMA if S3C24XX_DMA
92 select S3C2410_PM if PM 92 select S3C2410_PM if PM
93 help 93 help
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index f25479721dc9..9010ebaafff6 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -29,9 +29,9 @@ obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o
29obj-$(CONFIG_CPU_S3C2416) += s3c2416.o 29obj-$(CONFIG_CPU_S3C2416) += s3c2416.o
30obj-$(CONFIG_S3C2416_PM) += pm-s3c2416.o 30obj-$(CONFIG_S3C2416_PM) += pm-s3c2416.o
31 31
32obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o 32obj-$(CONFIG_CPU_S3C2440) += s3c2440.o
33obj-$(CONFIG_CPU_S3C2442) += s3c2442.o 33obj-$(CONFIG_CPU_S3C2442) += s3c2442.o
34obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o 34obj-$(CONFIG_CPU_S3C244X) += s3c244x.o
35obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o 35obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o
36obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o 36obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o
37obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o 37obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 35cf88e1fa83..bda9dd4abae3 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -92,7 +92,6 @@ static struct cpu_table cpu_ids[] __initdata = {
92 .idcode = 0x32440000, 92 .idcode = 0x32440000,
93 .idmask = 0xffffffff, 93 .idmask = 0xffffffff,
94 .map_io = s3c2440_map_io, 94 .map_io = s3c2440_map_io,
95 .init_clocks = s3c244x_init_clocks,
96 .init_uarts = s3c244x_init_uarts, 95 .init_uarts = s3c244x_init_uarts,
97 .init = s3c2440_init, 96 .init = s3c2440_init,
98 .name = name_s3c2440 97 .name = name_s3c2440
@@ -101,7 +100,6 @@ static struct cpu_table cpu_ids[] __initdata = {
101 .idcode = 0x32440001, 100 .idcode = 0x32440001,
102 .idmask = 0xffffffff, 101 .idmask = 0xffffffff,
103 .map_io = s3c2440_map_io, 102 .map_io = s3c2440_map_io,
104 .init_clocks = s3c244x_init_clocks,
105 .init_uarts = s3c244x_init_uarts, 103 .init_uarts = s3c244x_init_uarts,
106 .init = s3c2440_init, 104 .init = s3c2440_init,
107 .name = name_s3c2440a 105 .name = name_s3c2440a
@@ -110,7 +108,6 @@ static struct cpu_table cpu_ids[] __initdata = {
110 .idcode = 0x32440aaa, 108 .idcode = 0x32440aaa,
111 .idmask = 0xffffffff, 109 .idmask = 0xffffffff,
112 .map_io = s3c2442_map_io, 110 .map_io = s3c2442_map_io,
113 .init_clocks = s3c244x_init_clocks,
114 .init_uarts = s3c244x_init_uarts, 111 .init_uarts = s3c244x_init_uarts,
115 .init = s3c2442_init, 112 .init = s3c2442_init,
116 .name = name_s3c2442 113 .name = name_s3c2442
@@ -119,7 +116,6 @@ static struct cpu_table cpu_ids[] __initdata = {
119 .idcode = 0x32440aab, 116 .idcode = 0x32440aab,
120 .idmask = 0xffffffff, 117 .idmask = 0xffffffff,
121 .map_io = s3c2442_map_io, 118 .map_io = s3c2442_map_io,
122 .init_clocks = s3c244x_init_clocks,
123 .init_uarts = s3c244x_init_uarts, 119 .init_uarts = s3c244x_init_uarts,
124 .init = s3c2442_init, 120 .init = s3c2442_init,
125 .name = name_s3c2442b 121 .name = name_s3c2442b
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index f81944f3217d..7a0d83b2f93a 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -46,7 +46,6 @@
46 46
47#include <net/ax88796.h> 47#include <net/ax88796.h>
48 48
49#include <plat/clock.h>
50#include <plat/devs.h> 49#include <plat/devs.h>
51#include <plat/cpu.h> 50#include <plat/cpu.h>
52#include <linux/platform_data/asoc-s3c24xx_simtec.h> 51#include <linux/platform_data/asoc-s3c24xx_simtec.h>
@@ -415,7 +414,6 @@ static void __init anubis_map_io(void)
415#endif 414#endif
416 415
417 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); 416 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
418 s3c24xx_init_clocks(0);
419 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 417 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
420 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 418 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
421 419
@@ -433,6 +431,12 @@ static void __init anubis_map_io(void)
433 } 431 }
434} 432}
435 433
434static void __init anubis_init_time(void)
435{
436 s3c2440_init_clocks(12000000);
437 samsung_timer_init();
438}
439
436static void __init anubis_init(void) 440static void __init anubis_init(void)
437{ 441{
438 s3c_i2c0_set_platdata(NULL); 442 s3c_i2c0_set_platdata(NULL);
@@ -452,6 +456,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
452 .map_io = anubis_map_io, 456 .map_io = anubis_map_io,
453 .init_machine = anubis_init, 457 .init_machine = anubis_init,
454 .init_irq = s3c2440_init_irq, 458 .init_irq = s3c2440_init_irq,
455 .init_time = samsung_timer_init, 459 .init_time = anubis_init_time,
456 .restart = s3c244x_restart, 460 .restart = s3c244x_restart,
457MACHINE_END 461MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index d8f6bb1096cb..9db768f448a5 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -45,7 +45,6 @@
45#include <linux/mtd/nand_ecc.h> 45#include <linux/mtd/nand_ecc.h>
46#include <linux/mtd/partitions.h> 46#include <linux/mtd/partitions.h>
47 47
48#include <plat/clock.h>
49#include <plat/devs.h> 48#include <plat/devs.h>
50#include <plat/cpu.h> 49#include <plat/cpu.h>
51#include <linux/platform_data/mmc-s3cmci.h> 50#include <linux/platform_data/mmc-s3cmci.h>
@@ -192,11 +191,16 @@ static struct platform_device *at2440evb_devices[] __initdata = {
192static void __init at2440evb_map_io(void) 191static void __init at2440evb_map_io(void)
193{ 192{
194 s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); 193 s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
195 s3c24xx_init_clocks(16934400);
196 s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs)); 194 s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
197 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 195 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
198} 196}
199 197
198static void __init at2440evb_init_time(void)
199{
200 s3c2440_init_clocks(16934400);
201 samsung_timer_init();
202}
203
200static void __init at2440evb_init(void) 204static void __init at2440evb_init(void)
201{ 205{
202 s3c24xx_fb_set_platdata(&at2440evb_fb_info); 206 s3c24xx_fb_set_platdata(&at2440evb_fb_info);
@@ -213,6 +217,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
213 .map_io = at2440evb_map_io, 217 .map_io = at2440evb_map_io,
214 .init_machine = at2440evb_init, 218 .init_machine = at2440evb_init,
215 .init_irq = s3c2440_init_irq, 219 .init_irq = s3c2440_init_irq,
216 .init_time = samsung_timer_init, 220 .init_time = at2440evb_init_time,
217 .restart = s3c244x_restart, 221 .restart = s3c244x_restart,
218MACHINE_END 222MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index dc4db849f0fd..fc3a08d0cb3f 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -501,7 +501,6 @@ static struct platform_device gta02_buttons_device = {
501static void __init gta02_map_io(void) 501static void __init gta02_map_io(void)
502{ 502{
503 s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); 503 s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
504 s3c24xx_init_clocks(12000000);
505 s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs)); 504 s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs));
506 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 505 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
507} 506}
@@ -585,6 +584,11 @@ static void __init gta02_machine_init(void)
585 regulator_has_full_constraints(); 584 regulator_has_full_constraints();
586} 585}
587 586
587static void __init gta02_init_time(void)
588{
589 s3c2442_init_clocks(12000000);
590 samsung_timer_init();
591}
588 592
589MACHINE_START(NEO1973_GTA02, "GTA02") 593MACHINE_START(NEO1973_GTA02, "GTA02")
590 /* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */ 594 /* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */
@@ -592,6 +596,6 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
592 .map_io = gta02_map_io, 596 .map_io = gta02_map_io,
593 .init_irq = s3c2442_init_irq, 597 .init_irq = s3c2442_init_irq,
594 .init_machine = gta02_machine_init, 598 .init_machine = gta02_machine_init,
595 .init_time = samsung_timer_init, 599 .init_time = gta02_init_time,
596 .restart = s3c244x_restart, 600 .restart = s3c244x_restart,
597MACHINE_END 601MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 9e57fd9f4f3b..5cc40ec1d254 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -54,7 +54,6 @@
54#include <linux/mtd/partitions.h> 54#include <linux/mtd/partitions.h>
55 55
56#include <plat/gpio-cfg.h> 56#include <plat/gpio-cfg.h>
57#include <plat/clock.h>
58#include <plat/devs.h> 57#include <plat/devs.h>
59#include <plat/cpu.h> 58#include <plat/cpu.h>
60#include <plat/samsung-time.h> 59#include <plat/samsung-time.h>
@@ -525,11 +524,16 @@ static struct platform_device *mini2440_devices[] __initdata = {
525static void __init mini2440_map_io(void) 524static void __init mini2440_map_io(void)
526{ 525{
527 s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc)); 526 s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
528 s3c24xx_init_clocks(12000000);
529 s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs)); 527 s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
530 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 528 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
531} 529}
532 530
531static void __init mini2440_init_time(void)
532{
533 s3c2440_init_clocks(12000000);
534 samsung_timer_init();
535}
536
533/* 537/*
534 * mini2440_features string 538 * mini2440_features string
535 * 539 *
@@ -690,6 +694,6 @@ MACHINE_START(MINI2440, "MINI2440")
690 .map_io = mini2440_map_io, 694 .map_io = mini2440_map_io,
691 .init_machine = mini2440_init, 695 .init_machine = mini2440_init,
692 .init_irq = s3c2440_init_irq, 696 .init_irq = s3c2440_init_irq,
693 .init_time = samsung_timer_init, 697 .init_time = mini2440_init_time,
694 .restart = s3c244x_restart, 698 .restart = s3c244x_restart,
695MACHINE_END 699MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index 3066851f584d..05627c2b5116 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -42,7 +42,6 @@
42#include <linux/platform_data/i2c-s3c2410.h> 42#include <linux/platform_data/i2c-s3c2410.h>
43 43
44#include <plat/gpio-cfg.h> 44#include <plat/gpio-cfg.h>
45#include <plat/clock.h>
46#include <plat/devs.h> 45#include <plat/devs.h>
47#include <plat/cpu.h> 46#include <plat/cpu.h>
48#include <plat/samsung-time.h> 47#include <plat/samsung-time.h>
@@ -135,13 +134,23 @@ static void __init nexcoder_sensorboard_init(void)
135static void __init nexcoder_map_io(void) 134static void __init nexcoder_map_io(void)
136{ 135{
137 s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc)); 136 s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc));
138 s3c24xx_init_clocks(0);
139 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); 137 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
140 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 138 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
141 139
142 nexcoder_sensorboard_init(); 140 nexcoder_sensorboard_init();
143} 141}
144 142
143static void __init nexcoder_init_time(void)
144{
145 /*
146 * for whatever reason the nexcoder called s3c24xx_init_clocks(0)
147 * meaning a xti value of 0Hz, so this machine will most likely
148 * not work out of the box and needs a fixup.
149 */
150 s3c2440_init_clocks(0);
151 samsung_timer_init();
152}
153
145static void __init nexcoder_init(void) 154static void __init nexcoder_init(void)
146{ 155{
147 s3c_i2c0_set_platdata(NULL); 156 s3c_i2c0_set_platdata(NULL);
@@ -154,6 +163,6 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
154 .map_io = nexcoder_map_io, 163 .map_io = nexcoder_map_io,
155 .init_machine = nexcoder_init, 164 .init_machine = nexcoder_init,
156 .init_irq = s3c2440_init_irq, 165 .init_irq = s3c2440_init_irq,
157 .init_time = samsung_timer_init, 166 .init_time = nexcoder_init_time,
158 .restart = s3c244x_restart, 167 .restart = s3c244x_restart,
159MACHINE_END 168MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index 487be02e4f2c..3bc2c9bad8b3 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -40,7 +40,6 @@
40#include <linux/mtd/nand_ecc.h> 40#include <linux/mtd/nand_ecc.h>
41#include <linux/mtd/partitions.h> 41#include <linux/mtd/partitions.h>
42 42
43#include <plat/clock.h>
44#include <plat/cpu.h> 43#include <plat/cpu.h>
45#include <plat/cpu-freq.h> 44#include <plat/cpu-freq.h>
46#include <plat/devs.h> 45#include <plat/devs.h>
@@ -389,7 +388,6 @@ static void __init osiris_map_io(void)
389#endif 388#endif
390 389
391 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); 390 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
392 s3c24xx_init_clocks(0);
393 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 391 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
394 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 392 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
395 393
@@ -413,6 +411,12 @@ static void __init osiris_map_io(void)
413 local_irq_restore(flags); 411 local_irq_restore(flags);
414} 412}
415 413
414static void __init osiris_init_time(void)
415{
416 s3c2440_init_clocks(12000000);
417 samsung_timer_init();
418}
419
416static void __init osiris_init(void) 420static void __init osiris_init(void)
417{ 421{
418 register_syscore_ops(&osiris_pm_syscore_ops); 422 register_syscore_ops(&osiris_pm_syscore_ops);
@@ -434,6 +438,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
434 .map_io = osiris_map_io, 438 .map_io = osiris_map_io,
435 .init_irq = s3c2440_init_irq, 439 .init_irq = s3c2440_init_irq,
436 .init_machine = osiris_init, 440 .init_machine = osiris_init,
437 .init_time = samsung_timer_init, 441 .init_time = osiris_init_time,
438 .restart = s3c244x_restart, 442 .restart = s3c244x_restart,
439MACHINE_END 443MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 219454c93db4..5f37f5262e65 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -54,7 +54,6 @@
54#include <mach/regs-lcd.h> 54#include <mach/regs-lcd.h>
55#include <mach/gpio-samsung.h> 55#include <mach/gpio-samsung.h>
56 56
57#include <plat/clock.h>
58#include <plat/cpu.h> 57#include <plat/cpu.h>
59#include <plat/devs.h> 58#include <plat/devs.h>
60#include <plat/pm.h> 59#include <plat/pm.h>
@@ -746,7 +745,6 @@ static void __init rx1950_map_io(void)
746#endif 745#endif
747 746
748 s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); 747 s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc));
749 s3c24xx_init_clocks(16934000);
750 s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); 748 s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs));
751 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 749 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
752 750
@@ -759,6 +757,12 @@ static void __init rx1950_map_io(void)
759 s3c_pm_init(); 757 s3c_pm_init();
760} 758}
761 759
760static void __init rx1950_init_time(void)
761{
762 s3c2442_init_clocks(16934000);
763 samsung_timer_init();
764}
765
762static void __init rx1950_init_machine(void) 766static void __init rx1950_init_machine(void)
763{ 767{
764 int i; 768 int i;
@@ -821,6 +825,6 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
821 .reserve = rx1950_reserve, 825 .reserve = rx1950_reserve,
822 .init_irq = s3c2442_init_irq, 826 .init_irq = s3c2442_init_irq,
823 .init_machine = rx1950_init_machine, 827 .init_machine = rx1950_init_machine,
824 .init_time = samsung_timer_init, 828 .init_time = rx1950_init_time,
825 .restart = s3c244x_restart, 829 .restart = s3c244x_restart,
826MACHINE_END 830MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index e6535ce1bc5c..6e749ec3a2ea 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -46,7 +46,6 @@
46#include <mach/regs-lcd.h> 46#include <mach/regs-lcd.h>
47#include <mach/gpio-samsung.h> 47#include <mach/gpio-samsung.h>
48 48
49#include <plat/clock.h>
50#include <plat/cpu.h> 49#include <plat/cpu.h>
51#include <plat/devs.h> 50#include <plat/devs.h>
52#include <plat/pm.h> 51#include <plat/pm.h>
@@ -179,11 +178,16 @@ static struct platform_device *rx3715_devices[] __initdata = {
179static void __init rx3715_map_io(void) 178static void __init rx3715_map_io(void)
180{ 179{
181 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); 180 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
182 s3c24xx_init_clocks(16934000);
183 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); 181 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
184 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 182 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
185} 183}
186 184
185static void __init rx3715_init_time(void)
186{
187 s3c2440_init_clocks(16934000);
188 samsung_timer_init();
189}
190
187/* H1940 and RX3715 need to reserve this for suspend */ 191/* H1940 and RX3715 need to reserve this for suspend */
188static void __init rx3715_reserve(void) 192static void __init rx3715_reserve(void)
189{ 193{
@@ -210,6 +214,6 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
210 .reserve = rx3715_reserve, 214 .reserve = rx3715_reserve,
211 .init_irq = s3c2440_init_irq, 215 .init_irq = s3c2440_init_irq,
212 .init_machine = rx3715_init_machine, 216 .init_machine = rx3715_init_machine,
213 .init_time = samsung_timer_init, 217 .init_time = rx3715_init_time,
214 .restart = s3c244x_restart, 218 .restart = s3c244x_restart,
215MACHINE_END 219MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index d071dcfea548..5fb89c0ae17a 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -38,7 +38,6 @@
38#include <mach/fb.h> 38#include <mach/fb.h>
39#include <linux/platform_data/i2c-s3c2410.h> 39#include <linux/platform_data/i2c-s3c2410.h>
40 40
41#include <plat/clock.h>
42#include <plat/devs.h> 41#include <plat/devs.h>
43#include <plat/cpu.h> 42#include <plat/cpu.h>
44#include <plat/samsung-time.h> 43#include <plat/samsung-time.h>
@@ -159,11 +158,16 @@ static struct platform_device *smdk2440_devices[] __initdata = {
159static void __init smdk2440_map_io(void) 158static void __init smdk2440_map_io(void)
160{ 159{
161 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); 160 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
162 s3c24xx_init_clocks(16934400);
163 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); 161 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
164 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 162 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
165} 163}
166 164
165static void __init smdk2440_init_time(void)
166{
167 s3c2440_init_clocks(16934400);
168 samsung_timer_init();
169}
170
167static void __init smdk2440_machine_init(void) 171static void __init smdk2440_machine_init(void)
168{ 172{
169 s3c24xx_fb_set_platdata(&smdk2440_fb_info); 173 s3c24xx_fb_set_platdata(&smdk2440_fb_info);
@@ -180,6 +184,6 @@ MACHINE_START(S3C2440, "SMDK2440")
180 .init_irq = s3c2440_init_irq, 184 .init_irq = s3c2440_init_irq,
181 .map_io = smdk2440_map_io, 185 .map_io = smdk2440_map_io,
182 .init_machine = smdk2440_machine_init, 186 .init_machine = smdk2440_machine_init,
183 .init_time = samsung_timer_init, 187 .init_time = smdk2440_init_time,
184 .restart = s3c244x_restart, 188 .restart = s3c244x_restart,
185MACHINE_END 189MACHINE_END