diff options
22 files changed, 285 insertions, 339 deletions
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile index cfc0b9941808..f37016cebbe3 100644 --- a/arch/arm/mach-s3c64xx/Makefile +++ b/arch/arm/mach-s3c64xx/Makefile | |||
@@ -10,54 +10,49 @@ obj-m := | |||
10 | obj-n := | 10 | obj-n := |
11 | obj- := | 11 | obj- := |
12 | 12 | ||
13 | # Core files | 13 | # Core |
14 | obj-y += cpu.o | ||
15 | obj-y += clock.o | ||
16 | 14 | ||
17 | # Core support for S3C6400 system | 15 | obj-y += common.o clock.o |
16 | |||
17 | # Core support | ||
18 | 18 | ||
19 | obj-$(CONFIG_CPU_S3C6400) += s3c6400.o | 19 | obj-$(CONFIG_CPU_S3C6400) += s3c6400.o |
20 | obj-$(CONFIG_CPU_S3C6410) += s3c6410.o | 20 | obj-$(CONFIG_CPU_S3C6410) += s3c6410.o |
21 | 21 | ||
22 | obj-y += irq.o | 22 | # PM |
23 | obj-y += irq-eint.o | 23 | |
24 | obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o | ||
24 | 25 | ||
25 | # DMA support | 26 | # DMA support |
26 | 27 | ||
27 | obj-$(CONFIG_S3C64XX_DMA) += dma.o | 28 | obj-$(CONFIG_S3C64XX_DMA) += dma.o |
28 | 29 | ||
29 | # Device setup | 30 | # Device support |
30 | 31 | ||
31 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o | 32 | obj-y += dev-uart.o |
32 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o | 33 | obj-y += dev-audio.o |
33 | obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o | 34 | obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o |
34 | obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o | ||
35 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o | ||
36 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o | ||
37 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | ||
38 | 35 | ||
39 | # PM | 36 | # Device setup |
40 | 37 | ||
41 | obj-$(CONFIG_PM) += pm.o | 38 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o |
42 | obj-$(CONFIG_PM) += sleep.o | 39 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o |
43 | obj-$(CONFIG_PM) += irq-pm.o | 40 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o |
41 | obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o | ||
42 | obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o | ||
43 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o | ||
44 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | ||
44 | 45 | ||
45 | # Machine support | 46 | # Machine support |
46 | 47 | ||
47 | obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o | 48 | obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o |
48 | obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o | 49 | obj-$(CONFIG_MACH_HMT) += mach-hmt.o |
49 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o | 50 | obj-$(CONFIG_MACH_MINI6410) += mach-mini6410.o |
50 | obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o | 51 | obj-$(CONFIG_MACH_NCP) += mach-ncp.o |
51 | obj-$(CONFIG_MACH_MINI6410) += mach-mini6410.o | 52 | obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o |
52 | obj-$(CONFIG_MACH_NCP) += mach-ncp.o | 53 | obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o |
53 | obj-$(CONFIG_MACH_HMT) += mach-hmt.o | 54 | obj-$(CONFIG_MACH_SMARTQ5) += mach-smartq5.o |
54 | obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o | 55 | obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o |
55 | obj-$(CONFIG_MACH_SMARTQ5) += mach-smartq5.o | 56 | obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o |
56 | obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o | 57 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o |
57 | obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o | 58 | obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o |
58 | |||
59 | # device support | ||
60 | |||
61 | obj-y += dev-uart.o | ||
62 | obj-y += dev-audio.o | ||
63 | obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o | ||
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 39c238d7a3dc..625219b9cefc 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -705,7 +705,7 @@ static struct clksrc_clk *init_parents[] = { | |||
705 | 705 | ||
706 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) | 706 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) |
707 | 707 | ||
708 | void __init_or_cpufreq s3c6400_setup_clocks(void) | 708 | void __init_or_cpufreq s3c64xx_setup_clocks(void) |
709 | { | 709 | { |
710 | struct clk *xtal_clk; | 710 | struct clk *xtal_clk; |
711 | unsigned long xtal; | 711 | unsigned long xtal; |
@@ -804,7 +804,7 @@ static struct clk *clks[] __initdata = { | |||
804 | * as ARMCLK as well as the necessary parent clocks. | 804 | * as ARMCLK as well as the necessary parent clocks. |
805 | * | 805 | * |
806 | * This call does not setup the clocks, which is left to the | 806 | * This call does not setup the clocks, which is left to the |
807 | * s3c6400_setup_clocks() call which may be needed by the cpufreq | 807 | * s3c64xx_setup_clocks() call which may be needed by the cpufreq |
808 | * or resume code to re-set the clocks if the bootloader has changed | 808 | * or resume code to re-set the clocks if the bootloader has changed |
809 | * them. | 809 | * them. |
810 | */ | 810 | */ |
diff --git a/arch/arm/mach-s3c64xx/irq-eint.c b/arch/arm/mach-s3c64xx/common.c index 4d203be1f4c3..8ae5b16cc4f5 100644 --- a/arch/arm/mach-s3c64xx/irq-eint.c +++ b/arch/arm/mach-s3c64xx/common.c | |||
@@ -1,11 +1,13 @@ | |||
1 | /* arch/arm/plat-s3c64xx/irq-eint.c | 1 | /* |
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
2 | * | 4 | * |
3 | * Copyright 2008 Openmoko, Inc. | 5 | * Copyright 2008 Openmoko, Inc. |
4 | * Copyright 2008 Simtec Electronics | 6 | * Copyright 2008 Simtec Electronics |
5 | * Ben Dooks <ben@simtec.co.uk> | 7 | * Ben Dooks <ben@simtec.co.uk> |
6 | * http://armlinux.simtec.co.uk/ | 8 | * http://armlinux.simtec.co.uk/ |
7 | * | 9 | * |
8 | * S3C64XX - Interrupt handling for IRQ_EINT(x) | 10 | * Common Codes for S3C64XX machines |
9 | * | 11 | * |
10 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2 as | 13 | * it under the terms of the GNU General Public License version 2 as |
@@ -13,21 +15,182 @@ | |||
13 | */ | 15 | */ |
14 | 16 | ||
15 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | ||
19 | #include <linux/module.h> | ||
16 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/ioport.h> | ||
17 | #include <linux/sysdev.h> | 22 | #include <linux/sysdev.h> |
18 | #include <linux/gpio.h> | 23 | #include <linux/serial_core.h> |
19 | #include <linux/irq.h> | 24 | #include <linux/platform_device.h> |
20 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/dma-mapping.h> | ||
27 | #include <linux/irq.h> | ||
28 | #include <linux/gpio.h> | ||
21 | 29 | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/mach/map.h> | ||
22 | #include <asm/hardware/vic.h> | 32 | #include <asm/hardware/vic.h> |
23 | 33 | ||
24 | #include <plat/regs-irqtype.h> | 34 | #include <mach/map.h> |
35 | #include <mach/hardware.h> | ||
25 | #include <mach/regs-gpio.h> | 36 | #include <mach/regs-gpio.h> |
26 | #include <plat/gpio-cfg.h> | ||
27 | 37 | ||
28 | #include <mach/map.h> | ||
29 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
39 | #include <plat/clock.h> | ||
40 | #include <plat/devs.h> | ||
30 | #include <plat/pm.h> | 41 | #include <plat/pm.h> |
42 | #include <plat/gpio-cfg.h> | ||
43 | #include <plat/irq-uart.h> | ||
44 | #include <plat/irq-vic-timer.h> | ||
45 | #include <plat/regs-irqtype.h> | ||
46 | #include <plat/regs-serial.h> | ||
47 | |||
48 | #include "common.h" | ||
49 | |||
50 | /* uart registration process */ | ||
51 | |||
52 | void __init s3c64xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
53 | { | ||
54 | s3c24xx_init_uartdevs("s3c6400-uart", s3c64xx_uart_resources, cfg, no); | ||
55 | } | ||
56 | |||
57 | /* table of supported CPUs */ | ||
58 | |||
59 | static const char name_s3c6400[] = "S3C6400"; | ||
60 | static const char name_s3c6410[] = "S3C6410"; | ||
61 | |||
62 | static struct cpu_table cpu_ids[] __initdata = { | ||
63 | { | ||
64 | .idcode = S3C6400_CPU_ID, | ||
65 | .idmask = S3C64XX_CPU_MASK, | ||
66 | .map_io = s3c6400_map_io, | ||
67 | .init_clocks = s3c6400_init_clocks, | ||
68 | .init_uarts = s3c64xx_init_uarts, | ||
69 | .init = s3c6400_init, | ||
70 | .name = name_s3c6400, | ||
71 | }, { | ||
72 | .idcode = S3C6410_CPU_ID, | ||
73 | .idmask = S3C64XX_CPU_MASK, | ||
74 | .map_io = s3c6410_map_io, | ||
75 | .init_clocks = s3c6410_init_clocks, | ||
76 | .init_uarts = s3c64xx_init_uarts, | ||
77 | .init = s3c6410_init, | ||
78 | .name = name_s3c6410, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | /* minimal IO mapping */ | ||
83 | |||
84 | /* see notes on uart map in arch/arm/mach-s3c64xx/include/mach/debug-macro.S */ | ||
85 | #define UART_OFFS (S3C_PA_UART & 0xfffff) | ||
86 | |||
87 | static struct map_desc s3c_iodesc[] __initdata = { | ||
88 | { | ||
89 | .virtual = (unsigned long)S3C_VA_SYS, | ||
90 | .pfn = __phys_to_pfn(S3C64XX_PA_SYSCON), | ||
91 | .length = SZ_4K, | ||
92 | .type = MT_DEVICE, | ||
93 | }, { | ||
94 | .virtual = (unsigned long)S3C_VA_MEM, | ||
95 | .pfn = __phys_to_pfn(S3C64XX_PA_SROM), | ||
96 | .length = SZ_4K, | ||
97 | .type = MT_DEVICE, | ||
98 | }, { | ||
99 | .virtual = (unsigned long)(S3C_VA_UART + UART_OFFS), | ||
100 | .pfn = __phys_to_pfn(S3C_PA_UART), | ||
101 | .length = SZ_4K, | ||
102 | .type = MT_DEVICE, | ||
103 | }, { | ||
104 | .virtual = (unsigned long)VA_VIC0, | ||
105 | .pfn = __phys_to_pfn(S3C64XX_PA_VIC0), | ||
106 | .length = SZ_16K, | ||
107 | .type = MT_DEVICE, | ||
108 | }, { | ||
109 | .virtual = (unsigned long)VA_VIC1, | ||
110 | .pfn = __phys_to_pfn(S3C64XX_PA_VIC1), | ||
111 | .length = SZ_16K, | ||
112 | .type = MT_DEVICE, | ||
113 | }, { | ||
114 | .virtual = (unsigned long)S3C_VA_TIMER, | ||
115 | .pfn = __phys_to_pfn(S3C_PA_TIMER), | ||
116 | .length = SZ_16K, | ||
117 | .type = MT_DEVICE, | ||
118 | }, { | ||
119 | .virtual = (unsigned long)S3C64XX_VA_GPIO, | ||
120 | .pfn = __phys_to_pfn(S3C64XX_PA_GPIO), | ||
121 | .length = SZ_4K, | ||
122 | .type = MT_DEVICE, | ||
123 | }, { | ||
124 | .virtual = (unsigned long)S3C64XX_VA_MODEM, | ||
125 | .pfn = __phys_to_pfn(S3C64XX_PA_MODEM), | ||
126 | .length = SZ_4K, | ||
127 | .type = MT_DEVICE, | ||
128 | }, { | ||
129 | .virtual = (unsigned long)S3C_VA_WATCHDOG, | ||
130 | .pfn = __phys_to_pfn(S3C64XX_PA_WATCHDOG), | ||
131 | .length = SZ_4K, | ||
132 | .type = MT_DEVICE, | ||
133 | }, { | ||
134 | .virtual = (unsigned long)S3C_VA_USB_HSPHY, | ||
135 | .pfn = __phys_to_pfn(S3C64XX_PA_USB_HSPHY), | ||
136 | .length = SZ_1K, | ||
137 | .type = MT_DEVICE, | ||
138 | }, | ||
139 | }; | ||
140 | |||
141 | struct sysdev_class s3c64xx_sysclass = { | ||
142 | .name = "s3c64xx-core", | ||
143 | }; | ||
144 | |||
145 | static struct sys_device s3c64xx_sysdev = { | ||
146 | .cls = &s3c64xx_sysclass, | ||
147 | }; | ||
148 | |||
149 | /* read cpu identification code */ | ||
150 | |||
151 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | ||
152 | { | ||
153 | /* initialise the io descriptors we need for initialisation */ | ||
154 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); | ||
155 | iotable_init(mach_desc, size); | ||
156 | init_consistent_dma_size(SZ_8M); | ||
157 | |||
158 | /* detect cpu id */ | ||
159 | s3c64xx_init_cpu(); | ||
160 | |||
161 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | ||
162 | } | ||
163 | |||
164 | static __init int s3c64xx_sysdev_init(void) | ||
165 | { | ||
166 | sysdev_class_register(&s3c64xx_sysclass); | ||
167 | return sysdev_register(&s3c64xx_sysdev); | ||
168 | } | ||
169 | core_initcall(s3c64xx_sysdev_init); | ||
170 | |||
171 | /* | ||
172 | * setup the sources the vic should advertise resume | ||
173 | * for, even though it is not doing the wake | ||
174 | * (set_irq_wake needs to be valid) | ||
175 | */ | ||
176 | #define IRQ_VIC0_RESUME (1 << (IRQ_RTC_TIC - IRQ_VIC0_BASE)) | ||
177 | #define IRQ_VIC1_RESUME (1 << (IRQ_RTC_ALARM - IRQ_VIC1_BASE) | \ | ||
178 | 1 << (IRQ_PENDN - IRQ_VIC1_BASE) | \ | ||
179 | 1 << (IRQ_HSMMC0 - IRQ_VIC1_BASE) | \ | ||
180 | 1 << (IRQ_HSMMC1 - IRQ_VIC1_BASE) | \ | ||
181 | 1 << (IRQ_HSMMC2 - IRQ_VIC1_BASE)) | ||
182 | |||
183 | void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) | ||
184 | { | ||
185 | printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); | ||
186 | |||
187 | /* initialise the pair of VICs */ | ||
188 | vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, IRQ_VIC0_RESUME); | ||
189 | vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, IRQ_VIC1_RESUME); | ||
190 | |||
191 | /* add the timer sub-irqs */ | ||
192 | s3c_init_vic_timer_irq(5, IRQ_TIMER0); | ||
193 | } | ||
31 | 194 | ||
32 | #define eint_offset(irq) ((irq) - IRQ_EINT(0)) | 195 | #define eint_offset(irq) ((irq) - IRQ_EINT(0)) |
33 | #define eint_irq_to_bit(irq) ((u32)(1 << eint_offset(irq))) | 196 | #define eint_irq_to_bit(irq) ((u32)(1 << eint_offset(irq))) |
@@ -209,5 +372,4 @@ static int __init s3c64xx_init_irq_eint(void) | |||
209 | 372 | ||
210 | return 0; | 373 | return 0; |
211 | } | 374 | } |
212 | |||
213 | arch_initcall(s3c64xx_init_irq_eint); | 375 | arch_initcall(s3c64xx_init_irq_eint); |
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h new file mode 100644 index 000000000000..9f523a273274 --- /dev/null +++ b/arch/arm/mach-s3c64xx/common.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Copyright 2008 Openmoko, Inc. | ||
6 | * Copyright 2008 Simtec Electronics | ||
7 | * Ben Dooks <ben@simtec.co.uk> | ||
8 | * http://armlinux.simtec.co.uk/ | ||
9 | * | ||
10 | * Common Header for S3C64XX machines | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H | ||
18 | #define __ARCH_ARM_MACH_S3C64XX_COMMON_H | ||
19 | |||
20 | void s3c64xx_init_irq(u32 vic0, u32 vic1); | ||
21 | void s3c64xx_init_io(struct map_desc *mach_desc, int size); | ||
22 | |||
23 | void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); | ||
24 | void s3c64xx_setup_clocks(void); | ||
25 | |||
26 | extern struct syscore_ops s3c64xx_irq_syscore_ops; | ||
27 | extern struct sysdev_class s3c64xx_sysclass; | ||
28 | |||
29 | #ifdef CONFIG_CPU_S3C6400 | ||
30 | |||
31 | extern int s3c6400_init(void); | ||
32 | extern void s3c6400_init_irq(void); | ||
33 | extern void s3c6400_map_io(void); | ||
34 | extern void s3c6400_init_clocks(int xtal); | ||
35 | |||
36 | #else | ||
37 | #define s3c6400_init_clocks NULL | ||
38 | #define s3c6400_map_io NULL | ||
39 | #define s3c6400_init NULL | ||
40 | #endif | ||
41 | |||
42 | #ifdef CONFIG_CPU_S3C6410 | ||
43 | |||
44 | extern int s3c6410_init(void); | ||
45 | extern void s3c6410_init_irq(void); | ||
46 | extern void s3c6410_map_io(void); | ||
47 | extern void s3c6410_init_clocks(int xtal); | ||
48 | |||
49 | #else | ||
50 | #define s3c6410_init_clocks NULL | ||
51 | #define s3c6410_map_io NULL | ||
52 | #define s3c6410_init NULL | ||
53 | #endif | ||
54 | |||
55 | #endif /* __ARCH_ARM_MACH_S3C64XX_COMMON_H */ | ||
diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c deleted file mode 100644 index de085b798aa4..000000000000 --- a/arch/arm/mach-s3c64xx/cpu.c +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/cpu.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX CPU Support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/sysdev.h> | ||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/dma-mapping.h> | ||
24 | |||
25 | #include <mach/hardware.h> | ||
26 | #include <mach/map.h> | ||
27 | |||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | |||
31 | #include <plat/regs-serial.h> | ||
32 | |||
33 | #include <plat/cpu.h> | ||
34 | #include <plat/devs.h> | ||
35 | #include <plat/clock.h> | ||
36 | |||
37 | #include <plat/s3c6400.h> | ||
38 | #include <plat/s3c6410.h> | ||
39 | |||
40 | /* table of supported CPUs */ | ||
41 | |||
42 | static const char name_s3c6400[] = "S3C6400"; | ||
43 | static const char name_s3c6410[] = "S3C6410"; | ||
44 | |||
45 | static struct cpu_table cpu_ids[] __initdata = { | ||
46 | { | ||
47 | .idcode = S3C6400_CPU_ID, | ||
48 | .idmask = S3C64XX_CPU_MASK, | ||
49 | .map_io = s3c6400_map_io, | ||
50 | .init_clocks = s3c6400_init_clocks, | ||
51 | .init_uarts = s3c6400_init_uarts, | ||
52 | .init = s3c6400_init, | ||
53 | .name = name_s3c6400, | ||
54 | }, { | ||
55 | .idcode = S3C6410_CPU_ID, | ||
56 | .idmask = S3C64XX_CPU_MASK, | ||
57 | .map_io = s3c6410_map_io, | ||
58 | .init_clocks = s3c6410_init_clocks, | ||
59 | .init_uarts = s3c6410_init_uarts, | ||
60 | .init = s3c6410_init, | ||
61 | .name = name_s3c6410, | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | /* minimal IO mapping */ | ||
66 | |||
67 | /* see notes on uart map in arch/arm/mach-s3c6400/include/mach/debug-macro.S */ | ||
68 | #define UART_OFFS (S3C_PA_UART & 0xfffff) | ||
69 | |||
70 | static struct map_desc s3c_iodesc[] __initdata = { | ||
71 | { | ||
72 | .virtual = (unsigned long)S3C_VA_SYS, | ||
73 | .pfn = __phys_to_pfn(S3C64XX_PA_SYSCON), | ||
74 | .length = SZ_4K, | ||
75 | .type = MT_DEVICE, | ||
76 | }, { | ||
77 | .virtual = (unsigned long)S3C_VA_MEM, | ||
78 | .pfn = __phys_to_pfn(S3C64XX_PA_SROM), | ||
79 | .length = SZ_4K, | ||
80 | .type = MT_DEVICE, | ||
81 | }, { | ||
82 | .virtual = (unsigned long)(S3C_VA_UART + UART_OFFS), | ||
83 | .pfn = __phys_to_pfn(S3C_PA_UART), | ||
84 | .length = SZ_4K, | ||
85 | .type = MT_DEVICE, | ||
86 | }, { | ||
87 | .virtual = (unsigned long)VA_VIC0, | ||
88 | .pfn = __phys_to_pfn(S3C64XX_PA_VIC0), | ||
89 | .length = SZ_16K, | ||
90 | .type = MT_DEVICE, | ||
91 | }, { | ||
92 | .virtual = (unsigned long)VA_VIC1, | ||
93 | .pfn = __phys_to_pfn(S3C64XX_PA_VIC1), | ||
94 | .length = SZ_16K, | ||
95 | .type = MT_DEVICE, | ||
96 | }, { | ||
97 | .virtual = (unsigned long)S3C_VA_TIMER, | ||
98 | .pfn = __phys_to_pfn(S3C_PA_TIMER), | ||
99 | .length = SZ_16K, | ||
100 | .type = MT_DEVICE, | ||
101 | }, { | ||
102 | .virtual = (unsigned long)S3C64XX_VA_GPIO, | ||
103 | .pfn = __phys_to_pfn(S3C64XX_PA_GPIO), | ||
104 | .length = SZ_4K, | ||
105 | .type = MT_DEVICE, | ||
106 | }, { | ||
107 | .virtual = (unsigned long)S3C64XX_VA_MODEM, | ||
108 | .pfn = __phys_to_pfn(S3C64XX_PA_MODEM), | ||
109 | .length = SZ_4K, | ||
110 | .type = MT_DEVICE, | ||
111 | }, { | ||
112 | .virtual = (unsigned long)S3C_VA_WATCHDOG, | ||
113 | .pfn = __phys_to_pfn(S3C64XX_PA_WATCHDOG), | ||
114 | .length = SZ_4K, | ||
115 | .type = MT_DEVICE, | ||
116 | }, { | ||
117 | .virtual = (unsigned long)S3C_VA_USB_HSPHY, | ||
118 | .pfn = __phys_to_pfn(S3C64XX_PA_USB_HSPHY), | ||
119 | .length = SZ_1K, | ||
120 | .type = MT_DEVICE, | ||
121 | }, | ||
122 | }; | ||
123 | |||
124 | |||
125 | struct sysdev_class s3c64xx_sysclass = { | ||
126 | .name = "s3c64xx-core", | ||
127 | }; | ||
128 | |||
129 | static struct sys_device s3c64xx_sysdev = { | ||
130 | .cls = &s3c64xx_sysclass, | ||
131 | }; | ||
132 | |||
133 | /* uart registration process */ | ||
134 | |||
135 | void __init s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
136 | { | ||
137 | s3c24xx_init_uartdevs("s3c6400-uart", s3c64xx_uart_resources, cfg, no); | ||
138 | } | ||
139 | |||
140 | /* read cpu identification code */ | ||
141 | |||
142 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | ||
143 | { | ||
144 | /* initialise the io descriptors we need for initialisation */ | ||
145 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); | ||
146 | iotable_init(mach_desc, size); | ||
147 | init_consistent_dma_size(SZ_8M); | ||
148 | |||
149 | /* detect cpu id */ | ||
150 | s3c64xx_init_cpu(); | ||
151 | |||
152 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | ||
153 | } | ||
154 | |||
155 | static __init int s3c64xx_sysdev_init(void) | ||
156 | { | ||
157 | sysdev_class_register(&s3c64xx_sysclass); | ||
158 | return sysdev_register(&s3c64xx_sysdev); | ||
159 | } | ||
160 | |||
161 | core_initcall(s3c64xx_sysdev_init); | ||
diff --git a/arch/arm/mach-s3c64xx/irq.c b/arch/arm/mach-s3c64xx/irq.c deleted file mode 100644 index b07357e94958..000000000000 --- a/arch/arm/mach-s3c64xx/irq.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* arch/arm/plat-s3c64xx/irq.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - Interrupt handling | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/serial_core.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | #include <asm/hardware/vic.h> | ||
22 | |||
23 | #include <mach/map.h> | ||
24 | #include <plat/irq-vic-timer.h> | ||
25 | #include <plat/irq-uart.h> | ||
26 | #include <plat/cpu.h> | ||
27 | |||
28 | /* setup the sources the vic should advertise resume for, even though it | ||
29 | * is not doing the wake (set_irq_wake needs to be valid) */ | ||
30 | #define IRQ_VIC0_RESUME (1 << (IRQ_RTC_TIC - IRQ_VIC0_BASE)) | ||
31 | #define IRQ_VIC1_RESUME (1 << (IRQ_RTC_ALARM - IRQ_VIC1_BASE) | \ | ||
32 | 1 << (IRQ_PENDN - IRQ_VIC1_BASE) | \ | ||
33 | 1 << (IRQ_HSMMC0 - IRQ_VIC1_BASE) | \ | ||
34 | 1 << (IRQ_HSMMC1 - IRQ_VIC1_BASE) | \ | ||
35 | 1 << (IRQ_HSMMC2 - IRQ_VIC1_BASE)) | ||
36 | |||
37 | void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) | ||
38 | { | ||
39 | printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); | ||
40 | |||
41 | /* initialise the pair of VICs */ | ||
42 | vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, IRQ_VIC0_RESUME); | ||
43 | vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, IRQ_VIC1_RESUME); | ||
44 | |||
45 | /* add the timer sub-irqs */ | ||
46 | s3c_init_vic_timer_irq(5, IRQ_TIMER0); | ||
47 | } | ||
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 8eba88e7209e..4949bcd554b7 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -45,13 +45,14 @@ | |||
45 | #include <plat/fb.h> | 45 | #include <plat/fb.h> |
46 | #include <plat/regs-fb-v4.h> | 46 | #include <plat/regs-fb-v4.h> |
47 | 47 | ||
48 | #include <plat/s3c6410.h> | ||
49 | #include <plat/clock.h> | 48 | #include <plat/clock.h> |
50 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
51 | #include <plat/cpu.h> | 50 | #include <plat/cpu.h> |
52 | #include <mach/regs-gpio.h> | 51 | #include <mach/regs-gpio.h> |
53 | #include <mach/regs-modem.h> | 52 | #include <mach/regs-modem.h> |
54 | 53 | ||
54 | #include "common.h" | ||
55 | |||
55 | /* DM9000 */ | 56 | /* DM9000 */ |
56 | #define ANW6410_PA_DM9000 (0x18000000) | 57 | #define ANW6410_PA_DM9000 (0x18000000) |
57 | 58 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index d04b65448510..954a44e0c32a 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -50,7 +50,6 @@ | |||
50 | 50 | ||
51 | #include <mach/regs-gpio-memport.h> | 51 | #include <mach/regs-gpio-memport.h> |
52 | 52 | ||
53 | #include <plat/s3c6410.h> | ||
54 | #include <plat/regs-serial.h> | 53 | #include <plat/regs-serial.h> |
55 | #include <plat/regs-fb-v4.h> | 54 | #include <plat/regs-fb-v4.h> |
56 | #include <plat/fb.h> | 55 | #include <plat/fb.h> |
@@ -66,6 +65,8 @@ | |||
66 | #include <plat/iic.h> | 65 | #include <plat/iic.h> |
67 | #include <plat/pm.h> | 66 | #include <plat/pm.h> |
68 | 67 | ||
68 | #include "common.h" | ||
69 | |||
69 | /* serial port setup */ | 70 | /* serial port setup */ |
70 | 71 | ||
71 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) | 72 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 952f75ff5deb..b6231d5b9158 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -37,12 +37,13 @@ | |||
37 | #include <plat/fb.h> | 37 | #include <plat/fb.h> |
38 | #include <plat/nand.h> | 38 | #include <plat/nand.h> |
39 | 39 | ||
40 | #include <plat/s3c6410.h> | ||
41 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
42 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
43 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
44 | #include <plat/regs-fb-v4.h> | 43 | #include <plat/regs-fb-v4.h> |
45 | 44 | ||
45 | #include "common.h" | ||
46 | |||
46 | #define UCON S3C2410_UCON_DEFAULT | 47 | #define UCON S3C2410_UCON_DEFAULT |
47 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) | 48 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) |
48 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) | 49 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 1bc85c359498..ed02e7eebb97 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <mach/regs-modem.h> | 33 | #include <mach/regs-modem.h> |
34 | #include <mach/regs-srom.h> | 34 | #include <mach/regs-srom.h> |
35 | 35 | ||
36 | #include <plat/s3c6410.h> | ||
37 | #include <plat/adc.h> | 36 | #include <plat/adc.h> |
38 | #include <plat/cpu.h> | 37 | #include <plat/cpu.h> |
39 | #include <plat/devs.h> | 38 | #include <plat/devs.h> |
@@ -45,6 +44,8 @@ | |||
45 | 44 | ||
46 | #include <video/platform_lcd.h> | 45 | #include <video/platform_lcd.h> |
47 | 46 | ||
47 | #include "common.h" | ||
48 | |||
48 | #define UCON S3C2410_UCON_DEFAULT | 49 | #define UCON S3C2410_UCON_DEFAULT |
49 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) | 50 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) |
50 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) | 51 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) |
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index cb13cba98b3d..3e2391a98570 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
@@ -39,12 +39,13 @@ | |||
39 | #include <plat/iic.h> | 39 | #include <plat/iic.h> |
40 | #include <plat/fb.h> | 40 | #include <plat/fb.h> |
41 | 41 | ||
42 | #include <plat/s3c6410.h> | ||
43 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
44 | #include <plat/devs.h> | 43 | #include <plat/devs.h> |
45 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
46 | #include <plat/regs-fb-v4.h> | 45 | #include <plat/regs-fb-v4.h> |
47 | 46 | ||
47 | #include "common.h" | ||
48 | |||
48 | #define UCON S3C2410_UCON_DEFAULT | 49 | #define UCON S3C2410_UCON_DEFAULT |
49 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | 50 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE |
50 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 51 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 87281e4b8471..045614367f7f 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <mach/regs-modem.h> | 34 | #include <mach/regs-modem.h> |
35 | #include <mach/regs-srom.h> | 35 | #include <mach/regs-srom.h> |
36 | 36 | ||
37 | #include <plat/s3c6410.h> | ||
38 | #include <plat/adc.h> | 37 | #include <plat/adc.h> |
39 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
40 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
@@ -46,6 +45,8 @@ | |||
46 | 45 | ||
47 | #include <video/platform_lcd.h> | 46 | #include <video/platform_lcd.h> |
48 | 47 | ||
48 | #include "common.h" | ||
49 | |||
49 | #define UCON S3C2410_UCON_DEFAULT | 50 | #define UCON S3C2410_UCON_DEFAULT |
50 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) | 51 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) |
51 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) | 52 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index cb1ebeb08763..ce31db136231 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c | |||
@@ -40,6 +40,8 @@ | |||
40 | 40 | ||
41 | #include <video/platform_lcd.h> | 41 | #include <video/platform_lcd.h> |
42 | 42 | ||
43 | #include "common.h" | ||
44 | |||
43 | #define UCON S3C2410_UCON_DEFAULT | 45 | #define UCON S3C2410_UCON_DEFAULT |
44 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) | 46 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) |
45 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) | 47 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index 94c831d88365..2044a9f2e421 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
@@ -23,13 +23,13 @@ | |||
23 | #include <mach/map.h> | 23 | #include <mach/map.h> |
24 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
25 | 25 | ||
26 | #include <plat/s3c6410.h> | ||
27 | #include <plat/cpu.h> | 26 | #include <plat/cpu.h> |
28 | #include <plat/devs.h> | 27 | #include <plat/devs.h> |
29 | #include <plat/fb.h> | 28 | #include <plat/fb.h> |
30 | #include <plat/gpio-cfg.h> | 29 | #include <plat/gpio-cfg.h> |
31 | #include <plat/regs-fb-v4.h> | 30 | #include <plat/regs-fb-v4.h> |
32 | 31 | ||
32 | #include "common.h" | ||
33 | #include "mach-smartq.h" | 33 | #include "mach-smartq.h" |
34 | 34 | ||
35 | static struct gpio_led smartq5_leds[] = { | 35 | static struct gpio_led smartq5_leds[] = { |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index f112547ce80a..eaf24a35097b 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
@@ -23,13 +23,13 @@ | |||
23 | #include <mach/map.h> | 23 | #include <mach/map.h> |
24 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
25 | 25 | ||
26 | #include <plat/s3c6410.h> | ||
27 | #include <plat/cpu.h> | 26 | #include <plat/cpu.h> |
28 | #include <plat/devs.h> | 27 | #include <plat/devs.h> |
29 | #include <plat/fb.h> | 28 | #include <plat/fb.h> |
30 | #include <plat/gpio-cfg.h> | 29 | #include <plat/gpio-cfg.h> |
31 | #include <plat/regs-fb-v4.h> | 30 | #include <plat/regs-fb-v4.h> |
32 | 31 | ||
32 | #include "common.h" | ||
33 | #include "mach-smartq.h" | 33 | #include "mach-smartq.h" |
34 | 34 | ||
35 | static struct gpio_led smartq7_leds[] = { | 35 | static struct gpio_led smartq7_leds[] = { |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index 73450c2b530a..bda5e0b26c5a 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
@@ -31,12 +31,13 @@ | |||
31 | 31 | ||
32 | #include <plat/regs-serial.h> | 32 | #include <plat/regs-serial.h> |
33 | 33 | ||
34 | #include <plat/s3c6400.h> | ||
35 | #include <plat/clock.h> | 34 | #include <plat/clock.h> |
36 | #include <plat/devs.h> | 35 | #include <plat/devs.h> |
37 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
38 | #include <plat/iic.h> | 37 | #include <plat/iic.h> |
39 | 38 | ||
39 | #include "common.h" | ||
40 | |||
40 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 41 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
41 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 42 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
42 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 43 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 8bc8edd85e5a..91087da9d7c2 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <plat/fb.h> | 63 | #include <plat/fb.h> |
64 | #include <plat/gpio-cfg.h> | 64 | #include <plat/gpio-cfg.h> |
65 | 65 | ||
66 | #include <plat/s3c6410.h> | ||
67 | #include <plat/clock.h> | 66 | #include <plat/clock.h> |
68 | #include <plat/devs.h> | 67 | #include <plat/devs.h> |
69 | #include <plat/cpu.h> | 68 | #include <plat/cpu.h> |
@@ -73,6 +72,8 @@ | |||
73 | #include <plat/backlight.h> | 72 | #include <plat/backlight.h> |
74 | #include <plat/regs-fb-v4.h> | 73 | #include <plat/regs-fb-v4.h> |
75 | 74 | ||
75 | #include "common.h" | ||
76 | |||
76 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 77 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
77 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 78 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
78 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 79 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index 7a3bc32df425..33366581998f 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c | |||
@@ -38,7 +38,8 @@ | |||
38 | #include <plat/sdhci.h> | 38 | #include <plat/sdhci.h> |
39 | #include <plat/iic-core.h> | 39 | #include <plat/iic-core.h> |
40 | #include <plat/onenand-core.h> | 40 | #include <plat/onenand-core.h> |
41 | #include <plat/s3c6400.h> | 41 | |
42 | #include "common.h" | ||
42 | 43 | ||
43 | void __init s3c6400_map_io(void) | 44 | void __init s3c6400_map_io(void) |
44 | { | 45 | { |
@@ -60,7 +61,7 @@ void __init s3c6400_map_io(void) | |||
60 | void __init s3c6400_init_clocks(int xtal) | 61 | void __init s3c6400_init_clocks(int xtal) |
61 | { | 62 | { |
62 | s3c64xx_register_clocks(xtal, S3C6400_CLKDIV0_ARM_MASK); | 63 | s3c64xx_register_clocks(xtal, S3C6400_CLKDIV0_ARM_MASK); |
63 | s3c6400_setup_clocks(); | 64 | s3c64xx_setup_clocks(); |
64 | } | 65 | } |
65 | 66 | ||
66 | void __init s3c6400_init_irq(void) | 67 | void __init s3c6400_init_irq(void) |
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index 4117003464ad..fba71bd991c7 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c | |||
@@ -41,8 +41,8 @@ | |||
41 | #include <plat/adc-core.h> | 41 | #include <plat/adc-core.h> |
42 | #include <plat/iic-core.h> | 42 | #include <plat/iic-core.h> |
43 | #include <plat/onenand-core.h> | 43 | #include <plat/onenand-core.h> |
44 | #include <plat/s3c6400.h> | 44 | |
45 | #include <plat/s3c6410.h> | 45 | #include "common.h" |
46 | 46 | ||
47 | void __init s3c6410_map_io(void) | 47 | void __init s3c6410_map_io(void) |
48 | { | 48 | { |
@@ -66,7 +66,7 @@ void __init s3c6410_init_clocks(int xtal) | |||
66 | { | 66 | { |
67 | printk(KERN_DEBUG "%s: initialising clocks\n", __func__); | 67 | printk(KERN_DEBUG "%s: initialising clocks\n", __func__); |
68 | s3c64xx_register_clocks(xtal, S3C6410_CLKDIV0_ARM_MASK); | 68 | s3c64xx_register_clocks(xtal, S3C6410_CLKDIV0_ARM_MASK); |
69 | s3c6400_setup_clocks(); | 69 | s3c64xx_setup_clocks(); |
70 | } | 70 | } |
71 | 71 | ||
72 | void __init s3c6410_init_irq(void) | 72 | void __init s3c6410_init_irq(void) |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 40fd7b6b5e66..abbdadb4047b 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -152,11 +152,9 @@ extern void s3c_init_cpu(unsigned long idcode, | |||
152 | /* core initialisation functions */ | 152 | /* core initialisation functions */ |
153 | 153 | ||
154 | extern void s3c24xx_init_irq(void); | 154 | extern void s3c24xx_init_irq(void); |
155 | extern void s3c64xx_init_irq(u32 vic0, u32 vic1); | ||
156 | extern void s5p_init_irq(u32 *vic, u32 num_vic); | 155 | extern void s5p_init_irq(u32 *vic, u32 num_vic); |
157 | 156 | ||
158 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); | 157 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); |
159 | extern void s3c64xx_init_io(struct map_desc *mach_desc, int size); | ||
160 | extern void s5p_init_io(struct map_desc *mach_desc, | 158 | extern void s5p_init_io(struct map_desc *mach_desc, |
161 | int size, void __iomem *cpuid_addr); | 159 | int size, void __iomem *cpuid_addr); |
162 | 160 | ||
@@ -183,7 +181,6 @@ extern struct syscore_ops s3c2410_pm_syscore_ops; | |||
183 | extern struct syscore_ops s3c2412_pm_syscore_ops; | 181 | extern struct syscore_ops s3c2412_pm_syscore_ops; |
184 | extern struct syscore_ops s3c2416_pm_syscore_ops; | 182 | extern struct syscore_ops s3c2416_pm_syscore_ops; |
185 | extern struct syscore_ops s3c244x_pm_syscore_ops; | 183 | extern struct syscore_ops s3c244x_pm_syscore_ops; |
186 | extern struct syscore_ops s3c64xx_irq_syscore_ops; | ||
187 | 184 | ||
188 | /* system device classes */ | 185 | /* system device classes */ |
189 | 186 | ||
@@ -195,7 +192,6 @@ extern struct sysdev_class s3c2440_sysclass; | |||
195 | extern struct sysdev_class s3c2442_sysclass; | 192 | extern struct sysdev_class s3c2442_sysclass; |
196 | extern struct sysdev_class s3c2443_sysclass; | 193 | extern struct sysdev_class s3c2443_sysclass; |
197 | extern struct sysdev_class s3c6410_sysclass; | 194 | extern struct sysdev_class s3c6410_sysclass; |
198 | extern struct sysdev_class s3c64xx_sysclass; | ||
199 | extern struct sysdev_class s5p64x0_sysclass; | 195 | extern struct sysdev_class s5p64x0_sysclass; |
200 | extern struct sysdev_class s5pv210_sysclass; | 196 | extern struct sysdev_class s5pv210_sysclass; |
201 | extern struct sysdev_class exynos4_sysclass; | 197 | extern struct sysdev_class exynos4_sysclass; |
diff --git a/arch/arm/plat-samsung/include/plat/s3c6400.h b/arch/arm/plat-samsung/include/plat/s3c6400.h deleted file mode 100644 index 37d428aaaebb..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c6400.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/s3c6400.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Header file for s3c6400 cpu support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | /* Common init code for S3C6400 related SoCs */ | ||
16 | |||
17 | extern void s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
18 | extern void s3c6400_setup_clocks(void); | ||
19 | |||
20 | extern void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); | ||
21 | |||
22 | #ifdef CONFIG_CPU_S3C6400 | ||
23 | |||
24 | extern int s3c6400_init(void); | ||
25 | extern void s3c6400_init_irq(void); | ||
26 | extern void s3c6400_map_io(void); | ||
27 | extern void s3c6400_init_clocks(int xtal); | ||
28 | |||
29 | #define s3c6400_init_uarts s3c6400_common_init_uarts | ||
30 | |||
31 | #else | ||
32 | #define s3c6400_init_clocks NULL | ||
33 | #define s3c6400_init_uarts NULL | ||
34 | #define s3c6400_map_io NULL | ||
35 | #define s3c6400_init NULL | ||
36 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c6410.h b/arch/arm/plat-samsung/include/plat/s3c6410.h deleted file mode 100644 index 20a6675b9d17..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c6410.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/s3c6410.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Header file for s3c6410 cpu support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifdef CONFIG_CPU_S3C6410 | ||
16 | |||
17 | extern int s3c6410_init(void); | ||
18 | extern void s3c6410_init_irq(void); | ||
19 | extern void s3c6410_map_io(void); | ||
20 | extern void s3c6410_init_clocks(int xtal); | ||
21 | |||
22 | #define s3c6410_init_uarts s3c6400_common_init_uarts | ||
23 | |||
24 | #else | ||
25 | #define s3c6410_init_clocks NULL | ||
26 | #define s3c6410_init_uarts NULL | ||
27 | #define s3c6410_map_io NULL | ||
28 | #define s3c6410_init NULL | ||
29 | #endif | ||