aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig11
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c6
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig6
-rw-r--r--arch/arm/mach-s3c24xx/bast-irq.c2
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2412.c1
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2416.c1
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2443.c1
-rw-r--r--arch/arm/mach-s3c24xx/common-smdk.c3
-rw-r--r--arch/arm/mach-s3c24xx/common-smdk.h (renamed from arch/arm/plat-samsung/include/plat/common-smdk.h)3
-rw-r--r--arch/arm/mach-s3c24xx/common.c7
-rw-r--r--arch/arm/mach-s3c24xx/common.h90
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2412.c1
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2440.c1
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2443.c1
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-sdi.h127
-rw-r--r--arch/arm/mach-s3c24xx/irq-pm.c7
-rw-r--r--arch/arm/mach-s3c24xx/irq.c8
-rw-r--r--arch/arm/mach-s3c24xx/mach-amlm5900.c5
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-bast.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c5
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c6
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-n30.c7
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c6
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-otom.c5
-rw-r--r--arch/arm/mach-s3c24xx/mach-qt2410.c6
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx3715.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2410.c7
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2413.c13
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c8
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2440.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2443.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-tct_hammer.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-vr1000.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-vstms.c7
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2412.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2412.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2416.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2440.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2442.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2443.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c244x.c2
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig2
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-ncp.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c3
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq7.c3
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6400.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c4
-rw-r--r--arch/arm/mach-s5p64x0/Kconfig4
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c6
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c6
-rw-r--r--arch/arm/mach-s5pc100/Kconfig1
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c4
-rw-r--r--arch/arm/mach-s5pv210/Kconfig2
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c6
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c6
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkc110.c6
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c6
-rw-r--r--arch/arm/mach-s5pv210/mach-torbreck.c6
-rw-r--r--arch/arm/plat-samsung/Kconfig2
-rw-r--r--arch/arm/plat-samsung/Makefile3
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h4
-rw-r--r--arch/arm/plat-samsung/include/plat/irq.h116
-rw-r--r--arch/arm/plat-samsung/include/plat/s3c2410.h31
-rw-r--r--arch/arm/plat-samsung/include/plat/s3c2412.h32
-rw-r--r--arch/arm/plat-samsung/include/plat/s3c2416.h37
-rw-r--r--arch/arm/plat-samsung/include/plat/s3c2443.h36
-rw-r--r--arch/arm/plat-samsung/include/plat/s3c244x.h42
-rw-r--r--arch/arm/plat-samsung/include/plat/s5p-time.h40
-rw-r--r--arch/arm/plat-samsung/include/plat/samsung-time.h53
-rw-r--r--arch/arm/plat-samsung/samsung-time.c (renamed from arch/arm/plat-samsung/s5p-time.c)138
-rw-r--r--arch/arm/plat-samsung/time.c287
-rw-r--r--drivers/mmc/host/s3cmci.c83
88 files changed, 469 insertions, 952 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5b714695b01b..46fcfa8805f8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -770,8 +770,10 @@ config ARCH_SA1100
770config ARCH_S3C24XX 770config ARCH_S3C24XX
771 bool "Samsung S3C24XX SoCs" 771 bool "Samsung S3C24XX SoCs"
772 select ARCH_HAS_CPUFREQ 772 select ARCH_HAS_CPUFREQ
773 select ARCH_USES_GETTIMEOFFSET
774 select CLKDEV_LOOKUP 773 select CLKDEV_LOOKUP
774 select CLKSRC_MMIO
775 select GENERIC_CLOCKEVENTS
776 select GENERIC_GPIO
775 select HAVE_CLK 777 select HAVE_CLK
776 select HAVE_S3C2410_I2C if I2C 778 select HAVE_S3C2410_I2C if I2C
777 select HAVE_S3C2410_WATCHDOG if WATCHDOG 779 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -788,10 +790,11 @@ config ARCH_S3C64XX
788 bool "Samsung S3C64XX" 790 bool "Samsung S3C64XX"
789 select ARCH_HAS_CPUFREQ 791 select ARCH_HAS_CPUFREQ
790 select ARCH_REQUIRE_GPIOLIB 792 select ARCH_REQUIRE_GPIOLIB
791 select ARCH_USES_GETTIMEOFFSET
792 select ARM_VIC 793 select ARM_VIC
793 select CLKDEV_LOOKUP 794 select CLKDEV_LOOKUP
795 select CLKSRC_MMIO
794 select CPU_V6 796 select CPU_V6
797 select GENERIC_CLOCKEVENTS
795 select HAVE_CLK 798 select HAVE_CLK
796 select HAVE_S3C2410_I2C if I2C 799 select HAVE_S3C2410_I2C if I2C
797 select HAVE_S3C2410_WATCHDOG if WATCHDOG 800 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -825,9 +828,11 @@ config ARCH_S5P64X0
825 828
826config ARCH_S5PC100 829config ARCH_S5PC100
827 bool "Samsung S5PC100" 830 bool "Samsung S5PC100"
828 select ARCH_USES_GETTIMEOFFSET
829 select CLKDEV_LOOKUP 831 select CLKDEV_LOOKUP
832 select CLKSRC_MMIO
830 select CPU_V7 833 select CPU_V7
834 select GENERIC_CLOCKEVENTS
835 select GENERIC_GPIO
831 select HAVE_CLK 836 select HAVE_CLK
832 select HAVE_S3C2410_I2C if I2C 837 select HAVE_S3C2410_I2C if I2C
833 select HAVE_S3C2410_WATCHDOG if WATCHDOG 838 select HAVE_S3C2410_WATCHDOG if WATCHDOG
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 66b12f76e4ad..bc15b9ee8174 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -277,8 +277,8 @@ config MACH_UNIVERSAL_C210
277 select S5P_DEV_ONENAND 277 select S5P_DEV_ONENAND
278 select S5P_DEV_TV 278 select S5P_DEV_TV
279 select S5P_GPIO_INT 279 select S5P_GPIO_INT
280 select S5P_HRT
281 select S5P_SETUP_MIPIPHY 280 select S5P_SETUP_MIPIPHY
281 select SAMSUNG_HRT
282 help 282 help
283 Machine support for Samsung Mobile Universal S5PC210 Reference 283 Machine support for Samsung Mobile Universal S5PC210 Reference
284 Board. 284 Board.
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 497fcb793dc1..c870b0aaa5e0 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -41,7 +41,7 @@
41#include <plat/mfc.h> 41#include <plat/mfc.h>
42#include <plat/sdhci.h> 42#include <plat/sdhci.h>
43#include <plat/fimc-core.h> 43#include <plat/fimc-core.h>
44#include <plat/s5p-time.h> 44#include <plat/samsung-time.h>
45#include <plat/camport.h> 45#include <plat/camport.h>
46 46
47#include <mach/map.h> 47#include <mach/map.h>
@@ -1094,7 +1094,7 @@ static void __init universal_map_io(void)
1094 exynos_init_io(NULL, 0); 1094 exynos_init_io(NULL, 0);
1095 s3c24xx_init_clocks(clk_xusbxti.rate); 1095 s3c24xx_init_clocks(clk_xusbxti.rate);
1096 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); 1096 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
1097 s5p_set_timer_source(S5P_PWM2, S5P_PWM4); 1097 samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4);
1098} 1098}
1099 1099
1100static void s5p_tv_setup(void) 1100static void s5p_tv_setup(void)
@@ -1152,7 +1152,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
1152 .map_io = universal_map_io, 1152 .map_io = universal_map_io,
1153 .init_machine = universal_machine_init, 1153 .init_machine = universal_machine_init,
1154 .init_late = exynos_init_late, 1154 .init_late = exynos_init_late,
1155 .init_time = s5p_timer_init, 1155 .init_time = samsung_timer_init,
1156 .reserve = &universal_reserve, 1156 .reserve = &universal_reserve,
1157 .restart = exynos4_restart, 1157 .restart = exynos4_restart,
1158MACHINE_END 1158MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 37f513d1588e..0c5e4fb61117 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -30,6 +30,7 @@ config CPU_S3C2410
30 select S3C2410_CLOCK 30 select S3C2410_CLOCK
31 select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX 31 select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX
32 select S3C2410_PM if PM 32 select S3C2410_PM if PM
33 select SAMSUNG_HRT
33 help 34 help
34 Support for S3C2410 and S3C2410A family from the S3C24XX line 35 Support for S3C2410 and S3C2410A family from the S3C24XX line
35 of Samsung Mobile CPUs. 36 of Samsung Mobile CPUs.
@@ -41,6 +42,7 @@ config CPU_S3C2412
41 select CPU_LLSERIAL_S3C2440 42 select CPU_LLSERIAL_S3C2440
42 select S3C2412_DMA if S3C24XX_DMA 43 select S3C2412_DMA if S3C24XX_DMA
43 select S3C2412_PM if PM 44 select S3C2412_PM if PM
45 select SAMSUNG_HRT
44 help 46 help
45 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line 47 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
46 48
@@ -53,6 +55,7 @@ config CPU_S3C2416
53 select S3C2443_COMMON 55 select S3C2443_COMMON
54 select S3C2443_DMA if S3C24XX_DMA 56 select S3C2443_DMA if S3C24XX_DMA
55 select SAMSUNG_CLKSRC 57 select SAMSUNG_CLKSRC
58 select SAMSUNG_HRT
56 help 59 help
57 Support for the S3C2416 SoC from the S3C24XX line 60 Support for the S3C2416 SoC from the S3C24XX line
58 61
@@ -63,6 +66,7 @@ config CPU_S3C2440
63 select S3C2410_CLOCK 66 select S3C2410_CLOCK
64 select S3C2410_PM if PM 67 select S3C2410_PM if PM
65 select S3C2440_DMA if S3C24XX_DMA 68 select S3C2440_DMA if S3C24XX_DMA
69 select SAMSUNG_HRT
66 help 70 help
67 Support for S3C2440 Samsung Mobile CPU based systems. 71 Support for S3C2440 Samsung Mobile CPU based systems.
68 72
@@ -72,6 +76,7 @@ config CPU_S3C2442
72 select CPU_LLSERIAL_S3C2440 76 select CPU_LLSERIAL_S3C2440
73 select S3C2410_CLOCK 77 select S3C2410_CLOCK
74 select S3C2410_PM if PM 78 select S3C2410_PM if PM
79 select SAMSUNG_HRT
75 help 80 help
76 Support for S3C2442 Samsung Mobile CPU based systems. 81 Support for S3C2442 Samsung Mobile CPU based systems.
77 82
@@ -87,6 +92,7 @@ config CPU_S3C2443
87 select S3C2443_COMMON 92 select S3C2443_COMMON
88 select S3C2443_DMA if S3C24XX_DMA 93 select S3C2443_DMA if S3C24XX_DMA
89 select SAMSUNG_CLKSRC 94 select SAMSUNG_CLKSRC
95 select SAMSUNG_HRT
90 help 96 help
91 Support for the S3C2443 SoC from the S3C24XX line 97 Support for the S3C2443 SoC from the S3C24XX line
92 98
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index c0daa9590b4c..cb1b791954de 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -34,8 +34,6 @@
34#include <mach/hardware.h> 34#include <mach/hardware.h>
35#include <mach/regs-irq.h> 35#include <mach/regs-irq.h>
36 36
37#include <plat/irq.h>
38
39#include "bast.h" 37#include "bast.h"
40 38
41#define irqdbf(x...) 39#define irqdbf(x...)
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c
index 641266f3d152..34fffdf6fc1d 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2410.c
@@ -40,7 +40,6 @@
40#include <mach/regs-clock.h> 40#include <mach/regs-clock.h>
41#include <mach/regs-gpio.h> 41#include <mach/regs-gpio.h>
42 42
43#include <plat/s3c2410.h>
44#include <plat/clock.h> 43#include <plat/clock.h>
45#include <plat/cpu.h> 44#include <plat/cpu.h>
46 45
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2412.c b/arch/arm/mach-s3c24xx/clock-s3c2412.c
index d10b695a9066..2cc017da88fe 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2412.c
@@ -41,7 +41,6 @@
41#include <mach/regs-clock.h> 41#include <mach/regs-clock.h>
42#include <mach/regs-gpio.h> 42#include <mach/regs-gpio.h>
43 43
44#include <plat/s3c2412.h>
45#include <plat/clock.h> 44#include <plat/clock.h>
46#include <plat/cpu.h> 45#include <plat/cpu.h>
47 46
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2416.c b/arch/arm/mach-s3c24xx/clock-s3c2416.c
index 14a81c2317a4..036056cea57c 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2416.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2416.c
@@ -14,7 +14,6 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/clk.h> 15#include <linux/clk.h>
16 16
17#include <plat/s3c2416.h>
18#include <plat/clock.h> 17#include <plat/clock.h>
19#include <plat/clock-clksrc.h> 18#include <plat/clock-clksrc.h>
20#include <plat/cpu.h> 19#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index bdaba59b42dc..0a53051b0787 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -41,7 +41,6 @@
41 41
42#include <plat/cpu-freq.h> 42#include <plat/cpu-freq.h>
43 43
44#include <plat/s3c2443.h>
45#include <plat/clock.h> 44#include <plat/clock.h>
46#include <plat/clock-clksrc.h> 45#include <plat/clock-clksrc.h>
47#include <plat/cpu.h> 46#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 3b2cf6db3634..404444dd3840 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -41,11 +41,12 @@
41 41
42#include <linux/platform_data/mtd-nand-s3c2410.h> 42#include <linux/platform_data/mtd-nand-s3c2410.h>
43 43
44#include <plat/common-smdk.h>
45#include <plat/gpio-cfg.h> 44#include <plat/gpio-cfg.h>
46#include <plat/devs.h> 45#include <plat/devs.h>
47#include <plat/pm.h> 46#include <plat/pm.h>
48 47
48#include "common-smdk.h"
49
49/* LED devices */ 50/* LED devices */
50 51
51static struct s3c24xx_led_platdata smdk_pdata_led4 = { 52static struct s3c24xx_led_platdata smdk_pdata_led4 = {
diff --git a/arch/arm/plat-samsung/include/plat/common-smdk.h b/arch/arm/mach-s3c24xx/common-smdk.h
index ba028f1ed30b..98f733e1cb42 100644
--- a/arch/arm/plat-samsung/include/plat/common-smdk.h
+++ b/arch/arm/mach-s3c24xx/common-smdk.h
@@ -1,5 +1,4 @@
1/* linux/arch/arm/plat-samsung/include/plat/common-smdk.h 1/*
2 *
3 * Copyright (c) 2006 Simtec Electronics 2 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 3 * Ben Dooks <ben@simtec.co.uk>
5 * 4 *
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 6bcf87f65f9e..d97533d21ac4 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -47,14 +47,11 @@
47#include <plat/cpu.h> 47#include <plat/cpu.h>
48#include <plat/devs.h> 48#include <plat/devs.h>
49#include <plat/clock.h> 49#include <plat/clock.h>
50#include <plat/s3c2410.h>
51#include <plat/s3c2412.h>
52#include <plat/s3c2416.h>
53#include <plat/s3c244x.h>
54#include <plat/s3c2443.h>
55#include <plat/cpu-freq.h> 50#include <plat/cpu-freq.h>
56#include <plat/pll.h> 51#include <plat/pll.h>
57 52
53#include "common.h"
54
58/* table of supported CPUs */ 55/* table of supported CPUs */
59 56
60static const char name_s3c2410[] = "S3C2410"; 57static const char name_s3c2410[] = "S3C2410";
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index ed6276fcaa3b..8a2b4137ddb6 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -12,8 +12,94 @@
12#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H 12#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
13#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ 13#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
14 14
15void s3c2410_restart(char mode, const char *cmd); 15struct s3c2410_uartcfg;
16void s3c244x_restart(char mode, const char *cmd); 16
17#ifdef CONFIG_CPU_S3C2410
18extern int s3c2410_init(void);
19extern int s3c2410a_init(void);
20extern void s3c2410_map_io(void);
21extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
22extern void s3c2410_init_clocks(int xtal);
23extern void s3c2410_restart(char mode, const char *cmd);
24#else
25#define s3c2410_init_clocks NULL
26#define s3c2410_init_uarts NULL
27#define s3c2410_map_io NULL
28#define s3c2410_init NULL
29#define s3c2410a_init NULL
30#endif
31
32#ifdef CONFIG_CPU_S3C2412
33extern int s3c2412_init(void);
34extern void s3c2412_map_io(void);
35extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
36extern void s3c2412_init_clocks(int xtal);
37extern int s3c2412_baseclk_add(void);
38extern void s3c2412_restart(char mode, const char *cmd);
39#else
40#define s3c2412_init_clocks NULL
41#define s3c2412_init_uarts NULL
42#define s3c2412_map_io NULL
43#define s3c2412_init NULL
44#endif
45
46#ifdef CONFIG_CPU_S3C2416
47extern int s3c2416_init(void);
48extern void s3c2416_map_io(void);
49extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
50extern void s3c2416_init_clocks(int xtal);
51extern int s3c2416_baseclk_add(void);
52extern void s3c2416_restart(char mode, const char *cmd);
53extern void s3c2416_init_irq(void);
54
55extern struct syscore_ops s3c2416_irq_syscore_ops;
56#else
57#define s3c2416_init_clocks NULL
58#define s3c2416_init_uarts NULL
59#define s3c2416_map_io NULL
60#define s3c2416_init NULL
61#endif
62
63#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
64extern void s3c244x_map_io(void);
65extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
66extern void s3c244x_init_clocks(int xtal);
67extern void s3c244x_restart(char mode, const char *cmd);
68#else
69#define s3c244x_init_clocks NULL
70#define s3c244x_init_uarts NULL
71#endif
72
73#ifdef CONFIG_CPU_S3C2440
74extern int s3c2440_init(void);
75extern void s3c2440_map_io(void);
76#else
77#define s3c2440_init NULL
78#define s3c2440_map_io NULL
79#endif
80
81#ifdef CONFIG_CPU_S3C2442
82extern int s3c2442_init(void);
83extern void s3c2442_map_io(void);
84#else
85#define s3c2442_init NULL
86#define s3c2442_map_io NULL
87#endif
88
89#ifdef CONFIG_CPU_S3C2443
90extern int s3c2443_init(void);
91extern void s3c2443_map_io(void);
92extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
93extern void s3c2443_init_clocks(int xtal);
94extern int s3c2443_baseclk_add(void);
95extern void s3c2443_restart(char mode, const char *cmd);
96extern void s3c2443_init_irq(void);
97#else
98#define s3c2443_init_clocks NULL
99#define s3c2443_init_uarts NULL
100#define s3c2443_map_io NULL
101#define s3c2443_init NULL
102#endif
17 103
18extern struct syscore_ops s3c24xx_irq_syscore_ops; 104extern struct syscore_ops s3c24xx_irq_syscore_ops;
19 105
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2410.c b/arch/arm/mach-s3c24xx/dma-s3c2410.c
index 25d085adc93c..a6c94b820954 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c
@@ -28,7 +28,6 @@
28#include <plat/regs-ac97.h> 28#include <plat/regs-ac97.h>
29#include <plat/regs-dma.h> 29#include <plat/regs-dma.h>
30#include <mach/regs-lcd.h> 30#include <mach/regs-lcd.h>
31#include <mach/regs-sdi.h>
32#include <plat/regs-iis.h> 31#include <plat/regs-iis.h>
33#include <plat/regs-spi.h> 32#include <plat/regs-spi.h>
34 33
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2412.c b/arch/arm/mach-s3c24xx/dma-s3c2412.c
index d2408ba372cb..c0e8c3f5057e 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c
@@ -28,7 +28,6 @@
28#include <plat/regs-ac97.h> 28#include <plat/regs-ac97.h>
29#include <plat/regs-dma.h> 29#include <plat/regs-dma.h>
30#include <mach/regs-lcd.h> 30#include <mach/regs-lcd.h>
31#include <mach/regs-sdi.h>
32#include <plat/regs-iis.h> 31#include <plat/regs-iis.h>
33#include <plat/regs-spi.h> 32#include <plat/regs-spi.h>
34 33
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2440.c b/arch/arm/mach-s3c24xx/dma-s3c2440.c
index 0b86e74d104f..1c08eccd9425 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c
@@ -28,7 +28,6 @@
28#include <plat/regs-ac97.h> 28#include <plat/regs-ac97.h>
29#include <plat/regs-dma.h> 29#include <plat/regs-dma.h>
30#include <mach/regs-lcd.h> 30#include <mach/regs-lcd.h>
31#include <mach/regs-sdi.h>
32#include <plat/regs-iis.h> 31#include <plat/regs-iis.h>
33#include <plat/regs-spi.h> 32#include <plat/regs-spi.h>
34 33
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index 05536254a3f8..000e4c69fce9 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -28,7 +28,6 @@
28#include <plat/regs-ac97.h> 28#include <plat/regs-ac97.h>
29#include <plat/regs-dma.h> 29#include <plat/regs-dma.h>
30#include <mach/regs-lcd.h> 30#include <mach/regs-lcd.h>
31#include <mach/regs-sdi.h>
32#include <plat/regs-iis.h> 31#include <plat/regs-iis.h>
33#include <plat/regs-spi.h> 32#include <plat/regs-spi.h>
34 33
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h b/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h
deleted file mode 100644
index cbf2d8884e30..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-sdi.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 MMC/SDIO register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_SDI
14#define __ASM_ARM_REGS_SDI "regs-sdi.h"
15
16#define S3C2410_SDICON (0x00)
17#define S3C2410_SDIPRE (0x04)
18#define S3C2410_SDICMDARG (0x08)
19#define S3C2410_SDICMDCON (0x0C)
20#define S3C2410_SDICMDSTAT (0x10)
21#define S3C2410_SDIRSP0 (0x14)
22#define S3C2410_SDIRSP1 (0x18)
23#define S3C2410_SDIRSP2 (0x1C)
24#define S3C2410_SDIRSP3 (0x20)
25#define S3C2410_SDITIMER (0x24)
26#define S3C2410_SDIBSIZE (0x28)
27#define S3C2410_SDIDCON (0x2C)
28#define S3C2410_SDIDCNT (0x30)
29#define S3C2410_SDIDSTA (0x34)
30#define S3C2410_SDIFSTA (0x38)
31
32#define S3C2410_SDIDATA (0x3C)
33#define S3C2410_SDIIMSK (0x40)
34
35#define S3C2440_SDIDATA (0x40)
36#define S3C2440_SDIIMSK (0x3C)
37
38#define S3C2440_SDICON_SDRESET (1<<8)
39#define S3C2440_SDICON_MMCCLOCK (1<<5)
40#define S3C2410_SDICON_BYTEORDER (1<<4)
41#define S3C2410_SDICON_SDIOIRQ (1<<3)
42#define S3C2410_SDICON_RWAITEN (1<<2)
43#define S3C2410_SDICON_FIFORESET (1<<1)
44#define S3C2410_SDICON_CLOCKTYPE (1<<0)
45
46#define S3C2410_SDICMDCON_ABORT (1<<12)
47#define S3C2410_SDICMDCON_WITHDATA (1<<11)
48#define S3C2410_SDICMDCON_LONGRSP (1<<10)
49#define S3C2410_SDICMDCON_WAITRSP (1<<9)
50#define S3C2410_SDICMDCON_CMDSTART (1<<8)
51#define S3C2410_SDICMDCON_SENDERHOST (1<<6)
52#define S3C2410_SDICMDCON_INDEX (0x3f)
53
54#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12)
55#define S3C2410_SDICMDSTAT_CMDSENT (1<<11)
56#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10)
57#define S3C2410_SDICMDSTAT_RSPFIN (1<<9)
58#define S3C2410_SDICMDSTAT_XFERING (1<<8)
59#define S3C2410_SDICMDSTAT_INDEX (0xff)
60
61#define S3C2440_SDIDCON_DS_BYTE (0<<22)
62#define S3C2440_SDIDCON_DS_HALFWORD (1<<22)
63#define S3C2440_SDIDCON_DS_WORD (2<<22)
64#define S3C2410_SDIDCON_IRQPERIOD (1<<21)
65#define S3C2410_SDIDCON_TXAFTERRESP (1<<20)
66#define S3C2410_SDIDCON_RXAFTERCMD (1<<19)
67#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18)
68#define S3C2410_SDIDCON_BLOCKMODE (1<<17)
69#define S3C2410_SDIDCON_WIDEBUS (1<<16)
70#define S3C2410_SDIDCON_DMAEN (1<<15)
71#define S3C2410_SDIDCON_STOP (1<<14)
72#define S3C2440_SDIDCON_DATSTART (1<<14)
73#define S3C2410_SDIDCON_DATMODE (3<<12)
74#define S3C2410_SDIDCON_BLKNUM (0x7ff)
75
76/* constants for S3C2410_SDIDCON_DATMODE */
77#define S3C2410_SDIDCON_XFER_READY (0<<12)
78#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12)
79#define S3C2410_SDIDCON_XFER_RXSTART (2<<12)
80#define S3C2410_SDIDCON_XFER_TXSTART (3<<12)
81
82#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF)
83#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12)
84
85#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10)
86#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9)
87#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */
88#define S3C2410_SDIDSTA_CRCFAIL (1<<7)
89#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6)
90#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5)
91#define S3C2410_SDIDSTA_XFERFINISH (1<<4)
92#define S3C2410_SDIDSTA_BUSYFINISH (1<<3)
93#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */
94#define S3C2410_SDIDSTA_TXDATAON (1<<1)
95#define S3C2410_SDIDSTA_RXDATAON (1<<0)
96
97#define S3C2440_SDIFSTA_FIFORESET (1<<16)
98#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */
99#define S3C2410_SDIFSTA_TFDET (1<<13)
100#define S3C2410_SDIFSTA_RFDET (1<<12)
101#define S3C2410_SDIFSTA_TFHALF (1<<11)
102#define S3C2410_SDIFSTA_TFEMPTY (1<<10)
103#define S3C2410_SDIFSTA_RFLAST (1<<9)
104#define S3C2410_SDIFSTA_RFFULL (1<<8)
105#define S3C2410_SDIFSTA_RFHALF (1<<7)
106#define S3C2410_SDIFSTA_COUNTMASK (0x7f)
107
108#define S3C2410_SDIIMSK_RESPONSECRC (1<<17)
109#define S3C2410_SDIIMSK_CMDSENT (1<<16)
110#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15)
111#define S3C2410_SDIIMSK_RESPONSEND (1<<14)
112#define S3C2410_SDIIMSK_READWAIT (1<<13)
113#define S3C2410_SDIIMSK_SDIOIRQ (1<<12)
114#define S3C2410_SDIIMSK_FIFOFAIL (1<<11)
115#define S3C2410_SDIIMSK_CRCSTATUS (1<<10)
116#define S3C2410_SDIIMSK_DATACRC (1<<9)
117#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8)
118#define S3C2410_SDIIMSK_DATAFINISH (1<<7)
119#define S3C2410_SDIIMSK_BUSYFINISH (1<<6)
120#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */
121#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4)
122#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3)
123#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2)
124#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1)
125#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0)
126
127#endif /* __ASM_ARM_REGS_SDI */
diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c24xx/irq-pm.c
index e1199599873e..b91341ef2b2e 100644
--- a/arch/arm/mach-s3c24xx/irq-pm.c
+++ b/arch/arm/mach-s3c24xx/irq-pm.c
@@ -16,10 +16,15 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/syscore_ops.h> 18#include <linux/syscore_ops.h>
19#include <linux/io.h>
19 20
20#include <plat/cpu.h> 21#include <plat/cpu.h>
21#include <plat/pm.h> 22#include <plat/pm.h>
22#include <plat/irq.h> 23#include <plat/map-base.h>
24#include <plat/map-s3c.h>
25
26#include <mach/regs-irq.h>
27#include <mach/regs-gpio.h>
23 28
24#include <asm/irq.h> 29#include <asm/irq.h>
25 30
diff --git a/arch/arm/mach-s3c24xx/irq.c b/arch/arm/mach-s3c24xx/irq.c
index cb9f5e011e73..c1b96f7cc587 100644
--- a/arch/arm/mach-s3c24xx/irq.c
+++ b/arch/arm/mach-s3c24xx/irq.c
@@ -34,7 +34,6 @@
34#include <plat/cpu.h> 34#include <plat/cpu.h>
35#include <plat/regs-irqtype.h> 35#include <plat/regs-irqtype.h>
36#include <plat/pm.h> 36#include <plat/pm.h>
37#include <plat/irq.h>
38 37
39#define S3C_IRQTYPE_NONE 0 38#define S3C_IRQTYPE_NONE 0
40#define S3C_IRQTYPE_EINT 1 39#define S3C_IRQTYPE_EINT 1
@@ -175,8 +174,7 @@ static int s3c_irqext_type_set(void __iomem *gpcon_reg,
175 return 0; 174 return 0;
176} 175}
177 176
178/* FIXME: make static when it's out of plat-samsung/irq.h */ 177static int s3c_irqext_type(struct irq_data *data, unsigned int type)
179int s3c_irqext_type(struct irq_data *data, unsigned int type)
180{ 178{
181 void __iomem *extint_reg; 179 void __iomem *extint_reg;
182 void __iomem *gpcon_reg; 180 void __iomem *gpcon_reg;
@@ -224,7 +222,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type)
224 extint_offset, type); 222 extint_offset, type);
225} 223}
226 224
227struct irq_chip s3c_irq_chip = { 225static struct irq_chip s3c_irq_chip = {
228 .name = "s3c", 226 .name = "s3c",
229 .irq_ack = s3c_irq_ack, 227 .irq_ack = s3c_irq_ack,
230 .irq_mask = s3c_irq_mask, 228 .irq_mask = s3c_irq_mask,
@@ -232,7 +230,7 @@ struct irq_chip s3c_irq_chip = {
232 .irq_set_wake = s3c_irq_wake 230 .irq_set_wake = s3c_irq_wake
233}; 231};
234 232
235struct irq_chip s3c_irq_level_chip = { 233static struct irq_chip s3c_irq_level_chip = {
236 .name = "s3c-level", 234 .name = "s3c-level",
237 .irq_mask = s3c_irq_mask, 235 .irq_mask = s3c_irq_mask,
238 .irq_unmask = s3c_irq_unmask, 236 .irq_unmask = s3c_irq_unmask,
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 0e0279e79150..432144cb54ae 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -63,6 +63,8 @@
63#include <linux/mtd/map.h> 63#include <linux/mtd/map.h>
64#include <linux/mtd/physmap.h> 64#include <linux/mtd/physmap.h>
65 65
66#include <plat/samsung-time.h>
67
66#include "common.h" 68#include "common.h"
67 69
68static struct resource amlm5900_nor_resource = 70static struct resource amlm5900_nor_resource =
@@ -160,6 +162,7 @@ static void __init amlm5900_map_io(void)
160 s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); 162 s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc));
161 s3c24xx_init_clocks(0); 163 s3c24xx_init_clocks(0);
162 s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); 164 s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs));
165 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
163} 166}
164 167
165#ifdef CONFIG_FB_S3C2410 168#ifdef CONFIG_FB_S3C2410
@@ -237,6 +240,6 @@ MACHINE_START(AML_M5900, "AML_M5900")
237 .map_io = amlm5900_map_io, 240 .map_io = amlm5900_map_io,
238 .init_irq = s3c24xx_init_irq, 241 .init_irq = s3c24xx_init_irq,
239 .init_machine = amlm5900_init, 242 .init_machine = amlm5900_init,
240 .init_time = s3c24xx_timer_init, 243 .init_time = samsung_timer_init,
241 .restart = s3c2410_restart, 244 .restart = s3c2410_restart,
242MACHINE_END 245MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index bb595f15ce36..24f1a04ccc88 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -49,6 +49,7 @@
49#include <plat/devs.h> 49#include <plat/devs.h>
50#include <plat/cpu.h> 50#include <plat/cpu.h>
51#include <linux/platform_data/asoc-s3c24xx_simtec.h> 51#include <linux/platform_data/asoc-s3c24xx_simtec.h>
52#include <plat/samsung-time.h>
52 53
53#include "anubis.h" 54#include "anubis.h"
54#include "common.h" 55#include "common.h"
@@ -410,6 +411,7 @@ static void __init anubis_map_io(void)
410 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); 411 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
411 s3c24xx_init_clocks(0); 412 s3c24xx_init_clocks(0);
412 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 413 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
414 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
413 415
414 /* check for the newer revision boards with large page nand */ 416 /* check for the newer revision boards with large page nand */
415 417
@@ -444,6 +446,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
444 .map_io = anubis_map_io, 446 .map_io = anubis_map_io,
445 .init_machine = anubis_init, 447 .init_machine = anubis_init,
446 .init_irq = s3c24xx_init_irq, 448 .init_irq = s3c24xx_init_irq,
447 .init_time = s3c24xx_timer_init, 449 .init_time = samsung_timer_init,
448 .restart = s3c244x_restart, 450 .restart = s3c244x_restart,
449MACHINE_END 451MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index b4bc60c78ebb..2bf6c8c24317 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -48,6 +48,7 @@
48#include <plat/devs.h> 48#include <plat/devs.h>
49#include <plat/cpu.h> 49#include <plat/cpu.h>
50#include <linux/platform_data/mmc-s3cmci.h> 50#include <linux/platform_data/mmc-s3cmci.h>
51#include <plat/samsung-time.h>
51 52
52#include "common.h" 53#include "common.h"
53 54
@@ -192,6 +193,7 @@ static void __init at2440evb_map_io(void)
192 s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); 193 s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
193 s3c24xx_init_clocks(16934400); 194 s3c24xx_init_clocks(16934400);
194 s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs)); 195 s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
196 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
195} 197}
196 198
197static void __init at2440evb_init(void) 199static void __init at2440evb_init(void)
@@ -210,6 +212,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
210 .map_io = at2440evb_map_io, 212 .map_io = at2440evb_map_io,
211 .init_machine = at2440evb_init, 213 .init_machine = at2440evb_init,
212 .init_irq = s3c24xx_init_irq, 214 .init_irq = s3c24xx_init_irq,
213 .init_time = s3c24xx_timer_init, 215 .init_time = samsung_timer_init,
214 .restart = s3c244x_restart, 216 .restart = s3c244x_restart,
215MACHINE_END 217MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index ca6618081041..eabe2db42ef6 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -55,6 +55,7 @@
55#include <plat/devs.h> 55#include <plat/devs.h>
56#include <plat/gpio-cfg.h> 56#include <plat/gpio-cfg.h>
57#include <plat/regs-serial.h> 57#include <plat/regs-serial.h>
58#include <plat/samsung-time.h>
58 59
59#include "bast.h" 60#include "bast.h"
60#include "common.h" 61#include "common.h"
@@ -576,6 +577,7 @@ static void __init bast_map_io(void)
576 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); 577 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
577 s3c24xx_init_clocks(0); 578 s3c24xx_init_clocks(0);
578 s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); 579 s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
580 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
579} 581}
580 582
581static void __init bast_init(void) 583static void __init bast_init(void)
@@ -605,6 +607,6 @@ MACHINE_START(BAST, "Simtec-BAST")
605 .map_io = bast_map_io, 607 .map_io = bast_map_io,
606 .init_irq = s3c24xx_init_irq, 608 .init_irq = s3c24xx_init_irq,
607 .init_machine = bast_init, 609 .init_machine = bast_init,
608 .init_time = s3c24xx_timer_init, 610 .init_time = samsung_timer_init,
609 .restart = s3c2410_restart, 611 .restart = s3c2410_restart,
610MACHINE_END 612MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index a25e8c5a7b4c..84a750d46d4b 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -81,6 +81,7 @@
81#include <plat/gpio-cfg.h> 81#include <plat/gpio-cfg.h>
82#include <plat/pm.h> 82#include <plat/pm.h>
83#include <plat/regs-serial.h> 83#include <plat/regs-serial.h>
84#include <plat/samsung-time.h>
84 85
85#include "common.h" 86#include "common.h"
86#include "gta02.h" 87#include "gta02.h"
@@ -501,6 +502,7 @@ static void __init gta02_map_io(void)
501 s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); 502 s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
502 s3c24xx_init_clocks(12000000); 503 s3c24xx_init_clocks(12000000);
503 s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs)); 504 s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs));
505 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
504} 506}
505 507
506 508
@@ -589,6 +591,6 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
589 .map_io = gta02_map_io, 591 .map_io = gta02_map_io,
590 .init_irq = s3c24xx_init_irq, 592 .init_irq = s3c24xx_init_irq,
591 .init_machine = gta02_machine_init, 593 .init_machine = gta02_machine_init,
592 .init_time = s3c24xx_timer_init, 594 .init_time = samsung_timer_init,
593 .restart = s3c244x_restart, 595 .restart = s3c244x_restart,
594MACHINE_END 596MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 79bc0830d740..8dd660102846 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -62,7 +62,7 @@
62#include <plat/pll.h> 62#include <plat/pll.h>
63#include <plat/pm.h> 63#include <plat/pm.h>
64#include <plat/regs-serial.h> 64#include <plat/regs-serial.h>
65 65#include <plat/samsung-time.h>
66 66
67#include "common.h" 67#include "common.h"
68#include "h1940.h" 68#include "h1940.h"
@@ -646,6 +646,7 @@ static void __init h1940_map_io(void)
646 s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); 646 s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
647 s3c24xx_init_clocks(0); 647 s3c24xx_init_clocks(0);
648 s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); 648 s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
649 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
649 650
650 /* setup PM */ 651 /* setup PM */
651 652
@@ -741,6 +742,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
741 .reserve = h1940_reserve, 742 .reserve = h1940_reserve,
742 .init_irq = h1940_init_irq, 743 .init_irq = h1940_init_irq,
743 .init_machine = h1940_init, 744 .init_machine = h1940_init,
744 .init_time = s3c24xx_timer_init, 745 .init_time = samsung_timer_init,
745 .restart = s3c2410_restart, 746 .restart = s3c2410_restart,
746MACHINE_END 747MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 54e83c1f780c..aade943288c7 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -46,14 +46,15 @@
46#include <linux/mtd/nand_ecc.h> 46#include <linux/mtd/nand_ecc.h>
47#include <linux/mtd/partitions.h> 47#include <linux/mtd/partitions.h>
48 48
49#include <plat/s3c2412.h>
50#include <plat/gpio-cfg.h> 49#include <plat/gpio-cfg.h>
51#include <plat/clock.h> 50#include <plat/clock.h>
52#include <plat/devs.h> 51#include <plat/devs.h>
53#include <plat/cpu.h> 52#include <plat/cpu.h>
54#include <plat/pm.h> 53#include <plat/pm.h>
55#include <linux/platform_data/usb-s3c2410_udc.h> 54#include <linux/platform_data/usb-s3c2410_udc.h>
55#include <plat/samsung-time.h>
56 56
57#include "common.h"
57#include "s3c2412-power.h" 58#include "s3c2412-power.h"
58 59
59static struct map_desc jive_iodesc[] __initdata = { 60static struct map_desc jive_iodesc[] __initdata = {
@@ -506,6 +507,7 @@ static void __init jive_map_io(void)
506 s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc)); 507 s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
507 s3c24xx_init_clocks(12000000); 508 s3c24xx_init_clocks(12000000);
508 s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs)); 509 s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs));
510 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
509} 511}
510 512
511static void jive_power_off(void) 513static void jive_power_off(void)
@@ -661,6 +663,6 @@ MACHINE_START(JIVE, "JIVE")
661 .init_irq = s3c24xx_init_irq, 663 .init_irq = s3c24xx_init_irq,
662 .map_io = jive_map_io, 664 .map_io = jive_map_io,
663 .init_machine = jive_machine_init, 665 .init_machine = jive_machine_init,
664 .init_time = s3c24xx_timer_init, 666 .init_time = samsung_timer_init,
665 .restart = s3c2412_restart, 667 .restart = s3c2412_restart,
666MACHINE_END 668MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 2865e5919f2c..29f106cb370e 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -56,6 +56,7 @@
56#include <plat/clock.h> 56#include <plat/clock.h>
57#include <plat/devs.h> 57#include <plat/devs.h>
58#include <plat/cpu.h> 58#include <plat/cpu.h>
59#include <plat/samsung-time.h>
59 60
60#include <sound/s3c24xx_uda134x.h> 61#include <sound/s3c24xx_uda134x.h>
61 62
@@ -525,6 +526,7 @@ static void __init mini2440_map_io(void)
525 s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc)); 526 s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
526 s3c24xx_init_clocks(12000000); 527 s3c24xx_init_clocks(12000000);
527 s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs)); 528 s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
529 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
528} 530}
529 531
530/* 532/*
@@ -687,6 +689,6 @@ MACHINE_START(MINI2440, "MINI2440")
687 .map_io = mini2440_map_io, 689 .map_io = mini2440_map_io,
688 .init_machine = mini2440_init, 690 .init_machine = mini2440_init,
689 .init_irq = s3c24xx_init_irq, 691 .init_irq = s3c24xx_init_irq,
690 .init_time = s3c24xx_timer_init, 692 .init_time = samsung_timer_init,
691 .restart = s3c244x_restart, 693 .restart = s3c244x_restart,
692MACHINE_END 694MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index d9d04b240295..73a690f431e6 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -48,8 +48,8 @@
48#include <plat/cpu.h> 48#include <plat/cpu.h>
49#include <plat/devs.h> 49#include <plat/devs.h>
50#include <linux/platform_data/mmc-s3cmci.h> 50#include <linux/platform_data/mmc-s3cmci.h>
51#include <plat/s3c2410.h>
52#include <linux/platform_data/usb-s3c2410_udc.h> 51#include <linux/platform_data/usb-s3c2410_udc.h>
52#include <plat/samsung-time.h>
53 53
54#include "common.h" 54#include "common.h"
55 55
@@ -536,6 +536,7 @@ static void __init n30_map_io(void)
536 n30_hwinit(); 536 n30_hwinit();
537 s3c24xx_init_clocks(0); 537 s3c24xx_init_clocks(0);
538 s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); 538 s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs));
539 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
539} 540}
540 541
541/* GPB3 is the line that controls the pull-up for the USB D+ line */ 542/* GPB3 is the line that controls the pull-up for the USB D+ line */
@@ -589,7 +590,7 @@ MACHINE_START(N30, "Acer-N30")
589 Ben Dooks <ben-linux@fluff.org> 590 Ben Dooks <ben-linux@fluff.org>
590 */ 591 */
591 .atag_offset = 0x100, 592 .atag_offset = 0x100,
592 .init_time = s3c24xx_timer_init, 593 .init_time = samsung_timer_init,
593 .init_machine = n30_init, 594 .init_machine = n30_init,
594 .init_irq = s3c24xx_init_irq, 595 .init_irq = s3c24xx_init_irq,
595 .map_io = n30_map_io, 596 .map_io = n30_map_io,
@@ -600,7 +601,7 @@ MACHINE_START(N35, "Acer-N35")
600 /* Maintainer: Christer Weinigel <christer@weinigel.se> 601 /* Maintainer: Christer Weinigel <christer@weinigel.se>
601 */ 602 */
602 .atag_offset = 0x100, 603 .atag_offset = 0x100,
603 .init_time = s3c24xx_timer_init, 604 .init_time = samsung_timer_init,
604 .init_machine = n30_init, 605 .init_machine = n30_init,
605 .init_irq = s3c24xx_init_irq, 606 .init_irq = s3c24xx_init_irq,
606 .map_io = n30_map_io, 607 .map_io = n30_map_io,
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index a454e2461860..5c826d10a66d 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -41,11 +41,10 @@
41#include <linux/platform_data/i2c-s3c2410.h> 41#include <linux/platform_data/i2c-s3c2410.h>
42 42
43#include <plat/gpio-cfg.h> 43#include <plat/gpio-cfg.h>
44#include <plat/s3c2410.h>
45#include <plat/s3c244x.h>
46#include <plat/clock.h> 44#include <plat/clock.h>
47#include <plat/devs.h> 45#include <plat/devs.h>
48#include <plat/cpu.h> 46#include <plat/cpu.h>
47#include <plat/samsung-time.h>
49 48
50#include "common.h" 49#include "common.h"
51 50
@@ -137,6 +136,7 @@ static void __init nexcoder_map_io(void)
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); 137 s3c24xx_init_clocks(0);
139 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); 138 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
139 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
140 140
141 nexcoder_sensorboard_init(); 141 nexcoder_sensorboard_init();
142} 142}
@@ -153,6 +153,6 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
153 .map_io = nexcoder_map_io, 153 .map_io = nexcoder_map_io,
154 .init_machine = nexcoder_init, 154 .init_machine = nexcoder_init,
155 .init_irq = s3c24xx_init_irq, 155 .init_irq = s3c24xx_init_irq,
156 .init_time = s3c24xx_timer_init, 156 .init_time = samsung_timer_init,
157 .restart = s3c244x_restart, 157 .restart = s3c244x_restart,
158MACHINE_END 158MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index ae2cbdf3e3ca..4c90ffda4e11 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -45,6 +45,7 @@
45#include <plat/devs.h> 45#include <plat/devs.h>
46#include <plat/gpio-cfg.h> 46#include <plat/gpio-cfg.h>
47#include <plat/regs-serial.h> 47#include <plat/regs-serial.h>
48#include <plat/samsung-time.h>
48 49
49#include <mach/hardware.h> 50#include <mach/hardware.h>
50#include <mach/regs-gpio.h> 51#include <mach/regs-gpio.h>
@@ -384,6 +385,7 @@ static void __init osiris_map_io(void)
384 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); 385 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
385 s3c24xx_init_clocks(0); 386 s3c24xx_init_clocks(0);
386 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 387 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
388 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
387 389
388 /* check for the newer revision boards with large page nand */ 390 /* check for the newer revision boards with large page nand */
389 391
@@ -426,6 +428,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
426 .map_io = osiris_map_io, 428 .map_io = osiris_map_io,
427 .init_irq = s3c24xx_init_irq, 429 .init_irq = s3c24xx_init_irq,
428 .init_machine = osiris_init, 430 .init_machine = osiris_init,
429 .init_time = s3c24xx_timer_init, 431 .init_time = samsung_timer_init,
430 .restart = s3c244x_restart, 432 .restart = s3c244x_restart,
431MACHINE_END 433MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index 40a47d6c6a85..7b8670746b6a 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -33,7 +33,7 @@
33#include <plat/cpu.h> 33#include <plat/cpu.h>
34#include <plat/devs.h> 34#include <plat/devs.h>
35#include <plat/regs-serial.h> 35#include <plat/regs-serial.h>
36#include <plat/s3c2410.h> 36#include <plat/samsung-time.h>
37 37
38#include "common.h" 38#include "common.h"
39#include "otom.h" 39#include "otom.h"
@@ -102,6 +102,7 @@ static void __init otom11_map_io(void)
102 s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); 102 s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
103 s3c24xx_init_clocks(0); 103 s3c24xx_init_clocks(0);
104 s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); 104 s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
105 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
105} 106}
106 107
107static void __init otom11_init(void) 108static void __init otom11_init(void)
@@ -116,6 +117,6 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
116 .map_io = otom11_map_io, 117 .map_io = otom11_map_io,
117 .init_machine = otom11_init, 118 .init_machine = otom11_init,
118 .init_irq = s3c24xx_init_irq, 119 .init_irq = s3c24xx_init_irq,
119 .init_time = s3c24xx_timer_init, 120 .init_time = samsung_timer_init,
120 .restart = s3c2410_restart, 121 .restart = s3c2410_restart,
121MACHINE_END 122MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 56175f0941b1..71cf29b12d1f 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -55,13 +55,14 @@
55#include <linux/platform_data/usb-s3c2410_udc.h> 55#include <linux/platform_data/usb-s3c2410_udc.h>
56#include <linux/platform_data/i2c-s3c2410.h> 56#include <linux/platform_data/i2c-s3c2410.h>
57 57
58#include <plat/common-smdk.h>
59#include <plat/gpio-cfg.h> 58#include <plat/gpio-cfg.h>
60#include <plat/devs.h> 59#include <plat/devs.h>
61#include <plat/cpu.h> 60#include <plat/cpu.h>
62#include <plat/pm.h> 61#include <plat/pm.h>
62#include <plat/samsung-time.h>
63 63
64#include "common.h" 64#include "common.h"
65#include "common-smdk.h"
65 66
66static struct map_desc qt2410_iodesc[] __initdata = { 67static struct map_desc qt2410_iodesc[] __initdata = {
67 { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE } 68 { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE }
@@ -304,6 +305,7 @@ static void __init qt2410_map_io(void)
304 s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); 305 s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc));
305 s3c24xx_init_clocks(12*1000*1000); 306 s3c24xx_init_clocks(12*1000*1000);
306 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); 307 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
308 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
307} 309}
308 310
309static void __init qt2410_machine_init(void) 311static void __init qt2410_machine_init(void)
@@ -343,6 +345,6 @@ MACHINE_START(QT2410, "QT2410")
343 .map_io = qt2410_map_io, 345 .map_io = qt2410_map_io,
344 .init_irq = s3c24xx_init_irq, 346 .init_irq = s3c24xx_init_irq,
345 .init_machine = qt2410_machine_init, 347 .init_machine = qt2410_machine_init,
346 .init_time = s3c24xx_timer_init, 348 .init_time = samsung_timer_init,
347 .restart = s3c2410_restart, 349 .restart = s3c2410_restart,
348MACHINE_END 350MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 1f9ba2ae5288..799af43b4e6a 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -58,6 +58,7 @@
58#include <plat/pm.h> 58#include <plat/pm.h>
59#include <plat/regs-iic.h> 59#include <plat/regs-iic.h>
60#include <plat/regs-serial.h> 60#include <plat/regs-serial.h>
61#include <plat/samsung-time.h>
61 62
62#include "common.h" 63#include "common.h"
63#include "h1940.h" 64#include "h1940.h"
@@ -741,6 +742,7 @@ static void __init rx1950_map_io(void)
741 s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); 742 s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc));
742 s3c24xx_init_clocks(16934000); 743 s3c24xx_init_clocks(16934000);
743 s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); 744 s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs));
745 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
744 746
745 /* setup PM */ 747 /* setup PM */
746 748
@@ -813,6 +815,6 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
813 .reserve = rx1950_reserve, 815 .reserve = rx1950_reserve,
814 .init_irq = s3c24xx_init_irq, 816 .init_irq = s3c24xx_init_irq,
815 .init_machine = rx1950_init_machine, 817 .init_machine = rx1950_init_machine,
816 .init_time = s3c24xx_timer_init, 818 .init_time = samsung_timer_init,
817 .restart = s3c244x_restart, 819 .restart = s3c244x_restart,
818MACHINE_END 820MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index f20418a2fb1b..0a3c96452f0f 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -49,6 +49,7 @@
49#include <plat/devs.h> 49#include <plat/devs.h>
50#include <plat/pm.h> 50#include <plat/pm.h>
51#include <plat/regs-serial.h> 51#include <plat/regs-serial.h>
52#include <plat/samsung-time.h>
52 53
53#include "common.h" 54#include "common.h"
54#include "h1940.h" 55#include "h1940.h"
@@ -179,6 +180,7 @@ static void __init rx3715_map_io(void)
179 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); 180 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
180 s3c24xx_init_clocks(16934000); 181 s3c24xx_init_clocks(16934000);
181 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); 182 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
183 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
182} 184}
183 185
184/* H1940 and RX3715 need to reserve this for suspend */ 186/* H1940 and RX3715 need to reserve this for suspend */
@@ -212,6 +214,6 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
212 .reserve = rx3715_reserve, 214 .reserve = rx3715_reserve,
213 .init_irq = rx3715_init_irq, 215 .init_irq = rx3715_init_irq,
214 .init_machine = rx3715_init_machine, 216 .init_machine = rx3715_init_machine,
215 .init_time = s3c24xx_timer_init, 217 .init_time = samsung_timer_init,
216 .restart = s3c244x_restart, 218 .restart = s3c244x_restart,
217MACHINE_END 219MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index e184bfa9613a..fd96f7fc330c 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -51,10 +51,10 @@
51 51
52#include <plat/devs.h> 52#include <plat/devs.h>
53#include <plat/cpu.h> 53#include <plat/cpu.h>
54 54#include <plat/samsung-time.h>
55#include <plat/common-smdk.h>
56 55
57#include "common.h" 56#include "common.h"
57#include "common-smdk.h"
58 58
59static struct map_desc smdk2410_iodesc[] __initdata = { 59static struct map_desc smdk2410_iodesc[] __initdata = {
60 /* nothing here yet */ 60 /* nothing here yet */
@@ -101,6 +101,7 @@ static void __init smdk2410_map_io(void)
101 s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); 101 s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
102 s3c24xx_init_clocks(0); 102 s3c24xx_init_clocks(0);
103 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); 103 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
104 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
104} 105}
105 106
106static void __init smdk2410_init(void) 107static void __init smdk2410_init(void)
@@ -117,6 +118,6 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
117 .map_io = smdk2410_map_io, 118 .map_io = smdk2410_map_io,
118 .init_irq = s3c24xx_init_irq, 119 .init_irq = s3c24xx_init_irq,
119 .init_machine = smdk2410_init, 120 .init_machine = smdk2410_init,
120 .init_time = s3c24xx_timer_init, 121 .init_time = samsung_timer_init,
121 .restart = s3c2410_restart, 122 .restart = s3c2410_restart,
122MACHINE_END 123MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index 86d7847c9d45..8e3f1d9bbb7c 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -41,13 +41,13 @@
41#include <linux/platform_data/i2c-s3c2410.h> 41#include <linux/platform_data/i2c-s3c2410.h>
42#include <mach/fb.h> 42#include <mach/fb.h>
43 43
44#include <plat/s3c2410.h>
45#include <plat/s3c2412.h>
46#include <plat/clock.h> 44#include <plat/clock.h>
47#include <plat/devs.h> 45#include <plat/devs.h>
48#include <plat/cpu.h> 46#include <plat/cpu.h>
47#include <plat/samsung-time.h>
49 48
50#include <plat/common-smdk.h> 49#include "common.h"
50#include "common-smdk.h"
51 51
52static struct map_desc smdk2413_iodesc[] __initdata = { 52static struct map_desc smdk2413_iodesc[] __initdata = {
53}; 53};
@@ -106,6 +106,7 @@ static void __init smdk2413_map_io(void)
106 s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc)); 106 s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
107 s3c24xx_init_clocks(12000000); 107 s3c24xx_init_clocks(12000000);
108 s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs)); 108 s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs));
109 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
109} 110}
110 111
111static void __init smdk2413_machine_init(void) 112static void __init smdk2413_machine_init(void)
@@ -132,7 +133,7 @@ MACHINE_START(S3C2413, "S3C2413")
132 .init_irq = s3c24xx_init_irq, 133 .init_irq = s3c24xx_init_irq,
133 .map_io = smdk2413_map_io, 134 .map_io = smdk2413_map_io,
134 .init_machine = smdk2413_machine_init, 135 .init_machine = smdk2413_machine_init,
135 .init_time = s3c24xx_timer_init, 136 .init_time = samsung_timer_init,
136 .restart = s3c2412_restart, 137 .restart = s3c2412_restart,
137MACHINE_END 138MACHINE_END
138 139
@@ -144,7 +145,7 @@ MACHINE_START(SMDK2412, "SMDK2412")
144 .init_irq = s3c24xx_init_irq, 145 .init_irq = s3c24xx_init_irq,
145 .map_io = smdk2413_map_io, 146 .map_io = smdk2413_map_io,
146 .init_machine = smdk2413_machine_init, 147 .init_machine = smdk2413_machine_init,
147 .init_time = s3c24xx_timer_init, 148 .init_time = samsung_timer_init,
148 .restart = s3c2412_restart, 149 .restart = s3c2412_restart,
149MACHINE_END 150MACHINE_END
150 151
@@ -156,6 +157,6 @@ MACHINE_START(SMDK2413, "SMDK2413")
156 .init_irq = s3c24xx_init_irq, 157 .init_irq = s3c24xx_init_irq,
157 .map_io = smdk2413_map_io, 158 .map_io = smdk2413_map_io,
158 .init_machine = smdk2413_machine_init, 159 .init_machine = smdk2413_machine_init,
159 .init_time = s3c24xx_timer_init, 160 .init_time = samsung_timer_init,
160 .restart = s3c2412_restart, 161 .restart = s3c2412_restart,
161MACHINE_END 162MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index ebb2e61f3d07..cb46847c66b4 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -42,7 +42,6 @@
42#include <linux/platform_data/leds-s3c24xx.h> 42#include <linux/platform_data/leds-s3c24xx.h>
43#include <linux/platform_data/i2c-s3c2410.h> 43#include <linux/platform_data/i2c-s3c2410.h>
44 44
45#include <plat/s3c2416.h>
46#include <plat/gpio-cfg.h> 45#include <plat/gpio-cfg.h>
47#include <plat/clock.h> 46#include <plat/clock.h>
48#include <plat/devs.h> 47#include <plat/devs.h>
@@ -51,10 +50,12 @@
51#include <plat/sdhci.h> 50#include <plat/sdhci.h>
52#include <linux/platform_data/usb-s3c2410_udc.h> 51#include <linux/platform_data/usb-s3c2410_udc.h>
53#include <linux/platform_data/s3c-hsudc.h> 52#include <linux/platform_data/s3c-hsudc.h>
53#include <plat/samsung-time.h>
54 54
55#include <plat/fb.h> 55#include <plat/fb.h>
56 56
57#include <plat/common-smdk.h> 57#include "common.h"
58#include "common-smdk.h"
58 59
59static struct map_desc smdk2416_iodesc[] __initdata = { 60static struct map_desc smdk2416_iodesc[] __initdata = {
60 /* ISA IO Space map (memory space selected by A24) */ 61 /* ISA IO Space map (memory space selected by A24) */
@@ -221,6 +222,7 @@ static void __init smdk2416_map_io(void)
221 s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc)); 222 s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc));
222 s3c24xx_init_clocks(12000000); 223 s3c24xx_init_clocks(12000000);
223 s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs)); 224 s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs));
225 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
224} 226}
225 227
226static void __init smdk2416_machine_init(void) 228static void __init smdk2416_machine_init(void)
@@ -253,6 +255,6 @@ MACHINE_START(SMDK2416, "SMDK2416")
253 .init_irq = s3c2416_init_irq, 255 .init_irq = s3c2416_init_irq,
254 .map_io = smdk2416_map_io, 256 .map_io = smdk2416_map_io,
255 .init_machine = smdk2416_machine_init, 257 .init_machine = smdk2416_machine_init,
256 .init_time = s3c24xx_timer_init, 258 .init_time = samsung_timer_init,
257 .restart = s3c2416_restart, 259 .restart = s3c2416_restart,
258MACHINE_END 260MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index 08cc38c8a4ae..f56cb08e6d1c 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -38,15 +38,13 @@
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/s3c2410.h>
42#include <plat/s3c244x.h>
43#include <plat/clock.h> 41#include <plat/clock.h>
44#include <plat/devs.h> 42#include <plat/devs.h>
45#include <plat/cpu.h> 43#include <plat/cpu.h>
46 44#include <plat/samsung-time.h>
47#include <plat/common-smdk.h>
48 45
49#include "common.h" 46#include "common.h"
47#include "common-smdk.h"
50 48
51static struct map_desc smdk2440_iodesc[] __initdata = { 49static struct map_desc smdk2440_iodesc[] __initdata = {
52 /* ISA IO Space map (memory space selected by A24) */ 50 /* ISA IO Space map (memory space selected by A24) */
@@ -163,6 +161,7 @@ static void __init smdk2440_map_io(void)
163 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); 161 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
164 s3c24xx_init_clocks(16934400); 162 s3c24xx_init_clocks(16934400);
165 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); 163 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
164 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
166} 165}
167 166
168static void __init smdk2440_machine_init(void) 167static void __init smdk2440_machine_init(void)
@@ -181,6 +180,6 @@ MACHINE_START(S3C2440, "SMDK2440")
181 .init_irq = s3c24xx_init_irq, 180 .init_irq = s3c24xx_init_irq,
182 .map_io = smdk2440_map_io, 181 .map_io = smdk2440_map_io,
183 .init_machine = smdk2440_machine_init, 182 .init_machine = smdk2440_machine_init,
184 .init_time = s3c24xx_timer_init, 183 .init_time = samsung_timer_init,
185 .restart = s3c244x_restart, 184 .restart = s3c244x_restart,
186MACHINE_END 185MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index fc65d74d3c73..9435c3bef18a 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -38,13 +38,13 @@
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/s3c2410.h>
42#include <plat/s3c2443.h>
43#include <plat/clock.h> 41#include <plat/clock.h>
44#include <plat/devs.h> 42#include <plat/devs.h>
45#include <plat/cpu.h> 43#include <plat/cpu.h>
44#include <plat/samsung-time.h>
46 45
47#include <plat/common-smdk.h> 46#include "common.h"
47#include "common-smdk.h"
48 48
49static struct map_desc smdk2443_iodesc[] __initdata = { 49static struct map_desc smdk2443_iodesc[] __initdata = {
50 /* ISA IO Space map (memory space selected by A24) */ 50 /* ISA IO Space map (memory space selected by A24) */
@@ -122,6 +122,7 @@ static void __init smdk2443_map_io(void)
122 s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc)); 122 s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc));
123 s3c24xx_init_clocks(12000000); 123 s3c24xx_init_clocks(12000000);
124 s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs)); 124 s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs));
125 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
125} 126}
126 127
127static void __init smdk2443_machine_init(void) 128static void __init smdk2443_machine_init(void)
@@ -143,6 +144,6 @@ MACHINE_START(SMDK2443, "SMDK2443")
143 .init_irq = s3c2443_init_irq, 144 .init_irq = s3c2443_init_irq,
144 .map_io = smdk2443_map_io, 145 .map_io = smdk2443_map_io,
145 .init_machine = smdk2443_machine_init, 146 .init_machine = smdk2443_machine_init,
146 .init_time = s3c24xx_timer_init, 147 .init_time = samsung_timer_init,
147 .restart = s3c2443_restart, 148 .restart = s3c2443_restart,
148MACHINE_END 149MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 24b3d79e7b2c..31dfe589e349 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -53,6 +53,7 @@
53#include <linux/mtd/partitions.h> 53#include <linux/mtd/partitions.h>
54#include <linux/mtd/map.h> 54#include <linux/mtd/map.h>
55#include <linux/mtd/physmap.h> 55#include <linux/mtd/physmap.h>
56#include <plat/samsung-time.h>
56 57
57#include "common.h" 58#include "common.h"
58 59
@@ -136,6 +137,7 @@ static void __init tct_hammer_map_io(void)
136 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc)); 137 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
137 s3c24xx_init_clocks(0); 138 s3c24xx_init_clocks(0);
138 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs)); 139 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
140 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
139} 141}
140 142
141static void __init tct_hammer_init(void) 143static void __init tct_hammer_init(void)
@@ -149,6 +151,6 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
149 .map_io = tct_hammer_map_io, 151 .map_io = tct_hammer_map_io,
150 .init_irq = s3c24xx_init_irq, 152 .init_irq = s3c24xx_init_irq,
151 .init_machine = tct_hammer_init, 153 .init_machine = tct_hammer_init,
152 .init_time = s3c24xx_timer_init, 154 .init_time = samsung_timer_init,
153 .restart = s3c2410_restart, 155 .restart = s3c2410_restart,
154MACHINE_END 156MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index ec42d1e4e465..deeb8a0a4034 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -45,6 +45,7 @@
45#include <plat/cpu.h> 45#include <plat/cpu.h>
46#include <plat/devs.h> 46#include <plat/devs.h>
47#include <plat/regs-serial.h> 47#include <plat/regs-serial.h>
48#include <plat/samsung-time.h>
48 49
49#include "bast.h" 50#include "bast.h"
50#include "common.h" 51#include "common.h"
@@ -332,6 +333,7 @@ static void __init vr1000_map_io(void)
332 s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); 333 s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
333 s3c24xx_init_clocks(0); 334 s3c24xx_init_clocks(0);
334 s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); 335 s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
336 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
335} 337}
336 338
337static void __init vr1000_init(void) 339static void __init vr1000_init(void)
@@ -354,6 +356,6 @@ MACHINE_START(VR1000, "Thorcom-VR1000")
354 .map_io = vr1000_map_io, 356 .map_io = vr1000_map_io,
355 .init_machine = vr1000_init, 357 .init_machine = vr1000_init,
356 .init_irq = s3c24xx_init_irq, 358 .init_irq = s3c24xx_init_irq,
357 .init_time = s3c24xx_timer_init, 359 .init_time = samsung_timer_init,
358 .restart = s3c2410_restart, 360 .restart = s3c2410_restart,
359MACHINE_END 361MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index 3e2bfddc9df1..622a1ed24509 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -41,12 +41,12 @@
41#include <linux/platform_data/i2c-s3c2410.h> 41#include <linux/platform_data/i2c-s3c2410.h>
42#include <linux/platform_data/mtd-nand-s3c2410.h> 42#include <linux/platform_data/mtd-nand-s3c2410.h>
43 43
44#include <plat/s3c2410.h>
45#include <plat/s3c2412.h>
46#include <plat/clock.h> 44#include <plat/clock.h>
47#include <plat/devs.h> 45#include <plat/devs.h>
48#include <plat/cpu.h> 46#include <plat/cpu.h>
47#include <plat/samsung-time.h>
49 48
49#include "common.h"
50 50
51static struct map_desc vstms_iodesc[] __initdata = { 51static struct map_desc vstms_iodesc[] __initdata = {
52}; 52};
@@ -143,6 +143,7 @@ static void __init vstms_map_io(void)
143 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); 143 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
144 s3c24xx_init_clocks(12000000); 144 s3c24xx_init_clocks(12000000);
145 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); 145 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
146 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
146} 147}
147 148
148static void __init vstms_init(void) 149static void __init vstms_init(void)
@@ -160,6 +161,6 @@ MACHINE_START(VSTMS, "VSTMS")
160 .init_irq = s3c24xx_init_irq, 161 .init_irq = s3c24xx_init_irq,
161 .init_machine = vstms_init, 162 .init_machine = vstms_init,
162 .map_io = vstms_map_io, 163 .map_io = vstms_map_io,
163 .init_time = s3c24xx_timer_init, 164 .init_time = samsung_timer_init,
164 .restart = s3c2412_restart, 165 .restart = s3c2412_restart,
165MACHINE_END 166MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c
index 668a78a8b195..4c4bc1c83b77 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c
@@ -29,7 +29,6 @@
29 29
30#include <plat/cpu.h> 30#include <plat/cpu.h>
31#include <plat/pm.h> 31#include <plat/pm.h>
32#include <plat/s3c2412.h>
33 32
34#include "regs-dsc.h" 33#include "regs-dsc.h"
35#include "s3c2412-power.h" 34#include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 9ebef95da721..d850ea5adac2 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -37,7 +37,6 @@
37#include <mach/regs-clock.h> 37#include <mach/regs-clock.h>
38#include <plat/regs-serial.h> 38#include <plat/regs-serial.h>
39 39
40#include <plat/s3c2410.h>
41#include <plat/cpu.h> 40#include <plat/cpu.h>
42#include <plat/devs.h> 41#include <plat/devs.h>
43#include <plat/clock.h> 42#include <plat/clock.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 0d592159a5c3..0f864d4c97de 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -44,7 +44,6 @@
44#include <plat/pm.h> 44#include <plat/pm.h>
45#include <plat/regs-serial.h> 45#include <plat/regs-serial.h>
46#include <plat/regs-spi.h> 46#include <plat/regs-spi.h>
47#include <plat/s3c2412.h>
48 47
49#include "common.h" 48#include "common.h"
50#include "regs-dsc.h" 49#include "regs-dsc.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index e30476db0295..b9c5d382dafb 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -50,7 +50,6 @@
50#include <plat/gpio-core.h> 50#include <plat/gpio-core.h>
51#include <plat/gpio-cfg.h> 51#include <plat/gpio-cfg.h>
52#include <plat/gpio-cfg-helpers.h> 52#include <plat/gpio-cfg-helpers.h>
53#include <plat/s3c2416.h>
54#include <plat/devs.h> 53#include <plat/devs.h>
55#include <plat/cpu.h> 54#include <plat/cpu.h>
56#include <plat/sdhci.h> 55#include <plat/sdhci.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c
index 559e394e8989..5f9d6569475d 100644
--- a/arch/arm/mach-s3c24xx/s3c2440.c
+++ b/arch/arm/mach-s3c24xx/s3c2440.c
@@ -33,7 +33,6 @@
33 33
34#include <plat/devs.h> 34#include <plat/devs.h>
35#include <plat/cpu.h> 35#include <plat/cpu.h>
36#include <plat/s3c244x.h>
37#include <plat/pm.h> 36#include <plat/pm.h>
38 37
39#include <plat/gpio-core.h> 38#include <plat/gpio-core.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c
index f732826c2359..6819961f6b19 100644
--- a/arch/arm/mach-s3c24xx/s3c2442.c
+++ b/arch/arm/mach-s3c24xx/s3c2442.c
@@ -44,7 +44,6 @@
44 44
45#include <plat/clock.h> 45#include <plat/clock.h>
46#include <plat/cpu.h> 46#include <plat/cpu.h>
47#include <plat/s3c244x.h>
48#include <plat/pm.h> 47#include <plat/pm.h>
49 48
50#include <plat/gpio-core.h> 49#include <plat/gpio-core.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index 165b6a6b3daa..8328cd65bf3d 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -36,7 +36,6 @@
36#include <plat/gpio-core.h> 36#include <plat/gpio-core.h>
37#include <plat/gpio-cfg.h> 37#include <plat/gpio-cfg.h>
38#include <plat/gpio-cfg-helpers.h> 38#include <plat/gpio-cfg-helpers.h>
39#include <plat/s3c2443.h>
40#include <plat/devs.h> 39#include <plat/devs.h>
41#include <plat/cpu.h> 40#include <plat/cpu.h>
42#include <plat/fb-core.h> 41#include <plat/fb-core.h>
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index ad2671baa910..2a35edb67354 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -37,8 +37,6 @@
37#include <plat/regs-serial.h> 37#include <plat/regs-serial.h>
38#include <mach/regs-gpio.h> 38#include <mach/regs-gpio.h>
39 39
40#include <plat/s3c2410.h>
41#include <plat/s3c244x.h>
42#include <plat/clock.h> 40#include <plat/clock.h>
43#include <plat/devs.h> 41#include <plat/devs.h>
44#include <plat/cpu.h> 42#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 131c86284711..283cb77d4721 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -17,11 +17,13 @@ config PLAT_S3C64XX
17# Configuration options for the S3C6410 CPU 17# Configuration options for the S3C6410 CPU
18 18
19config CPU_S3C6400 19config CPU_S3C6400
20 select SAMSUNG_HRT
20 bool 21 bool
21 help 22 help
22 Enable S3C6400 CPU support 23 Enable S3C6400 CPU support
23 24
24config CPU_S3C6410 25config CPU_S3C6410
26 select SAMSUNG_HRT
25 bool 27 bool
26 help 28 help
27 Enable S3C6410 CPU support 29 Enable S3C6410 CPU support
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index 728eef3296b2..35e3f54574ef 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -49,6 +49,7 @@
49#include <plat/devs.h> 49#include <plat/devs.h>
50#include <plat/cpu.h> 50#include <plat/cpu.h>
51#include <mach/regs-gpio.h> 51#include <mach/regs-gpio.h>
52#include <plat/samsung-time.h>
52 53
53#include "common.h" 54#include "common.h"
54#include "regs-modem.h" 55#include "regs-modem.h"
@@ -208,6 +209,7 @@ static void __init anw6410_map_io(void)
208 s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc)); 209 s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc));
209 s3c24xx_init_clocks(12000000); 210 s3c24xx_init_clocks(12000000);
210 s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs)); 211 s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs));
212 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
211 213
212 anw6410_lcd_mode_set(); 214 anw6410_lcd_mode_set();
213} 215}
@@ -232,6 +234,6 @@ MACHINE_START(ANW6410, "A&W6410")
232 .map_io = anw6410_map_io, 234 .map_io = anw6410_map_io,
233 .init_machine = anw6410_machine_init, 235 .init_machine = anw6410_machine_init,
234 .init_late = s3c64xx_init_late, 236 .init_late = s3c64xx_init_late,
235 .init_time = s3c24xx_timer_init, 237 .init_time = samsung_timer_init,
236 .restart = s3c64xx_restart, 238 .restart = s3c64xx_restart,
237MACHINE_END 239MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 1acf02bace57..8ad88ace795a 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -64,6 +64,7 @@
64#include <plat/adc.h> 64#include <plat/adc.h>
65#include <linux/platform_data/i2c-s3c2410.h> 65#include <linux/platform_data/i2c-s3c2410.h>
66#include <plat/pm.h> 66#include <plat/pm.h>
67#include <plat/samsung-time.h>
67 68
68#include "common.h" 69#include "common.h"
69#include "crag6410.h" 70#include "crag6410.h"
@@ -744,6 +745,7 @@ static void __init crag6410_map_io(void)
744 s3c64xx_init_io(NULL, 0); 745 s3c64xx_init_io(NULL, 0);
745 s3c24xx_init_clocks(12000000); 746 s3c24xx_init_clocks(12000000);
746 s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs)); 747 s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs));
748 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
747 749
748 /* LCD type and Bypass set by bootloader */ 750 /* LCD type and Bypass set by bootloader */
749} 751}
@@ -868,6 +870,6 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
868 .map_io = crag6410_map_io, 870 .map_io = crag6410_map_io,
869 .init_machine = crag6410_machine_init, 871 .init_machine = crag6410_machine_init,
870 .init_late = s3c64xx_init_late, 872 .init_late = s3c64xx_init_late,
871 .init_time = s3c24xx_timer_init, 873 .init_time = samsung_timer_init,
872 .restart = s3c64xx_restart, 874 .restart = s3c64xx_restart,
873MACHINE_END 875MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 7212eb9cfeb9..5b7f357d8c22 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -41,6 +41,7 @@
41#include <plat/clock.h> 41#include <plat/clock.h>
42#include <plat/devs.h> 42#include <plat/devs.h>
43#include <plat/cpu.h> 43#include <plat/cpu.h>
44#include <plat/samsung-time.h>
44 45
45#include "common.h" 46#include "common.h"
46 47
@@ -248,6 +249,7 @@ static void __init hmt_map_io(void)
248 s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc)); 249 s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc));
249 s3c24xx_init_clocks(12000000); 250 s3c24xx_init_clocks(12000000);
250 s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs)); 251 s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs));
252 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
251} 253}
252 254
253static void __init hmt_machine_init(void) 255static void __init hmt_machine_init(void)
@@ -275,6 +277,6 @@ MACHINE_START(HMT, "Airgoo-HMT")
275 .map_io = hmt_map_io, 277 .map_io = hmt_map_io,
276 .init_machine = hmt_machine_init, 278 .init_machine = hmt_machine_init,
277 .init_late = s3c64xx_init_late, 279 .init_late = s3c64xx_init_late,
278 .init_time = s3c24xx_timer_init, 280 .init_time = samsung_timer_init,
279 .restart = s3c64xx_restart, 281 .restart = s3c64xx_restart,
280MACHINE_END 282MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 4b41fcdaa7b6..fc043e3ecdf8 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -41,6 +41,7 @@
41 41
42#include <video/platform_lcd.h> 42#include <video/platform_lcd.h>
43#include <video/samsung_fimd.h> 43#include <video/samsung_fimd.h>
44#include <plat/samsung-time.h>
44 45
45#include "common.h" 46#include "common.h"
46#include "regs-modem.h" 47#include "regs-modem.h"
@@ -232,6 +233,7 @@ static void __init mini6410_map_io(void)
232 s3c64xx_init_io(NULL, 0); 233 s3c64xx_init_io(NULL, 0);
233 s3c24xx_init_clocks(12000000); 234 s3c24xx_init_clocks(12000000);
234 s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs)); 235 s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs));
236 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
235 237
236 /* set the LCD type */ 238 /* set the LCD type */
237 tmp = __raw_readl(S3C64XX_SPCON); 239 tmp = __raw_readl(S3C64XX_SPCON);
@@ -354,6 +356,6 @@ MACHINE_START(MINI6410, "MINI6410")
354 .map_io = mini6410_map_io, 356 .map_io = mini6410_map_io,
355 .init_machine = mini6410_machine_init, 357 .init_machine = mini6410_machine_init,
356 .init_late = s3c64xx_init_late, 358 .init_late = s3c64xx_init_late,
357 .init_time = s3c24xx_timer_init, 359 .init_time = samsung_timer_init,
358 .restart = s3c64xx_restart, 360 .restart = s3c64xx_restart,
359MACHINE_END 361MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c
index 8d3cedd995ff..7e2c3908f1f8 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c64xx/mach-ncp.c
@@ -43,6 +43,7 @@
43#include <plat/clock.h> 43#include <plat/clock.h>
44#include <plat/devs.h> 44#include <plat/devs.h>
45#include <plat/cpu.h> 45#include <plat/cpu.h>
46#include <plat/samsung-time.h>
46 47
47#include "common.h" 48#include "common.h"
48 49
@@ -87,6 +88,7 @@ static void __init ncp_map_io(void)
87 s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc)); 88 s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
88 s3c24xx_init_clocks(12000000); 89 s3c24xx_init_clocks(12000000);
89 s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs)); 90 s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
91 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
90} 92}
91 93
92static void __init ncp_machine_init(void) 94static void __init ncp_machine_init(void)
@@ -103,6 +105,6 @@ MACHINE_START(NCP, "NCP")
103 .map_io = ncp_map_io, 105 .map_io = ncp_map_io,
104 .init_machine = ncp_machine_init, 106 .init_machine = ncp_machine_init,
105 .init_late = s3c64xx_init_late, 107 .init_late = s3c64xx_init_late,
106 .init_time = s3c24xx_timer_init, 108 .init_time = samsung_timer_init,
107 .restart = s3c64xx_restart, 109 .restart = s3c64xx_restart,
108MACHINE_END 110MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index fa12bd21ad82..8bed37b3d5ac 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -42,6 +42,7 @@
42 42
43#include <video/platform_lcd.h> 43#include <video/platform_lcd.h>
44#include <video/samsung_fimd.h> 44#include <video/samsung_fimd.h>
45#include <plat/samsung-time.h>
45 46
46#include "common.h" 47#include "common.h"
47#include "regs-modem.h" 48#include "regs-modem.h"
@@ -211,6 +212,7 @@ static void __init real6410_map_io(void)
211 s3c64xx_init_io(NULL, 0); 212 s3c64xx_init_io(NULL, 0);
212 s3c24xx_init_clocks(12000000); 213 s3c24xx_init_clocks(12000000);
213 s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs)); 214 s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
215 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
214 216
215 /* set the LCD type */ 217 /* set the LCD type */
216 tmp = __raw_readl(S3C64XX_SPCON); 218 tmp = __raw_readl(S3C64XX_SPCON);
@@ -333,6 +335,6 @@ MACHINE_START(REAL6410, "REAL6410")
333 .map_io = real6410_map_io, 335 .map_io = real6410_map_io,
334 .init_machine = real6410_machine_init, 336 .init_machine = real6410_machine_init,
335 .init_late = s3c64xx_init_late, 337 .init_late = s3c64xx_init_late,
336 .init_time = s3c24xx_timer_init, 338 .init_time = samsung_timer_init,
337 .restart = s3c64xx_restart, 339 .restart = s3c64xx_restart,
338MACHINE_END 340MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c
index fc3e9b32e26f..58ac99041274 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq.c
@@ -38,6 +38,7 @@
38#include <linux/platform_data/touchscreen-s3c2410.h> 38#include <linux/platform_data/touchscreen-s3c2410.h>
39 39
40#include <video/platform_lcd.h> 40#include <video/platform_lcd.h>
41#include <plat/samsung-time.h>
41 42
42#include "common.h" 43#include "common.h"
43#include "regs-modem.h" 44#include "regs-modem.h"
@@ -378,6 +379,7 @@ void __init smartq_map_io(void)
378 s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc)); 379 s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc));
379 s3c24xx_init_clocks(12000000); 380 s3c24xx_init_clocks(12000000);
380 s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs)); 381 s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs));
382 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
381 383
382 smartq_lcd_mode_set(); 384 smartq_lcd_mode_set();
383} 385}
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index ca2afcfce573..8aca5daf3d05 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -28,6 +28,7 @@
28#include <plat/devs.h> 28#include <plat/devs.h>
29#include <plat/fb.h> 29#include <plat/fb.h>
30#include <plat/gpio-cfg.h> 30#include <plat/gpio-cfg.h>
31#include <plat/samsung-time.h>
31 32
32#include "common.h" 33#include "common.h"
33#include "mach-smartq.h" 34#include "mach-smartq.h"
@@ -155,6 +156,6 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
155 .map_io = smartq_map_io, 156 .map_io = smartq_map_io,
156 .init_machine = smartq5_machine_init, 157 .init_machine = smartq5_machine_init,
157 .init_late = s3c64xx_init_late, 158 .init_late = s3c64xx_init_late,
158 .init_time = s3c24xx_timer_init, 159 .init_time = samsung_timer_init,
159 .restart = s3c64xx_restart, 160 .restart = s3c64xx_restart,
160MACHINE_END 161MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index 37bb0c632a5e..a052e107c0b4 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -28,6 +28,7 @@
28#include <plat/devs.h> 28#include <plat/devs.h>
29#include <plat/fb.h> 29#include <plat/fb.h>
30#include <plat/gpio-cfg.h> 30#include <plat/gpio-cfg.h>
31#include <plat/samsung-time.h>
31 32
32#include "common.h" 33#include "common.h"
33#include "mach-smartq.h" 34#include "mach-smartq.h"
@@ -171,6 +172,6 @@ MACHINE_START(SMARTQ7, "SmartQ 7")
171 .map_io = smartq_map_io, 172 .map_io = smartq_map_io,
172 .init_machine = smartq7_machine_init, 173 .init_machine = smartq7_machine_init,
173 .init_late = s3c64xx_init_late, 174 .init_late = s3c64xx_init_late,
174 .init_time = s3c24xx_timer_init, 175 .init_time = samsung_timer_init,
175 .restart = s3c64xx_restart, 176 .restart = s3c64xx_restart,
176MACHINE_END 177MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c
index a392869c8342..d70c0843aea2 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c
@@ -35,6 +35,7 @@
35#include <plat/devs.h> 35#include <plat/devs.h>
36#include <plat/cpu.h> 36#include <plat/cpu.h>
37#include <linux/platform_data/i2c-s3c2410.h> 37#include <linux/platform_data/i2c-s3c2410.h>
38#include <plat/samsung-time.h>
38 39
39#include "common.h" 40#include "common.h"
40 41
@@ -66,6 +67,7 @@ static void __init smdk6400_map_io(void)
66 s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc)); 67 s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
67 s3c24xx_init_clocks(12000000); 68 s3c24xx_init_clocks(12000000);
68 s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs)); 69 s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
70 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
69} 71}
70 72
71static struct platform_device *smdk6400_devices[] __initdata = { 73static struct platform_device *smdk6400_devices[] __initdata = {
@@ -92,6 +94,6 @@ MACHINE_START(SMDK6400, "SMDK6400")
92 .map_io = smdk6400_map_io, 94 .map_io = smdk6400_map_io,
93 .init_machine = smdk6400_machine_init, 95 .init_machine = smdk6400_machine_init,
94 .init_late = s3c64xx_init_late, 96 .init_late = s3c64xx_init_late,
95 .init_time = s3c24xx_timer_init, 97 .init_time = samsung_timer_init,
96 .restart = s3c64xx_restart, 98 .restart = s3c64xx_restart,
97MACHINE_END 99MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index ba7544e2d04d..bd3295a19ad7 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -69,6 +69,7 @@
69#include <linux/platform_data/touchscreen-s3c2410.h> 69#include <linux/platform_data/touchscreen-s3c2410.h>
70#include <plat/keypad.h> 70#include <plat/keypad.h>
71#include <plat/backlight.h> 71#include <plat/backlight.h>
72#include <plat/samsung-time.h>
72 73
73#include "common.h" 74#include "common.h"
74#include "regs-modem.h" 75#include "regs-modem.h"
@@ -634,6 +635,7 @@ static void __init smdk6410_map_io(void)
634 s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc)); 635 s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
635 s3c24xx_init_clocks(12000000); 636 s3c24xx_init_clocks(12000000);
636 s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs)); 637 s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs));
638 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
637 639
638 /* set the LCD type */ 640 /* set the LCD type */
639 641
@@ -702,6 +704,6 @@ MACHINE_START(SMDK6410, "SMDK6410")
702 .map_io = smdk6410_map_io, 704 .map_io = smdk6410_map_io,
703 .init_machine = smdk6410_machine_init, 705 .init_machine = smdk6410_machine_init,
704 .init_late = s3c64xx_init_late, 706 .init_late = s3c64xx_init_late,
705 .init_time = s3c24xx_timer_init, 707 .init_time = samsung_timer_init,
706 .restart = s3c64xx_restart, 708 .restart = s3c64xx_restart,
707MACHINE_END 709MACHINE_END
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index e8742cb7ddd9..5a707bdb9ea0 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -9,16 +9,16 @@ if ARCH_S5P64X0
9 9
10config CPU_S5P6440 10config CPU_S5P6440
11 bool 11 bool
12 select S5P_HRT
13 select S5P_SLEEP if PM 12 select S5P_SLEEP if PM
14 select SAMSUNG_DMADEV 13 select SAMSUNG_DMADEV
14 select SAMSUNG_HRT
15 select SAMSUNG_WAKEMASK if PM 15 select SAMSUNG_WAKEMASK if PM
16 help 16 help
17 Enable S5P6440 CPU support 17 Enable S5P6440 CPU support
18 18
19config CPU_S5P6450 19config CPU_S5P6450
20 bool 20 bool
21 select S5P_HRT 21 select SAMSUNG_HRT
22 select S5P_SLEEP if PM 22 select S5P_SLEEP if PM
23 select SAMSUNG_DMADEV 23 select SAMSUNG_DMADEV
24 select SAMSUNG_WAKEMASK if PM 24 select SAMSUNG_WAKEMASK if PM
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index e23723a5a214..73f71a698a34 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -48,7 +48,7 @@
48#include <plat/pll.h> 48#include <plat/pll.h>
49#include <plat/adc.h> 49#include <plat/adc.h>
50#include <linux/platform_data/touchscreen-s3c2410.h> 50#include <linux/platform_data/touchscreen-s3c2410.h>
51#include <plat/s5p-time.h> 51#include <plat/samsung-time.h>
52#include <plat/backlight.h> 52#include <plat/backlight.h>
53#include <plat/fb.h> 53#include <plat/fb.h>
54#include <plat/sdhci.h> 54#include <plat/sdhci.h>
@@ -229,7 +229,7 @@ static void __init smdk6440_map_io(void)
229 s5p64x0_init_io(NULL, 0); 229 s5p64x0_init_io(NULL, 0);
230 s3c24xx_init_clocks(12000000); 230 s3c24xx_init_clocks(12000000);
231 s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs)); 231 s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs));
232 s5p_set_timer_source(S5P_PWM3, S5P_PWM4); 232 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
233} 233}
234 234
235static void s5p6440_set_lcd_interface(void) 235static void s5p6440_set_lcd_interface(void)
@@ -273,6 +273,6 @@ MACHINE_START(SMDK6440, "SMDK6440")
273 .init_irq = s5p6440_init_irq, 273 .init_irq = s5p6440_init_irq,
274 .map_io = smdk6440_map_io, 274 .map_io = smdk6440_map_io,
275 .init_machine = smdk6440_machine_init, 275 .init_machine = smdk6440_machine_init,
276 .init_time = s5p_timer_init, 276 .init_time = samsung_timer_init,
277 .restart = s5p64x0_restart, 277 .restart = s5p64x0_restart,
278MACHINE_END 278MACHINE_END
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index ca10963a959e..18303e12019f 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -48,7 +48,7 @@
48#include <plat/pll.h> 48#include <plat/pll.h>
49#include <plat/adc.h> 49#include <plat/adc.h>
50#include <linux/platform_data/touchscreen-s3c2410.h> 50#include <linux/platform_data/touchscreen-s3c2410.h>
51#include <plat/s5p-time.h> 51#include <plat/samsung-time.h>
52#include <plat/backlight.h> 52#include <plat/backlight.h>
53#include <plat/fb.h> 53#include <plat/fb.h>
54#include <plat/sdhci.h> 54#include <plat/sdhci.h>
@@ -248,7 +248,7 @@ static void __init smdk6450_map_io(void)
248 s5p64x0_init_io(NULL, 0); 248 s5p64x0_init_io(NULL, 0);
249 s3c24xx_init_clocks(19200000); 249 s3c24xx_init_clocks(19200000);
250 s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs)); 250 s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs));
251 s5p_set_timer_source(S5P_PWM3, S5P_PWM4); 251 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
252} 252}
253 253
254static void s5p6450_set_lcd_interface(void) 254static void s5p6450_set_lcd_interface(void)
@@ -292,6 +292,6 @@ MACHINE_START(SMDK6450, "SMDK6450")
292 .init_irq = s5p6450_init_irq, 292 .init_irq = s5p6450_init_irq,
293 .map_io = smdk6450_map_io, 293 .map_io = smdk6450_map_io,
294 .init_machine = smdk6450_machine_init, 294 .init_machine = smdk6450_machine_init,
295 .init_time = s5p_timer_init, 295 .init_time = samsung_timer_init,
296 .restart = s5p64x0_restart, 296 .restart = s5p64x0_restart,
297MACHINE_END 297MACHINE_END
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
index 15170be97a74..2f456a4533ba 100644
--- a/arch/arm/mach-s5pc100/Kconfig
+++ b/arch/arm/mach-s5pc100/Kconfig
@@ -11,6 +11,7 @@ config CPU_S5PC100
11 bool 11 bool
12 select S5P_EXT_INT 12 select S5P_EXT_INT
13 select SAMSUNG_DMADEV 13 select SAMSUNG_DMADEV
14 select SAMSUNG_HRT
14 help 15 help
15 Enable S5PC100 CPU support 16 Enable S5PC100 CPU support
16 17
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 185a19583898..8c880f76f274 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -51,6 +51,7 @@
51#include <linux/platform_data/touchscreen-s3c2410.h> 51#include <linux/platform_data/touchscreen-s3c2410.h>
52#include <linux/platform_data/asoc-s3c.h> 52#include <linux/platform_data/asoc-s3c.h>
53#include <plat/backlight.h> 53#include <plat/backlight.h>
54#include <plat/samsung-time.h>
54 55
55#include "common.h" 56#include "common.h"
56 57
@@ -221,6 +222,7 @@ static void __init smdkc100_map_io(void)
221 s5pc100_init_io(NULL, 0); 222 s5pc100_init_io(NULL, 0);
222 s3c24xx_init_clocks(12000000); 223 s3c24xx_init_clocks(12000000);
223 s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs)); 224 s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs));
225 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
224} 226}
225 227
226static void __init smdkc100_machine_init(void) 228static void __init smdkc100_machine_init(void)
@@ -255,6 +257,6 @@ MACHINE_START(SMDKC100, "SMDKC100")
255 .init_irq = s5pc100_init_irq, 257 .init_irq = s5pc100_init_irq,
256 .map_io = smdkc100_map_io, 258 .map_io = smdkc100_map_io,
257 .init_machine = smdkc100_machine_init, 259 .init_machine = smdkc100_machine_init,
258 .init_time = s3c24xx_timer_init, 260 .init_time = samsung_timer_init,
259 .restart = s5pc100_restart, 261 .restart = s5pc100_restart,
260MACHINE_END 262MACHINE_END
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 92ad72f0ef98..0963283a7c5d 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -12,10 +12,10 @@ if ARCH_S5PV210
12config CPU_S5PV210 12config CPU_S5PV210
13 bool 13 bool
14 select S5P_EXT_INT 14 select S5P_EXT_INT
15 select S5P_HRT
16 select S5P_PM if PM 15 select S5P_PM if PM
17 select S5P_SLEEP if PM 16 select S5P_SLEEP if PM
18 select SAMSUNG_DMADEV 17 select SAMSUNG_DMADEV
18 select SAMSUNG_HRT
19 help 19 help
20 Enable S5PV210 CPU support 20 Enable S5PV210 CPU support
21 21
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 11900a8e88a3..ed2b85485b9d 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -38,7 +38,7 @@
38#include <plat/fb.h> 38#include <plat/fb.h>
39#include <plat/fimc-core.h> 39#include <plat/fimc-core.h>
40#include <plat/sdhci.h> 40#include <plat/sdhci.h>
41#include <plat/s5p-time.h> 41#include <plat/samsung-time.h>
42 42
43#include "common.h" 43#include "common.h"
44 44
@@ -651,7 +651,7 @@ static void __init aquila_map_io(void)
651 s5pv210_init_io(NULL, 0); 651 s5pv210_init_io(NULL, 0);
652 s3c24xx_init_clocks(24000000); 652 s3c24xx_init_clocks(24000000);
653 s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs)); 653 s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs));
654 s5p_set_timer_source(S5P_PWM3, S5P_PWM4); 654 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
655} 655}
656 656
657static void __init aquila_machine_init(void) 657static void __init aquila_machine_init(void)
@@ -686,6 +686,6 @@ MACHINE_START(AQUILA, "Aquila")
686 .init_irq = s5pv210_init_irq, 686 .init_irq = s5pv210_init_irq,
687 .map_io = aquila_map_io, 687 .map_io = aquila_map_io,
688 .init_machine = aquila_machine_init, 688 .init_machine = aquila_machine_init,
689 .init_time = s5p_timer_init, 689 .init_time = samsung_timer_init,
690 .restart = s5pv210_restart, 690 .restart = s5pv210_restart,
691MACHINE_END 691MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 3a38f7b34b94..256439448364 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -47,7 +47,7 @@
47#include <plat/keypad.h> 47#include <plat/keypad.h>
48#include <plat/sdhci.h> 48#include <plat/sdhci.h>
49#include <plat/clock.h> 49#include <plat/clock.h>
50#include <plat/s5p-time.h> 50#include <plat/samsung-time.h>
51#include <plat/mfc.h> 51#include <plat/mfc.h>
52#include <plat/camport.h> 52#include <plat/camport.h>
53 53
@@ -908,7 +908,7 @@ static void __init goni_map_io(void)
908 s5pv210_init_io(NULL, 0); 908 s5pv210_init_io(NULL, 0);
909 s3c24xx_init_clocks(clk_xusbxti.rate); 909 s3c24xx_init_clocks(clk_xusbxti.rate);
910 s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); 910 s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs));
911 s5p_set_timer_source(S5P_PWM3, S5P_PWM4); 911 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
912} 912}
913 913
914static void __init goni_reserve(void) 914static void __init goni_reserve(void)
@@ -973,7 +973,7 @@ MACHINE_START(GONI, "GONI")
973 .init_irq = s5pv210_init_irq, 973 .init_irq = s5pv210_init_irq,
974 .map_io = goni_map_io, 974 .map_io = goni_map_io,
975 .init_machine = goni_machine_init, 975 .init_machine = goni_machine_init,
976 .init_time = s5p_timer_init, 976 .init_time = samsung_timer_init,
977 .reserve = &goni_reserve, 977 .reserve = &goni_reserve,
978 .restart = s5pv210_restart, 978 .restart = s5pv210_restart,
979MACHINE_END 979MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index 28bd0248a3e2..7c0ed07a78a3 100644
--- a/arch/arm/mach-s5pv210/mach-smdkc110.c
+++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
@@ -29,7 +29,7 @@
29#include <linux/platform_data/ata-samsung_cf.h> 29#include <linux/platform_data/ata-samsung_cf.h>
30#include <linux/platform_data/i2c-s3c2410.h> 30#include <linux/platform_data/i2c-s3c2410.h>
31#include <plat/pm.h> 31#include <plat/pm.h>
32#include <plat/s5p-time.h> 32#include <plat/samsung-time.h>
33#include <plat/mfc.h> 33#include <plat/mfc.h>
34 34
35#include "common.h" 35#include "common.h"
@@ -120,7 +120,7 @@ static void __init smdkc110_map_io(void)
120 s5pv210_init_io(NULL, 0); 120 s5pv210_init_io(NULL, 0);
121 s3c24xx_init_clocks(24000000); 121 s3c24xx_init_clocks(24000000);
122 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); 122 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
123 s5p_set_timer_source(S5P_PWM3, S5P_PWM4); 123 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
124} 124}
125 125
126static void __init smdkc110_reserve(void) 126static void __init smdkc110_reserve(void)
@@ -153,7 +153,7 @@ MACHINE_START(SMDKC110, "SMDKC110")
153 .init_irq = s5pv210_init_irq, 153 .init_irq = s5pv210_init_irq,
154 .map_io = smdkc110_map_io, 154 .map_io = smdkc110_map_io,
155 .init_machine = smdkc110_machine_init, 155 .init_machine = smdkc110_machine_init,
156 .init_time = s5p_timer_init, 156 .init_time = samsung_timer_init,
157 .restart = s5pv210_restart, 157 .restart = s5pv210_restart,
158 .reserve = &smdkc110_reserve, 158 .reserve = &smdkc110_reserve,
159MACHINE_END 159MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 3c73f36869bb..d50b6f124465 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -44,7 +44,7 @@
44#include <plat/keypad.h> 44#include <plat/keypad.h>
45#include <plat/pm.h> 45#include <plat/pm.h>
46#include <plat/fb.h> 46#include <plat/fb.h>
47#include <plat/s5p-time.h> 47#include <plat/samsung-time.h>
48#include <plat/backlight.h> 48#include <plat/backlight.h>
49#include <plat/mfc.h> 49#include <plat/mfc.h>
50#include <plat/clock.h> 50#include <plat/clock.h>
@@ -285,7 +285,7 @@ static void __init smdkv210_map_io(void)
285 s5pv210_init_io(NULL, 0); 285 s5pv210_init_io(NULL, 0);
286 s3c24xx_init_clocks(clk_xusbxti.rate); 286 s3c24xx_init_clocks(clk_xusbxti.rate);
287 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); 287 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
288 s5p_set_timer_source(S5P_PWM2, S5P_PWM4); 288 samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4);
289} 289}
290 290
291static void __init smdkv210_reserve(void) 291static void __init smdkv210_reserve(void)
@@ -329,7 +329,7 @@ MACHINE_START(SMDKV210, "SMDKV210")
329 .init_irq = s5pv210_init_irq, 329 .init_irq = s5pv210_init_irq,
330 .map_io = smdkv210_map_io, 330 .map_io = smdkv210_map_io,
331 .init_machine = smdkv210_machine_init, 331 .init_machine = smdkv210_machine_init,
332 .init_time = s5p_timer_init, 332 .init_time = samsung_timer_init,
333 .restart = s5pv210_restart, 333 .restart = s5pv210_restart,
334 .reserve = &smdkv210_reserve, 334 .reserve = &smdkv210_reserve,
335MACHINE_END 335MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c
index 2d4c5531819c..579afe89842a 100644
--- a/arch/arm/mach-s5pv210/mach-torbreck.c
+++ b/arch/arm/mach-s5pv210/mach-torbreck.c
@@ -26,7 +26,7 @@
26#include <plat/devs.h> 26#include <plat/devs.h>
27#include <plat/cpu.h> 27#include <plat/cpu.h>
28#include <linux/platform_data/i2c-s3c2410.h> 28#include <linux/platform_data/i2c-s3c2410.h>
29#include <plat/s5p-time.h> 29#include <plat/samsung-time.h>
30 30
31#include "common.h" 31#include "common.h"
32 32
@@ -106,7 +106,7 @@ static void __init torbreck_map_io(void)
106 s5pv210_init_io(NULL, 0); 106 s5pv210_init_io(NULL, 0);
107 s3c24xx_init_clocks(24000000); 107 s3c24xx_init_clocks(24000000);
108 s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs)); 108 s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs));
109 s5p_set_timer_source(S5P_PWM3, S5P_PWM4); 109 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
110} 110}
111 111
112static void __init torbreck_machine_init(void) 112static void __init torbreck_machine_init(void)
@@ -130,6 +130,6 @@ MACHINE_START(TORBRECK, "TORBRECK")
130 .init_irq = s5pv210_init_irq, 130 .init_irq = s5pv210_init_irq,
131 .map_io = torbreck_map_io, 131 .map_io = torbreck_map_io,
132 .init_machine = torbreck_machine_init, 132 .init_machine = torbreck_machine_init,
133 .init_time = s5p_timer_init, 133 .init_time = samsung_timer_init,
134 .restart = s5pv210_restart, 134 .restart = s5pv210_restart,
135MACHINE_END 135MACHINE_END
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index a9d52167e16e..b708b3e56d27 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -70,7 +70,7 @@ config S3C_LOWLEVEL_UART_PORT
70 70
71# timer options 71# timer options
72 72
73config S5P_HRT 73config SAMSUNG_HRT
74 bool 74 bool
75 select SAMSUNG_DEV_PWM 75 select SAMSUNG_DEV_PWM
76 help 76 help
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 3a7c64d1814a..a23c460299a1 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -12,8 +12,7 @@ obj- :=
12# Objects we always build independent of SoC choice 12# Objects we always build independent of SoC choice
13 13
14obj-y += init.o cpu.o 14obj-y += init.o cpu.o
15obj-$(CONFIG_ARCH_USES_GETTIMEOFFSET) += time.o 15obj-$(CONFIG_SAMSUNG_HRT) += samsung-time.o
16obj-$(CONFIG_S5P_HRT) += s5p-time.o
17 16
18obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o 17obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o
19obj-$(CONFIG_SAMSUNG_CLOCK) += pwm-clock.o 18obj-$(CONFIG_SAMSUNG_CLOCK) += pwm-clock.o
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 37703ef6dfc7..e126644cadf4 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -192,10 +192,6 @@ extern void s3c24xx_init_uartdevs(char *name,
192 struct s3c24xx_uart_resources *res, 192 struct s3c24xx_uart_resources *res,
193 struct s3c2410_uartcfg *cfg, int no); 193 struct s3c2410_uartcfg *cfg, int no);
194 194
195/* timer for 2410/2440 */
196
197extern void s3c24xx_timer_init(void);
198
199extern struct syscore_ops s3c2410_pm_syscore_ops; 195extern struct syscore_ops s3c2410_pm_syscore_ops;
200extern struct syscore_ops s3c2412_pm_syscore_ops; 196extern struct syscore_ops s3c2412_pm_syscore_ops;
201extern struct syscore_ops s3c2416_pm_syscore_ops; 197extern struct syscore_ops s3c2416_pm_syscore_ops;
diff --git a/arch/arm/plat-samsung/include/plat/irq.h b/arch/arm/plat-samsung/include/plat/irq.h
deleted file mode 100644
index e21a89bc26c9..000000000000
--- a/arch/arm/plat-samsung/include/plat/irq.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/irq.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU IRQ support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/io.h>
14
15#include <mach/hardware.h>
16#include <mach/regs-irq.h>
17#include <mach/regs-gpio.h>
18
19#define irqdbf(x...)
20#define irqdbf2(x...)
21
22#define EXTINT_OFF (IRQ_EINT4 - 4)
23
24/* these are exported for arch/arm/mach-* usage */
25extern struct irq_chip s3c_irq_level_chip;
26extern struct irq_chip s3c_irq_chip;
27
28static inline void s3c_irqsub_mask(unsigned int irqno,
29 unsigned int parentbit,
30 int subcheck)
31{
32 unsigned long mask;
33 unsigned long submask;
34
35 submask = __raw_readl(S3C2410_INTSUBMSK);
36 mask = __raw_readl(S3C2410_INTMSK);
37
38 submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
39
40 /* check to see if we need to mask the parent IRQ */
41
42 if ((submask & subcheck) == subcheck)
43 __raw_writel(mask | parentbit, S3C2410_INTMSK);
44
45 /* write back masks */
46 __raw_writel(submask, S3C2410_INTSUBMSK);
47
48}
49
50static inline void s3c_irqsub_unmask(unsigned int irqno,
51 unsigned int parentbit)
52{
53 unsigned long mask;
54 unsigned long submask;
55
56 submask = __raw_readl(S3C2410_INTSUBMSK);
57 mask = __raw_readl(S3C2410_INTMSK);
58
59 submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
60 mask &= ~parentbit;
61
62 /* write back masks */
63 __raw_writel(submask, S3C2410_INTSUBMSK);
64 __raw_writel(mask, S3C2410_INTMSK);
65}
66
67
68static inline void s3c_irqsub_maskack(unsigned int irqno,
69 unsigned int parentmask,
70 unsigned int group)
71{
72 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
73
74 s3c_irqsub_mask(irqno, parentmask, group);
75
76 __raw_writel(bit, S3C2410_SUBSRCPND);
77
78 /* only ack parent if we've got all the irqs (seems we must
79 * ack, all and hope that the irq system retriggers ok when
80 * the interrupt goes off again)
81 */
82
83 if (1) {
84 __raw_writel(parentmask, S3C2410_SRCPND);
85 __raw_writel(parentmask, S3C2410_INTPND);
86 }
87}
88
89static inline void s3c_irqsub_ack(unsigned int irqno,
90 unsigned int parentmask,
91 unsigned int group)
92{
93 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
94
95 __raw_writel(bit, S3C2410_SUBSRCPND);
96
97 /* only ack parent if we've got all the irqs (seems we must
98 * ack, all and hope that the irq system retriggers ok when
99 * the interrupt goes off again)
100 */
101
102 if (1) {
103 __raw_writel(parentmask, S3C2410_SRCPND);
104 __raw_writel(parentmask, S3C2410_INTPND);
105 }
106}
107
108/* exported for use in arch/arm/mach-s3c2410 */
109
110#ifdef CONFIG_PM
111extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
112#else
113#define s3c_irq_wake NULL
114#endif
115
116extern int s3c_irqext_type(struct irq_data *d, unsigned int type);
diff --git a/arch/arm/plat-samsung/include/plat/s3c2410.h b/arch/arm/plat-samsung/include/plat/s3c2410.h
deleted file mode 100644
index 55b0e5f51e97..000000000000
--- a/arch/arm/plat-samsung/include/plat/s3c2410.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/s3c2410.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2410 machine directory
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#ifdef CONFIG_CPU_S3C2410
15
16extern int s3c2410_init(void);
17extern int s3c2410a_init(void);
18
19extern void s3c2410_map_io(void);
20
21extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
22
23extern void s3c2410_init_clocks(int xtal);
24
25#else
26#define s3c2410_init_clocks NULL
27#define s3c2410_init_uarts NULL
28#define s3c2410_map_io NULL
29#define s3c2410_init NULL
30#define s3c2410a_init NULL
31#endif
diff --git a/arch/arm/plat-samsung/include/plat/s3c2412.h b/arch/arm/plat-samsung/include/plat/s3c2412.h
deleted file mode 100644
index cbae50ddacc8..000000000000
--- a/arch/arm/plat-samsung/include/plat/s3c2412.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/s3c2412.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2412 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2412
14
15extern int s3c2412_init(void);
16
17extern void s3c2412_map_io(void);
18
19extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
20
21extern void s3c2412_init_clocks(int xtal);
22
23extern int s3c2412_baseclk_add(void);
24
25extern void s3c2412_restart(char mode, const char *cmd);
26#else
27#define s3c2412_init_clocks NULL
28#define s3c2412_init_uarts NULL
29#define s3c2412_map_io NULL
30#define s3c2412_init NULL
31#define s3c2412_restart NULL
32#endif
diff --git a/arch/arm/plat-samsung/include/plat/s3c2416.h b/arch/arm/plat-samsung/include/plat/s3c2416.h
deleted file mode 100644
index f27399a3c68d..000000000000
--- a/arch/arm/plat-samsung/include/plat/s3c2416.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/s3c2416.h
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>
4 *
5 * Header file for s3c2416 cpu support
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#ifdef CONFIG_CPU_S3C2416
13
14struct s3c2410_uartcfg;
15
16extern int s3c2416_init(void);
17
18extern void s3c2416_map_io(void);
19
20extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
21
22extern void s3c2416_init_clocks(int xtal);
23
24extern int s3c2416_baseclk_add(void);
25
26extern void s3c2416_restart(char mode, const char *cmd);
27
28extern void s3c2416_init_irq(void);
29extern struct syscore_ops s3c2416_irq_syscore_ops;
30
31#else
32#define s3c2416_init_clocks NULL
33#define s3c2416_init_uarts NULL
34#define s3c2416_map_io NULL
35#define s3c2416_init NULL
36#define s3c2416_restart NULL
37#endif
diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h b/arch/arm/plat-samsung/include/plat/s3c2443.h
deleted file mode 100644
index 71b88ec48956..000000000000
--- a/arch/arm/plat-samsung/include/plat/s3c2443.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/s3c2443.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2443 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2443
14
15struct s3c2410_uartcfg;
16
17extern int s3c2443_init(void);
18
19extern void s3c2443_map_io(void);
20
21extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
22
23extern void s3c2443_init_clocks(int xtal);
24
25extern int s3c2443_baseclk_add(void);
26
27extern void s3c2443_restart(char mode, const char *cmd);
28
29extern void s3c2443_init_irq(void);
30#else
31#define s3c2443_init_clocks NULL
32#define s3c2443_init_uarts NULL
33#define s3c2443_map_io NULL
34#define s3c2443_init NULL
35#define s3c2443_restart NULL
36#endif
diff --git a/arch/arm/plat-samsung/include/plat/s3c244x.h b/arch/arm/plat-samsung/include/plat/s3c244x.h
deleted file mode 100644
index ea0c961b7603..000000000000
--- a/arch/arm/plat-samsung/include/plat/s3c244x.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/s3c244x.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C2440 and S3C2442 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
14
15extern void s3c244x_map_io(void);
16
17extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
18
19extern void s3c244x_init_clocks(int xtal);
20
21#else
22#define s3c244x_init_clocks NULL
23#define s3c244x_init_uarts NULL
24#endif
25
26#ifdef CONFIG_CPU_S3C2440
27extern int s3c2440_init(void);
28
29extern void s3c2440_map_io(void);
30#else
31#define s3c2440_init NULL
32#define s3c2440_map_io NULL
33#endif
34
35#ifdef CONFIG_CPU_S3C2442
36extern int s3c2442_init(void);
37
38extern void s3c2442_map_io(void);
39#else
40#define s3c2442_init NULL
41#define s3c2442_map_io NULL
42#endif
diff --git a/arch/arm/plat-samsung/include/plat/s5p-time.h b/arch/arm/plat-samsung/include/plat/s5p-time.h
deleted file mode 100644
index 9c96f3586ce0..000000000000
--- a/arch/arm/plat-samsung/include/plat/s5p-time.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/s5p-time.h
2 *
3 * Copyright 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * Header file for s5p time support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_PLAT_S5P_TIME_H
14#define __ASM_PLAT_S5P_TIME_H __FILE__
15
16/* S5P HR-Timer Clock mode */
17enum s5p_timer_mode {
18 S5P_PWM0,
19 S5P_PWM1,
20 S5P_PWM2,
21 S5P_PWM3,
22 S5P_PWM4,
23};
24
25struct s5p_timer_source {
26 unsigned int event_id;
27 unsigned int source_id;
28};
29
30/* Be able to sleep for atleast 4 seconds (usually more) */
31#define S5PTIMER_MIN_RANGE 4
32
33#define TCNT_MAX 0xffffffff
34#define NON_PERIODIC 0
35#define PERIODIC 1
36
37extern void __init s5p_set_timer_source(enum s5p_timer_mode event,
38 enum s5p_timer_mode source);
39extern void s5p_timer_init(void);
40#endif /* __ASM_PLAT_S5P_TIME_H */
diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/plat-samsung/include/plat/samsung-time.h
new file mode 100644
index 000000000000..4cc99bb1f176
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/samsung-time.h
@@ -0,0 +1,53 @@
1/* linux/arch/arm/plat-samsung/include/plat/samsung-time.h
2 *
3 * Copyright 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * Header file for samsung s3c and s5p time support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_PLAT_SAMSUNG_TIME_H
14#define __ASM_PLAT_SAMSUNG_TIME_H __FILE__
15
16/* SAMSUNG HR-Timer Clock mode */
17enum samsung_timer_mode {
18 SAMSUNG_PWM0,
19 SAMSUNG_PWM1,
20 SAMSUNG_PWM2,
21 SAMSUNG_PWM3,
22 SAMSUNG_PWM4,
23};
24
25struct samsung_timer_source {
26 unsigned int event_id;
27 unsigned int source_id;
28};
29
30/* Be able to sleep for atleast 4 seconds (usually more) */
31#define SAMSUNG_TIMER_MIN_RANGE 4
32
33#if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100)
34#define TCNT_MAX 0xffff
35#define TSCALER_DIV 25
36#define TDIV 50
37#define TSIZE 16
38#else
39#define TCNT_MAX 0xffffffff
40#define TSCALER_DIV 2
41#define TDIV 2
42#define TSIZE 32
43#endif
44
45#define NON_PERIODIC 0
46#define PERIODIC 1
47
48extern void __init samsung_set_timer_source(enum samsung_timer_mode event,
49 enum samsung_timer_mode source);
50
51extern void __init samsung_timer_init(void);
52
53#endif /* __ASM_PLAT_SAMSUNG_TIME_H */
diff --git a/arch/arm/plat-samsung/s5p-time.c b/arch/arm/plat-samsung/samsung-time.c
index e92510cf82ee..f899cbc9b288 100644
--- a/arch/arm/plat-samsung/s5p-time.c
+++ b/arch/arm/plat-samsung/samsung-time.c
@@ -2,7 +2,7 @@
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 2 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com/ 3 * http://www.samsung.com/
4 * 4 *
5 * S5P - Common hr-timer support 5 * samsung - Common hr-timer support (s3c and s5p)
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
@@ -25,41 +25,41 @@
25#include <mach/map.h> 25#include <mach/map.h>
26#include <plat/devs.h> 26#include <plat/devs.h>
27#include <plat/regs-timer.h> 27#include <plat/regs-timer.h>
28#include <plat/s5p-time.h> 28#include <plat/samsung-time.h>
29 29
30static struct clk *tin_event; 30static struct clk *tin_event;
31static struct clk *tin_source; 31static struct clk *tin_source;
32static struct clk *tdiv_event; 32static struct clk *tdiv_event;
33static struct clk *tdiv_source; 33static struct clk *tdiv_source;
34static struct clk *timerclk; 34static struct clk *timerclk;
35static struct s5p_timer_source timer_source; 35static struct samsung_timer_source timer_source;
36static unsigned long clock_count_per_tick; 36static unsigned long clock_count_per_tick;
37static void s5p_timer_resume(void); 37static void samsung_timer_resume(void);
38 38
39static void s5p_time_stop(enum s5p_timer_mode mode) 39static void samsung_time_stop(enum samsung_timer_mode mode)
40{ 40{
41 unsigned long tcon; 41 unsigned long tcon;
42 42
43 tcon = __raw_readl(S3C2410_TCON); 43 tcon = __raw_readl(S3C2410_TCON);
44 44
45 switch (mode) { 45 switch (mode) {
46 case S5P_PWM0: 46 case SAMSUNG_PWM0:
47 tcon &= ~S3C2410_TCON_T0START; 47 tcon &= ~S3C2410_TCON_T0START;
48 break; 48 break;
49 49
50 case S5P_PWM1: 50 case SAMSUNG_PWM1:
51 tcon &= ~S3C2410_TCON_T1START; 51 tcon &= ~S3C2410_TCON_T1START;
52 break; 52 break;
53 53
54 case S5P_PWM2: 54 case SAMSUNG_PWM2:
55 tcon &= ~S3C2410_TCON_T2START; 55 tcon &= ~S3C2410_TCON_T2START;
56 break; 56 break;
57 57
58 case S5P_PWM3: 58 case SAMSUNG_PWM3:
59 tcon &= ~S3C2410_TCON_T3START; 59 tcon &= ~S3C2410_TCON_T3START;
60 break; 60 break;
61 61
62 case S5P_PWM4: 62 case SAMSUNG_PWM4:
63 tcon &= ~S3C2410_TCON_T4START; 63 tcon &= ~S3C2410_TCON_T4START;
64 break; 64 break;
65 65
@@ -70,7 +70,7 @@ static void s5p_time_stop(enum s5p_timer_mode mode)
70 __raw_writel(tcon, S3C2410_TCON); 70 __raw_writel(tcon, S3C2410_TCON);
71} 71}
72 72
73static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt) 73static void samsung_time_setup(enum samsung_timer_mode mode, unsigned long tcnt)
74{ 74{
75 unsigned long tcon; 75 unsigned long tcon;
76 76
@@ -79,27 +79,27 @@ static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt)
79 tcnt--; 79 tcnt--;
80 80
81 switch (mode) { 81 switch (mode) {
82 case S5P_PWM0: 82 case SAMSUNG_PWM0:
83 tcon &= ~(0x0f << 0); 83 tcon &= ~(0x0f << 0);
84 tcon |= S3C2410_TCON_T0MANUALUPD; 84 tcon |= S3C2410_TCON_T0MANUALUPD;
85 break; 85 break;
86 86
87 case S5P_PWM1: 87 case SAMSUNG_PWM1:
88 tcon &= ~(0x0f << 8); 88 tcon &= ~(0x0f << 8);
89 tcon |= S3C2410_TCON_T1MANUALUPD; 89 tcon |= S3C2410_TCON_T1MANUALUPD;
90 break; 90 break;
91 91
92 case S5P_PWM2: 92 case SAMSUNG_PWM2:
93 tcon &= ~(0x0f << 12); 93 tcon &= ~(0x0f << 12);
94 tcon |= S3C2410_TCON_T2MANUALUPD; 94 tcon |= S3C2410_TCON_T2MANUALUPD;
95 break; 95 break;
96 96
97 case S5P_PWM3: 97 case SAMSUNG_PWM3:
98 tcon &= ~(0x0f << 16); 98 tcon &= ~(0x0f << 16);
99 tcon |= S3C2410_TCON_T3MANUALUPD; 99 tcon |= S3C2410_TCON_T3MANUALUPD;
100 break; 100 break;
101 101
102 case S5P_PWM4: 102 case SAMSUNG_PWM4:
103 tcon &= ~(0x07 << 20); 103 tcon &= ~(0x07 << 20);
104 tcon |= S3C2410_TCON_T4MANUALUPD; 104 tcon |= S3C2410_TCON_T4MANUALUPD;
105 break; 105 break;
@@ -114,14 +114,14 @@ static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt)
114 __raw_writel(tcon, S3C2410_TCON); 114 __raw_writel(tcon, S3C2410_TCON);
115} 115}
116 116
117static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) 117static void samsung_time_start(enum samsung_timer_mode mode, bool periodic)
118{ 118{
119 unsigned long tcon; 119 unsigned long tcon;
120 120
121 tcon = __raw_readl(S3C2410_TCON); 121 tcon = __raw_readl(S3C2410_TCON);
122 122
123 switch (mode) { 123 switch (mode) {
124 case S5P_PWM0: 124 case SAMSUNG_PWM0:
125 tcon |= S3C2410_TCON_T0START; 125 tcon |= S3C2410_TCON_T0START;
126 tcon &= ~S3C2410_TCON_T0MANUALUPD; 126 tcon &= ~S3C2410_TCON_T0MANUALUPD;
127 127
@@ -131,7 +131,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic)
131 tcon &= ~S3C2410_TCON_T0RELOAD; 131 tcon &= ~S3C2410_TCON_T0RELOAD;
132 break; 132 break;
133 133
134 case S5P_PWM1: 134 case SAMSUNG_PWM1:
135 tcon |= S3C2410_TCON_T1START; 135 tcon |= S3C2410_TCON_T1START;
136 tcon &= ~S3C2410_TCON_T1MANUALUPD; 136 tcon &= ~S3C2410_TCON_T1MANUALUPD;
137 137
@@ -141,7 +141,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic)
141 tcon &= ~S3C2410_TCON_T1RELOAD; 141 tcon &= ~S3C2410_TCON_T1RELOAD;
142 break; 142 break;
143 143
144 case S5P_PWM2: 144 case SAMSUNG_PWM2:
145 tcon |= S3C2410_TCON_T2START; 145 tcon |= S3C2410_TCON_T2START;
146 tcon &= ~S3C2410_TCON_T2MANUALUPD; 146 tcon &= ~S3C2410_TCON_T2MANUALUPD;
147 147
@@ -151,7 +151,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic)
151 tcon &= ~S3C2410_TCON_T2RELOAD; 151 tcon &= ~S3C2410_TCON_T2RELOAD;
152 break; 152 break;
153 153
154 case S5P_PWM3: 154 case SAMSUNG_PWM3:
155 tcon |= S3C2410_TCON_T3START; 155 tcon |= S3C2410_TCON_T3START;
156 tcon &= ~S3C2410_TCON_T3MANUALUPD; 156 tcon &= ~S3C2410_TCON_T3MANUALUPD;
157 157
@@ -161,7 +161,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic)
161 tcon &= ~S3C2410_TCON_T3RELOAD; 161 tcon &= ~S3C2410_TCON_T3RELOAD;
162 break; 162 break;
163 163
164 case S5P_PWM4: 164 case SAMSUNG_PWM4:
165 tcon |= S3C2410_TCON_T4START; 165 tcon |= S3C2410_TCON_T4START;
166 tcon &= ~S3C2410_TCON_T4MANUALUPD; 166 tcon &= ~S3C2410_TCON_T4MANUALUPD;
167 167
@@ -178,24 +178,24 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic)
178 __raw_writel(tcon, S3C2410_TCON); 178 __raw_writel(tcon, S3C2410_TCON);
179} 179}
180 180
181static int s5p_set_next_event(unsigned long cycles, 181static int samsung_set_next_event(unsigned long cycles,
182 struct clock_event_device *evt) 182 struct clock_event_device *evt)
183{ 183{
184 s5p_time_setup(timer_source.event_id, cycles); 184 samsung_time_setup(timer_source.event_id, cycles);
185 s5p_time_start(timer_source.event_id, NON_PERIODIC); 185 samsung_time_start(timer_source.event_id, NON_PERIODIC);
186 186
187 return 0; 187 return 0;
188} 188}
189 189
190static void s5p_set_mode(enum clock_event_mode mode, 190static void samsung_set_mode(enum clock_event_mode mode,
191 struct clock_event_device *evt) 191 struct clock_event_device *evt)
192{ 192{
193 s5p_time_stop(timer_source.event_id); 193 samsung_time_stop(timer_source.event_id);
194 194
195 switch (mode) { 195 switch (mode) {
196 case CLOCK_EVT_MODE_PERIODIC: 196 case CLOCK_EVT_MODE_PERIODIC:
197 s5p_time_setup(timer_source.event_id, clock_count_per_tick); 197 samsung_time_setup(timer_source.event_id, clock_count_per_tick);
198 s5p_time_start(timer_source.event_id, PERIODIC); 198 samsung_time_start(timer_source.event_id, PERIODIC);
199 break; 199 break;
200 200
201 case CLOCK_EVT_MODE_ONESHOT: 201 case CLOCK_EVT_MODE_ONESHOT:
@@ -206,24 +206,24 @@ static void s5p_set_mode(enum clock_event_mode mode,
206 break; 206 break;
207 207
208 case CLOCK_EVT_MODE_RESUME: 208 case CLOCK_EVT_MODE_RESUME:
209 s5p_timer_resume(); 209 samsung_timer_resume();
210 break; 210 break;
211 } 211 }
212} 212}
213 213
214static void s5p_timer_resume(void) 214static void samsung_timer_resume(void)
215{ 215{
216 /* event timer restart */ 216 /* event timer restart */
217 s5p_time_setup(timer_source.event_id, clock_count_per_tick); 217 samsung_time_setup(timer_source.event_id, clock_count_per_tick);
218 s5p_time_start(timer_source.event_id, PERIODIC); 218 samsung_time_start(timer_source.event_id, PERIODIC);
219 219
220 /* source timer restart */ 220 /* source timer restart */
221 s5p_time_setup(timer_source.source_id, TCNT_MAX); 221 samsung_time_setup(timer_source.source_id, TCNT_MAX);
222 s5p_time_start(timer_source.source_id, PERIODIC); 222 samsung_time_start(timer_source.source_id, PERIODIC);
223} 223}
224 224
225void __init s5p_set_timer_source(enum s5p_timer_mode event, 225void __init samsung_set_timer_source(enum samsung_timer_mode event,
226 enum s5p_timer_mode source) 226 enum samsung_timer_mode source)
227{ 227{
228 s3c_device_timer[event].dev.bus = &platform_bus_type; 228 s3c_device_timer[event].dev.bus = &platform_bus_type;
229 s3c_device_timer[source].dev.bus = &platform_bus_type; 229 s3c_device_timer[source].dev.bus = &platform_bus_type;
@@ -233,14 +233,14 @@ void __init s5p_set_timer_source(enum s5p_timer_mode event,
233} 233}
234 234
235static struct clock_event_device time_event_device = { 235static struct clock_event_device time_event_device = {
236 .name = "s5p_event_timer", 236 .name = "samsung_event_timer",
237 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 237 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
238 .rating = 200, 238 .rating = 200,
239 .set_next_event = s5p_set_next_event, 239 .set_next_event = samsung_set_next_event,
240 .set_mode = s5p_set_mode, 240 .set_mode = samsung_set_mode,
241}; 241};
242 242
243static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id) 243static irqreturn_t samsung_clock_event_isr(int irq, void *dev_id)
244{ 244{
245 struct clock_event_device *evt = dev_id; 245 struct clock_event_device *evt = dev_id;
246 246
@@ -249,14 +249,14 @@ static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id)
249 return IRQ_HANDLED; 249 return IRQ_HANDLED;
250} 250}
251 251
252static struct irqaction s5p_clock_event_irq = { 252static struct irqaction samsung_clock_event_irq = {
253 .name = "s5p_time_irq", 253 .name = "samsung_time_irq",
254 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 254 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
255 .handler = s5p_clock_event_isr, 255 .handler = samsung_clock_event_isr,
256 .dev_id = &time_event_device, 256 .dev_id = &time_event_device,
257}; 257};
258 258
259static void __init s5p_clockevent_init(void) 259static void __init samsung_clockevent_init(void)
260{ 260{
261 unsigned long pclk; 261 unsigned long pclk;
262 unsigned long clock_rate; 262 unsigned long clock_rate;
@@ -267,8 +267,8 @@ static void __init s5p_clockevent_init(void)
267 267
268 tscaler = clk_get_parent(tdiv_event); 268 tscaler = clk_get_parent(tdiv_event);
269 269
270 clk_set_rate(tscaler, pclk / 2); 270 clk_set_rate(tscaler, pclk / TSCALER_DIV);
271 clk_set_rate(tdiv_event, pclk / 2); 271 clk_set_rate(tdiv_event, pclk / TDIV);
272 clk_set_parent(tin_event, tdiv_event); 272 clk_set_parent(tin_event, tdiv_event);
273 273
274 clock_rate = clk_get_rate(tin_event); 274 clock_rate = clk_get_rate(tin_event);
@@ -278,22 +278,22 @@ static void __init s5p_clockevent_init(void)
278 clockevents_config_and_register(&time_event_device, clock_rate, 1, -1); 278 clockevents_config_and_register(&time_event_device, clock_rate, 1, -1);
279 279
280 irq_number = timer_source.event_id + IRQ_TIMER0; 280 irq_number = timer_source.event_id + IRQ_TIMER0;
281 setup_irq(irq_number, &s5p_clock_event_irq); 281 setup_irq(irq_number, &samsung_clock_event_irq);
282} 282}
283 283
284static void __iomem *s5p_timer_reg(void) 284static void __iomem *samsung_timer_reg(void)
285{ 285{
286 unsigned long offset = 0; 286 unsigned long offset = 0;
287 287
288 switch (timer_source.source_id) { 288 switch (timer_source.source_id) {
289 case S5P_PWM0: 289 case SAMSUNG_PWM0:
290 case S5P_PWM1: 290 case SAMSUNG_PWM1:
291 case S5P_PWM2: 291 case SAMSUNG_PWM2:
292 case S5P_PWM3: 292 case SAMSUNG_PWM3:
293 offset = (timer_source.source_id * 0x0c) + 0x14; 293 offset = (timer_source.source_id * 0x0c) + 0x14;
294 break; 294 break;
295 295
296 case S5P_PWM4: 296 case SAMSUNG_PWM4:
297 offset = 0x40; 297 offset = 0x40;
298 break; 298 break;
299 299
@@ -312,9 +312,9 @@ static void __iomem *s5p_timer_reg(void)
312 * this wraps around for now, since it is just a relative time 312 * this wraps around for now, since it is just a relative time
313 * stamp. (Inspired by U300 implementation.) 313 * stamp. (Inspired by U300 implementation.)
314 */ 314 */
315static u32 notrace s5p_read_sched_clock(void) 315static u32 notrace samsung_read_sched_clock(void)
316{ 316{
317 void __iomem *reg = s5p_timer_reg(); 317 void __iomem *reg = samsung_timer_reg();
318 318
319 if (!reg) 319 if (!reg)
320 return 0; 320 return 0;
@@ -322,29 +322,29 @@ static u32 notrace s5p_read_sched_clock(void)
322 return ~__raw_readl(reg); 322 return ~__raw_readl(reg);
323} 323}
324 324
325static void __init s5p_clocksource_init(void) 325static void __init samsung_clocksource_init(void)
326{ 326{
327 unsigned long pclk; 327 unsigned long pclk;
328 unsigned long clock_rate; 328 unsigned long clock_rate;
329 329
330 pclk = clk_get_rate(timerclk); 330 pclk = clk_get_rate(timerclk);
331 331
332 clk_set_rate(tdiv_source, pclk / 2); 332 clk_set_rate(tdiv_source, pclk / TDIV);
333 clk_set_parent(tin_source, tdiv_source); 333 clk_set_parent(tin_source, tdiv_source);
334 334
335 clock_rate = clk_get_rate(tin_source); 335 clock_rate = clk_get_rate(tin_source);
336 336
337 s5p_time_setup(timer_source.source_id, TCNT_MAX); 337 samsung_time_setup(timer_source.source_id, TCNT_MAX);
338 s5p_time_start(timer_source.source_id, PERIODIC); 338 samsung_time_start(timer_source.source_id, PERIODIC);
339 339
340 setup_sched_clock(s5p_read_sched_clock, 32, clock_rate); 340 setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate);
341 341
342 if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer", 342 if (clocksource_mmio_init(samsung_timer_reg(), "samsung_clocksource_timer",
343 clock_rate, 250, 32, clocksource_mmio_readl_down)) 343 clock_rate, 250, TSIZE, clocksource_mmio_readl_down))
344 panic("s5p_clocksource_timer: can't register clocksource\n"); 344 panic("samsung_clocksource_timer: can't register clocksource\n");
345} 345}
346 346
347static void __init s5p_timer_resources(void) 347static void __init samsung_timer_resources(void)
348{ 348{
349 349
350 unsigned long event_id = timer_source.event_id; 350 unsigned long event_id = timer_source.event_id;
@@ -386,9 +386,9 @@ static void __init s5p_timer_resources(void)
386 clk_enable(tin_source); 386 clk_enable(tin_source);
387} 387}
388 388
389void __init s5p_timer_init(void) 389void __init samsung_timer_init(void)
390{ 390{
391 s5p_timer_resources(); 391 samsung_timer_resources();
392 s5p_clockevent_init(); 392 samsung_clockevent_init();
393 s5p_clocksource_init(); 393 samsung_clocksource_init();
394} 394}
diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c
deleted file mode 100644
index 73defd00c3e4..000000000000
--- a/arch/arm/plat-samsung/time.c
+++ /dev/null
@@ -1,287 +0,0 @@
1/* linux/arch/arm/plat-samsung/time.c
2 *
3 * Copyright (C) 2003-2005 Simtec Electronics
4 * Ben Dooks, <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/sched.h>
23#include <linux/init.h>
24#include <linux/interrupt.h>
25#include <linux/irq.h>
26#include <linux/err.h>
27#include <linux/clk.h>
28#include <linux/io.h>
29#include <linux/platform_device.h>
30#include <linux/syscore_ops.h>
31
32#include <asm/mach-types.h>
33
34#include <asm/irq.h>
35#include <mach/map.h>
36#include <plat/regs-timer.h>
37#include <mach/regs-irq.h>
38#include <asm/mach/time.h>
39#include <mach/tick.h>
40
41#include <plat/clock.h>
42#include <plat/cpu.h>
43
44static unsigned long timer_startval;
45static unsigned long timer_usec_ticks;
46
47#ifndef TICK_MAX
48#define TICK_MAX (0xffff)
49#endif
50
51#define TIMER_USEC_SHIFT 16
52
53/* we use the shifted arithmetic to work out the ratio of timer ticks
54 * to usecs, as often the peripheral clock is not a nice even multiple
55 * of 1MHz.
56 *
57 * shift of 14 and 15 are too low for the 12MHz, 16 seems to be ok
58 * for the current HZ value of 200 without producing overflows.
59 *
60 * Original patch by Dimitry Andric, updated by Ben Dooks
61*/
62
63
64/* timer_mask_usec_ticks
65 *
66 * given a clock and divisor, make the value to pass into timer_ticks_to_usec
67 * to scale the ticks into usecs
68*/
69
70static inline unsigned long
71timer_mask_usec_ticks(unsigned long scaler, unsigned long pclk)
72{
73 unsigned long den = pclk / 1000;
74
75 return ((1000 << TIMER_USEC_SHIFT) * scaler + (den >> 1)) / den;
76}
77
78/* timer_ticks_to_usec
79 *
80 * convert timer ticks to usec.
81*/
82
83static inline unsigned long timer_ticks_to_usec(unsigned long ticks)
84{
85 unsigned long res;
86
87 res = ticks * timer_usec_ticks;
88 res += 1 << (TIMER_USEC_SHIFT - 4); /* round up slightly */
89
90 return res >> TIMER_USEC_SHIFT;
91}
92
93/***
94 * Returns microsecond since last clock interrupt. Note that interrupts
95 * will have been disabled by do_gettimeoffset()
96 * IRQs are disabled before entering here from do_gettimeofday()
97 */
98
99static u32 s3c2410_gettimeoffset(void)
100{
101 unsigned long tdone;
102 unsigned long tval;
103
104 /* work out how many ticks have gone since last timer interrupt */
105
106 tval = __raw_readl(S3C2410_TCNTO(4));
107 tdone = timer_startval - tval;
108
109 /* check to see if there is an interrupt pending */
110
111 if (s3c24xx_ostimer_pending()) {
112 /* re-read the timer, and try and fix up for the missed
113 * interrupt. Note, the interrupt may go off before the
114 * timer has re-loaded from wrapping.
115 */
116
117 tval = __raw_readl(S3C2410_TCNTO(4));
118 tdone = timer_startval - tval;
119
120 if (tval != 0)
121 tdone += timer_startval;
122 }
123
124 return timer_ticks_to_usec(tdone) * 1000;
125}
126
127
128/*
129 * IRQ handler for the timer
130 */
131static irqreturn_t
132s3c2410_timer_interrupt(int irq, void *dev_id)
133{
134 timer_tick();
135 return IRQ_HANDLED;
136}
137
138static struct irqaction s3c2410_timer_irq = {
139 .name = "S3C2410 Timer Tick",
140 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
141 .handler = s3c2410_timer_interrupt,
142};
143
144#define use_tclk1_12() ( \
145 machine_is_bast() || \
146 machine_is_vr1000() || \
147 machine_is_anubis() || \
148 machine_is_osiris())
149
150static struct clk *tin;
151static struct clk *tdiv;
152static struct clk *timerclk;
153
154/*
155 * Set up timer interrupt, and return the current time in seconds.
156 *
157 * Currently we only use timer4, as it is the only timer which has no
158 * other function that can be exploited externally
159 */
160static void s3c2410_timer_setup (void)
161{
162 unsigned long tcon;
163 unsigned long tcnt;
164 unsigned long tcfg1;
165 unsigned long tcfg0;
166
167 tcnt = TICK_MAX; /* default value for tcnt */
168
169 /* configure the system for whichever machine is in use */
170
171 if (use_tclk1_12()) {
172 /* timer is at 12MHz, scaler is 1 */
173 timer_usec_ticks = timer_mask_usec_ticks(1, 12000000);
174 tcnt = 12000000 / HZ;
175
176 tcfg1 = __raw_readl(S3C2410_TCFG1);
177 tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK;
178 tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1;
179 __raw_writel(tcfg1, S3C2410_TCFG1);
180 } else {
181 unsigned long pclk;
182 struct clk *tscaler;
183
184 /* for the h1940 (and others), we use the pclk from the core
185 * to generate the timer values. since values around 50 to
186 * 70MHz are not values we can directly generate the timer
187 * value from, we need to pre-scale and divide before using it.
188 *
189 * for instance, using 50.7MHz and dividing by 6 gives 8.45MHz
190 * (8.45 ticks per usec)
191 */
192
193 pclk = clk_get_rate(timerclk);
194
195 /* configure clock tick */
196
197 timer_usec_ticks = timer_mask_usec_ticks(6, pclk);
198
199 tscaler = clk_get_parent(tdiv);
200
201 clk_set_rate(tscaler, pclk / 3);
202 clk_set_rate(tdiv, pclk / 6);
203 clk_set_parent(tin, tdiv);
204
205 tcnt = clk_get_rate(tin) / HZ;
206 }
207
208 tcon = __raw_readl(S3C2410_TCON);
209 tcfg0 = __raw_readl(S3C2410_TCFG0);
210 tcfg1 = __raw_readl(S3C2410_TCFG1);
211
212 /* timers reload after counting zero, so reduce the count by 1 */
213
214 tcnt--;
215
216 printk(KERN_DEBUG "timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx, usec %08lx\n",
217 tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks);
218
219 /* check to see if timer is within 16bit range... */
220 if (tcnt > TICK_MAX) {
221 panic("setup_timer: HZ is too small, cannot configure timer!");
222 return;
223 }
224
225 __raw_writel(tcfg1, S3C2410_TCFG1);
226 __raw_writel(tcfg0, S3C2410_TCFG0);
227
228 timer_startval = tcnt;
229 __raw_writel(tcnt, S3C2410_TCNTB(4));
230
231 /* ensure timer is stopped... */
232
233 tcon &= ~(7<<20);
234 tcon |= S3C2410_TCON_T4RELOAD;
235 tcon |= S3C2410_TCON_T4MANUALUPD;
236
237 __raw_writel(tcon, S3C2410_TCON);
238 __raw_writel(tcnt, S3C2410_TCNTB(4));
239 __raw_writel(tcnt, S3C2410_TCMPB(4));
240
241 /* start the timer running */
242 tcon |= S3C2410_TCON_T4START;
243 tcon &= ~S3C2410_TCON_T4MANUALUPD;
244 __raw_writel(tcon, S3C2410_TCON);
245}
246
247static void __init s3c2410_timer_resources(void)
248{
249 struct platform_device tmpdev;
250
251 tmpdev.dev.bus = &platform_bus_type;
252 tmpdev.id = 4;
253
254 timerclk = clk_get(NULL, "timers");
255 if (IS_ERR(timerclk))
256 panic("failed to get clock for system timer");
257
258 clk_enable(timerclk);
259
260 if (!use_tclk1_12()) {
261 tmpdev.id = 4;
262 tmpdev.dev.init_name = "s3c24xx-pwm.4";
263 tin = clk_get(&tmpdev.dev, "pwm-tin");
264 if (IS_ERR(tin))
265 panic("failed to get pwm-tin clock for system timer");
266
267 tdiv = clk_get(&tmpdev.dev, "pwm-tdiv");
268 if (IS_ERR(tdiv))
269 panic("failed to get pwm-tdiv clock for system timer");
270 }
271
272 clk_enable(tin);
273}
274
275static struct syscore_ops s3c24xx_syscore_ops = {
276 .resume = s3c2410_timer_setup,
277};
278
279void __init s3c24xx_timer_init(void)
280{
281 arch_gettimeoffset = s3c2410_gettimeoffset;
282
283 s3c2410_timer_resources();
284 s3c2410_timer_setup();
285 setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
286 register_syscore_ops(&s3c24xx_syscore_ops);
287}
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 63fb265e0da6..8d6794cdf899 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -25,14 +25,93 @@
25 25
26#include <mach/dma.h> 26#include <mach/dma.h>
27 27
28#include <mach/regs-sdi.h>
29
30#include <linux/platform_data/mmc-s3cmci.h> 28#include <linux/platform_data/mmc-s3cmci.h>
31 29
32#include "s3cmci.h" 30#include "s3cmci.h"
33 31
34#define DRIVER_NAME "s3c-mci" 32#define DRIVER_NAME "s3c-mci"
35 33
34#define S3C2410_SDICON (0x00)
35#define S3C2410_SDIPRE (0x04)
36#define S3C2410_SDICMDARG (0x08)
37#define S3C2410_SDICMDCON (0x0C)
38#define S3C2410_SDICMDSTAT (0x10)
39#define S3C2410_SDIRSP0 (0x14)
40#define S3C2410_SDIRSP1 (0x18)
41#define S3C2410_SDIRSP2 (0x1C)
42#define S3C2410_SDIRSP3 (0x20)
43#define S3C2410_SDITIMER (0x24)
44#define S3C2410_SDIBSIZE (0x28)
45#define S3C2410_SDIDCON (0x2C)
46#define S3C2410_SDIDCNT (0x30)
47#define S3C2410_SDIDSTA (0x34)
48#define S3C2410_SDIFSTA (0x38)
49
50#define S3C2410_SDIDATA (0x3C)
51#define S3C2410_SDIIMSK (0x40)
52
53#define S3C2440_SDIDATA (0x40)
54#define S3C2440_SDIIMSK (0x3C)
55
56#define S3C2440_SDICON_SDRESET (1 << 8)
57#define S3C2410_SDICON_SDIOIRQ (1 << 3)
58#define S3C2410_SDICON_FIFORESET (1 << 1)
59#define S3C2410_SDICON_CLOCKTYPE (1 << 0)
60
61#define S3C2410_SDICMDCON_LONGRSP (1 << 10)
62#define S3C2410_SDICMDCON_WAITRSP (1 << 9)
63#define S3C2410_SDICMDCON_CMDSTART (1 << 8)
64#define S3C2410_SDICMDCON_SENDERHOST (1 << 6)
65#define S3C2410_SDICMDCON_INDEX (0x3f)
66
67#define S3C2410_SDICMDSTAT_CRCFAIL (1 << 12)
68#define S3C2410_SDICMDSTAT_CMDSENT (1 << 11)
69#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1 << 10)
70#define S3C2410_SDICMDSTAT_RSPFIN (1 << 9)
71
72#define S3C2440_SDIDCON_DS_WORD (2 << 22)
73#define S3C2410_SDIDCON_TXAFTERRESP (1 << 20)
74#define S3C2410_SDIDCON_RXAFTERCMD (1 << 19)
75#define S3C2410_SDIDCON_BLOCKMODE (1 << 17)
76#define S3C2410_SDIDCON_WIDEBUS (1 << 16)
77#define S3C2410_SDIDCON_DMAEN (1 << 15)
78#define S3C2410_SDIDCON_STOP (1 << 14)
79#define S3C2440_SDIDCON_DATSTART (1 << 14)
80
81#define S3C2410_SDIDCON_XFER_RXSTART (2 << 12)
82#define S3C2410_SDIDCON_XFER_TXSTART (3 << 12)
83
84#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF)
85
86#define S3C2410_SDIDSTA_SDIOIRQDETECT (1 << 9)
87#define S3C2410_SDIDSTA_FIFOFAIL (1 << 8)
88#define S3C2410_SDIDSTA_CRCFAIL (1 << 7)
89#define S3C2410_SDIDSTA_RXCRCFAIL (1 << 6)
90#define S3C2410_SDIDSTA_DATATIMEOUT (1 << 5)
91#define S3C2410_SDIDSTA_XFERFINISH (1 << 4)
92#define S3C2410_SDIDSTA_TXDATAON (1 << 1)
93#define S3C2410_SDIDSTA_RXDATAON (1 << 0)
94
95#define S3C2440_SDIFSTA_FIFORESET (1 << 16)
96#define S3C2440_SDIFSTA_FIFOFAIL (3 << 14)
97#define S3C2410_SDIFSTA_TFDET (1 << 13)
98#define S3C2410_SDIFSTA_RFDET (1 << 12)
99#define S3C2410_SDIFSTA_COUNTMASK (0x7f)
100
101#define S3C2410_SDIIMSK_RESPONSECRC (1 << 17)
102#define S3C2410_SDIIMSK_CMDSENT (1 << 16)
103#define S3C2410_SDIIMSK_CMDTIMEOUT (1 << 15)
104#define S3C2410_SDIIMSK_RESPONSEND (1 << 14)
105#define S3C2410_SDIIMSK_SDIOIRQ (1 << 12)
106#define S3C2410_SDIIMSK_FIFOFAIL (1 << 11)
107#define S3C2410_SDIIMSK_CRCSTATUS (1 << 10)
108#define S3C2410_SDIIMSK_DATACRC (1 << 9)
109#define S3C2410_SDIIMSK_DATATIMEOUT (1 << 8)
110#define S3C2410_SDIIMSK_DATAFINISH (1 << 7)
111#define S3C2410_SDIIMSK_TXFIFOHALF (1 << 4)
112#define S3C2410_SDIIMSK_RXFIFOLAST (1 << 2)
113#define S3C2410_SDIIMSK_RXFIFOHALF (1 << 0)
114
36enum dbg_channels { 115enum dbg_channels {
37 dbg_err = (1 << 0), 116 dbg_err = (1 << 0),
38 dbg_debug = (1 << 1), 117 dbg_debug = (1 << 1),