diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-22 17:32:07 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-23 14:11:28 -0500 |
commit | 3fa754c298b7e6fcbdbe615d6b609117fa7e0de9 (patch) | |
tree | aebfe49d8b77a839f73c7c32e69e364a28103513 /arch/arm | |
parent | dd4153d9af67496f6545831e72c743060d33a830 (diff) |
ARM: 7248/1: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch]
This patch introduces common.[ch] which are used only in the
arch/arm/mach-s5pv210/ directory. The common.c file merges
the cpu.c and init.c which are used commonly on S5PCV210/S5PC100
SoC and the common.h local header file replaces with plat/s5pv210.h
file.
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s5pv210/Makefile | 19 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/clock.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/common.c (renamed from arch/arm/mach-s5pv210/cpu.c) | 109 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/common.h | 35 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/init.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-aquila.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkc110.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkv210.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-torbreck.c | 5 | ||||
-rw-r--r-- | arch/arm/plat-s5p/cpu.c | 10 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/s5pv210.h | 33 |
12 files changed, 158 insertions, 120 deletions
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile index 009fbe53df96..4c59186de957 100644 --- a/arch/arm/mach-s5pv210/Makefile +++ b/arch/arm/mach-s5pv210/Makefile | |||
@@ -10,18 +10,20 @@ obj-m := | |||
10 | obj-n := | 10 | obj-n := |
11 | obj- := | 11 | obj- := |
12 | 12 | ||
13 | # Core support for S5PV210 system | 13 | # Core |
14 | |||
15 | obj-y += common.o clock.o | ||
14 | 16 | ||
15 | obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o | ||
16 | obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o | ||
17 | obj-$(CONFIG_PM) += pm.o | 17 | obj-$(CONFIG_PM) += pm.o |
18 | 18 | ||
19 | obj-y += dma.o | ||
20 | |||
19 | # machine support | 21 | # machine support |
20 | 22 | ||
21 | obj-$(CONFIG_MACH_AQUILA) += mach-aquila.o | 23 | obj-$(CONFIG_MACH_AQUILA) += mach-aquila.o |
22 | obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o | ||
23 | obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o | ||
24 | obj-$(CONFIG_MACH_GONI) += mach-goni.o | 24 | obj-$(CONFIG_MACH_GONI) += mach-goni.o |
25 | obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o | ||
26 | obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o | ||
25 | obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o | 27 | obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o |
26 | 28 | ||
27 | # device support | 29 | # device support |
@@ -29,11 +31,12 @@ obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o | |||
29 | obj-y += dev-audio.o | 31 | obj-y += dev-audio.o |
30 | obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o | 32 | obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o |
31 | 33 | ||
34 | obj-y += setup-i2c0.o | ||
32 | obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o | 35 | obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o |
33 | obj-$(CONFIG_S5PV210_SETUP_FIMC) += setup-fimc.o | 36 | obj-$(CONFIG_S5PV210_SETUP_FIMC) += setup-fimc.o |
34 | obj-$(CONFIG_S5PV210_SETUP_I2C1) += setup-i2c1.o | 37 | obj-$(CONFIG_S5PV210_SETUP_I2C1) += setup-i2c1.o |
35 | obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o | 38 | obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o |
36 | obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o | 39 | obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o |
37 | obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o | 40 | obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o |
38 | obj-$(CONFIG_S5PV210_SETUP_SDHCI) += setup-sdhci.o | 41 | obj-$(CONFIG_S5PV210_SETUP_SDHCI) += setup-sdhci.o |
39 | obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 42 | obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 4c5ac7a69e9e..f2dbf5f75a2c 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -29,7 +29,8 @@ | |||
29 | #include <plat/pll.h> | 29 | #include <plat/pll.h> |
30 | #include <plat/s5p-clock.h> | 30 | #include <plat/s5p-clock.h> |
31 | #include <plat/clock-clksrc.h> | 31 | #include <plat/clock-clksrc.h> |
32 | #include <plat/s5pv210.h> | 32 | |
33 | #include "common.h" | ||
33 | 34 | ||
34 | static unsigned long xtal; | 35 | static unsigned long xtal; |
35 | 36 | ||
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/common.c index 84ec74633232..2899ee8f0806 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -1,12 +1,13 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/cpu.c | 1 | /* |
2 | * | 2 | * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd. |
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | 3 | * http://www.samsung.com |
5 | * | 4 | * |
5 | * Common Codes for S5PV210 | ||
6 | * | ||
6 | * 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 |
7 | * 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 |
8 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
9 | */ | 10 | */ |
10 | 11 | ||
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
@@ -21,33 +22,75 @@ | |||
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
23 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/serial_core.h> | ||
24 | 26 | ||
27 | #include <asm/proc-fns.h> | ||
25 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
27 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
28 | 31 | ||
29 | #include <asm/proc-fns.h> | ||
30 | #include <mach/map.h> | 32 | #include <mach/map.h> |
31 | #include <mach/regs-clock.h> | 33 | #include <mach/regs-clock.h> |
32 | 34 | ||
33 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
34 | #include <plat/devs.h> | ||
35 | #include <plat/clock.h> | 36 | #include <plat/clock.h> |
36 | #include <plat/fb-core.h> | 37 | #include <plat/devs.h> |
37 | #include <plat/s5pv210.h> | 38 | #include <plat/reset.h> |
39 | #include <plat/sdhci.h> | ||
38 | #include <plat/adc-core.h> | 40 | #include <plat/adc-core.h> |
39 | #include <plat/ata-core.h> | 41 | #include <plat/ata-core.h> |
42 | #include <plat/fb-core.h> | ||
40 | #include <plat/fimc-core.h> | 43 | #include <plat/fimc-core.h> |
41 | #include <plat/iic-core.h> | 44 | #include <plat/iic-core.h> |
42 | #include <plat/keypad-core.h> | 45 | #include <plat/keypad-core.h> |
43 | #include <plat/sdhci.h> | ||
44 | #include <plat/reset.h> | ||
45 | #include <plat/tv-core.h> | 46 | #include <plat/tv-core.h> |
47 | #include <plat/regs-serial.h> | ||
48 | |||
49 | #include "common.h" | ||
50 | |||
51 | static const char name_s5pv210[] = "S5PV210/S5PC110"; | ||
52 | |||
53 | static struct cpu_table cpu_ids[] __initdata = { | ||
54 | { | ||
55 | .idcode = S5PV210_CPU_ID, | ||
56 | .idmask = S5PV210_CPU_MASK, | ||
57 | .map_io = s5pv210_map_io, | ||
58 | .init_clocks = s5pv210_init_clocks, | ||
59 | .init_uarts = s5pv210_init_uarts, | ||
60 | .init = s5pv210_init, | ||
61 | .name = name_s5pv210, | ||
62 | }, | ||
63 | }; | ||
46 | 64 | ||
47 | /* Initial IO mappings */ | 65 | /* Initial IO mappings */ |
48 | 66 | ||
49 | static struct map_desc s5pv210_iodesc[] __initdata = { | 67 | static struct map_desc s5pv210_iodesc[] __initdata = { |
50 | { | 68 | { |
69 | .virtual = (unsigned long)S5P_VA_CHIPID, | ||
70 | .pfn = __phys_to_pfn(S5PV210_PA_CHIPID), | ||
71 | .length = SZ_4K, | ||
72 | .type = MT_DEVICE, | ||
73 | }, { | ||
74 | .virtual = (unsigned long)S3C_VA_SYS, | ||
75 | .pfn = __phys_to_pfn(S5PV210_PA_SYSCON), | ||
76 | .length = SZ_64K, | ||
77 | .type = MT_DEVICE, | ||
78 | }, { | ||
79 | .virtual = (unsigned long)S3C_VA_TIMER, | ||
80 | .pfn = __phys_to_pfn(S5PV210_PA_TIMER), | ||
81 | .length = SZ_16K, | ||
82 | .type = MT_DEVICE, | ||
83 | }, { | ||
84 | .virtual = (unsigned long)S3C_VA_WATCHDOG, | ||
85 | .pfn = __phys_to_pfn(S5PV210_PA_WATCHDOG), | ||
86 | .length = SZ_4K, | ||
87 | .type = MT_DEVICE, | ||
88 | }, { | ||
89 | .virtual = (unsigned long)S5P_VA_SROMC, | ||
90 | .pfn = __phys_to_pfn(S5PV210_PA_SROMC), | ||
91 | .length = SZ_4K, | ||
92 | .type = MT_DEVICE, | ||
93 | }, { | ||
51 | .virtual = (unsigned long)S5P_VA_SYSTIMER, | 94 | .virtual = (unsigned long)S5P_VA_SYSTIMER, |
52 | .pfn = __phys_to_pfn(S5PV210_PA_SYSTIMER), | 95 | .pfn = __phys_to_pfn(S5PV210_PA_SYSTIMER), |
53 | .length = SZ_4K, | 96 | .length = SZ_4K, |
@@ -113,14 +156,27 @@ static void s5pv210_sw_reset(void) | |||
113 | __raw_writel(0x1, S5P_SWRESET); | 156 | __raw_writel(0x1, S5P_SWRESET); |
114 | } | 157 | } |
115 | 158 | ||
116 | /* s5pv210_map_io | 159 | /* |
160 | * s5pv210_map_io | ||
117 | * | 161 | * |
118 | * register the standard cpu IO areas | 162 | * register the standard cpu IO areas |
119 | */ | 163 | */ |
120 | 164 | ||
121 | void __init s5pv210_map_io(void) | 165 | void __init s5pv210_init_io(struct map_desc *mach_desc, int size) |
122 | { | 166 | { |
167 | /* initialize the io descriptors we need for initialization */ | ||
123 | iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc)); | 168 | iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc)); |
169 | if (mach_desc) | ||
170 | iotable_init(mach_desc, size); | ||
171 | |||
172 | /* detect cpu id and rev. */ | ||
173 | s5p_init_cpu(S5P_VA_CHIPID); | ||
174 | |||
175 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | ||
176 | } | ||
177 | |||
178 | void __init s5pv210_map_io(void) | ||
179 | { | ||
124 | init_consistent_dma_size(14 << 20); | 180 | init_consistent_dma_size(14 << 20); |
125 | 181 | ||
126 | /* initialise device information early */ | 182 | /* initialise device information early */ |
@@ -186,7 +242,6 @@ static int __init s5pv210_core_init(void) | |||
186 | { | 242 | { |
187 | return sysdev_class_register(&s5pv210_sysclass); | 243 | return sysdev_class_register(&s5pv210_sysclass); |
188 | } | 244 | } |
189 | |||
190 | core_initcall(s5pv210_core_init); | 245 | core_initcall(s5pv210_core_init); |
191 | 246 | ||
192 | int __init s5pv210_init(void) | 247 | int __init s5pv210_init(void) |
@@ -201,3 +256,29 @@ int __init s5pv210_init(void) | |||
201 | 256 | ||
202 | return sysdev_register(&s5pv210_sysdev); | 257 | return sysdev_register(&s5pv210_sysdev); |
203 | } | 258 | } |
259 | |||
260 | static struct s3c24xx_uart_clksrc s5pv210_serial_clocks[] = { | ||
261 | [0] = { | ||
262 | .name = "pclk", | ||
263 | .divisor = 1, | ||
264 | .min_baud = 0, | ||
265 | .max_baud = 0, | ||
266 | }, | ||
267 | }; | ||
268 | |||
269 | /* uart registration process */ | ||
270 | |||
271 | void __init s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
272 | { | ||
273 | struct s3c2410_uartcfg *tcfg = cfg; | ||
274 | u32 ucnt; | ||
275 | |||
276 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | ||
277 | if (!tcfg->clocks) { | ||
278 | tcfg->clocks = s5pv210_serial_clocks; | ||
279 | tcfg->clocks_size = ARRAY_SIZE(s5pv210_serial_clocks); | ||
280 | } | ||
281 | } | ||
282 | |||
283 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); | ||
284 | } | ||
diff --git a/arch/arm/mach-s5pv210/common.h b/arch/arm/mach-s5pv210/common.h new file mode 100644 index 000000000000..f74ef965bba3 --- /dev/null +++ b/arch/arm/mach-s5pv210/common.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Common Header for S5PV210 machines | ||
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 | #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H | ||
13 | #define __ARCH_ARM_MACH_S5PV210_COMMON_H | ||
14 | |||
15 | void s5pv210_init_io(struct map_desc *mach_desc, int size); | ||
16 | void s5pv210_init_irq(void); | ||
17 | |||
18 | void s5pv210_register_clocks(void); | ||
19 | void s5pv210_setup_clocks(void); | ||
20 | |||
21 | #ifdef CONFIG_CPU_S5PV210 | ||
22 | |||
23 | extern int s5pv210_init(void); | ||
24 | extern void s5pv210_map_io(void); | ||
25 | extern void s5pv210_init_clocks(int xtal); | ||
26 | extern void s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
27 | |||
28 | #else | ||
29 | #define s5pv210_init_clocks NULL | ||
30 | #define s5pv210_init_uarts NULL | ||
31 | #define s5pv210_map_io NULL | ||
32 | #define s5pv210_init NULL | ||
33 | #endif | ||
34 | |||
35 | #endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */ | ||
diff --git a/arch/arm/mach-s5pv210/init.c b/arch/arm/mach-s5pv210/init.c deleted file mode 100644 index 4865ae2c475a..000000000000 --- a/arch/arm/mach-s5pv210/init.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/init.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/serial_core.h> | ||
15 | |||
16 | #include <plat/cpu.h> | ||
17 | #include <plat/devs.h> | ||
18 | #include <plat/s5pv210.h> | ||
19 | #include <plat/regs-serial.h> | ||
20 | |||
21 | static struct s3c24xx_uart_clksrc s5pv210_serial_clocks[] = { | ||
22 | [0] = { | ||
23 | .name = "pclk", | ||
24 | .divisor = 1, | ||
25 | .min_baud = 0, | ||
26 | .max_baud = 0, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | /* uart registration process */ | ||
31 | void __init s5pv210_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
32 | { | ||
33 | struct s3c2410_uartcfg *tcfg = cfg; | ||
34 | u32 ucnt; | ||
35 | |||
36 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | ||
37 | if (!tcfg->clocks) { | ||
38 | tcfg->clocks = s5pv210_serial_clocks; | ||
39 | tcfg->clocks_size = ARRAY_SIZE(s5pv210_serial_clocks); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); | ||
44 | } | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 5811a96125f0..261373923c17 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <plat/gpio-cfg.h> | 33 | #include <plat/gpio-cfg.h> |
34 | #include <plat/regs-serial.h> | 34 | #include <plat/regs-serial.h> |
35 | #include <plat/s5pv210.h> | ||
36 | #include <plat/devs.h> | 35 | #include <plat/devs.h> |
37 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
38 | #include <plat/fb.h> | 37 | #include <plat/fb.h> |
@@ -41,6 +40,8 @@ | |||
41 | #include <plat/s5p-time.h> | 40 | #include <plat/s5p-time.h> |
42 | #include <plat/regs-fb-v4.h> | 41 | #include <plat/regs-fb-v4.h> |
43 | 42 | ||
43 | #include "common.h" | ||
44 | |||
44 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 45 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
45 | #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 46 | #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
46 | S3C2410_UCON_RXILEVEL | \ | 47 | S3C2410_UCON_RXILEVEL | \ |
@@ -644,7 +645,7 @@ static void __init aquila_sound_init(void) | |||
644 | 645 | ||
645 | static void __init aquila_map_io(void) | 646 | static void __init aquila_map_io(void) |
646 | { | 647 | { |
647 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 648 | s5pv210_init_io(NULL, 0); |
648 | s3c24xx_init_clocks(24000000); | 649 | s3c24xx_init_clocks(24000000); |
649 | s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs)); | 650 | s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs)); |
650 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 651 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 15edcae448b9..b542f055d0c7 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <plat/gpio-cfg.h> | 38 | #include <plat/gpio-cfg.h> |
39 | #include <plat/regs-serial.h> | 39 | #include <plat/regs-serial.h> |
40 | #include <plat/s5pv210.h> | ||
41 | #include <plat/devs.h> | 40 | #include <plat/devs.h> |
42 | #include <plat/cpu.h> | 41 | #include <plat/cpu.h> |
43 | #include <plat/fb.h> | 42 | #include <plat/fb.h> |
@@ -54,6 +53,8 @@ | |||
54 | #include <media/s5p_fimc.h> | 53 | #include <media/s5p_fimc.h> |
55 | #include <media/noon010pc30.h> | 54 | #include <media/noon010pc30.h> |
56 | 55 | ||
56 | #include "common.h" | ||
57 | |||
57 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 58 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
58 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 59 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
59 | S3C2410_UCON_RXILEVEL | \ | 60 | S3C2410_UCON_RXILEVEL | \ |
@@ -890,7 +891,7 @@ static void __init goni_sound_init(void) | |||
890 | 891 | ||
891 | static void __init goni_map_io(void) | 892 | static void __init goni_map_io(void) |
892 | { | 893 | { |
893 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 894 | s5pv210_init_io(NULL, 0); |
894 | s3c24xx_init_clocks(24000000); | 895 | s3c24xx_init_clocks(24000000); |
895 | s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); | 896 | s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); |
896 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 897 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index f7266bb0cac8..7f55d94d89e0 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <mach/regs-clock.h> | 24 | #include <mach/regs-clock.h> |
25 | 25 | ||
26 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
27 | #include <plat/s5pv210.h> | ||
28 | #include <plat/devs.h> | 27 | #include <plat/devs.h> |
29 | #include <plat/cpu.h> | 28 | #include <plat/cpu.h> |
30 | #include <plat/ata.h> | 29 | #include <plat/ata.h> |
@@ -32,6 +31,8 @@ | |||
32 | #include <plat/pm.h> | 31 | #include <plat/pm.h> |
33 | #include <plat/s5p-time.h> | 32 | #include <plat/s5p-time.h> |
34 | 33 | ||
34 | #include "common.h" | ||
35 | |||
35 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 36 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
36 | #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 37 | #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
37 | S3C2410_UCON_RXILEVEL | \ | 38 | S3C2410_UCON_RXILEVEL | \ |
@@ -109,7 +110,7 @@ static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = { | |||
109 | 110 | ||
110 | static void __init smdkc110_map_io(void) | 111 | static void __init smdkc110_map_io(void) |
111 | { | 112 | { |
112 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 113 | s5pv210_init_io(NULL, 0); |
113 | s3c24xx_init_clocks(24000000); | 114 | s3c24xx_init_clocks(24000000); |
114 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); | 115 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); |
115 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 116 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index a9106c392398..bc35e8261e5b 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <plat/regs-serial.h> | 33 | #include <plat/regs-serial.h> |
34 | #include <plat/regs-srom.h> | 34 | #include <plat/regs-srom.h> |
35 | #include <plat/gpio-cfg.h> | 35 | #include <plat/gpio-cfg.h> |
36 | #include <plat/s5pv210.h> | ||
37 | #include <plat/devs.h> | 36 | #include <plat/devs.h> |
38 | #include <plat/cpu.h> | 37 | #include <plat/cpu.h> |
39 | #include <plat/adc.h> | 38 | #include <plat/adc.h> |
@@ -47,6 +46,8 @@ | |||
47 | #include <plat/backlight.h> | 46 | #include <plat/backlight.h> |
48 | #include <plat/regs-fb-v4.h> | 47 | #include <plat/regs-fb-v4.h> |
49 | 48 | ||
49 | #include "common.h" | ||
50 | |||
50 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 51 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
51 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 52 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
52 | S3C2410_UCON_RXILEVEL | \ | 53 | S3C2410_UCON_RXILEVEL | \ |
@@ -277,7 +278,7 @@ static struct platform_pwm_backlight_data smdkv210_bl_data = { | |||
277 | 278 | ||
278 | static void __init smdkv210_map_io(void) | 279 | static void __init smdkv210_map_io(void) |
279 | { | 280 | { |
280 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 281 | s5pv210_init_io(NULL, 0); |
281 | s3c24xx_init_clocks(24000000); | 282 | s3c24xx_init_clocks(24000000); |
282 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); | 283 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); |
283 | s5p_set_timer_source(S5P_PWM2, S5P_PWM4); | 284 | s5p_set_timer_source(S5P_PWM2, S5P_PWM4); |
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c index 97cc066c5369..1669fe607d49 100644 --- a/arch/arm/mach-s5pv210/mach-torbreck.c +++ b/arch/arm/mach-s5pv210/mach-torbreck.c | |||
@@ -23,12 +23,13 @@ | |||
23 | #include <mach/regs-clock.h> | 23 | #include <mach/regs-clock.h> |
24 | 24 | ||
25 | #include <plat/regs-serial.h> | 25 | #include <plat/regs-serial.h> |
26 | #include <plat/s5pv210.h> | ||
27 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
28 | #include <plat/cpu.h> | 27 | #include <plat/cpu.h> |
29 | #include <plat/iic.h> | 28 | #include <plat/iic.h> |
30 | #include <plat/s5p-time.h> | 29 | #include <plat/s5p-time.h> |
31 | 30 | ||
31 | #include "common.h" | ||
32 | |||
32 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 33 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
33 | #define TORBRECK_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 34 | #define TORBRECK_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
34 | S3C2410_UCON_RXILEVEL | \ | 35 | S3C2410_UCON_RXILEVEL | \ |
@@ -102,7 +103,7 @@ static struct i2c_board_info torbreck_i2c_devs2[] __initdata = { | |||
102 | 103 | ||
103 | static void __init torbreck_map_io(void) | 104 | static void __init torbreck_map_io(void) |
104 | { | 105 | { |
105 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 106 | s5pv210_init_io(NULL, 0); |
106 | s3c24xx_init_clocks(24000000); | 107 | s3c24xx_init_clocks(24000000); |
107 | s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs)); | 108 | s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs)); |
108 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 109 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); |
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c index 74bcd716f300..63c3fadf64ef 100644 --- a/arch/arm/plat-s5p/cpu.c +++ b/arch/arm/plat-s5p/cpu.c | |||
@@ -20,26 +20,16 @@ | |||
20 | #include <mach/regs-clock.h> | 20 | #include <mach/regs-clock.h> |
21 | 21 | ||
22 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
23 | #include <plat/s5pv210.h> | ||
24 | #include <plat/exynos4.h> | 23 | #include <plat/exynos4.h> |
25 | 24 | ||
26 | /* table of supported CPUs */ | 25 | /* table of supported CPUs */ |
27 | 26 | ||
28 | static const char name_s5pv210[] = "S5PV210/S5PC110"; | ||
29 | static const char name_exynos4210[] = "EXYNOS4210"; | 27 | static const char name_exynos4210[] = "EXYNOS4210"; |
30 | static const char name_exynos4212[] = "EXYNOS4212"; | 28 | static const char name_exynos4212[] = "EXYNOS4212"; |
31 | static const char name_exynos4412[] = "EXYNOS4412"; | 29 | static const char name_exynos4412[] = "EXYNOS4412"; |
32 | 30 | ||
33 | static struct cpu_table cpu_ids[] __initdata = { | 31 | static struct cpu_table cpu_ids[] __initdata = { |
34 | { | 32 | { |
35 | .idcode = S5PV210_CPU_ID, | ||
36 | .idmask = S5PV210_CPU_MASK, | ||
37 | .map_io = s5pv210_map_io, | ||
38 | .init_clocks = s5pv210_init_clocks, | ||
39 | .init_uarts = s5pv210_init_uarts, | ||
40 | .init = s5pv210_init, | ||
41 | .name = name_s5pv210, | ||
42 | }, { | ||
43 | .idcode = EXYNOS4210_CPU_ID, | 33 | .idcode = EXYNOS4210_CPU_ID, |
44 | .idmask = EXYNOS4_CPU_MASK, | 34 | .idmask = EXYNOS4_CPU_MASK, |
45 | .map_io = exynos4_map_io, | 35 | .map_io = exynos4_map_io, |
diff --git a/arch/arm/plat-samsung/include/plat/s5pv210.h b/arch/arm/plat-samsung/include/plat/s5pv210.h deleted file mode 100644 index b4bc6be77072..000000000000 --- a/arch/arm/plat-samsung/include/plat/s5pv210.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/s5pv210.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Header file for s5pv210 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 | /* Common init code for S5PV210 related SoCs */ | ||
14 | |||
15 | extern void s5pv210_common_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
16 | extern void s5pv210_register_clocks(void); | ||
17 | extern void s5pv210_setup_clocks(void); | ||
18 | |||
19 | #ifdef CONFIG_CPU_S5PV210 | ||
20 | |||
21 | extern int s5pv210_init(void); | ||
22 | extern void s5pv210_init_irq(void); | ||
23 | extern void s5pv210_map_io(void); | ||
24 | extern void s5pv210_init_clocks(int xtal); | ||
25 | |||
26 | #define s5pv210_init_uarts s5pv210_common_init_uarts | ||
27 | |||
28 | #else | ||
29 | #define s5pv210_init_clocks NULL | ||
30 | #define s5pv210_init_uarts NULL | ||
31 | #define s5pv210_map_io NULL | ||
32 | #define s5pv210_init NULL | ||
33 | #endif | ||