diff options
Diffstat (limited to 'arch/arm')
325 files changed, 7154 insertions, 1967 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 0106f75530c0..dcb088e868fe 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -180,6 +180,7 @@ machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0 | |||
180 | machine-$(CONFIG_ARCH_S5PC100) := s5pc100 | 180 | machine-$(CONFIG_ARCH_S5PC100) := s5pc100 |
181 | machine-$(CONFIG_ARCH_S5PV210) := s5pv210 | 181 | machine-$(CONFIG_ARCH_S5PV210) := s5pv210 |
182 | machine-$(CONFIG_ARCH_EXYNOS4) := exynos | 182 | machine-$(CONFIG_ARCH_EXYNOS4) := exynos |
183 | machine-$(CONFIG_ARCH_EXYNOS5) := exynos | ||
183 | machine-$(CONFIG_ARCH_SA1100) := sa1100 | 184 | machine-$(CONFIG_ARCH_SA1100) := sa1100 |
184 | machine-$(CONFIG_ARCH_SHARK) := shark | 185 | machine-$(CONFIG_ARCH_SHARK) := shark |
185 | machine-$(CONFIG_ARCH_SHMOBILE) := shmobile | 186 | machine-$(CONFIG_ARCH_SHMOBILE) := shmobile |
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi index a100db03ec90..92f36627e7f8 100644 --- a/arch/arm/boot/dts/at91sam9g20.dtsi +++ b/arch/arm/boot/dts/at91sam9g20.dtsi | |||
@@ -59,6 +59,26 @@ | |||
59 | reg = <0xfffff000 0x200>; | 59 | reg = <0xfffff000 0x200>; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | ramc0: ramc@ffffea00 { | ||
63 | compatible = "atmel,at91sam9260-sdramc"; | ||
64 | reg = <0xffffea00 0x200>; | ||
65 | }; | ||
66 | |||
67 | pmc: pmc@fffffc00 { | ||
68 | compatible = "atmel,at91rm9200-pmc"; | ||
69 | reg = <0xfffffc00 0x100>; | ||
70 | }; | ||
71 | |||
72 | rstc@fffffd00 { | ||
73 | compatible = "atmel,at91sam9260-rstc"; | ||
74 | reg = <0xfffffd00 0x10>; | ||
75 | }; | ||
76 | |||
77 | shdwc@fffffd10 { | ||
78 | compatible = "atmel,at91sam9260-shdwc"; | ||
79 | reg = <0xfffffd10 0x10>; | ||
80 | }; | ||
81 | |||
62 | pit: timer@fffffd30 { | 82 | pit: timer@fffffd30 { |
63 | compatible = "atmel,at91sam9260-pit"; | 83 | compatible = "atmel,at91sam9260-pit"; |
64 | reg = <0xfffffd30 0xf>; | 84 | reg = <0xfffffd30 0xf>; |
@@ -171,6 +191,49 @@ | |||
171 | interrupts = <21 4>; | 191 | interrupts = <21 4>; |
172 | status = "disabled"; | 192 | status = "disabled"; |
173 | }; | 193 | }; |
194 | |||
195 | usb1: gadget@fffa4000 { | ||
196 | compatible = "atmel,at91rm9200-udc"; | ||
197 | reg = <0xfffa4000 0x4000>; | ||
198 | interrupts = <10 4>; | ||
199 | status = "disabled"; | ||
200 | }; | ||
201 | }; | ||
202 | |||
203 | nand0: nand@40000000 { | ||
204 | compatible = "atmel,at91rm9200-nand"; | ||
205 | #address-cells = <1>; | ||
206 | #size-cells = <1>; | ||
207 | reg = <0x40000000 0x10000000 | ||
208 | 0xffffe800 0x200 | ||
209 | >; | ||
210 | atmel,nand-addr-offset = <21>; | ||
211 | atmel,nand-cmd-offset = <22>; | ||
212 | gpios = <&pioC 13 0 | ||
213 | &pioC 14 0 | ||
214 | 0 | ||
215 | >; | ||
216 | status = "disabled"; | ||
174 | }; | 217 | }; |
218 | |||
219 | usb0: ohci@00500000 { | ||
220 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
221 | reg = <0x00500000 0x100000>; | ||
222 | interrupts = <20 4>; | ||
223 | status = "disabled"; | ||
224 | }; | ||
225 | }; | ||
226 | |||
227 | i2c@0 { | ||
228 | compatible = "i2c-gpio"; | ||
229 | gpios = <&pioA 23 0 /* sda */ | ||
230 | &pioA 24 0 /* scl */ | ||
231 | >; | ||
232 | i2c-gpio,sda-open-drain; | ||
233 | i2c-gpio,scl-open-drain; | ||
234 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
235 | #address-cells = <1>; | ||
236 | #size-cells = <0>; | ||
237 | status = "disabled"; | ||
175 | }; | 238 | }; |
176 | }; | 239 | }; |
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts index e64eb932083b..ac0dc0031dda 100644 --- a/arch/arm/boot/dts/at91sam9g25ek.dts +++ b/arch/arm/boot/dts/at91sam9g25ek.dts | |||
@@ -15,7 +15,7 @@ | |||
15 | compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | 15 | compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; |
16 | 16 | ||
17 | chosen { | 17 | chosen { |
18 | bootargs = "128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; | 18 | bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | ahb { | 21 | ahb { |
@@ -33,5 +33,17 @@ | |||
33 | status = "okay"; | 33 | status = "okay"; |
34 | }; | 34 | }; |
35 | }; | 35 | }; |
36 | |||
37 | usb0: ohci@00600000 { | ||
38 | status = "okay"; | ||
39 | num-ports = <2>; | ||
40 | atmel,vbus-gpio = <&pioD 19 0 | ||
41 | &pioD 20 0 | ||
42 | >; | ||
43 | }; | ||
44 | |||
45 | usb1: ehci@00700000 { | ||
46 | status = "okay"; | ||
47 | }; | ||
36 | }; | 48 | }; |
37 | }; | 49 | }; |
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index f779667159b1..3d0c32fb218f 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -60,6 +60,22 @@ | |||
60 | reg = <0xfffff000 0x200>; | 60 | reg = <0xfffff000 0x200>; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | ramc0: ramc@ffffe400 { | ||
64 | compatible = "atmel,at91sam9g45-ddramc"; | ||
65 | reg = <0xffffe400 0x200 | ||
66 | 0xffffe600 0x200>; | ||
67 | }; | ||
68 | |||
69 | pmc: pmc@fffffc00 { | ||
70 | compatible = "atmel,at91rm9200-pmc"; | ||
71 | reg = <0xfffffc00 0x100>; | ||
72 | }; | ||
73 | |||
74 | rstc@fffffd00 { | ||
75 | compatible = "atmel,at91sam9g45-rstc"; | ||
76 | reg = <0xfffffd00 0x10>; | ||
77 | }; | ||
78 | |||
63 | pit: timer@fffffd30 { | 79 | pit: timer@fffffd30 { |
64 | compatible = "atmel,at91sam9260-pit"; | 80 | compatible = "atmel,at91sam9260-pit"; |
65 | reg = <0xfffffd30 0xf>; | 81 | reg = <0xfffffd30 0xf>; |
@@ -67,6 +83,11 @@ | |||
67 | }; | 83 | }; |
68 | 84 | ||
69 | 85 | ||
86 | shdwc@fffffd10 { | ||
87 | compatible = "atmel,at91sam9rl-shdwc"; | ||
88 | reg = <0xfffffd10 0x10>; | ||
89 | }; | ||
90 | |||
70 | tcb0: timer@fff7c000 { | 91 | tcb0: timer@fff7c000 { |
71 | compatible = "atmel,at91rm9200-tcb"; | 92 | compatible = "atmel,at91rm9200-tcb"; |
72 | reg = <0xfff7c000 0x100>; | 93 | reg = <0xfff7c000 0x100>; |
@@ -180,5 +201,48 @@ | |||
180 | status = "disabled"; | 201 | status = "disabled"; |
181 | }; | 202 | }; |
182 | }; | 203 | }; |
204 | |||
205 | nand0: nand@40000000 { | ||
206 | compatible = "atmel,at91rm9200-nand"; | ||
207 | #address-cells = <1>; | ||
208 | #size-cells = <1>; | ||
209 | reg = <0x40000000 0x10000000 | ||
210 | 0xffffe200 0x200 | ||
211 | >; | ||
212 | atmel,nand-addr-offset = <21>; | ||
213 | atmel,nand-cmd-offset = <22>; | ||
214 | gpios = <&pioC 8 0 | ||
215 | &pioC 14 0 | ||
216 | 0 | ||
217 | >; | ||
218 | status = "disabled"; | ||
219 | }; | ||
220 | |||
221 | usb0: ohci@00700000 { | ||
222 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
223 | reg = <0x00700000 0x100000>; | ||
224 | interrupts = <22 4>; | ||
225 | status = "disabled"; | ||
226 | }; | ||
227 | |||
228 | usb1: ehci@00800000 { | ||
229 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | ||
230 | reg = <0x00800000 0x100000>; | ||
231 | interrupts = <22 4>; | ||
232 | status = "disabled"; | ||
233 | }; | ||
234 | }; | ||
235 | |||
236 | i2c@0 { | ||
237 | compatible = "i2c-gpio"; | ||
238 | gpios = <&pioA 20 0 /* sda */ | ||
239 | &pioA 21 0 /* scl */ | ||
240 | >; | ||
241 | i2c-gpio,sda-open-drain; | ||
242 | i2c-gpio,scl-open-drain; | ||
243 | i2c-gpio,delay-us = <5>; /* ~100 kHz */ | ||
244 | #address-cells = <1>; | ||
245 | #size-cells = <0>; | ||
246 | status = "disabled"; | ||
183 | }; | 247 | }; |
184 | }; | 248 | }; |
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts index 15e25f903cad..c4c8ae4123d5 100644 --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts | |||
@@ -14,13 +14,24 @@ | |||
14 | compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9"; | 14 | compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9"; |
15 | 15 | ||
16 | chosen { | 16 | chosen { |
17 | bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=jffs2"; | 17 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2"; |
18 | }; | 18 | }; |
19 | 19 | ||
20 | memory@70000000 { | 20 | memory@70000000 { |
21 | reg = <0x70000000 0x4000000>; | 21 | reg = <0x70000000 0x4000000>; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | clocks { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | ranges; | ||
28 | |||
29 | main_clock: clock@0 { | ||
30 | compatible = "atmel,osc", "fixed-clock"; | ||
31 | clock-frequency = <12000000>; | ||
32 | }; | ||
33 | }; | ||
34 | |||
24 | ahb { | 35 | ahb { |
25 | apb { | 36 | apb { |
26 | dbgu: serial@ffffee00 { | 37 | dbgu: serial@ffffee00 { |
@@ -36,6 +47,39 @@ | |||
36 | status = "okay"; | 47 | status = "okay"; |
37 | }; | 48 | }; |
38 | }; | 49 | }; |
50 | |||
51 | nand0: nand@40000000 { | ||
52 | nand-bus-width = <8>; | ||
53 | nand-ecc-mode = "soft"; | ||
54 | nand-on-flash-bbt; | ||
55 | status = "okay"; | ||
56 | |||
57 | boot@0 { | ||
58 | label = "bootstrap/uboot/kernel"; | ||
59 | reg = <0x0 0x400000>; | ||
60 | }; | ||
61 | |||
62 | rootfs@400000 { | ||
63 | label = "rootfs"; | ||
64 | reg = <0x400000 0x3C00000>; | ||
65 | }; | ||
66 | |||
67 | data@4000000 { | ||
68 | label = "data"; | ||
69 | reg = <0x4000000 0xC000000>; | ||
70 | }; | ||
71 | }; | ||
72 | |||
73 | usb0: ohci@00700000 { | ||
74 | status = "okay"; | ||
75 | num-ports = <2>; | ||
76 | atmel,vbus-gpio = <&pioD 1 0 | ||
77 | &pioD 3 0>; | ||
78 | }; | ||
79 | |||
80 | usb1: ehci@00800000 { | ||
81 | status = "okay"; | ||
82 | }; | ||
39 | }; | 83 | }; |
40 | 84 | ||
41 | leds { | 85 | leds { |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index a02e636d8a57..c111001f254e 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -58,6 +58,26 @@ | |||
58 | reg = <0xfffff000 0x200>; | 58 | reg = <0xfffff000 0x200>; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | ramc0: ramc@ffffe800 { | ||
62 | compatible = "atmel,at91sam9g45-ddramc"; | ||
63 | reg = <0xffffe800 0x200>; | ||
64 | }; | ||
65 | |||
66 | pmc: pmc@fffffc00 { | ||
67 | compatible = "atmel,at91rm9200-pmc"; | ||
68 | reg = <0xfffffc00 0x100>; | ||
69 | }; | ||
70 | |||
71 | rstc@fffffe00 { | ||
72 | compatible = "atmel,at91sam9g45-rstc"; | ||
73 | reg = <0xfffffe00 0x10>; | ||
74 | }; | ||
75 | |||
76 | shdwc@fffffe10 { | ||
77 | compatible = "atmel,at91sam9x5-shdwc"; | ||
78 | reg = <0xfffffe10 0x10>; | ||
79 | }; | ||
80 | |||
61 | pit: timer@fffffe30 { | 81 | pit: timer@fffffe30 { |
62 | compatible = "atmel,at91sam9260-pit"; | 82 | compatible = "atmel,at91sam9260-pit"; |
63 | reg = <0xfffffe30 0xf>; | 83 | reg = <0xfffffe30 0xf>; |
@@ -172,5 +192,73 @@ | |||
172 | status = "disabled"; | 192 | status = "disabled"; |
173 | }; | 193 | }; |
174 | }; | 194 | }; |
195 | |||
196 | nand0: nand@40000000 { | ||
197 | compatible = "atmel,at91rm9200-nand"; | ||
198 | #address-cells = <1>; | ||
199 | #size-cells = <1>; | ||
200 | reg = <0x40000000 0x10000000 | ||
201 | >; | ||
202 | atmel,nand-addr-offset = <21>; | ||
203 | atmel,nand-cmd-offset = <22>; | ||
204 | gpios = <&pioC 8 0 | ||
205 | &pioC 14 0 | ||
206 | 0 | ||
207 | >; | ||
208 | status = "disabled"; | ||
209 | }; | ||
210 | |||
211 | usb0: ohci@00600000 { | ||
212 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
213 | reg = <0x00600000 0x100000>; | ||
214 | interrupts = <22 4>; | ||
215 | status = "disabled"; | ||
216 | }; | ||
217 | |||
218 | usb1: ehci@00700000 { | ||
219 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | ||
220 | reg = <0x00700000 0x100000>; | ||
221 | interrupts = <22 4>; | ||
222 | status = "disabled"; | ||
223 | }; | ||
224 | }; | ||
225 | |||
226 | i2c@0 { | ||
227 | compatible = "i2c-gpio"; | ||
228 | gpios = <&pioA 30 0 /* sda */ | ||
229 | &pioA 31 0 /* scl */ | ||
230 | >; | ||
231 | i2c-gpio,sda-open-drain; | ||
232 | i2c-gpio,scl-open-drain; | ||
233 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
234 | #address-cells = <1>; | ||
235 | #size-cells = <0>; | ||
236 | status = "disabled"; | ||
237 | }; | ||
238 | |||
239 | i2c@1 { | ||
240 | compatible = "i2c-gpio"; | ||
241 | gpios = <&pioC 0 0 /* sda */ | ||
242 | &pioC 1 0 /* scl */ | ||
243 | >; | ||
244 | i2c-gpio,sda-open-drain; | ||
245 | i2c-gpio,scl-open-drain; | ||
246 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
247 | #address-cells = <1>; | ||
248 | #size-cells = <0>; | ||
249 | status = "disabled"; | ||
250 | }; | ||
251 | |||
252 | i2c@2 { | ||
253 | compatible = "i2c-gpio"; | ||
254 | gpios = <&pioB 4 0 /* sda */ | ||
255 | &pioB 5 0 /* scl */ | ||
256 | >; | ||
257 | i2c-gpio,sda-open-drain; | ||
258 | i2c-gpio,scl-open-drain; | ||
259 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
260 | #address-cells = <1>; | ||
261 | #size-cells = <0>; | ||
262 | status = "disabled"; | ||
175 | }; | 263 | }; |
176 | }; | 264 | }; |
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi index 64ae3e890259..67936f83c694 100644 --- a/arch/arm/boot/dts/at91sam9x5cm.dtsi +++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi | |||
@@ -12,6 +12,51 @@ | |||
12 | reg = <0x20000000 0x8000000>; | 12 | reg = <0x20000000 0x8000000>; |
13 | }; | 13 | }; |
14 | 14 | ||
15 | clocks { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | ranges; | ||
19 | |||
20 | main_clock: clock@0 { | ||
21 | compatible = "atmel,osc", "fixed-clock"; | ||
22 | clock-frequency = <12000000>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | ahb { | ||
27 | nand0: nand@40000000 { | ||
28 | nand-bus-width = <8>; | ||
29 | nand-ecc-mode = "soft"; | ||
30 | nand-on-flash-bbt; | ||
31 | status = "okay"; | ||
32 | |||
33 | at91bootstrap@0 { | ||
34 | label = "at91bootstrap"; | ||
35 | reg = <0x0 0x40000>; | ||
36 | }; | ||
37 | |||
38 | uboot@40000 { | ||
39 | label = "u-boot"; | ||
40 | reg = <0x40000 0x80000>; | ||
41 | }; | ||
42 | |||
43 | ubootenv@c0000 { | ||
44 | label = "U-Boot Env"; | ||
45 | reg = <0xc0000 0x140000>; | ||
46 | }; | ||
47 | |||
48 | kernel@200000 { | ||
49 | label = "kernel"; | ||
50 | reg = <0x200000 0x600000>; | ||
51 | }; | ||
52 | |||
53 | rootfs@800000 { | ||
54 | label = "rootfs"; | ||
55 | reg = <0x800000 0x1f800000>; | ||
56 | }; | ||
57 | }; | ||
58 | }; | ||
59 | |||
15 | leds { | 60 | leds { |
16 | compatible = "gpio-leds"; | 61 | compatible = "gpio-leds"; |
17 | 62 | ||
diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi new file mode 100644 index 000000000000..d73dce645667 --- /dev/null +++ b/arch/arm/boot/dts/db8500.dtsi | |||
@@ -0,0 +1,275 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Linaro Ltd | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | /include/ "skeleton.dtsi" | ||
13 | |||
14 | / { | ||
15 | soc-u9500 { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | compatible = "stericsson,db8500"; | ||
19 | interrupt-parent = <&intc>; | ||
20 | ranges; | ||
21 | |||
22 | intc: interrupt-controller@a0411000 { | ||
23 | compatible = "arm,cortex-a9-gic"; | ||
24 | #interrupt-cells = <3>; | ||
25 | #address-cells = <1>; | ||
26 | interrupt-controller; | ||
27 | interrupt-parent; | ||
28 | reg = <0xa0411000 0x1000>, | ||
29 | <0xa0410100 0x100>; | ||
30 | }; | ||
31 | |||
32 | L2: l2-cache { | ||
33 | compatible = "arm,pl310-cache"; | ||
34 | reg = <0xa0412000 0x1000>; | ||
35 | interrupts = <0 13 4>; | ||
36 | cache-unified; | ||
37 | cache-level = <2>; | ||
38 | }; | ||
39 | |||
40 | pmu { | ||
41 | compatible = "arm,cortex-a9-pmu"; | ||
42 | interrupts = <0 7 0x4>; | ||
43 | }; | ||
44 | |||
45 | timer@a0410600 { | ||
46 | compatible = "arm,cortex-a9-twd-timer"; | ||
47 | reg = <0xa0410600 0x20>; | ||
48 | interrupts = <1 13 0x304>; | ||
49 | }; | ||
50 | |||
51 | rtc@80154000 { | ||
52 | compatible = "stericsson,db8500-rtc"; | ||
53 | reg = <0x80154000 0x1000>; | ||
54 | interrupts = <0 18 0x4>; | ||
55 | }; | ||
56 | |||
57 | gpio0: gpio@8012e000 { | ||
58 | compatible = "stericsson,db8500-gpio", | ||
59 | "stmicroelectronics,nomadik-gpio"; | ||
60 | reg = <0x8012e000 0x80>; | ||
61 | interrupts = <0 119 0x4>; | ||
62 | supports-sleepmode; | ||
63 | gpio-controller; | ||
64 | }; | ||
65 | |||
66 | gpio1: gpio@8012e080 { | ||
67 | compatible = "stericsson,db8500-gpio", | ||
68 | "stmicroelectronics,nomadik-gpio"; | ||
69 | reg = <0x8012e080 0x80>; | ||
70 | interrupts = <0 120 0x4>; | ||
71 | supports-sleepmode; | ||
72 | gpio-controller; | ||
73 | }; | ||
74 | |||
75 | gpio2: gpio@8000e000 { | ||
76 | compatible = "stericsson,db8500-gpio", | ||
77 | "stmicroelectronics,nomadik-gpio"; | ||
78 | reg = <0x8000e000 0x80>; | ||
79 | interrupts = <0 121 0x4>; | ||
80 | supports-sleepmode; | ||
81 | gpio-controller; | ||
82 | }; | ||
83 | |||
84 | gpio3: gpio@8000e080 { | ||
85 | compatible = "stericsson,db8500-gpio", | ||
86 | "stmicroelectronics,nomadik-gpio"; | ||
87 | reg = <0x8000e080 0x80>; | ||
88 | interrupts = <0 122 0x4>; | ||
89 | supports-sleepmode; | ||
90 | gpio-controller; | ||
91 | }; | ||
92 | |||
93 | gpio4: gpio@8000e100 { | ||
94 | compatible = "stericsson,db8500-gpio", | ||
95 | "stmicroelectronics,nomadik-gpio"; | ||
96 | reg = <0x8000e100 0x80>; | ||
97 | interrupts = <0 123 0x4>; | ||
98 | supports-sleepmode; | ||
99 | gpio-controller; | ||
100 | }; | ||
101 | |||
102 | gpio5: gpio@8000e180 { | ||
103 | compatible = "stericsson,db8500-gpio", | ||
104 | "stmicroelectronics,nomadik-gpio"; | ||
105 | reg = <0x8000e180 0x80>; | ||
106 | interrupts = <0 124 0x4>; | ||
107 | supports-sleepmode; | ||
108 | gpio-controller; | ||
109 | }; | ||
110 | |||
111 | gpio6: gpio@8011e000 { | ||
112 | compatible = "stericsson,db8500-gpio", | ||
113 | "stmicroelectronics,nomadik-gpio"; | ||
114 | reg = <0x8011e000 0x80>; | ||
115 | interrupts = <0 125 0x4>; | ||
116 | supports-sleepmode; | ||
117 | gpio-controller; | ||
118 | }; | ||
119 | |||
120 | gpio7: gpio@8011e080 { | ||
121 | compatible = "stericsson,db8500-gpio", | ||
122 | "stmicroelectronics,nomadik-gpio"; | ||
123 | reg = <0x8011e080 0x80>; | ||
124 | interrupts = <0 126 0x4>; | ||
125 | supports-sleepmode; | ||
126 | gpio-controller; | ||
127 | }; | ||
128 | |||
129 | gpio8: gpio@a03fe000 { | ||
130 | compatible = "stericsson,db8500-gpio", | ||
131 | "stmicroelectronics,nomadik-gpio"; | ||
132 | reg = <0xa03fe000 0x80>; | ||
133 | interrupts = <0 127 0x4>; | ||
134 | supports-sleepmode; | ||
135 | gpio-controller; | ||
136 | }; | ||
137 | |||
138 | usb@a03e0000 { | ||
139 | compatible = "stericsson,db8500-musb", | ||
140 | "mentor,musb"; | ||
141 | reg = <0xa03e0000 0x10000>; | ||
142 | interrupts = <0 23 0x4>; | ||
143 | }; | ||
144 | |||
145 | dma-controller@801C0000 { | ||
146 | compatible = "stericsson,db8500-dma40", | ||
147 | "stericsson,dma40"; | ||
148 | reg = <0x801C0000 0x1000 0x40010000 0x800>; | ||
149 | interrupts = <0 25 0x4>; | ||
150 | }; | ||
151 | |||
152 | prcmu@80157000 { | ||
153 | compatible = "stericsson,db8500-prcmu"; | ||
154 | reg = <0x80157000 0x1000>; | ||
155 | interrupts = <46 47>; | ||
156 | #address-cells = <1>; | ||
157 | #size-cells = <0>; | ||
158 | |||
159 | ab8500@5 { | ||
160 | compatible = "stericsson,ab8500"; | ||
161 | reg = <5>; /* mailbox 5 is i2c */ | ||
162 | interrupts = <0 40 0x4>; | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | i2c@80004000 { | ||
167 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | ||
168 | reg = <0x80004000 0x1000>; | ||
169 | interrupts = <0 21 0x4>; | ||
170 | #address-cells = <1>; | ||
171 | #size-cells = <0>; | ||
172 | }; | ||
173 | |||
174 | i2c@80122000 { | ||
175 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | ||
176 | reg = <0x80122000 0x1000>; | ||
177 | interrupts = <0 22 0x4>; | ||
178 | #address-cells = <1>; | ||
179 | #size-cells = <0>; | ||
180 | }; | ||
181 | |||
182 | i2c@80128000 { | ||
183 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | ||
184 | reg = <0x80128000 0x1000>; | ||
185 | interrupts = <0 55 0x4>; | ||
186 | #address-cells = <1>; | ||
187 | #size-cells = <0>; | ||
188 | }; | ||
189 | |||
190 | i2c@80110000 { | ||
191 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | ||
192 | reg = <0x80110000 0x1000>; | ||
193 | interrupts = <0 12 0x4>; | ||
194 | #address-cells = <1>; | ||
195 | #size-cells = <0>; | ||
196 | }; | ||
197 | |||
198 | i2c@8012a000 { | ||
199 | compatible = "stericsson,db8500-i2c", "stmicroelectronics,nomadik-i2c"; | ||
200 | reg = <0x8012a000 0x1000>; | ||
201 | interrupts = <0 51 0x4>; | ||
202 | #address-cells = <1>; | ||
203 | #size-cells = <0>; | ||
204 | }; | ||
205 | |||
206 | ssp@80002000 { | ||
207 | compatible = "arm,pl022", "arm,primecell"; | ||
208 | reg = <80002000 0x1000>; | ||
209 | interrupts = <0 14 0x4>; | ||
210 | #address-cells = <1>; | ||
211 | #size-cells = <0>; | ||
212 | status = "disabled"; | ||
213 | |||
214 | // Add one of these for each child device | ||
215 | cs-gpios = <&gpio0 31 &gpio4 14 &gpio4 16 &gpio6 22 &gpio7 0>; | ||
216 | |||
217 | }; | ||
218 | |||
219 | uart@80120000 { | ||
220 | compatible = "arm,pl011", "arm,primecell"; | ||
221 | reg = <0x80120000 0x1000>; | ||
222 | interrupts = <0 11 0x4>; | ||
223 | status = "disabled"; | ||
224 | }; | ||
225 | uart@80121000 { | ||
226 | compatible = "arm,pl011", "arm,primecell"; | ||
227 | reg = <0x80121000 0x1000>; | ||
228 | interrupts = <0 19 0x4>; | ||
229 | status = "disabled"; | ||
230 | }; | ||
231 | uart@80007000 { | ||
232 | compatible = "arm,pl011", "arm,primecell"; | ||
233 | reg = <0x80007000 0x1000>; | ||
234 | interrupts = <0 26 0x4>; | ||
235 | status = "disabled"; | ||
236 | }; | ||
237 | |||
238 | sdi@80126000 { | ||
239 | compatible = "arm,pl18x", "arm,primecell"; | ||
240 | reg = <0x80126000 0x1000>; | ||
241 | interrupts = <0 60 0x4>; | ||
242 | status = "disabled"; | ||
243 | }; | ||
244 | sdi@80118000 { | ||
245 | compatible = "arm,pl18x", "arm,primecell"; | ||
246 | reg = <0x80118000 0x1000>; | ||
247 | interrupts = <0 50 0x4>; | ||
248 | status = "disabled"; | ||
249 | }; | ||
250 | sdi@80005000 { | ||
251 | compatible = "arm,pl18x", "arm,primecell"; | ||
252 | reg = <0x80005000 0x1000>; | ||
253 | interrupts = <0 41 0x4>; | ||
254 | status = "disabled"; | ||
255 | }; | ||
256 | sdi@80119000 { | ||
257 | compatible = "arm,pl18x", "arm,primecell"; | ||
258 | reg = <0x80119000 0x1000>; | ||
259 | interrupts = <0 59 0x4>; | ||
260 | status = "disabled"; | ||
261 | }; | ||
262 | sdi@80114000 { | ||
263 | compatible = "arm,pl18x", "arm,primecell"; | ||
264 | reg = <0x80114000 0x1000>; | ||
265 | interrupts = <0 99 0x4>; | ||
266 | status = "disabled"; | ||
267 | }; | ||
268 | sdi@80008000 { | ||
269 | compatible = "arm,pl18x", "arm,primecell"; | ||
270 | reg = <0x80114000 0x1000>; | ||
271 | interrupts = <0 100 0x4>; | ||
272 | status = "disabled"; | ||
273 | }; | ||
274 | }; | ||
275 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts new file mode 100644 index 000000000000..399d17b231d2 --- /dev/null +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * SAMSUNG SMDK5250 board device tree source | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
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 | /dts-v1/; | ||
13 | /include/ "exynos5250.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; | ||
17 | compatible = "samsung,smdk5250", "samsung,exynos5250"; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x40000000 0x80000000>; | ||
21 | }; | ||
22 | |||
23 | chosen { | ||
24 | bootargs = "root=/dev/ram0 rw ramdisk=8192 console=ttySAC1,115200"; | ||
25 | }; | ||
26 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi new file mode 100644 index 000000000000..dfc433599436 --- /dev/null +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -0,0 +1,413 @@ | |||
1 | /* | ||
2 | * SAMSUNG EXYNOS5250 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * SAMSUNG EXYNOS5250 SoC device nodes are listed in this file. | ||
8 | * EXYNOS5250 based board files can include this file and provide | ||
9 | * values for board specfic bindings. | ||
10 | * | ||
11 | * Note: This file does not include device nodes for all the controllers in | ||
12 | * EXYNOS5250 SoC. As device tree coverage for EXYNOS5250 increases, | ||
13 | * additional nodes can be added to this file. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | /include/ "skeleton.dtsi" | ||
21 | |||
22 | / { | ||
23 | compatible = "samsung,exynos5250"; | ||
24 | interrupt-parent = <&gic>; | ||
25 | |||
26 | gic:interrupt-controller@10490000 { | ||
27 | compatible = "arm,cortex-a9-gic"; | ||
28 | #interrupt-cells = <3>; | ||
29 | interrupt-controller; | ||
30 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; | ||
31 | }; | ||
32 | |||
33 | watchdog { | ||
34 | compatible = "samsung,s3c2410-wdt"; | ||
35 | reg = <0x101D0000 0x100>; | ||
36 | interrupts = <0 42 0>; | ||
37 | }; | ||
38 | |||
39 | rtc { | ||
40 | compatible = "samsung,s3c6410-rtc"; | ||
41 | reg = <0x101E0000 0x100>; | ||
42 | interrupts = <0 43 0>, <0 44 0>; | ||
43 | }; | ||
44 | |||
45 | sdhci@12200000 { | ||
46 | compatible = "samsung,exynos4210-sdhci"; | ||
47 | reg = <0x12200000 0x100>; | ||
48 | interrupts = <0 75 0>; | ||
49 | }; | ||
50 | |||
51 | sdhci@12210000 { | ||
52 | compatible = "samsung,exynos4210-sdhci"; | ||
53 | reg = <0x12210000 0x100>; | ||
54 | interrupts = <0 76 0>; | ||
55 | }; | ||
56 | |||
57 | sdhci@12220000 { | ||
58 | compatible = "samsung,exynos4210-sdhci"; | ||
59 | reg = <0x12220000 0x100>; | ||
60 | interrupts = <0 77 0>; | ||
61 | }; | ||
62 | |||
63 | sdhci@12230000 { | ||
64 | compatible = "samsung,exynos4210-sdhci"; | ||
65 | reg = <0x12230000 0x100>; | ||
66 | interrupts = <0 78 0>; | ||
67 | }; | ||
68 | |||
69 | serial@12C00000 { | ||
70 | compatible = "samsung,exynos4210-uart"; | ||
71 | reg = <0x12C00000 0x100>; | ||
72 | interrupts = <0 51 0>; | ||
73 | }; | ||
74 | |||
75 | serial@12C10000 { | ||
76 | compatible = "samsung,exynos4210-uart"; | ||
77 | reg = <0x12C10000 0x100>; | ||
78 | interrupts = <0 52 0>; | ||
79 | }; | ||
80 | |||
81 | serial@12C20000 { | ||
82 | compatible = "samsung,exynos4210-uart"; | ||
83 | reg = <0x12C20000 0x100>; | ||
84 | interrupts = <0 53 0>; | ||
85 | }; | ||
86 | |||
87 | serial@12C30000 { | ||
88 | compatible = "samsung,exynos4210-uart"; | ||
89 | reg = <0x12C30000 0x100>; | ||
90 | interrupts = <0 54 0>; | ||
91 | }; | ||
92 | |||
93 | i2c@12C60000 { | ||
94 | compatible = "samsung,s3c2440-i2c"; | ||
95 | reg = <0x12C60000 0x100>; | ||
96 | interrupts = <0 56 0>; | ||
97 | }; | ||
98 | |||
99 | i2c@12C70000 { | ||
100 | compatible = "samsung,s3c2440-i2c"; | ||
101 | reg = <0x12C70000 0x100>; | ||
102 | interrupts = <0 57 0>; | ||
103 | }; | ||
104 | |||
105 | i2c@12C80000 { | ||
106 | compatible = "samsung,s3c2440-i2c"; | ||
107 | reg = <0x12C80000 0x100>; | ||
108 | interrupts = <0 58 0>; | ||
109 | }; | ||
110 | |||
111 | i2c@12C90000 { | ||
112 | compatible = "samsung,s3c2440-i2c"; | ||
113 | reg = <0x12C90000 0x100>; | ||
114 | interrupts = <0 59 0>; | ||
115 | }; | ||
116 | |||
117 | i2c@12CA0000 { | ||
118 | compatible = "samsung,s3c2440-i2c"; | ||
119 | reg = <0x12CA0000 0x100>; | ||
120 | interrupts = <0 60 0>; | ||
121 | }; | ||
122 | |||
123 | i2c@12CB0000 { | ||
124 | compatible = "samsung,s3c2440-i2c"; | ||
125 | reg = <0x12CB0000 0x100>; | ||
126 | interrupts = <0 61 0>; | ||
127 | }; | ||
128 | |||
129 | i2c@12CC0000 { | ||
130 | compatible = "samsung,s3c2440-i2c"; | ||
131 | reg = <0x12CC0000 0x100>; | ||
132 | interrupts = <0 62 0>; | ||
133 | }; | ||
134 | |||
135 | i2c@12CD0000 { | ||
136 | compatible = "samsung,s3c2440-i2c"; | ||
137 | reg = <0x12CD0000 0x100>; | ||
138 | interrupts = <0 63 0>; | ||
139 | }; | ||
140 | |||
141 | amba { | ||
142 | #address-cells = <1>; | ||
143 | #size-cells = <1>; | ||
144 | compatible = "arm,amba-bus"; | ||
145 | interrupt-parent = <&gic>; | ||
146 | ranges; | ||
147 | |||
148 | pdma0: pdma@121A0000 { | ||
149 | compatible = "arm,pl330", "arm,primecell"; | ||
150 | reg = <0x121A0000 0x1000>; | ||
151 | interrupts = <0 34 0>; | ||
152 | }; | ||
153 | |||
154 | pdma1: pdma@121B0000 { | ||
155 | compatible = "arm,pl330", "arm,primecell"; | ||
156 | reg = <0x121B0000 0x1000>; | ||
157 | interrupts = <0 35 0>; | ||
158 | }; | ||
159 | |||
160 | mdma0: pdma@10800000 { | ||
161 | compatible = "arm,pl330", "arm,primecell"; | ||
162 | reg = <0x10800000 0x1000>; | ||
163 | interrupts = <0 33 0>; | ||
164 | }; | ||
165 | |||
166 | mdma1: pdma@11C10000 { | ||
167 | compatible = "arm,pl330", "arm,primecell"; | ||
168 | reg = <0x11C10000 0x1000>; | ||
169 | interrupts = <0 124 0>; | ||
170 | }; | ||
171 | }; | ||
172 | |||
173 | gpio-controllers { | ||
174 | #address-cells = <1>; | ||
175 | #size-cells = <1>; | ||
176 | gpio-controller; | ||
177 | ranges; | ||
178 | |||
179 | gpa0: gpio-controller@11400000 { | ||
180 | compatible = "samsung,exynos4-gpio"; | ||
181 | reg = <0x11400000 0x20>; | ||
182 | #gpio-cells = <4>; | ||
183 | }; | ||
184 | |||
185 | gpa1: gpio-controller@11400020 { | ||
186 | compatible = "samsung,exynos4-gpio"; | ||
187 | reg = <0x11400020 0x20>; | ||
188 | #gpio-cells = <4>; | ||
189 | }; | ||
190 | |||
191 | gpa2: gpio-controller@11400040 { | ||
192 | compatible = "samsung,exynos4-gpio"; | ||
193 | reg = <0x11400040 0x20>; | ||
194 | #gpio-cells = <4>; | ||
195 | }; | ||
196 | |||
197 | gpb0: gpio-controller@11400060 { | ||
198 | compatible = "samsung,exynos4-gpio"; | ||
199 | reg = <0x11400060 0x20>; | ||
200 | #gpio-cells = <4>; | ||
201 | }; | ||
202 | |||
203 | gpb1: gpio-controller@11400080 { | ||
204 | compatible = "samsung,exynos4-gpio"; | ||
205 | reg = <0x11400080 0x20>; | ||
206 | #gpio-cells = <4>; | ||
207 | }; | ||
208 | |||
209 | gpb2: gpio-controller@114000A0 { | ||
210 | compatible = "samsung,exynos4-gpio"; | ||
211 | reg = <0x114000A0 0x20>; | ||
212 | #gpio-cells = <4>; | ||
213 | }; | ||
214 | |||
215 | gpb3: gpio-controller@114000C0 { | ||
216 | compatible = "samsung,exynos4-gpio"; | ||
217 | reg = <0x114000C0 0x20>; | ||
218 | #gpio-cells = <4>; | ||
219 | }; | ||
220 | |||
221 | gpc0: gpio-controller@114000E0 { | ||
222 | compatible = "samsung,exynos4-gpio"; | ||
223 | reg = <0x114000E0 0x20>; | ||
224 | #gpio-cells = <4>; | ||
225 | }; | ||
226 | |||
227 | gpc1: gpio-controller@11400100 { | ||
228 | compatible = "samsung,exynos4-gpio"; | ||
229 | reg = <0x11400100 0x20>; | ||
230 | #gpio-cells = <4>; | ||
231 | }; | ||
232 | |||
233 | gpc2: gpio-controller@11400120 { | ||
234 | compatible = "samsung,exynos4-gpio"; | ||
235 | reg = <0x11400120 0x20>; | ||
236 | #gpio-cells = <4>; | ||
237 | }; | ||
238 | |||
239 | gpc3: gpio-controller@11400140 { | ||
240 | compatible = "samsung,exynos4-gpio"; | ||
241 | reg = <0x11400140 0x20>; | ||
242 | #gpio-cells = <4>; | ||
243 | }; | ||
244 | |||
245 | gpd0: gpio-controller@11400160 { | ||
246 | compatible = "samsung,exynos4-gpio"; | ||
247 | reg = <0x11400160 0x20>; | ||
248 | #gpio-cells = <4>; | ||
249 | }; | ||
250 | |||
251 | gpd1: gpio-controller@11400180 { | ||
252 | compatible = "samsung,exynos4-gpio"; | ||
253 | reg = <0x11400180 0x20>; | ||
254 | #gpio-cells = <4>; | ||
255 | }; | ||
256 | |||
257 | gpy0: gpio-controller@114001A0 { | ||
258 | compatible = "samsung,exynos4-gpio"; | ||
259 | reg = <0x114001A0 0x20>; | ||
260 | #gpio-cells = <4>; | ||
261 | }; | ||
262 | |||
263 | gpy1: gpio-controller@114001C0 { | ||
264 | compatible = "samsung,exynos4-gpio"; | ||
265 | reg = <0x114001C0 0x20>; | ||
266 | #gpio-cells = <4>; | ||
267 | }; | ||
268 | |||
269 | gpy2: gpio-controller@114001E0 { | ||
270 | compatible = "samsung,exynos4-gpio"; | ||
271 | reg = <0x114001E0 0x20>; | ||
272 | #gpio-cells = <4>; | ||
273 | }; | ||
274 | |||
275 | gpy3: gpio-controller@11400200 { | ||
276 | compatible = "samsung,exynos4-gpio"; | ||
277 | reg = <0x11400200 0x20>; | ||
278 | #gpio-cells = <4>; | ||
279 | }; | ||
280 | |||
281 | gpy4: gpio-controller@11400220 { | ||
282 | compatible = "samsung,exynos4-gpio"; | ||
283 | reg = <0x11400220 0x20>; | ||
284 | #gpio-cells = <4>; | ||
285 | }; | ||
286 | |||
287 | gpy5: gpio-controller@11400240 { | ||
288 | compatible = "samsung,exynos4-gpio"; | ||
289 | reg = <0x11400240 0x20>; | ||
290 | #gpio-cells = <4>; | ||
291 | }; | ||
292 | |||
293 | gpy6: gpio-controller@11400260 { | ||
294 | compatible = "samsung,exynos4-gpio"; | ||
295 | reg = <0x11400260 0x20>; | ||
296 | #gpio-cells = <4>; | ||
297 | }; | ||
298 | |||
299 | gpx0: gpio-controller@11400C00 { | ||
300 | compatible = "samsung,exynos4-gpio"; | ||
301 | reg = <0x11400C00 0x20>; | ||
302 | #gpio-cells = <4>; | ||
303 | }; | ||
304 | |||
305 | gpx1: gpio-controller@11400C20 { | ||
306 | compatible = "samsung,exynos4-gpio"; | ||
307 | reg = <0x11400C20 0x20>; | ||
308 | #gpio-cells = <4>; | ||
309 | }; | ||
310 | |||
311 | gpx2: gpio-controller@11400C40 { | ||
312 | compatible = "samsung,exynos4-gpio"; | ||
313 | reg = <0x11400C40 0x20>; | ||
314 | #gpio-cells = <4>; | ||
315 | }; | ||
316 | |||
317 | gpx3: gpio-controller@11400C60 { | ||
318 | compatible = "samsung,exynos4-gpio"; | ||
319 | reg = <0x11400C60 0x20>; | ||
320 | #gpio-cells = <4>; | ||
321 | }; | ||
322 | |||
323 | gpe0: gpio-controller@13400000 { | ||
324 | compatible = "samsung,exynos4-gpio"; | ||
325 | reg = <0x13400000 0x20>; | ||
326 | #gpio-cells = <4>; | ||
327 | }; | ||
328 | |||
329 | gpe1: gpio-controller@13400020 { | ||
330 | compatible = "samsung,exynos4-gpio"; | ||
331 | reg = <0x13400020 0x20>; | ||
332 | #gpio-cells = <4>; | ||
333 | }; | ||
334 | |||
335 | gpf0: gpio-controller@13400040 { | ||
336 | compatible = "samsung,exynos4-gpio"; | ||
337 | reg = <0x13400040 0x20>; | ||
338 | #gpio-cells = <4>; | ||
339 | }; | ||
340 | |||
341 | gpf1: gpio-controller@13400060 { | ||
342 | compatible = "samsung,exynos4-gpio"; | ||
343 | reg = <0x13400060 0x20>; | ||
344 | #gpio-cells = <4>; | ||
345 | }; | ||
346 | |||
347 | gpg0: gpio-controller@13400080 { | ||
348 | compatible = "samsung,exynos4-gpio"; | ||
349 | reg = <0x13400080 0x20>; | ||
350 | #gpio-cells = <4>; | ||
351 | }; | ||
352 | |||
353 | gpg1: gpio-controller@134000A0 { | ||
354 | compatible = "samsung,exynos4-gpio"; | ||
355 | reg = <0x134000A0 0x20>; | ||
356 | #gpio-cells = <4>; | ||
357 | }; | ||
358 | |||
359 | gpg2: gpio-controller@134000C0 { | ||
360 | compatible = "samsung,exynos4-gpio"; | ||
361 | reg = <0x134000C0 0x20>; | ||
362 | #gpio-cells = <4>; | ||
363 | }; | ||
364 | |||
365 | gph0: gpio-controller@134000E0 { | ||
366 | compatible = "samsung,exynos4-gpio"; | ||
367 | reg = <0x134000E0 0x20>; | ||
368 | #gpio-cells = <4>; | ||
369 | }; | ||
370 | |||
371 | gph1: gpio-controller@13400100 { | ||
372 | compatible = "samsung,exynos4-gpio"; | ||
373 | reg = <0x13400100 0x20>; | ||
374 | #gpio-cells = <4>; | ||
375 | }; | ||
376 | |||
377 | gpv0: gpio-controller@10D10000 { | ||
378 | compatible = "samsung,exynos4-gpio"; | ||
379 | reg = <0x10D10000 0x20>; | ||
380 | #gpio-cells = <4>; | ||
381 | }; | ||
382 | |||
383 | gpv1: gpio-controller@10D10020 { | ||
384 | compatible = "samsung,exynos4-gpio"; | ||
385 | reg = <0x10D10020 0x20>; | ||
386 | #gpio-cells = <4>; | ||
387 | }; | ||
388 | |||
389 | gpv2: gpio-controller@10D10040 { | ||
390 | compatible = "samsung,exynos4-gpio"; | ||
391 | reg = <0x10D10040 0x20>; | ||
392 | #gpio-cells = <4>; | ||
393 | }; | ||
394 | |||
395 | gpv3: gpio-controller@10D10060 { | ||
396 | compatible = "samsung,exynos4-gpio"; | ||
397 | reg = <0x10D10060 0x20>; | ||
398 | #gpio-cells = <4>; | ||
399 | }; | ||
400 | |||
401 | gpv4: gpio-controller@10D10080 { | ||
402 | compatible = "samsung,exynos4-gpio"; | ||
403 | reg = <0x10D10080 0x20>; | ||
404 | #gpio-cells = <4>; | ||
405 | }; | ||
406 | |||
407 | gpz: gpio-controller@03860000 { | ||
408 | compatible = "samsung,exynos4-gpio"; | ||
409 | reg = <0x03860000 0x20>; | ||
410 | #gpio-cells = <4>; | ||
411 | }; | ||
412 | }; | ||
413 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index 8a5dff807b45..a5376b84227f 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "Globalscale Technologies Dreamplug"; | 6 | model = "Globalscale Technologies Dreamplug"; |
7 | compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | 7 | compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; |
8 | 8 | ||
9 | memory { | 9 | memory { |
10 | device_type = "memory"; | 10 | device_type = "memory"; |
@@ -15,11 +15,10 @@ | |||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | 15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | serial@f1012000 { | 18 | ocp@f1000000 { |
19 | compatible = "ns16550a"; | 19 | serial@12000 { |
20 | reg = <0xf1012000 0xff>; | 20 | clock-frequency = <200000000>; |
21 | reg-shift = <2>; | 21 | status = "ok"; |
22 | interrupts = <33>; | 22 | }; |
23 | clock-frequency = <200000000>; | ||
24 | }; | 23 | }; |
25 | }; | 24 | }; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 771c6bbeb29a..3474ef890945 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -1,6 +1,36 @@ | |||
1 | /include/ "skeleton.dtsi" | 1 | /include/ "skeleton.dtsi" |
2 | 2 | ||
3 | / { | 3 | / { |
4 | compatible = "marvell,kirkwood"; | 4 | compatible = "mrvl,kirkwood"; |
5 | }; | 5 | |
6 | ocp@f1000000 { | ||
7 | compatible = "simple-bus"; | ||
8 | ranges = <0 0xf1000000 0x1000000>; | ||
9 | #address-cells = <1>; | ||
10 | #size-cells = <1>; | ||
11 | |||
12 | serial@12000 { | ||
13 | compatible = "ns16550a"; | ||
14 | reg = <0x12000 0x100>; | ||
15 | reg-shift = <2>; | ||
16 | interrupts = <33>; | ||
17 | /* set clock-frequency in board dts */ | ||
18 | status = "disabled"; | ||
19 | }; | ||
6 | 20 | ||
21 | serial@12100 { | ||
22 | compatible = "ns16550a"; | ||
23 | reg = <0x12100 0x100>; | ||
24 | reg-shift = <2>; | ||
25 | interrupts = <34>; | ||
26 | /* set clock-frequency in board dts */ | ||
27 | status = "disabled"; | ||
28 | }; | ||
29 | |||
30 | rtc@10300 { | ||
31 | compatible = "mrvl,kirkwood-rtc", "mrvl,orion-rtc"; | ||
32 | reg = <0x10300 0x20>; | ||
33 | interrupts = <53>; | ||
34 | }; | ||
35 | }; | ||
36 | }; | ||
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts new file mode 100644 index 000000000000..359c6d679156 --- /dev/null +++ b/arch/arm/boot/dts/snowball.dts | |||
@@ -0,0 +1,139 @@ | |||
1 | /* | ||
2 | * Copyright 2011 ST-Ericsson AB | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | /include/ "db8500.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "Calao Systems Snowball platform with device tree"; | ||
17 | compatible = "calaosystems,snowball-a9500"; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x00000000 0x20000000>; | ||
21 | }; | ||
22 | |||
23 | gpio_keys { | ||
24 | compatible = "gpio-keys"; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | button@1 { | ||
29 | debounce_interval = <50>; | ||
30 | wakeup = <1>; | ||
31 | linux,code = <2>; | ||
32 | label = "userpb"; | ||
33 | gpios = <&gpio1 0>; | ||
34 | }; | ||
35 | button@2 { | ||
36 | debounce_interval = <50>; | ||
37 | wakeup = <1>; | ||
38 | linux,code = <3>; | ||
39 | label = "userpb"; | ||
40 | gpios = <&gpio4 23>; | ||
41 | }; | ||
42 | button@3 { | ||
43 | debounce_interval = <50>; | ||
44 | wakeup = <1>; | ||
45 | linux,code = <4>; | ||
46 | label = "userpb"; | ||
47 | gpios = <&gpio4 23>; | ||
48 | }; | ||
49 | button@4 { | ||
50 | debounce_interval = <50>; | ||
51 | wakeup = <1>; | ||
52 | linux,code = <5>; | ||
53 | label = "userpb"; | ||
54 | gpios = <&gpio5 1>; | ||
55 | }; | ||
56 | button@5 { | ||
57 | debounce_interval = <50>; | ||
58 | wakeup = <1>; | ||
59 | linux,code = <6>; | ||
60 | label = "userpb"; | ||
61 | gpios = <&gpio5 2>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
65 | leds { | ||
66 | compatible = "gpio-leds"; | ||
67 | used-led { | ||
68 | label = "user_led"; | ||
69 | gpios = <&gpio4 14>; | ||
70 | }; | ||
71 | }; | ||
72 | |||
73 | soc-u9500 { | ||
74 | |||
75 | external-bus@50000000 { | ||
76 | compatible = "simple-bus"; | ||
77 | reg = <0x50000000 0x10000000>; | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | ranges; | ||
81 | |||
82 | ethernet@50000000 { | ||
83 | compatible = "smsc,9111"; | ||
84 | reg = <0x50000000 0x10000>; | ||
85 | interrupts = <12>; | ||
86 | interrupt-parent = <&gpio4>; | ||
87 | }; | ||
88 | }; | ||
89 | |||
90 | sdi@80126000 { | ||
91 | status = "enabled"; | ||
92 | cd-gpios = <&gpio6 26>; | ||
93 | }; | ||
94 | |||
95 | sdi@80114000 { | ||
96 | status = "enabled"; | ||
97 | }; | ||
98 | |||
99 | uart@80120000 { | ||
100 | status = "okay"; | ||
101 | }; | ||
102 | |||
103 | uart@80121000 { | ||
104 | status = "okay"; | ||
105 | }; | ||
106 | |||
107 | uart@80007000 { | ||
108 | status = "okay"; | ||
109 | }; | ||
110 | |||
111 | i2c@80004000 { | ||
112 | tc3589x@42 { | ||
113 | //compatible = "tc3589x"; | ||
114 | reg = <0x42>; | ||
115 | interrupts = <25>; | ||
116 | interrupt-parent = <&gpio6>; | ||
117 | }; | ||
118 | tps61052@33 { | ||
119 | //compatible = "tps61052"; | ||
120 | reg = <0x33>; | ||
121 | }; | ||
122 | }; | ||
123 | |||
124 | i2c@80128000 { | ||
125 | lp5521@0x33 { | ||
126 | // compatible = "lp5521"; | ||
127 | reg = <0x33>; | ||
128 | }; | ||
129 | lp5521@0x34 { | ||
130 | // compatible = "lp5521"; | ||
131 | reg = <0x34>; | ||
132 | }; | ||
133 | bh1780@0x29 { | ||
134 | // compatible = "rohm,bh1780gli"; | ||
135 | reg = <0x33>; | ||
136 | }; | ||
137 | }; | ||
138 | }; | ||
139 | }; | ||
diff --git a/arch/arm/boot/dts/spear600-evb.dts b/arch/arm/boot/dts/spear600-evb.dts new file mode 100644 index 000000000000..636292e18c90 --- /dev/null +++ b/arch/arm/boot/dts/spear600-evb.dts | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Stefan Roese <sr@denx.de> | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | /include/ "spear600.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "ST SPEAr600 Evaluation Board"; | ||
17 | compatible = "st,spear600-evb", "st,spear600"; | ||
18 | #address-cells = <1>; | ||
19 | #size-cells = <1>; | ||
20 | |||
21 | memory { | ||
22 | device_type = "memory"; | ||
23 | reg = <0 0x10000000>; | ||
24 | }; | ||
25 | |||
26 | ahb { | ||
27 | gmac: ethernet@e0800000 { | ||
28 | phy-mode = "gmii"; | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | apb { | ||
33 | serial@d0000000 { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | |||
37 | serial@d0080000 { | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | i2c@d0200000 { | ||
42 | clock-frequency = <400000>; | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | }; | ||
46 | }; | ||
47 | }; | ||
diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi new file mode 100644 index 000000000000..ebe0885a2b98 --- /dev/null +++ b/arch/arm/boot/dts/spear600.dtsi | |||
@@ -0,0 +1,174 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Stefan Roese <sr@denx.de> | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | /include/ "skeleton.dtsi" | ||
13 | |||
14 | / { | ||
15 | compatible = "st,spear600"; | ||
16 | |||
17 | cpus { | ||
18 | cpu@0 { | ||
19 | compatible = "arm,arm926ejs"; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | memory { | ||
24 | device_type = "memory"; | ||
25 | reg = <0 0x40000000>; | ||
26 | }; | ||
27 | |||
28 | ahb { | ||
29 | #address-cells = <1>; | ||
30 | #size-cells = <1>; | ||
31 | compatible = "simple-bus"; | ||
32 | ranges = <0xd0000000 0xd0000000 0x30000000>; | ||
33 | |||
34 | vic0: interrupt-controller@f1100000 { | ||
35 | compatible = "arm,pl190-vic"; | ||
36 | interrupt-controller; | ||
37 | reg = <0xf1100000 0x1000>; | ||
38 | #interrupt-cells = <1>; | ||
39 | }; | ||
40 | |||
41 | vic1: interrupt-controller@f1000000 { | ||
42 | compatible = "arm,pl190-vic"; | ||
43 | interrupt-controller; | ||
44 | reg = <0xf1000000 0x1000>; | ||
45 | #interrupt-cells = <1>; | ||
46 | }; | ||
47 | |||
48 | gmac: ethernet@e0800000 { | ||
49 | compatible = "st,spear600-gmac"; | ||
50 | reg = <0xe0800000 0x8000>; | ||
51 | interrupt-parent = <&vic1>; | ||
52 | interrupts = <24 23>; | ||
53 | interrupt-names = "macirq", "eth_wake_irq"; | ||
54 | status = "disabled"; | ||
55 | }; | ||
56 | |||
57 | fsmc: flash@d1800000 { | ||
58 | compatible = "st,spear600-fsmc-nand"; | ||
59 | #address-cells = <1>; | ||
60 | #size-cells = <1>; | ||
61 | reg = <0xd1800000 0x1000 /* FSMC Register */ | ||
62 | 0xd2000000 0x4000>; /* NAND Base */ | ||
63 | reg-names = "fsmc_regs", "nand_data"; | ||
64 | st,ale-off = <0x20000>; | ||
65 | st,cle-off = <0x10000>; | ||
66 | status = "disabled"; | ||
67 | }; | ||
68 | |||
69 | smi: flash@fc000000 { | ||
70 | compatible = "st,spear600-smi"; | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <1>; | ||
73 | reg = <0xfc000000 0x1000>; | ||
74 | interrupt-parent = <&vic1>; | ||
75 | interrupts = <12>; | ||
76 | status = "disabled"; | ||
77 | }; | ||
78 | |||
79 | ehci@e1800000 { | ||
80 | compatible = "st,spear600-ehci", "usb-ehci"; | ||
81 | reg = <0xe1800000 0x1000>; | ||
82 | interrupt-parent = <&vic1>; | ||
83 | interrupts = <27>; | ||
84 | status = "disabled"; | ||
85 | }; | ||
86 | |||
87 | ehci@e2000000 { | ||
88 | compatible = "st,spear600-ehci", "usb-ehci"; | ||
89 | reg = <0xe2000000 0x1000>; | ||
90 | interrupt-parent = <&vic1>; | ||
91 | interrupts = <29>; | ||
92 | status = "disabled"; | ||
93 | }; | ||
94 | |||
95 | ohci@e1900000 { | ||
96 | compatible = "st,spear600-ohci", "usb-ohci"; | ||
97 | reg = <0xe1900000 0x1000>; | ||
98 | interrupt-parent = <&vic1>; | ||
99 | interrupts = <26>; | ||
100 | status = "disabled"; | ||
101 | }; | ||
102 | |||
103 | ohci@e2100000 { | ||
104 | compatible = "st,spear600-ohci", "usb-ohci"; | ||
105 | reg = <0xe2100000 0x1000>; | ||
106 | interrupt-parent = <&vic1>; | ||
107 | interrupts = <28>; | ||
108 | status = "disabled"; | ||
109 | }; | ||
110 | |||
111 | apb { | ||
112 | #address-cells = <1>; | ||
113 | #size-cells = <1>; | ||
114 | compatible = "simple-bus"; | ||
115 | ranges = <0xd0000000 0xd0000000 0x30000000>; | ||
116 | |||
117 | serial@d0000000 { | ||
118 | compatible = "arm,pl011", "arm,primecell"; | ||
119 | reg = <0xd0000000 0x1000>; | ||
120 | interrupt-parent = <&vic0>; | ||
121 | interrupts = <24>; | ||
122 | status = "disabled"; | ||
123 | }; | ||
124 | |||
125 | serial@d0080000 { | ||
126 | compatible = "arm,pl011", "arm,primecell"; | ||
127 | reg = <0xd0080000 0x1000>; | ||
128 | interrupt-parent = <&vic0>; | ||
129 | interrupts = <25>; | ||
130 | status = "disabled"; | ||
131 | }; | ||
132 | |||
133 | /* local/cpu GPIO */ | ||
134 | gpio0: gpio@f0100000 { | ||
135 | #gpio-cells = <2>; | ||
136 | compatible = "arm,pl061", "arm,primecell"; | ||
137 | gpio-controller; | ||
138 | reg = <0xf0100000 0x1000>; | ||
139 | interrupt-parent = <&vic0>; | ||
140 | interrupts = <18>; | ||
141 | }; | ||
142 | |||
143 | /* basic GPIO */ | ||
144 | gpio1: gpio@fc980000 { | ||
145 | #gpio-cells = <2>; | ||
146 | compatible = "arm,pl061", "arm,primecell"; | ||
147 | gpio-controller; | ||
148 | reg = <0xfc980000 0x1000>; | ||
149 | interrupt-parent = <&vic1>; | ||
150 | interrupts = <19>; | ||
151 | }; | ||
152 | |||
153 | /* appl GPIO */ | ||
154 | gpio2: gpio@d8100000 { | ||
155 | #gpio-cells = <2>; | ||
156 | compatible = "arm,pl061", "arm,primecell"; | ||
157 | gpio-controller; | ||
158 | reg = <0xd8100000 0x1000>; | ||
159 | interrupt-parent = <&vic1>; | ||
160 | interrupts = <4>; | ||
161 | }; | ||
162 | |||
163 | i2c@d0200000 { | ||
164 | #address-cells = <1>; | ||
165 | #size-cells = <0>; | ||
166 | compatible = "snps,designware-i2c"; | ||
167 | reg = <0xd0200000 0x1000>; | ||
168 | interrupt-parent = <&vic0>; | ||
169 | interrupts = <28>; | ||
170 | status = "disabled"; | ||
171 | }; | ||
172 | }; | ||
173 | }; | ||
174 | }; | ||
diff --git a/arch/arm/boot/dts/tegra-cardhu.dts b/arch/arm/boot/dts/tegra-cardhu.dts index 73263501f581..ac3fb7558459 100644 --- a/arch/arm/boot/dts/tegra-cardhu.dts +++ b/arch/arm/boot/dts/tegra-cardhu.dts | |||
@@ -14,6 +14,22 @@ | |||
14 | clock-frequency = < 408000000 >; | 14 | clock-frequency = < 408000000 >; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | serial@70006040 { | ||
18 | status = "disable"; | ||
19 | }; | ||
20 | |||
21 | serial@70006200 { | ||
22 | status = "disable"; | ||
23 | }; | ||
24 | |||
25 | serial@70006300 { | ||
26 | status = "disable"; | ||
27 | }; | ||
28 | |||
29 | serial@70006400 { | ||
30 | status = "disable"; | ||
31 | }; | ||
32 | |||
17 | i2c@7000c000 { | 33 | i2c@7000c000 { |
18 | clock-frequency = <100000>; | 34 | clock-frequency = <100000>; |
19 | }; | 35 | }; |
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index 876d5c92ce36..dbf1c5a171c2 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts | |||
@@ -112,6 +112,7 @@ | |||
112 | 112 | ||
113 | usb@c5000000 { | 113 | usb@c5000000 { |
114 | nvidia,vbus-gpio = <&gpio 24 0>; /* PD0 */ | 114 | nvidia,vbus-gpio = <&gpio 24 0>; /* PD0 */ |
115 | dr_mode = "otg"; | ||
115 | }; | 116 | }; |
116 | 117 | ||
117 | gpio-keys { | 118 | gpio-keys { |
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index aff8a175aa40..108e894a8926 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -190,6 +190,7 @@ | |||
190 | reg = <0xc5000000 0x4000>; | 190 | reg = <0xc5000000 0x4000>; |
191 | interrupts = < 0 20 0x04 >; | 191 | interrupts = < 0 20 0x04 >; |
192 | phy_type = "utmi"; | 192 | phy_type = "utmi"; |
193 | nvidia,has-legacy-mode; | ||
193 | }; | 194 | }; |
194 | 195 | ||
195 | usb@c5004000 { | 196 | usb@c5004000 { |
diff --git a/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi b/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi new file mode 100644 index 000000000000..ad3eca17c436 --- /dev/null +++ b/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * calao-dab-mmx.dtsi - Device Tree Include file for Calao DAB-MMX Daughter Board | ||
3 | * | ||
4 | * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | / { | ||
10 | ahb { | ||
11 | apb { | ||
12 | usart1: serial@fffb4000 { | ||
13 | status = "okay"; | ||
14 | }; | ||
15 | |||
16 | usart3: serial@fffd0000 { | ||
17 | status = "okay"; | ||
18 | }; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | i2c-gpio@0 { | ||
23 | status = "okay"; | ||
24 | }; | ||
25 | |||
26 | leds { | ||
27 | compatible = "gpio-leds"; | ||
28 | |||
29 | user_led1 { | ||
30 | label = "user_led1"; | ||
31 | gpios = <&pioB 20 1>; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * led already used by mother board but active as high | ||
36 | * user_led2 { | ||
37 | * label = "user_led2"; | ||
38 | * gpios = <&pioB 21 1>; | ||
39 | * }; | ||
40 | */ | ||
41 | user_led3 { | ||
42 | label = "user_led3"; | ||
43 | gpios = <&pioB 22 1>; | ||
44 | }; | ||
45 | |||
46 | user_led4 { | ||
47 | label = "user_led4"; | ||
48 | gpios = <&pioB 23 1>; | ||
49 | }; | ||
50 | |||
51 | red { | ||
52 | label = "red"; | ||
53 | gpios = <&pioB 24 1>; | ||
54 | }; | ||
55 | |||
56 | orange { | ||
57 | label = "orange"; | ||
58 | gpios = <&pioB 30 1>; | ||
59 | }; | ||
60 | |||
61 | green { | ||
62 | label = "green"; | ||
63 | gpios = <&pioB 31 1>; | ||
64 | }; | ||
65 | }; | ||
66 | |||
67 | gpio_keys { | ||
68 | compatible = "gpio-keys"; | ||
69 | #address-cells = <1>; | ||
70 | #size-cells = <0>; | ||
71 | |||
72 | user_pb1 { | ||
73 | label = "user_pb1"; | ||
74 | gpios = <&pioB 25 1>; | ||
75 | linux,code = <0x100>; | ||
76 | }; | ||
77 | |||
78 | user_pb2 { | ||
79 | label = "user_pb2"; | ||
80 | gpios = <&pioB 13 1>; | ||
81 | linux,code = <0x101>; | ||
82 | }; | ||
83 | |||
84 | user_pb3 { | ||
85 | label = "user_pb3"; | ||
86 | gpios = <&pioA 26 1>; | ||
87 | linux,code = <0x102>; | ||
88 | }; | ||
89 | |||
90 | user_pb4 { | ||
91 | label = "user_pb4"; | ||
92 | gpios = <&pioC 9 1>; | ||
93 | linux,code = <0x103>; | ||
94 | }; | ||
95 | }; | ||
96 | }; | ||
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts index d74545a2a77c..3b3c4e0fa79f 100644 --- a/arch/arm/boot/dts/usb_a9g20.dts +++ b/arch/arm/boot/dts/usb_a9g20.dts | |||
@@ -13,13 +13,24 @@ | |||
13 | compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9"; | 13 | compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9"; |
14 | 14 | ||
15 | chosen { | 15 | chosen { |
16 | bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) root=/dev/mtdblock5 rw rootfstype=ubifs"; | 16 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | memory@20000000 { | 19 | memory@20000000 { |
20 | reg = <0x20000000 0x4000000>; | 20 | reg = <0x20000000 0x4000000>; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | clocks { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | ranges; | ||
27 | |||
28 | main_clock: clock@0 { | ||
29 | compatible = "atmel,osc", "fixed-clock"; | ||
30 | clock-frequency = <12000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
23 | ahb { | 34 | ahb { |
24 | apb { | 35 | apb { |
25 | dbgu: serial@fffff200 { | 36 | dbgu: serial@fffff200 { |
@@ -30,6 +41,58 @@ | |||
30 | phy-mode = "rmii"; | 41 | phy-mode = "rmii"; |
31 | status = "okay"; | 42 | status = "okay"; |
32 | }; | 43 | }; |
44 | |||
45 | usb1: gadget@fffa4000 { | ||
46 | atmel,vbus-gpio = <&pioC 5 0>; | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | nand0: nand@40000000 { | ||
52 | nand-bus-width = <8>; | ||
53 | nand-ecc-mode = "soft"; | ||
54 | nand-on-flash-bbt; | ||
55 | status = "okay"; | ||
56 | |||
57 | at91bootstrap@0 { | ||
58 | label = "at91bootstrap"; | ||
59 | reg = <0x0 0x20000>; | ||
60 | }; | ||
61 | |||
62 | barebox@20000 { | ||
63 | label = "barebox"; | ||
64 | reg = <0x20000 0x40000>; | ||
65 | }; | ||
66 | |||
67 | bareboxenv@60000 { | ||
68 | label = "bareboxenv"; | ||
69 | reg = <0x60000 0x20000>; | ||
70 | }; | ||
71 | |||
72 | bareboxenv2@80000 { | ||
73 | label = "bareboxenv2"; | ||
74 | reg = <0x80000 0x20000>; | ||
75 | }; | ||
76 | |||
77 | kernel@a0000 { | ||
78 | label = "kernel"; | ||
79 | reg = <0xa0000 0x400000>; | ||
80 | }; | ||
81 | |||
82 | rootfs@4a0000 { | ||
83 | label = "rootfs"; | ||
84 | reg = <0x4a0000 0x7800000>; | ||
85 | }; | ||
86 | |||
87 | data@7ca0000 { | ||
88 | label = "data"; | ||
89 | reg = <0x7ca0000 0x8360000>; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | usb0: ohci@00500000 { | ||
94 | num-ports = <2>; | ||
95 | status = "okay"; | ||
33 | }; | 96 | }; |
34 | }; | 97 | }; |
35 | 98 | ||
@@ -55,4 +118,13 @@ | |||
55 | gpio-key,wakeup; | 118 | gpio-key,wakeup; |
56 | }; | 119 | }; |
57 | }; | 120 | }; |
121 | |||
122 | i2c@0 { | ||
123 | status = "okay"; | ||
124 | |||
125 | rv3029c2@56 { | ||
126 | compatible = "rv3029c2"; | ||
127 | reg = <0x56>; | ||
128 | }; | ||
129 | }; | ||
58 | }; | 130 | }; |
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c index 67dd2affc57a..1171a5010aea 100644 --- a/arch/arm/common/via82c505.c +++ b/arch/arm/common/via82c505.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <linux/ioport.h> | 6 | #include <linux/ioport.h> |
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | 8 | ||
9 | #include <asm/system.h> | ||
10 | 9 | ||
11 | #include <asm/mach/pci.h> | 10 | #include <asm/mach/pci.h> |
12 | 11 | ||
diff --git a/arch/arm/configs/at91sam9g20_defconfig b/arch/arm/configs/at91sam9g20_defconfig index 9123568d9a8d..994d331b2319 100644 --- a/arch/arm/configs/at91sam9g20_defconfig +++ b/arch/arm/configs/at91sam9g20_defconfig | |||
@@ -74,6 +74,8 @@ CONFIG_LEGACY_PTY_COUNT=16 | |||
74 | CONFIG_SERIAL_ATMEL=y | 74 | CONFIG_SERIAL_ATMEL=y |
75 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 75 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
76 | CONFIG_HW_RANDOM=y | 76 | CONFIG_HW_RANDOM=y |
77 | CONFIG_I2C=y | ||
78 | CONFIG_I2C_GPIO=y | ||
77 | CONFIG_SPI=y | 79 | CONFIG_SPI=y |
78 | CONFIG_SPI_ATMEL=y | 80 | CONFIG_SPI_ATMEL=y |
79 | CONFIG_SPI_SPIDEV=y | 81 | CONFIG_SPI_SPIDEV=y |
@@ -105,6 +107,7 @@ CONFIG_LEDS_TRIGGERS=y | |||
105 | CONFIG_LEDS_TRIGGER_TIMER=y | 107 | CONFIG_LEDS_TRIGGER_TIMER=y |
106 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 108 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
107 | CONFIG_RTC_CLASS=y | 109 | CONFIG_RTC_CLASS=y |
110 | CONFIG_RTC_DRV_RV3029C2=y | ||
108 | CONFIG_RTC_DRV_AT91SAM9=y | 111 | CONFIG_RTC_DRV_AT91SAM9=y |
109 | CONFIG_EXT2_FS=y | 112 | CONFIG_EXT2_FS=y |
110 | CONFIG_MSDOS_FS=y | 113 | CONFIG_MSDOS_FS=y |
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index 2d7b6e7b7271..889d73ac1ae1 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
@@ -13,6 +13,7 @@ CONFIG_UX500_SOC_DB8500=y | |||
13 | CONFIG_MACH_HREFV60=y | 13 | CONFIG_MACH_HREFV60=y |
14 | CONFIG_MACH_SNOWBALL=y | 14 | CONFIG_MACH_SNOWBALL=y |
15 | CONFIG_MACH_U5500=y | 15 | CONFIG_MACH_U5500=y |
16 | CONFIG_MACH_UX500_DT=y | ||
16 | CONFIG_NO_HZ=y | 17 | CONFIG_NO_HZ=y |
17 | CONFIG_HIGH_RES_TIMERS=y | 18 | CONFIG_HIGH_RES_TIMERS=y |
18 | CONFIG_SMP=y | 19 | CONFIG_SMP=y |
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index 86976d034382..68374ba6a943 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h | |||
@@ -13,7 +13,9 @@ | |||
13 | 13 | ||
14 | #include <linux/compiler.h> | 14 | #include <linux/compiler.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <asm/system.h> | 16 | #include <linux/irqflags.h> |
17 | #include <asm/barrier.h> | ||
18 | #include <asm/cmpxchg.h> | ||
17 | 19 | ||
18 | #define ATOMIC_INIT(i) { (i) } | 20 | #define ATOMIC_INIT(i) { (i) } |
19 | 21 | ||
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h new file mode 100644 index 000000000000..44f4a09ff37b --- /dev/null +++ b/arch/arm/include/asm/barrier.h | |||
@@ -0,0 +1,69 @@ | |||
1 | #ifndef __ASM_BARRIER_H | ||
2 | #define __ASM_BARRIER_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
7 | |||
8 | #if __LINUX_ARM_ARCH__ >= 7 || \ | ||
9 | (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) | ||
10 | #define sev() __asm__ __volatile__ ("sev" : : : "memory") | ||
11 | #define wfe() __asm__ __volatile__ ("wfe" : : : "memory") | ||
12 | #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") | ||
13 | #endif | ||
14 | |||
15 | #if __LINUX_ARM_ARCH__ >= 7 | ||
16 | #define isb() __asm__ __volatile__ ("isb" : : : "memory") | ||
17 | #define dsb() __asm__ __volatile__ ("dsb" : : : "memory") | ||
18 | #define dmb() __asm__ __volatile__ ("dmb" : : : "memory") | ||
19 | #elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 | ||
20 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
21 | : : "r" (0) : "memory") | ||
22 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
23 | : : "r" (0) : "memory") | ||
24 | #define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | ||
25 | : : "r" (0) : "memory") | ||
26 | #elif defined(CONFIG_CPU_FA526) | ||
27 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
28 | : : "r" (0) : "memory") | ||
29 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
30 | : : "r" (0) : "memory") | ||
31 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
32 | #else | ||
33 | #define isb() __asm__ __volatile__ ("" : : : "memory") | ||
34 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
35 | : : "r" (0) : "memory") | ||
36 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
37 | #endif | ||
38 | |||
39 | #ifdef CONFIG_ARCH_HAS_BARRIERS | ||
40 | #include <mach/barriers.h> | ||
41 | #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) | ||
42 | #include <asm/outercache.h> | ||
43 | #define mb() do { dsb(); outer_sync(); } while (0) | ||
44 | #define rmb() dsb() | ||
45 | #define wmb() mb() | ||
46 | #else | ||
47 | #include <asm/memory.h> | ||
48 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
49 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
50 | #define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
51 | #endif | ||
52 | |||
53 | #ifndef CONFIG_SMP | ||
54 | #define smp_mb() barrier() | ||
55 | #define smp_rmb() barrier() | ||
56 | #define smp_wmb() barrier() | ||
57 | #else | ||
58 | #define smp_mb() dmb() | ||
59 | #define smp_rmb() dmb() | ||
60 | #define smp_wmb() dmb() | ||
61 | #endif | ||
62 | |||
63 | #define read_barrier_depends() do { } while(0) | ||
64 | #define smp_read_barrier_depends() do { } while(0) | ||
65 | |||
66 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | ||
67 | |||
68 | #endif /* !__ASSEMBLY__ */ | ||
69 | #endif /* __ASM_BARRIER_H */ | ||
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h index f7419ef9c8f9..e691ec91e4d3 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
27 | #include <asm/system.h> | 27 | #include <linux/irqflags.h> |
28 | 28 | ||
29 | #define smp_mb__before_clear_bit() smp_mb() | 29 | #define smp_mb__before_clear_bit() smp_mb() |
30 | #define smp_mb__after_clear_bit() smp_mb() | 30 | #define smp_mb__after_clear_bit() smp_mb() |
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index fac79dceb736..7af5c6c3653a 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASMARM_BUG_H | 1 | #ifndef _ASMARM_BUG_H |
2 | #define _ASMARM_BUG_H | 2 | #define _ASMARM_BUG_H |
3 | 3 | ||
4 | #include <linux/linkage.h> | ||
4 | 5 | ||
5 | #ifdef CONFIG_BUG | 6 | #ifdef CONFIG_BUG |
6 | 7 | ||
@@ -57,4 +58,33 @@ do { \ | |||
57 | 58 | ||
58 | #include <asm-generic/bug.h> | 59 | #include <asm-generic/bug.h> |
59 | 60 | ||
61 | struct pt_regs; | ||
62 | void die(const char *msg, struct pt_regs *regs, int err); | ||
63 | |||
64 | struct siginfo; | ||
65 | void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, | ||
66 | unsigned long err, unsigned long trap); | ||
67 | |||
68 | #ifdef CONFIG_ARM_LPAE | ||
69 | #define FAULT_CODE_ALIGNMENT 33 | ||
70 | #define FAULT_CODE_DEBUG 34 | ||
71 | #else | ||
72 | #define FAULT_CODE_ALIGNMENT 1 | ||
73 | #define FAULT_CODE_DEBUG 2 | ||
74 | #endif | ||
75 | |||
76 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | ||
77 | struct pt_regs *), | ||
78 | int sig, int code, const char *name); | ||
79 | |||
80 | void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, | ||
81 | struct pt_regs *), | ||
82 | int sig, int code, const char *name); | ||
83 | |||
84 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); | ||
85 | |||
86 | struct mm_struct; | ||
87 | extern void show_pte(struct mm_struct *mm, unsigned long addr); | ||
88 | extern void __show_regs(struct pt_regs *); | ||
89 | |||
60 | #endif | 90 | #endif |
diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h new file mode 100644 index 000000000000..d41d7cbf0ada --- /dev/null +++ b/arch/arm/include/asm/cmpxchg.h | |||
@@ -0,0 +1,295 @@ | |||
1 | #ifndef __ASM_ARM_CMPXCHG_H | ||
2 | #define __ASM_ARM_CMPXCHG_H | ||
3 | |||
4 | #include <linux/irqflags.h> | ||
5 | #include <asm/barrier.h> | ||
6 | |||
7 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) | ||
8 | /* | ||
9 | * On the StrongARM, "swp" is terminally broken since it bypasses the | ||
10 | * cache totally. This means that the cache becomes inconsistent, and, | ||
11 | * since we use normal loads/stores as well, this is really bad. | ||
12 | * Typically, this causes oopsen in filp_close, but could have other, | ||
13 | * more disastrous effects. There are two work-arounds: | ||
14 | * 1. Disable interrupts and emulate the atomic swap | ||
15 | * 2. Clean the cache, perform atomic swap, flush the cache | ||
16 | * | ||
17 | * We choose (1) since its the "easiest" to achieve here and is not | ||
18 | * dependent on the processor type. | ||
19 | * | ||
20 | * NOTE that this solution won't work on an SMP system, so explcitly | ||
21 | * forbid it here. | ||
22 | */ | ||
23 | #define swp_is_buggy | ||
24 | #endif | ||
25 | |||
26 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | ||
27 | { | ||
28 | extern void __bad_xchg(volatile void *, int); | ||
29 | unsigned long ret; | ||
30 | #ifdef swp_is_buggy | ||
31 | unsigned long flags; | ||
32 | #endif | ||
33 | #if __LINUX_ARM_ARCH__ >= 6 | ||
34 | unsigned int tmp; | ||
35 | #endif | ||
36 | |||
37 | smp_mb(); | ||
38 | |||
39 | switch (size) { | ||
40 | #if __LINUX_ARM_ARCH__ >= 6 | ||
41 | case 1: | ||
42 | asm volatile("@ __xchg1\n" | ||
43 | "1: ldrexb %0, [%3]\n" | ||
44 | " strexb %1, %2, [%3]\n" | ||
45 | " teq %1, #0\n" | ||
46 | " bne 1b" | ||
47 | : "=&r" (ret), "=&r" (tmp) | ||
48 | : "r" (x), "r" (ptr) | ||
49 | : "memory", "cc"); | ||
50 | break; | ||
51 | case 4: | ||
52 | asm volatile("@ __xchg4\n" | ||
53 | "1: ldrex %0, [%3]\n" | ||
54 | " strex %1, %2, [%3]\n" | ||
55 | " teq %1, #0\n" | ||
56 | " bne 1b" | ||
57 | : "=&r" (ret), "=&r" (tmp) | ||
58 | : "r" (x), "r" (ptr) | ||
59 | : "memory", "cc"); | ||
60 | break; | ||
61 | #elif defined(swp_is_buggy) | ||
62 | #ifdef CONFIG_SMP | ||
63 | #error SMP is not supported on this platform | ||
64 | #endif | ||
65 | case 1: | ||
66 | raw_local_irq_save(flags); | ||
67 | ret = *(volatile unsigned char *)ptr; | ||
68 | *(volatile unsigned char *)ptr = x; | ||
69 | raw_local_irq_restore(flags); | ||
70 | break; | ||
71 | |||
72 | case 4: | ||
73 | raw_local_irq_save(flags); | ||
74 | ret = *(volatile unsigned long *)ptr; | ||
75 | *(volatile unsigned long *)ptr = x; | ||
76 | raw_local_irq_restore(flags); | ||
77 | break; | ||
78 | #else | ||
79 | case 1: | ||
80 | asm volatile("@ __xchg1\n" | ||
81 | " swpb %0, %1, [%2]" | ||
82 | : "=&r" (ret) | ||
83 | : "r" (x), "r" (ptr) | ||
84 | : "memory", "cc"); | ||
85 | break; | ||
86 | case 4: | ||
87 | asm volatile("@ __xchg4\n" | ||
88 | " swp %0, %1, [%2]" | ||
89 | : "=&r" (ret) | ||
90 | : "r" (x), "r" (ptr) | ||
91 | : "memory", "cc"); | ||
92 | break; | ||
93 | #endif | ||
94 | default: | ||
95 | __bad_xchg(ptr, size), ret = 0; | ||
96 | break; | ||
97 | } | ||
98 | smp_mb(); | ||
99 | |||
100 | return ret; | ||
101 | } | ||
102 | |||
103 | #define xchg(ptr,x) \ | ||
104 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | ||
105 | |||
106 | #include <asm-generic/cmpxchg-local.h> | ||
107 | |||
108 | #if __LINUX_ARM_ARCH__ < 6 | ||
109 | /* min ARCH < ARMv6 */ | ||
110 | |||
111 | #ifdef CONFIG_SMP | ||
112 | #error "SMP is not supported on this platform" | ||
113 | #endif | ||
114 | |||
115 | /* | ||
116 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
117 | * them available. | ||
118 | */ | ||
119 | #define cmpxchg_local(ptr, o, n) \ | ||
120 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
121 | (unsigned long)(n), sizeof(*(ptr)))) | ||
122 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
123 | |||
124 | #ifndef CONFIG_SMP | ||
125 | #include <asm-generic/cmpxchg.h> | ||
126 | #endif | ||
127 | |||
128 | #else /* min ARCH >= ARMv6 */ | ||
129 | |||
130 | extern void __bad_cmpxchg(volatile void *ptr, int size); | ||
131 | |||
132 | /* | ||
133 | * cmpxchg only support 32-bits operands on ARMv6. | ||
134 | */ | ||
135 | |||
136 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | ||
137 | unsigned long new, int size) | ||
138 | { | ||
139 | unsigned long oldval, res; | ||
140 | |||
141 | switch (size) { | ||
142 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ | ||
143 | case 1: | ||
144 | do { | ||
145 | asm volatile("@ __cmpxchg1\n" | ||
146 | " ldrexb %1, [%2]\n" | ||
147 | " mov %0, #0\n" | ||
148 | " teq %1, %3\n" | ||
149 | " strexbeq %0, %4, [%2]\n" | ||
150 | : "=&r" (res), "=&r" (oldval) | ||
151 | : "r" (ptr), "Ir" (old), "r" (new) | ||
152 | : "memory", "cc"); | ||
153 | } while (res); | ||
154 | break; | ||
155 | case 2: | ||
156 | do { | ||
157 | asm volatile("@ __cmpxchg1\n" | ||
158 | " ldrexh %1, [%2]\n" | ||
159 | " mov %0, #0\n" | ||
160 | " teq %1, %3\n" | ||
161 | " strexheq %0, %4, [%2]\n" | ||
162 | : "=&r" (res), "=&r" (oldval) | ||
163 | : "r" (ptr), "Ir" (old), "r" (new) | ||
164 | : "memory", "cc"); | ||
165 | } while (res); | ||
166 | break; | ||
167 | #endif | ||
168 | case 4: | ||
169 | do { | ||
170 | asm volatile("@ __cmpxchg4\n" | ||
171 | " ldrex %1, [%2]\n" | ||
172 | " mov %0, #0\n" | ||
173 | " teq %1, %3\n" | ||
174 | " strexeq %0, %4, [%2]\n" | ||
175 | : "=&r" (res), "=&r" (oldval) | ||
176 | : "r" (ptr), "Ir" (old), "r" (new) | ||
177 | : "memory", "cc"); | ||
178 | } while (res); | ||
179 | break; | ||
180 | default: | ||
181 | __bad_cmpxchg(ptr, size); | ||
182 | oldval = 0; | ||
183 | } | ||
184 | |||
185 | return oldval; | ||
186 | } | ||
187 | |||
188 | static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, | ||
189 | unsigned long new, int size) | ||
190 | { | ||
191 | unsigned long ret; | ||
192 | |||
193 | smp_mb(); | ||
194 | ret = __cmpxchg(ptr, old, new, size); | ||
195 | smp_mb(); | ||
196 | |||
197 | return ret; | ||
198 | } | ||
199 | |||
200 | #define cmpxchg(ptr,o,n) \ | ||
201 | ((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \ | ||
202 | (unsigned long)(o), \ | ||
203 | (unsigned long)(n), \ | ||
204 | sizeof(*(ptr)))) | ||
205 | |||
206 | static inline unsigned long __cmpxchg_local(volatile void *ptr, | ||
207 | unsigned long old, | ||
208 | unsigned long new, int size) | ||
209 | { | ||
210 | unsigned long ret; | ||
211 | |||
212 | switch (size) { | ||
213 | #ifdef CONFIG_CPU_V6 /* min ARCH == ARMv6 */ | ||
214 | case 1: | ||
215 | case 2: | ||
216 | ret = __cmpxchg_local_generic(ptr, old, new, size); | ||
217 | break; | ||
218 | #endif | ||
219 | default: | ||
220 | ret = __cmpxchg(ptr, old, new, size); | ||
221 | } | ||
222 | |||
223 | return ret; | ||
224 | } | ||
225 | |||
226 | #define cmpxchg_local(ptr,o,n) \ | ||
227 | ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \ | ||
228 | (unsigned long)(o), \ | ||
229 | (unsigned long)(n), \ | ||
230 | sizeof(*(ptr)))) | ||
231 | |||
232 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ | ||
233 | |||
234 | /* | ||
235 | * Note : ARMv7-M (currently unsupported by Linux) does not support | ||
236 | * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should | ||
237 | * not be allowed to use __cmpxchg64. | ||
238 | */ | ||
239 | static inline unsigned long long __cmpxchg64(volatile void *ptr, | ||
240 | unsigned long long old, | ||
241 | unsigned long long new) | ||
242 | { | ||
243 | register unsigned long long oldval asm("r0"); | ||
244 | register unsigned long long __old asm("r2") = old; | ||
245 | register unsigned long long __new asm("r4") = new; | ||
246 | unsigned long res; | ||
247 | |||
248 | do { | ||
249 | asm volatile( | ||
250 | " @ __cmpxchg8\n" | ||
251 | " ldrexd %1, %H1, [%2]\n" | ||
252 | " mov %0, #0\n" | ||
253 | " teq %1, %3\n" | ||
254 | " teqeq %H1, %H3\n" | ||
255 | " strexdeq %0, %4, %H4, [%2]\n" | ||
256 | : "=&r" (res), "=&r" (oldval) | ||
257 | : "r" (ptr), "Ir" (__old), "r" (__new) | ||
258 | : "memory", "cc"); | ||
259 | } while (res); | ||
260 | |||
261 | return oldval; | ||
262 | } | ||
263 | |||
264 | static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, | ||
265 | unsigned long long old, | ||
266 | unsigned long long new) | ||
267 | { | ||
268 | unsigned long long ret; | ||
269 | |||
270 | smp_mb(); | ||
271 | ret = __cmpxchg64(ptr, old, new); | ||
272 | smp_mb(); | ||
273 | |||
274 | return ret; | ||
275 | } | ||
276 | |||
277 | #define cmpxchg64(ptr,o,n) \ | ||
278 | ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ | ||
279 | (unsigned long long)(o), \ | ||
280 | (unsigned long long)(n))) | ||
281 | |||
282 | #define cmpxchg64_local(ptr,o,n) \ | ||
283 | ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ | ||
284 | (unsigned long long)(o), \ | ||
285 | (unsigned long long)(n))) | ||
286 | |||
287 | #else /* min ARCH = ARMv6 */ | ||
288 | |||
289 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
290 | |||
291 | #endif | ||
292 | |||
293 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | ||
294 | |||
295 | #endif /* __ASM_ARM_CMPXCHG_H */ | ||
diff --git a/arch/arm/include/asm/compiler.h b/arch/arm/include/asm/compiler.h new file mode 100644 index 000000000000..8155db2f7fa1 --- /dev/null +++ b/arch/arm/include/asm/compiler.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __ASM_ARM_COMPILER_H | ||
2 | #define __ASM_ARM_COMPILER_H | ||
3 | |||
4 | /* | ||
5 | * This is used to ensure the compiler did actually allocate the register we | ||
6 | * asked it for some inline assembly sequences. Apparently we can't trust | ||
7 | * the compiler from one version to another so a bit of paranoia won't hurt. | ||
8 | * This string is meant to be concatenated with the inline asm string and | ||
9 | * will cause compilation to stop on mismatch. | ||
10 | * (for details, see gcc PR 15089) | ||
11 | */ | ||
12 | #define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t" | ||
13 | |||
14 | |||
15 | #endif /* __ASM_ARM_COMPILER_H */ | ||
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h new file mode 100644 index 000000000000..5ef4d8015a60 --- /dev/null +++ b/arch/arm/include/asm/cp15.h | |||
@@ -0,0 +1,87 @@ | |||
1 | #ifndef __ASM_ARM_CP15_H | ||
2 | #define __ASM_ARM_CP15_H | ||
3 | |||
4 | #include <asm/barrier.h> | ||
5 | |||
6 | /* | ||
7 | * CR1 bits (CP#15 CR1) | ||
8 | */ | ||
9 | #define CR_M (1 << 0) /* MMU enable */ | ||
10 | #define CR_A (1 << 1) /* Alignment abort enable */ | ||
11 | #define CR_C (1 << 2) /* Dcache enable */ | ||
12 | #define CR_W (1 << 3) /* Write buffer enable */ | ||
13 | #define CR_P (1 << 4) /* 32-bit exception handler */ | ||
14 | #define CR_D (1 << 5) /* 32-bit data address range */ | ||
15 | #define CR_L (1 << 6) /* Implementation defined */ | ||
16 | #define CR_B (1 << 7) /* Big endian */ | ||
17 | #define CR_S (1 << 8) /* System MMU protection */ | ||
18 | #define CR_R (1 << 9) /* ROM MMU protection */ | ||
19 | #define CR_F (1 << 10) /* Implementation defined */ | ||
20 | #define CR_Z (1 << 11) /* Implementation defined */ | ||
21 | #define CR_I (1 << 12) /* Icache enable */ | ||
22 | #define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ | ||
23 | #define CR_RR (1 << 14) /* Round Robin cache replacement */ | ||
24 | #define CR_L4 (1 << 15) /* LDR pc can set T bit */ | ||
25 | #define CR_DT (1 << 16) | ||
26 | #define CR_IT (1 << 18) | ||
27 | #define CR_ST (1 << 19) | ||
28 | #define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */ | ||
29 | #define CR_U (1 << 22) /* Unaligned access operation */ | ||
30 | #define CR_XP (1 << 23) /* Extended page tables */ | ||
31 | #define CR_VE (1 << 24) /* Vectored interrupts */ | ||
32 | #define CR_EE (1 << 25) /* Exception (Big) Endian */ | ||
33 | #define CR_TRE (1 << 28) /* TEX remap enable */ | ||
34 | #define CR_AFE (1 << 29) /* Access flag enable */ | ||
35 | #define CR_TE (1 << 30) /* Thumb exception enable */ | ||
36 | |||
37 | #ifndef __ASSEMBLY__ | ||
38 | |||
39 | #if __LINUX_ARM_ARCH__ >= 4 | ||
40 | #define vectors_high() (cr_alignment & CR_V) | ||
41 | #else | ||
42 | #define vectors_high() (0) | ||
43 | #endif | ||
44 | |||
45 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | ||
46 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ | ||
47 | |||
48 | static inline unsigned int get_cr(void) | ||
49 | { | ||
50 | unsigned int val; | ||
51 | asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); | ||
52 | return val; | ||
53 | } | ||
54 | |||
55 | static inline void set_cr(unsigned int val) | ||
56 | { | ||
57 | asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" | ||
58 | : : "r" (val) : "cc"); | ||
59 | isb(); | ||
60 | } | ||
61 | |||
62 | #ifndef CONFIG_SMP | ||
63 | extern void adjust_cr(unsigned long mask, unsigned long set); | ||
64 | #endif | ||
65 | |||
66 | #define CPACC_FULL(n) (3 << (n * 2)) | ||
67 | #define CPACC_SVC(n) (1 << (n * 2)) | ||
68 | #define CPACC_DISABLE(n) (0 << (n * 2)) | ||
69 | |||
70 | static inline unsigned int get_copro_access(void) | ||
71 | { | ||
72 | unsigned int val; | ||
73 | asm("mrc p15, 0, %0, c1, c0, 2 @ get copro access" | ||
74 | : "=r" (val) : : "cc"); | ||
75 | return val; | ||
76 | } | ||
77 | |||
78 | static inline void set_copro_access(unsigned int val) | ||
79 | { | ||
80 | asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" | ||
81 | : : "r" (val) : "cc"); | ||
82 | isb(); | ||
83 | } | ||
84 | |||
85 | #endif | ||
86 | |||
87 | #endif | ||
diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h index d3f0a9eee9f6..fe92ccf1d0b0 100644 --- a/arch/arm/include/asm/div64.h +++ b/arch/arm/include/asm/div64.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef __ASM_ARM_DIV64 | 1 | #ifndef __ASM_ARM_DIV64 |
2 | #define __ASM_ARM_DIV64 | 2 | #define __ASM_ARM_DIV64 |
3 | 3 | ||
4 | #include <asm/system.h> | ||
5 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/compiler.h> | ||
6 | 6 | ||
7 | /* | 7 | /* |
8 | * The semantics of do_div() are: | 8 | * The semantics of do_div() are: |
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 69a5b0b6455c..5694a0d6576b 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -19,7 +19,6 @@ | |||
19 | * It should not be re-used except for that purpose. | 19 | * It should not be re-used except for that purpose. |
20 | */ | 20 | */ |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <asm/system.h> | ||
23 | #include <asm/scatterlist.h> | 22 | #include <asm/scatterlist.h> |
24 | 23 | ||
25 | #include <mach/isa-dma.h> | 24 | #include <mach/isa-dma.h> |
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index b5dc173d336f..3d2220498abc 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h | |||
@@ -10,6 +10,10 @@ | |||
10 | #ifndef __ASM_PROC_DOMAIN_H | 10 | #ifndef __ASM_PROC_DOMAIN_H |
11 | #define __ASM_PROC_DOMAIN_H | 11 | #define __ASM_PROC_DOMAIN_H |
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | ||
14 | #include <asm/barrier.h> | ||
15 | #endif | ||
16 | |||
13 | /* | 17 | /* |
14 | * Domain numbers | 18 | * Domain numbers |
15 | * | 19 | * |
diff --git a/arch/arm/include/asm/exec.h b/arch/arm/include/asm/exec.h new file mode 100644 index 000000000000..7c4fbef72b3a --- /dev/null +++ b/arch/arm/include/asm/exec.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_ARM_EXEC_H | ||
2 | #define __ASM_ARM_EXEC_H | ||
3 | |||
4 | #define arch_align_stack(x) (x) | ||
5 | |||
6 | #endif /* __ASM_ARM_EXEC_H */ | ||
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 077c32326c63..2ff2c75a4639 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h | |||
@@ -231,6 +231,9 @@ extern int iop3xx_get_init_atu(void); | |||
231 | 231 | ||
232 | 232 | ||
233 | #ifndef __ASSEMBLY__ | 233 | #ifndef __ASSEMBLY__ |
234 | |||
235 | #include <linux/types.h> | ||
236 | |||
234 | void iop3xx_map_io(void); | 237 | void iop3xx_map_io(void); |
235 | void iop_init_cp6_handler(void); | 238 | void iop_init_cp6_handler(void); |
236 | void iop_init_time(unsigned long tickrate); | 239 | void iop_init_time(unsigned long tickrate); |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 9275828feb3d..bae7eb6011d2 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <asm/byteorder.h> | 27 | #include <asm/byteorder.h> |
28 | #include <asm/memory.h> | 28 | #include <asm/memory.h> |
29 | #include <asm/system.h> | ||
30 | #include <asm-generic/pci_iomap.h> | 29 | #include <asm-generic/pci_iomap.h> |
31 | 30 | ||
32 | /* | 31 | /* |
@@ -99,6 +98,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
99 | 98 | ||
100 | /* IO barriers */ | 99 | /* IO barriers */ |
101 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE | 100 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE |
101 | #include <asm/barrier.h> | ||
102 | #define __iormb() rmb() | 102 | #define __iormb() rmb() |
103 | #define __iowmb() wmb() | 103 | #define __iowmb() wmb() |
104 | #else | 104 | #else |
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index 14965658a923..b8e580a297e4 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
@@ -34,4 +34,11 @@ typedef struct { | |||
34 | 34 | ||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* | ||
38 | * switch_mm() may do a full cache flush over the context switch, | ||
39 | * so enable interrupts over the context switch to avoid high | ||
40 | * latency. | ||
41 | */ | ||
42 | #define __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
43 | |||
37 | #endif | 44 | #endif |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index cb8d638924fd..f4d7f56ee51f 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/hw_breakpoint.h> | 22 | #include <asm/hw_breakpoint.h> |
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | #include <asm/system.h> | ||
26 | 25 | ||
27 | #ifdef __KERNEL__ | 26 | #ifdef __KERNEL__ |
28 | #define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ | 27 | #define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ |
@@ -90,6 +89,8 @@ unsigned long get_wchan(struct task_struct *p); | |||
90 | #define cpu_relax() barrier() | 89 | #define cpu_relax() barrier() |
91 | #endif | 90 | #endif |
92 | 91 | ||
92 | void cpu_idle_wait(void); | ||
93 | |||
93 | /* | 94 | /* |
94 | * Create a new kernel thread | 95 | * Create a new kernel thread |
95 | */ | 96 | */ |
diff --git a/arch/arm/include/asm/switch_to.h b/arch/arm/include/asm/switch_to.h new file mode 100644 index 000000000000..fa09e6b49bf1 --- /dev/null +++ b/arch/arm/include/asm/switch_to.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __ASM_ARM_SWITCH_TO_H | ||
2 | #define __ASM_ARM_SWITCH_TO_H | ||
3 | |||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | /* | ||
7 | * switch_to(prev, next) should switch from task `prev' to `next' | ||
8 | * `prev' will never be the same as `next'. schedule() itself | ||
9 | * contains the memory barrier to tell GCC not to cache `current'. | ||
10 | */ | ||
11 | extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *); | ||
12 | |||
13 | #define switch_to(prev,next,last) \ | ||
14 | do { \ | ||
15 | last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ | ||
16 | } while (0) | ||
17 | |||
18 | #endif /* __ASM_ARM_SWITCH_TO_H */ | ||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 424aa458c487..74542c52f9be 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -1,544 +1,8 @@ | |||
1 | #ifndef __ASM_ARM_SYSTEM_H | 1 | /* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */ |
2 | #define __ASM_ARM_SYSTEM_H | 2 | #include <asm/barrier.h> |
3 | 3 | #include <asm/compiler.h> | |
4 | #ifdef __KERNEL__ | 4 | #include <asm/cmpxchg.h> |
5 | 5 | #include <asm/exec.h> | |
6 | #define CPU_ARCH_UNKNOWN 0 | 6 | #include <asm/switch_to.h> |
7 | #define CPU_ARCH_ARMv3 1 | 7 | #include <asm/system_info.h> |
8 | #define CPU_ARCH_ARMv4 2 | 8 | #include <asm/system_misc.h> |
9 | #define CPU_ARCH_ARMv4T 3 | ||
10 | #define CPU_ARCH_ARMv5 4 | ||
11 | #define CPU_ARCH_ARMv5T 5 | ||
12 | #define CPU_ARCH_ARMv5TE 6 | ||
13 | #define CPU_ARCH_ARMv5TEJ 7 | ||
14 | #define CPU_ARCH_ARMv6 8 | ||
15 | #define CPU_ARCH_ARMv7 9 | ||
16 | |||
17 | /* | ||
18 | * CR1 bits (CP#15 CR1) | ||
19 | */ | ||
20 | #define CR_M (1 << 0) /* MMU enable */ | ||
21 | #define CR_A (1 << 1) /* Alignment abort enable */ | ||
22 | #define CR_C (1 << 2) /* Dcache enable */ | ||
23 | #define CR_W (1 << 3) /* Write buffer enable */ | ||
24 | #define CR_P (1 << 4) /* 32-bit exception handler */ | ||
25 | #define CR_D (1 << 5) /* 32-bit data address range */ | ||
26 | #define CR_L (1 << 6) /* Implementation defined */ | ||
27 | #define CR_B (1 << 7) /* Big endian */ | ||
28 | #define CR_S (1 << 8) /* System MMU protection */ | ||
29 | #define CR_R (1 << 9) /* ROM MMU protection */ | ||
30 | #define CR_F (1 << 10) /* Implementation defined */ | ||
31 | #define CR_Z (1 << 11) /* Implementation defined */ | ||
32 | #define CR_I (1 << 12) /* Icache enable */ | ||
33 | #define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ | ||
34 | #define CR_RR (1 << 14) /* Round Robin cache replacement */ | ||
35 | #define CR_L4 (1 << 15) /* LDR pc can set T bit */ | ||
36 | #define CR_DT (1 << 16) | ||
37 | #define CR_IT (1 << 18) | ||
38 | #define CR_ST (1 << 19) | ||
39 | #define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */ | ||
40 | #define CR_U (1 << 22) /* Unaligned access operation */ | ||
41 | #define CR_XP (1 << 23) /* Extended page tables */ | ||
42 | #define CR_VE (1 << 24) /* Vectored interrupts */ | ||
43 | #define CR_EE (1 << 25) /* Exception (Big) Endian */ | ||
44 | #define CR_TRE (1 << 28) /* TEX remap enable */ | ||
45 | #define CR_AFE (1 << 29) /* Access flag enable */ | ||
46 | #define CR_TE (1 << 30) /* Thumb exception enable */ | ||
47 | |||
48 | /* | ||
49 | * This is used to ensure the compiler did actually allocate the register we | ||
50 | * asked it for some inline assembly sequences. Apparently we can't trust | ||
51 | * the compiler from one version to another so a bit of paranoia won't hurt. | ||
52 | * This string is meant to be concatenated with the inline asm string and | ||
53 | * will cause compilation to stop on mismatch. | ||
54 | * (for details, see gcc PR 15089) | ||
55 | */ | ||
56 | #define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t" | ||
57 | |||
58 | #ifndef __ASSEMBLY__ | ||
59 | |||
60 | #include <linux/compiler.h> | ||
61 | #include <linux/linkage.h> | ||
62 | #include <linux/irqflags.h> | ||
63 | |||
64 | #include <asm/outercache.h> | ||
65 | |||
66 | struct thread_info; | ||
67 | struct task_struct; | ||
68 | |||
69 | /* information about the system we're running on */ | ||
70 | extern unsigned int system_rev; | ||
71 | extern unsigned int system_serial_low; | ||
72 | extern unsigned int system_serial_high; | ||
73 | extern unsigned int mem_fclk_21285; | ||
74 | |||
75 | struct pt_regs; | ||
76 | |||
77 | void die(const char *msg, struct pt_regs *regs, int err); | ||
78 | |||
79 | struct siginfo; | ||
80 | void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, | ||
81 | unsigned long err, unsigned long trap); | ||
82 | |||
83 | #ifdef CONFIG_ARM_LPAE | ||
84 | #define FAULT_CODE_ALIGNMENT 33 | ||
85 | #define FAULT_CODE_DEBUG 34 | ||
86 | #else | ||
87 | #define FAULT_CODE_ALIGNMENT 1 | ||
88 | #define FAULT_CODE_DEBUG 2 | ||
89 | #endif | ||
90 | |||
91 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | ||
92 | struct pt_regs *), | ||
93 | int sig, int code, const char *name); | ||
94 | |||
95 | void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, | ||
96 | struct pt_regs *), | ||
97 | int sig, int code, const char *name); | ||
98 | |||
99 | #define xchg(ptr,x) \ | ||
100 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | ||
101 | |||
102 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); | ||
103 | |||
104 | struct mm_struct; | ||
105 | extern void show_pte(struct mm_struct *mm, unsigned long addr); | ||
106 | extern void __show_regs(struct pt_regs *); | ||
107 | |||
108 | extern int __pure cpu_architecture(void); | ||
109 | extern void cpu_init(void); | ||
110 | |||
111 | void soft_restart(unsigned long); | ||
112 | extern void (*arm_pm_restart)(char str, const char *cmd); | ||
113 | extern void (*arm_pm_idle)(void); | ||
114 | |||
115 | #define UDBG_UNDEFINED (1 << 0) | ||
116 | #define UDBG_SYSCALL (1 << 1) | ||
117 | #define UDBG_BADABORT (1 << 2) | ||
118 | #define UDBG_SEGV (1 << 3) | ||
119 | #define UDBG_BUS (1 << 4) | ||
120 | |||
121 | extern unsigned int user_debug; | ||
122 | |||
123 | #if __LINUX_ARM_ARCH__ >= 4 | ||
124 | #define vectors_high() (cr_alignment & CR_V) | ||
125 | #else | ||
126 | #define vectors_high() (0) | ||
127 | #endif | ||
128 | |||
129 | #if __LINUX_ARM_ARCH__ >= 7 || \ | ||
130 | (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) | ||
131 | #define sev() __asm__ __volatile__ ("sev" : : : "memory") | ||
132 | #define wfe() __asm__ __volatile__ ("wfe" : : : "memory") | ||
133 | #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") | ||
134 | #endif | ||
135 | |||
136 | #if __LINUX_ARM_ARCH__ >= 7 | ||
137 | #define isb() __asm__ __volatile__ ("isb" : : : "memory") | ||
138 | #define dsb() __asm__ __volatile__ ("dsb" : : : "memory") | ||
139 | #define dmb() __asm__ __volatile__ ("dmb" : : : "memory") | ||
140 | #elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 | ||
141 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
142 | : : "r" (0) : "memory") | ||
143 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
144 | : : "r" (0) : "memory") | ||
145 | #define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | ||
146 | : : "r" (0) : "memory") | ||
147 | #elif defined(CONFIG_CPU_FA526) | ||
148 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
149 | : : "r" (0) : "memory") | ||
150 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
151 | : : "r" (0) : "memory") | ||
152 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
153 | #else | ||
154 | #define isb() __asm__ __volatile__ ("" : : : "memory") | ||
155 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
156 | : : "r" (0) : "memory") | ||
157 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
158 | #endif | ||
159 | |||
160 | #ifdef CONFIG_ARCH_HAS_BARRIERS | ||
161 | #include <mach/barriers.h> | ||
162 | #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) | ||
163 | #define mb() do { dsb(); outer_sync(); } while (0) | ||
164 | #define rmb() dsb() | ||
165 | #define wmb() mb() | ||
166 | #else | ||
167 | #include <asm/memory.h> | ||
168 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
169 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
170 | #define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
171 | #endif | ||
172 | |||
173 | #ifndef CONFIG_SMP | ||
174 | #define smp_mb() barrier() | ||
175 | #define smp_rmb() barrier() | ||
176 | #define smp_wmb() barrier() | ||
177 | #else | ||
178 | #define smp_mb() dmb() | ||
179 | #define smp_rmb() dmb() | ||
180 | #define smp_wmb() dmb() | ||
181 | #endif | ||
182 | |||
183 | #define read_barrier_depends() do { } while(0) | ||
184 | #define smp_read_barrier_depends() do { } while(0) | ||
185 | |||
186 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | ||
187 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
188 | |||
189 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | ||
190 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ | ||
191 | |||
192 | static inline unsigned int get_cr(void) | ||
193 | { | ||
194 | unsigned int val; | ||
195 | asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); | ||
196 | return val; | ||
197 | } | ||
198 | |||
199 | static inline void set_cr(unsigned int val) | ||
200 | { | ||
201 | asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" | ||
202 | : : "r" (val) : "cc"); | ||
203 | isb(); | ||
204 | } | ||
205 | |||
206 | #ifndef CONFIG_SMP | ||
207 | extern void adjust_cr(unsigned long mask, unsigned long set); | ||
208 | #endif | ||
209 | |||
210 | #define CPACC_FULL(n) (3 << (n * 2)) | ||
211 | #define CPACC_SVC(n) (1 << (n * 2)) | ||
212 | #define CPACC_DISABLE(n) (0 << (n * 2)) | ||
213 | |||
214 | static inline unsigned int get_copro_access(void) | ||
215 | { | ||
216 | unsigned int val; | ||
217 | asm("mrc p15, 0, %0, c1, c0, 2 @ get copro access" | ||
218 | : "=r" (val) : : "cc"); | ||
219 | return val; | ||
220 | } | ||
221 | |||
222 | static inline void set_copro_access(unsigned int val) | ||
223 | { | ||
224 | asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" | ||
225 | : : "r" (val) : "cc"); | ||
226 | isb(); | ||
227 | } | ||
228 | |||
229 | /* | ||
230 | * switch_mm() may do a full cache flush over the context switch, | ||
231 | * so enable interrupts over the context switch to avoid high | ||
232 | * latency. | ||
233 | */ | ||
234 | #define __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
235 | |||
236 | /* | ||
237 | * switch_to(prev, next) should switch from task `prev' to `next' | ||
238 | * `prev' will never be the same as `next'. schedule() itself | ||
239 | * contains the memory barrier to tell GCC not to cache `current'. | ||
240 | */ | ||
241 | extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *); | ||
242 | |||
243 | #define switch_to(prev,next,last) \ | ||
244 | do { \ | ||
245 | last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ | ||
246 | } while (0) | ||
247 | |||
248 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) | ||
249 | /* | ||
250 | * On the StrongARM, "swp" is terminally broken since it bypasses the | ||
251 | * cache totally. This means that the cache becomes inconsistent, and, | ||
252 | * since we use normal loads/stores as well, this is really bad. | ||
253 | * Typically, this causes oopsen in filp_close, but could have other, | ||
254 | * more disastrous effects. There are two work-arounds: | ||
255 | * 1. Disable interrupts and emulate the atomic swap | ||
256 | * 2. Clean the cache, perform atomic swap, flush the cache | ||
257 | * | ||
258 | * We choose (1) since its the "easiest" to achieve here and is not | ||
259 | * dependent on the processor type. | ||
260 | * | ||
261 | * NOTE that this solution won't work on an SMP system, so explcitly | ||
262 | * forbid it here. | ||
263 | */ | ||
264 | #define swp_is_buggy | ||
265 | #endif | ||
266 | |||
267 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | ||
268 | { | ||
269 | extern void __bad_xchg(volatile void *, int); | ||
270 | unsigned long ret; | ||
271 | #ifdef swp_is_buggy | ||
272 | unsigned long flags; | ||
273 | #endif | ||
274 | #if __LINUX_ARM_ARCH__ >= 6 | ||
275 | unsigned int tmp; | ||
276 | #endif | ||
277 | |||
278 | smp_mb(); | ||
279 | |||
280 | switch (size) { | ||
281 | #if __LINUX_ARM_ARCH__ >= 6 | ||
282 | case 1: | ||
283 | asm volatile("@ __xchg1\n" | ||
284 | "1: ldrexb %0, [%3]\n" | ||
285 | " strexb %1, %2, [%3]\n" | ||
286 | " teq %1, #0\n" | ||
287 | " bne 1b" | ||
288 | : "=&r" (ret), "=&r" (tmp) | ||
289 | : "r" (x), "r" (ptr) | ||
290 | : "memory", "cc"); | ||
291 | break; | ||
292 | case 4: | ||
293 | asm volatile("@ __xchg4\n" | ||
294 | "1: ldrex %0, [%3]\n" | ||
295 | " strex %1, %2, [%3]\n" | ||
296 | " teq %1, #0\n" | ||
297 | " bne 1b" | ||
298 | : "=&r" (ret), "=&r" (tmp) | ||
299 | : "r" (x), "r" (ptr) | ||
300 | : "memory", "cc"); | ||
301 | break; | ||
302 | #elif defined(swp_is_buggy) | ||
303 | #ifdef CONFIG_SMP | ||
304 | #error SMP is not supported on this platform | ||
305 | #endif | ||
306 | case 1: | ||
307 | raw_local_irq_save(flags); | ||
308 | ret = *(volatile unsigned char *)ptr; | ||
309 | *(volatile unsigned char *)ptr = x; | ||
310 | raw_local_irq_restore(flags); | ||
311 | break; | ||
312 | |||
313 | case 4: | ||
314 | raw_local_irq_save(flags); | ||
315 | ret = *(volatile unsigned long *)ptr; | ||
316 | *(volatile unsigned long *)ptr = x; | ||
317 | raw_local_irq_restore(flags); | ||
318 | break; | ||
319 | #else | ||
320 | case 1: | ||
321 | asm volatile("@ __xchg1\n" | ||
322 | " swpb %0, %1, [%2]" | ||
323 | : "=&r" (ret) | ||
324 | : "r" (x), "r" (ptr) | ||
325 | : "memory", "cc"); | ||
326 | break; | ||
327 | case 4: | ||
328 | asm volatile("@ __xchg4\n" | ||
329 | " swp %0, %1, [%2]" | ||
330 | : "=&r" (ret) | ||
331 | : "r" (x), "r" (ptr) | ||
332 | : "memory", "cc"); | ||
333 | break; | ||
334 | #endif | ||
335 | default: | ||
336 | __bad_xchg(ptr, size), ret = 0; | ||
337 | break; | ||
338 | } | ||
339 | smp_mb(); | ||
340 | |||
341 | return ret; | ||
342 | } | ||
343 | |||
344 | extern void disable_hlt(void); | ||
345 | extern void enable_hlt(void); | ||
346 | |||
347 | void cpu_idle_wait(void); | ||
348 | |||
349 | #include <asm-generic/cmpxchg-local.h> | ||
350 | |||
351 | #if __LINUX_ARM_ARCH__ < 6 | ||
352 | /* min ARCH < ARMv6 */ | ||
353 | |||
354 | #ifdef CONFIG_SMP | ||
355 | #error "SMP is not supported on this platform" | ||
356 | #endif | ||
357 | |||
358 | /* | ||
359 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
360 | * them available. | ||
361 | */ | ||
362 | #define cmpxchg_local(ptr, o, n) \ | ||
363 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
364 | (unsigned long)(n), sizeof(*(ptr)))) | ||
365 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
366 | |||
367 | #ifndef CONFIG_SMP | ||
368 | #include <asm-generic/cmpxchg.h> | ||
369 | #endif | ||
370 | |||
371 | #else /* min ARCH >= ARMv6 */ | ||
372 | |||
373 | extern void __bad_cmpxchg(volatile void *ptr, int size); | ||
374 | |||
375 | /* | ||
376 | * cmpxchg only support 32-bits operands on ARMv6. | ||
377 | */ | ||
378 | |||
379 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | ||
380 | unsigned long new, int size) | ||
381 | { | ||
382 | unsigned long oldval, res; | ||
383 | |||
384 | switch (size) { | ||
385 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ | ||
386 | case 1: | ||
387 | do { | ||
388 | asm volatile("@ __cmpxchg1\n" | ||
389 | " ldrexb %1, [%2]\n" | ||
390 | " mov %0, #0\n" | ||
391 | " teq %1, %3\n" | ||
392 | " strexbeq %0, %4, [%2]\n" | ||
393 | : "=&r" (res), "=&r" (oldval) | ||
394 | : "r" (ptr), "Ir" (old), "r" (new) | ||
395 | : "memory", "cc"); | ||
396 | } while (res); | ||
397 | break; | ||
398 | case 2: | ||
399 | do { | ||
400 | asm volatile("@ __cmpxchg1\n" | ||
401 | " ldrexh %1, [%2]\n" | ||
402 | " mov %0, #0\n" | ||
403 | " teq %1, %3\n" | ||
404 | " strexheq %0, %4, [%2]\n" | ||
405 | : "=&r" (res), "=&r" (oldval) | ||
406 | : "r" (ptr), "Ir" (old), "r" (new) | ||
407 | : "memory", "cc"); | ||
408 | } while (res); | ||
409 | break; | ||
410 | #endif | ||
411 | case 4: | ||
412 | do { | ||
413 | asm volatile("@ __cmpxchg4\n" | ||
414 | " ldrex %1, [%2]\n" | ||
415 | " mov %0, #0\n" | ||
416 | " teq %1, %3\n" | ||
417 | " strexeq %0, %4, [%2]\n" | ||
418 | : "=&r" (res), "=&r" (oldval) | ||
419 | : "r" (ptr), "Ir" (old), "r" (new) | ||
420 | : "memory", "cc"); | ||
421 | } while (res); | ||
422 | break; | ||
423 | default: | ||
424 | __bad_cmpxchg(ptr, size); | ||
425 | oldval = 0; | ||
426 | } | ||
427 | |||
428 | return oldval; | ||
429 | } | ||
430 | |||
431 | static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, | ||
432 | unsigned long new, int size) | ||
433 | { | ||
434 | unsigned long ret; | ||
435 | |||
436 | smp_mb(); | ||
437 | ret = __cmpxchg(ptr, old, new, size); | ||
438 | smp_mb(); | ||
439 | |||
440 | return ret; | ||
441 | } | ||
442 | |||
443 | #define cmpxchg(ptr,o,n) \ | ||
444 | ((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \ | ||
445 | (unsigned long)(o), \ | ||
446 | (unsigned long)(n), \ | ||
447 | sizeof(*(ptr)))) | ||
448 | |||
449 | static inline unsigned long __cmpxchg_local(volatile void *ptr, | ||
450 | unsigned long old, | ||
451 | unsigned long new, int size) | ||
452 | { | ||
453 | unsigned long ret; | ||
454 | |||
455 | switch (size) { | ||
456 | #ifdef CONFIG_CPU_V6 /* min ARCH == ARMv6 */ | ||
457 | case 1: | ||
458 | case 2: | ||
459 | ret = __cmpxchg_local_generic(ptr, old, new, size); | ||
460 | break; | ||
461 | #endif | ||
462 | default: | ||
463 | ret = __cmpxchg(ptr, old, new, size); | ||
464 | } | ||
465 | |||
466 | return ret; | ||
467 | } | ||
468 | |||
469 | #define cmpxchg_local(ptr,o,n) \ | ||
470 | ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \ | ||
471 | (unsigned long)(o), \ | ||
472 | (unsigned long)(n), \ | ||
473 | sizeof(*(ptr)))) | ||
474 | |||
475 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ | ||
476 | |||
477 | /* | ||
478 | * Note : ARMv7-M (currently unsupported by Linux) does not support | ||
479 | * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should | ||
480 | * not be allowed to use __cmpxchg64. | ||
481 | */ | ||
482 | static inline unsigned long long __cmpxchg64(volatile void *ptr, | ||
483 | unsigned long long old, | ||
484 | unsigned long long new) | ||
485 | { | ||
486 | register unsigned long long oldval asm("r0"); | ||
487 | register unsigned long long __old asm("r2") = old; | ||
488 | register unsigned long long __new asm("r4") = new; | ||
489 | unsigned long res; | ||
490 | |||
491 | do { | ||
492 | asm volatile( | ||
493 | " @ __cmpxchg8\n" | ||
494 | " ldrexd %1, %H1, [%2]\n" | ||
495 | " mov %0, #0\n" | ||
496 | " teq %1, %3\n" | ||
497 | " teqeq %H1, %H3\n" | ||
498 | " strexdeq %0, %4, %H4, [%2]\n" | ||
499 | : "=&r" (res), "=&r" (oldval) | ||
500 | : "r" (ptr), "Ir" (__old), "r" (__new) | ||
501 | : "memory", "cc"); | ||
502 | } while (res); | ||
503 | |||
504 | return oldval; | ||
505 | } | ||
506 | |||
507 | static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, | ||
508 | unsigned long long old, | ||
509 | unsigned long long new) | ||
510 | { | ||
511 | unsigned long long ret; | ||
512 | |||
513 | smp_mb(); | ||
514 | ret = __cmpxchg64(ptr, old, new); | ||
515 | smp_mb(); | ||
516 | |||
517 | return ret; | ||
518 | } | ||
519 | |||
520 | #define cmpxchg64(ptr,o,n) \ | ||
521 | ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ | ||
522 | (unsigned long long)(o), \ | ||
523 | (unsigned long long)(n))) | ||
524 | |||
525 | #define cmpxchg64_local(ptr,o,n) \ | ||
526 | ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ | ||
527 | (unsigned long long)(o), \ | ||
528 | (unsigned long long)(n))) | ||
529 | |||
530 | #else /* min ARCH = ARMv6 */ | ||
531 | |||
532 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
533 | |||
534 | #endif | ||
535 | |||
536 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | ||
537 | |||
538 | #endif /* __ASSEMBLY__ */ | ||
539 | |||
540 | #define arch_align_stack(x) (x) | ||
541 | |||
542 | #endif /* __KERNEL__ */ | ||
543 | |||
544 | #endif | ||
diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h new file mode 100644 index 000000000000..dfd386d0c022 --- /dev/null +++ b/arch/arm/include/asm/system_info.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __ASM_ARM_SYSTEM_INFO_H | ||
2 | #define __ASM_ARM_SYSTEM_INFO_H | ||
3 | |||
4 | #define CPU_ARCH_UNKNOWN 0 | ||
5 | #define CPU_ARCH_ARMv3 1 | ||
6 | #define CPU_ARCH_ARMv4 2 | ||
7 | #define CPU_ARCH_ARMv4T 3 | ||
8 | #define CPU_ARCH_ARMv5 4 | ||
9 | #define CPU_ARCH_ARMv5T 5 | ||
10 | #define CPU_ARCH_ARMv5TE 6 | ||
11 | #define CPU_ARCH_ARMv5TEJ 7 | ||
12 | #define CPU_ARCH_ARMv6 8 | ||
13 | #define CPU_ARCH_ARMv7 9 | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | /* information about the system we're running on */ | ||
18 | extern unsigned int system_rev; | ||
19 | extern unsigned int system_serial_low; | ||
20 | extern unsigned int system_serial_high; | ||
21 | extern unsigned int mem_fclk_21285; | ||
22 | |||
23 | extern int __pure cpu_architecture(void); | ||
24 | |||
25 | #endif /* !__ASSEMBLY__ */ | ||
26 | |||
27 | #endif /* __ASM_ARM_SYSTEM_INFO_H */ | ||
diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/system_misc.h new file mode 100644 index 000000000000..5a85f148b607 --- /dev/null +++ b/arch/arm/include/asm/system_misc.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef __ASM_ARM_SYSTEM_MISC_H | ||
2 | #define __ASM_ARM_SYSTEM_MISC_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | #include <linux/compiler.h> | ||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/irqflags.h> | ||
9 | |||
10 | extern void cpu_init(void); | ||
11 | |||
12 | void soft_restart(unsigned long); | ||
13 | extern void (*arm_pm_restart)(char str, const char *cmd); | ||
14 | extern void (*arm_pm_idle)(void); | ||
15 | |||
16 | #define UDBG_UNDEFINED (1 << 0) | ||
17 | #define UDBG_SYSCALL (1 << 1) | ||
18 | #define UDBG_BADABORT (1 << 2) | ||
19 | #define UDBG_SEGV (1 << 3) | ||
20 | #define UDBG_BUS (1 << 4) | ||
21 | |||
22 | extern unsigned int user_debug; | ||
23 | |||
24 | extern void disable_hlt(void); | ||
25 | extern void enable_hlt(void); | ||
26 | |||
27 | #endif /* !__ASSEMBLY__ */ | ||
28 | |||
29 | #endif /* __ASM_ARM_SYSTEM_MISC_H */ | ||
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 2958976d867b..71f6536d17ac 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <asm/errno.h> | 16 | #include <asm/errno.h> |
17 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
18 | #include <asm/domain.h> | 18 | #include <asm/domain.h> |
19 | #include <asm/system.h> | ||
20 | #include <asm/unified.h> | 19 | #include <asm/unified.h> |
20 | #include <asm/compiler.h> | ||
21 | 21 | ||
22 | #define VERIFY_READ 0 | 22 | #define VERIFY_READ 0 |
23 | #define VERIFY_WRITE 1 | 23 | #define VERIFY_WRITE 1 |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 5b0bce61eb69..b57c75e0b01f 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include <asm/checksum.h> | 20 | #include <asm/checksum.h> |
21 | #include <asm/system.h> | ||
22 | #include <asm/ftrace.h> | 21 | #include <asm/ftrace.h> |
23 | 22 | ||
24 | /* | 23 | /* |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index ddba41d1fcf1..d0d1e83150c9 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/personality.h> | 3 | #include <linux/personality.h> |
4 | #include <linux/binfmts.h> | 4 | #include <linux/binfmts.h> |
5 | #include <linux/elf.h> | 5 | #include <linux/elf.h> |
6 | #include <asm/system_info.h> | ||
6 | 7 | ||
7 | int elf_check_arch(const struct elf32_hdr *x) | 8 | int elf_check_arch(const struct elf32_hdr *x) |
8 | { | 9 | { |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 22f0ed324f37..8ec5eed55e37 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/unwind.h> | 26 | #include <asm/unwind.h> |
27 | #include <asm/unistd.h> | 27 | #include <asm/unistd.h> |
28 | #include <asm/tls.h> | 28 | #include <asm/tls.h> |
29 | #include <asm/system.h> | 29 | #include <asm/system_info.h> |
30 | 30 | ||
31 | #include "entry-header.S" | 31 | #include "entry-header.S" |
32 | #include <asm/entry-macro-multi.S> | 32 | #include <asm/entry-macro-multi.S> |
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 4c164ece5891..c32f8456aa09 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #include <linux/seq_file.h> | 42 | #include <linux/seq_file.h> |
43 | 43 | ||
44 | #include <asm/cacheflush.h> | 44 | #include <asm/cacheflush.h> |
45 | #include <asm/cp15.h> | ||
45 | #include <asm/fiq.h> | 46 | #include <asm/fiq.h> |
46 | #include <asm/irq.h> | 47 | #include <asm/irq.h> |
47 | #include <asm/system.h> | ||
48 | #include <asm/traps.h> | 48 | #include <asm/traps.h> |
49 | 49 | ||
50 | static unsigned long no_fiq_insn; | 50 | static unsigned long no_fiq_insn; |
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index d46f25968bec..278cfc144f44 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -17,8 +17,8 @@ | |||
17 | #include <asm/assembler.h> | 17 | #include <asm/assembler.h> |
18 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
19 | #include <asm/asm-offsets.h> | 19 | #include <asm/asm-offsets.h> |
20 | #include <asm/cp15.h> | ||
20 | #include <asm/thread_info.h> | 21 | #include <asm/thread_info.h> |
21 | #include <asm/system.h> | ||
22 | 22 | ||
23 | /* | 23 | /* |
24 | * Kernel startup entry point. | 24 | * Kernel startup entry point. |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 6d5791144066..a2e9694a68ee 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -15,12 +15,12 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | 16 | ||
17 | #include <asm/assembler.h> | 17 | #include <asm/assembler.h> |
18 | #include <asm/cp15.h> | ||
18 | #include <asm/domain.h> | 19 | #include <asm/domain.h> |
19 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
20 | #include <asm/asm-offsets.h> | 21 | #include <asm/asm-offsets.h> |
21 | #include <asm/memory.h> | 22 | #include <asm/memory.h> |
22 | #include <asm/thread_info.h> | 23 | #include <asm/thread_info.h> |
23 | #include <asm/system.h> | ||
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
25 | 25 | ||
26 | #ifdef CONFIG_DEBUG_LL | 26 | #ifdef CONFIG_DEBUG_LL |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index d6a95ef9131d..ba386bd94107 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/current.h> | 34 | #include <asm/current.h> |
35 | #include <asm/hw_breakpoint.h> | 35 | #include <asm/hw_breakpoint.h> |
36 | #include <asm/kdebug.h> | 36 | #include <asm/kdebug.h> |
37 | #include <asm/system.h> | ||
38 | #include <asm/traps.h> | 37 | #include <asm/traps.h> |
39 | 38 | ||
40 | /* Breakpoint currently in use for each BRP. */ | 39 | /* Breakpoint currently in use for each BRP. */ |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 3efd82cc95f0..6a6a097edd61 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
37 | 37 | ||
38 | #include <asm/exception.h> | 38 | #include <asm/exception.h> |
39 | #include <asm/system.h> | ||
40 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/irq.h> | 40 | #include <asm/mach/irq.h> |
42 | #include <asm/mach/time.h> | 41 | #include <asm/mach/time.h> |
diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c index a5394fb4e4e0..18a76282970e 100644 --- a/arch/arm/kernel/kprobes-common.c +++ b/arch/arm/kernel/kprobes-common.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/kprobes.h> | 15 | #include <linux/kprobes.h> |
16 | #include <asm/system_info.h> | ||
16 | 17 | ||
17 | #include "kprobes.h" | 18 | #include "kprobes.h" |
18 | 19 | ||
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 764bd456d84f..56995983eed8 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/mmu_context.h> | 12 | #include <asm/mmu_context.h> |
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | #include <asm/system.h> | 15 | #include <asm/system_misc.h> |
16 | 16 | ||
17 | extern const unsigned char relocate_new_kernel[]; | 17 | extern const unsigned char relocate_new_kernel[]; |
18 | extern const unsigned int relocate_new_kernel_size; | 18 | extern const unsigned int relocate_new_kernel_size; |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index d3eca4524533..7b9cddef6e53 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
36 | #include <asm/leds.h> | 36 | #include <asm/leds.h> |
37 | #include <asm/processor.h> | 37 | #include <asm/processor.h> |
38 | #include <asm/system.h> | ||
39 | #include <asm/thread_notify.h> | 38 | #include <asm/thread_notify.h> |
40 | #include <asm/stacktrace.h> | 39 | #include <asm/stacktrace.h> |
41 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index ede6443c34d9..45956c9d0ef0 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/audit.h> | 26 | #include <linux/audit.h> |
27 | 27 | ||
28 | #include <asm/pgtable.h> | 28 | #include <asm/pgtable.h> |
29 | #include <asm/system.h> | ||
30 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
31 | 30 | ||
32 | #define REG_PC 15 | 31 | #define REG_PC 15 |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index a255c39612ca..9e0fdb3a1988 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/sort.h> | 33 | #include <linux/sort.h> |
34 | 34 | ||
35 | #include <asm/unified.h> | 35 | #include <asm/unified.h> |
36 | #include <asm/cp15.h> | ||
36 | #include <asm/cpu.h> | 37 | #include <asm/cpu.h> |
37 | #include <asm/cputype.h> | 38 | #include <asm/cputype.h> |
38 | #include <asm/elf.h> | 39 | #include <asm/elf.h> |
@@ -44,12 +45,13 @@ | |||
44 | #include <asm/cacheflush.h> | 45 | #include <asm/cacheflush.h> |
45 | #include <asm/cachetype.h> | 46 | #include <asm/cachetype.h> |
46 | #include <asm/tlbflush.h> | 47 | #include <asm/tlbflush.h> |
47 | #include <asm/system.h> | ||
48 | 48 | ||
49 | #include <asm/prom.h> | 49 | #include <asm/prom.h> |
50 | #include <asm/mach/arch.h> | 50 | #include <asm/mach/arch.h> |
51 | #include <asm/mach/irq.h> | 51 | #include <asm/mach/irq.h> |
52 | #include <asm/mach/time.h> | 52 | #include <asm/mach/time.h> |
53 | #include <asm/system_info.h> | ||
54 | #include <asm/system_misc.h> | ||
53 | #include <asm/traps.h> | 55 | #include <asm/traps.h> |
54 | #include <asm/unwind.h> | 56 | #include <asm/unwind.h> |
55 | #include <asm/memblock.h> | 57 | #include <asm/memblock.h> |
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index 1f268bda4552..987dcf33415c 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <asm/assembler.h> | 4 | #include <asm/assembler.h> |
5 | #include <asm/glue-cache.h> | 5 | #include <asm/glue-cache.h> |
6 | #include <asm/glue-proc.h> | 6 | #include <asm/glue-proc.h> |
7 | #include <asm/system.h> | ||
8 | .text | 7 | .text |
9 | 8 | ||
10 | /* | 9 | /* |
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c index 01ec453bb924..30ae6bb4a310 100644 --- a/arch/arm/kernel/tcm.c +++ b/arch/arm/kernel/tcm.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/cputype.h> | 16 | #include <asm/cputype.h> |
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | #include <asm/memory.h> | 18 | #include <asm/memory.h> |
19 | #include <asm/system_info.h> | ||
19 | #include "tcm.h" | 20 | #include "tcm.h" |
20 | 21 | ||
21 | static struct gen_pool *tcm_pool; | 22 | static struct gen_pool *tcm_pool; |
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index 9cb7aaca159f..aab899764053 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | 22 | ||
23 | #include <asm/system_info.h> | ||
23 | #include <asm/thread_notify.h> | 24 | #include <asm/thread_notify.h> |
24 | 25 | ||
25 | /* | 26 | /* |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f84dfe67724f..cd77743472a2 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -29,11 +29,11 @@ | |||
29 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
31 | #include <asm/exception.h> | 31 | #include <asm/exception.h> |
32 | #include <asm/system.h> | ||
33 | #include <asm/unistd.h> | 32 | #include <asm/unistd.h> |
34 | #include <asm/traps.h> | 33 | #include <asm/traps.h> |
35 | #include <asm/unwind.h> | 34 | #include <asm/unwind.h> |
36 | #include <asm/tls.h> | 35 | #include <asm/tls.h> |
36 | #include <asm/system_misc.h> | ||
37 | 37 | ||
38 | #include "signal.h" | 38 | #include "signal.h" |
39 | 39 | ||
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index e55cdcbd81fb..45db05d8d94c 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -20,9 +20,11 @@ config HAVE_AT91_USART5 | |||
20 | 20 | ||
21 | config AT91_SAM9_ALT_RESET | 21 | config AT91_SAM9_ALT_RESET |
22 | bool | 22 | bool |
23 | default !ARCH_AT91X40 | ||
23 | 24 | ||
24 | config AT91_SAM9G45_RESET | 25 | config AT91_SAM9G45_RESET |
25 | bool | 26 | bool |
27 | default !ARCH_AT91X40 | ||
26 | 28 | ||
27 | menu "Atmel AT91 System-on-Chip" | 29 | menu "Atmel AT91 System-on-Chip" |
28 | 30 | ||
@@ -45,7 +47,6 @@ config ARCH_AT91SAM9260 | |||
45 | select HAVE_AT91_USART4 | 47 | select HAVE_AT91_USART4 |
46 | select HAVE_AT91_USART5 | 48 | select HAVE_AT91_USART5 |
47 | select HAVE_NET_MACB | 49 | select HAVE_NET_MACB |
48 | select AT91_SAM9_ALT_RESET | ||
49 | 50 | ||
50 | config ARCH_AT91SAM9261 | 51 | config ARCH_AT91SAM9261 |
51 | bool "AT91SAM9261" | 52 | bool "AT91SAM9261" |
@@ -53,7 +54,6 @@ config ARCH_AT91SAM9261 | |||
53 | select GENERIC_CLOCKEVENTS | 54 | select GENERIC_CLOCKEVENTS |
54 | select HAVE_FB_ATMEL | 55 | select HAVE_FB_ATMEL |
55 | select HAVE_AT91_DBGU0 | 56 | select HAVE_AT91_DBGU0 |
56 | select AT91_SAM9_ALT_RESET | ||
57 | 57 | ||
58 | config ARCH_AT91SAM9G10 | 58 | config ARCH_AT91SAM9G10 |
59 | bool "AT91SAM9G10" | 59 | bool "AT91SAM9G10" |
@@ -61,7 +61,6 @@ config ARCH_AT91SAM9G10 | |||
61 | select GENERIC_CLOCKEVENTS | 61 | select GENERIC_CLOCKEVENTS |
62 | select HAVE_AT91_DBGU0 | 62 | select HAVE_AT91_DBGU0 |
63 | select HAVE_FB_ATMEL | 63 | select HAVE_FB_ATMEL |
64 | select AT91_SAM9_ALT_RESET | ||
65 | 64 | ||
66 | config ARCH_AT91SAM9263 | 65 | config ARCH_AT91SAM9263 |
67 | bool "AT91SAM9263" | 66 | bool "AT91SAM9263" |
@@ -70,7 +69,6 @@ config ARCH_AT91SAM9263 | |||
70 | select HAVE_FB_ATMEL | 69 | select HAVE_FB_ATMEL |
71 | select HAVE_NET_MACB | 70 | select HAVE_NET_MACB |
72 | select HAVE_AT91_DBGU1 | 71 | select HAVE_AT91_DBGU1 |
73 | select AT91_SAM9_ALT_RESET | ||
74 | 72 | ||
75 | config ARCH_AT91SAM9RL | 73 | config ARCH_AT91SAM9RL |
76 | bool "AT91SAM9RL" | 74 | bool "AT91SAM9RL" |
@@ -79,7 +77,6 @@ config ARCH_AT91SAM9RL | |||
79 | select HAVE_AT91_USART3 | 77 | select HAVE_AT91_USART3 |
80 | select HAVE_FB_ATMEL | 78 | select HAVE_FB_ATMEL |
81 | select HAVE_AT91_DBGU0 | 79 | select HAVE_AT91_DBGU0 |
82 | select AT91_SAM9_ALT_RESET | ||
83 | 80 | ||
84 | config ARCH_AT91SAM9G20 | 81 | config ARCH_AT91SAM9G20 |
85 | bool "AT91SAM9G20" | 82 | bool "AT91SAM9G20" |
@@ -90,7 +87,6 @@ config ARCH_AT91SAM9G20 | |||
90 | select HAVE_AT91_USART4 | 87 | select HAVE_AT91_USART4 |
91 | select HAVE_AT91_USART5 | 88 | select HAVE_AT91_USART5 |
92 | select HAVE_NET_MACB | 89 | select HAVE_NET_MACB |
93 | select AT91_SAM9_ALT_RESET | ||
94 | 90 | ||
95 | config ARCH_AT91SAM9G45 | 91 | config ARCH_AT91SAM9G45 |
96 | bool "AT91SAM9G45" | 92 | bool "AT91SAM9G45" |
@@ -100,7 +96,6 @@ config ARCH_AT91SAM9G45 | |||
100 | select HAVE_FB_ATMEL | 96 | select HAVE_FB_ATMEL |
101 | select HAVE_NET_MACB | 97 | select HAVE_NET_MACB |
102 | select HAVE_AT91_DBGU1 | 98 | select HAVE_AT91_DBGU1 |
103 | select AT91_SAM9G45_RESET | ||
104 | 99 | ||
105 | config ARCH_AT91SAM9X5 | 100 | config ARCH_AT91SAM9X5 |
106 | bool "AT91SAM9x5 family" | 101 | bool "AT91SAM9x5 family" |
@@ -109,7 +104,6 @@ config ARCH_AT91SAM9X5 | |||
109 | select HAVE_FB_ATMEL | 104 | select HAVE_FB_ATMEL |
110 | select HAVE_NET_MACB | 105 | select HAVE_NET_MACB |
111 | select HAVE_AT91_DBGU0 | 106 | select HAVE_AT91_DBGU0 |
112 | select AT91_SAM9G45_RESET | ||
113 | 107 | ||
114 | config ARCH_AT91X40 | 108 | config ARCH_AT91X40 |
115 | bool "AT91x40" | 109 | bool "AT91x40" |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 0df1045311e4..364c19357e60 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | #include <asm/system_misc.h> | ||
18 | #include <mach/at91rm9200.h> | 19 | #include <mach/at91rm9200.h> |
19 | #include <mach/at91_pmc.h> | 20 | #include <mach/at91_pmc.h> |
20 | #include <mach/at91_st.h> | 21 | #include <mach/at91_st.h> |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 14b5a9c9a514..46f774233298 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | ||
19 | #include <mach/cpu.h> | 20 | #include <mach/cpu.h> |
20 | #include <mach/at91_dbgu.h> | 21 | #include <mach/at91_dbgu.h> |
21 | #include <mach/at91sam9260.h> | 22 | #include <mach/at91sam9260.h> |
@@ -216,6 +217,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
216 | CLKDEV_CON_DEV_ID("t0_clk", "fffdc000.timer", &tc3_clk), | 217 | CLKDEV_CON_DEV_ID("t0_clk", "fffdc000.timer", &tc3_clk), |
217 | CLKDEV_CON_DEV_ID("t1_clk", "fffdc000.timer", &tc4_clk), | 218 | CLKDEV_CON_DEV_ID("t1_clk", "fffdc000.timer", &tc4_clk), |
218 | CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk), | 219 | CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk), |
220 | CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk), | ||
219 | /* fake hclk clock */ | 221 | /* fake hclk clock */ |
220 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 222 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
221 | CLKDEV_CON_ID("pioA", &pioA_clk), | 223 | CLKDEV_CON_ID("pioA", &pioA_clk), |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 684c5dfd92ac..7de81e6222f1 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | ||
19 | #include <mach/cpu.h> | 20 | #include <mach/cpu.h> |
20 | #include <mach/at91sam9261.h> | 21 | #include <mach/at91sam9261.h> |
21 | #include <mach/at91_pmc.h> | 22 | #include <mach/at91_pmc.h> |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 0b4fa5a7f685..ef301be66575 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | ||
19 | #include <mach/at91sam9263.h> | 20 | #include <mach/at91sam9263.h> |
20 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_rstc.h> | 22 | #include <mach/at91_rstc.h> |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 0014573dfe17..d222f8333dab 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | ||
19 | #include <mach/at91sam9g45.h> | 20 | #include <mach/at91sam9g45.h> |
20 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
21 | #include <mach/cpu.h> | 22 | #include <mach/cpu.h> |
@@ -232,6 +233,8 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
232 | /* more tc lookup table for DT entries */ | 233 | /* more tc lookup table for DT entries */ |
233 | CLKDEV_CON_DEV_ID("t0_clk", "fff7c000.timer", &tcb0_clk), | 234 | CLKDEV_CON_DEV_ID("t0_clk", "fff7c000.timer", &tcb0_clk), |
234 | CLKDEV_CON_DEV_ID("t0_clk", "fffd4000.timer", &tcb0_clk), | 235 | CLKDEV_CON_DEV_ID("t0_clk", "fffd4000.timer", &tcb0_clk), |
236 | CLKDEV_CON_DEV_ID("hclk", "700000.ohci", &uhphs_clk), | ||
237 | CLKDEV_CON_DEV_ID("ehci_clk", "800000.ehci", &uhphs_clk), | ||
235 | /* fake hclk clock */ | 238 | /* fake hclk clock */ |
236 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk), | 239 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk), |
237 | CLKDEV_CON_ID("pioA", &pioA_clk), | 240 | CLKDEV_CON_ID("pioA", &pioA_clk), |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 63d9372eb18e..d9f2774f385e 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | #include <asm/system_misc.h> | ||
18 | #include <mach/cpu.h> | 19 | #include <mach/cpu.h> |
19 | #include <mach/at91_dbgu.h> | 20 | #include <mach/at91_dbgu.h> |
20 | #include <mach/at91sam9rl.h> | 21 | #include <mach/at91sam9rl.h> |
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index a34d96afa746..b6831eeb7b76 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c | |||
@@ -131,7 +131,7 @@ static struct clk dma1_clk = { | |||
131 | .type = CLK_TYPE_PERIPHERAL, | 131 | .type = CLK_TYPE_PERIPHERAL, |
132 | }; | 132 | }; |
133 | static struct clk uhphs_clk = { | 133 | static struct clk uhphs_clk = { |
134 | .name = "uhphs_clk", | 134 | .name = "uhphs", |
135 | .pmc_mask = 1 << AT91SAM9X5_ID_UHPHS, | 135 | .pmc_mask = 1 << AT91SAM9X5_ID_UHPHS, |
136 | .type = CLK_TYPE_PERIPHERAL, | 136 | .type = CLK_TYPE_PERIPHERAL, |
137 | }; | 137 | }; |
@@ -230,6 +230,9 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
230 | /* additional fake clock for macb_hclk */ | 230 | /* additional fake clock for macb_hclk */ |
231 | CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb0_clk), | 231 | CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb0_clk), |
232 | CLKDEV_CON_DEV_ID("hclk", "f8030000.ethernet", &macb1_clk), | 232 | CLKDEV_CON_DEV_ID("hclk", "f8030000.ethernet", &macb1_clk), |
233 | CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk), | ||
234 | CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk), | ||
235 | CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk), | ||
233 | }; | 236 | }; |
234 | 237 | ||
235 | /* | 238 | /* |
@@ -299,14 +302,8 @@ static void __init at91sam9x5_map_io(void) | |||
299 | at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE); | 302 | at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE); |
300 | } | 303 | } |
301 | 304 | ||
302 | static void __init at91sam9x5_ioremap_registers(void) | ||
303 | { | ||
304 | at91_ioremap_ramc(0, AT91SAM9X5_BASE_DDRSDRC0, 512); | ||
305 | } | ||
306 | |||
307 | void __init at91sam9x5_initialize(void) | 305 | void __init at91sam9x5_initialize(void) |
308 | { | 306 | { |
309 | arm_pm_restart = at91sam9g45_restart; | ||
310 | at91_extern_irq = (1 << AT91SAM9X5_ID_IRQ0); | 307 | at91_extern_irq = (1 << AT91SAM9X5_ID_IRQ0); |
311 | 308 | ||
312 | /* Register GPIO subsystem (using DT) */ | 309 | /* Register GPIO subsystem (using DT) */ |
@@ -314,11 +311,6 @@ void __init at91sam9x5_initialize(void) | |||
314 | } | 311 | } |
315 | 312 | ||
316 | /* -------------------------------------------------------------------- | 313 | /* -------------------------------------------------------------------- |
317 | * AT91SAM9x5 devices (temporary before modification of code) | ||
318 | * -------------------------------------------------------------------- */ | ||
319 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} | ||
320 | |||
321 | /* -------------------------------------------------------------------- | ||
322 | * Interrupt initialization | 314 | * Interrupt initialization |
323 | * -------------------------------------------------------------------- */ | 315 | * -------------------------------------------------------------------- */ |
324 | /* | 316 | /* |
@@ -362,7 +354,6 @@ static unsigned int at91sam9x5_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
362 | struct at91_init_soc __initdata at91sam9x5_soc = { | 354 | struct at91_init_soc __initdata at91sam9x5_soc = { |
363 | .map_io = at91sam9x5_map_io, | 355 | .map_io = at91sam9x5_map_io, |
364 | .default_irq_priority = at91sam9x5_default_irq_priority, | 356 | .default_irq_priority = at91sam9x5_default_irq_priority, |
365 | .ioremap_registers = at91sam9x5_ioremap_registers, | ||
366 | .register_clocks = at91sam9x5_register_clocks, | 357 | .register_clocks = at91sam9x5_register_clocks, |
367 | .init = at91sam9x5_initialize, | 358 | .init = at91sam9x5_initialize, |
368 | }; | 359 | }; |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 3bb40694b02d..161efbaa1029 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -138,6 +138,7 @@ static struct atmel_nand_data __initdata afeb9260_nand_data = { | |||
138 | .rdy_pin = AT91_PIN_PC13, | 138 | .rdy_pin = AT91_PIN_PC13, |
139 | .enable_pin = AT91_PIN_PC14, | 139 | .enable_pin = AT91_PIN_PC14, |
140 | .bus_width_16 = 0, | 140 | .bus_width_16 = 0, |
141 | .ecc_mode = NAND_ECC_SOFT, | ||
141 | .parts = afeb9260_nand_partition, | 142 | .parts = afeb9260_nand_partition, |
142 | .num_parts = ARRAY_SIZE(afeb9260_nand_partition), | 143 | .num_parts = ARRAY_SIZE(afeb9260_nand_partition), |
143 | .det_pin = -EINVAL, | 144 | .det_pin = -EINVAL, |
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index 8510e9e54988..c6d44ee0c77e 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -140,6 +140,7 @@ static struct atmel_nand_data __initdata cam60_nand_data = { | |||
140 | .det_pin = -EINVAL, | 140 | .det_pin = -EINVAL, |
141 | .rdy_pin = AT91_PIN_PA9, | 141 | .rdy_pin = AT91_PIN_PA9, |
142 | .enable_pin = AT91_PIN_PA7, | 142 | .enable_pin = AT91_PIN_PA7, |
143 | .ecc_mode = NAND_ECC_SOFT, | ||
143 | .parts = cam60_nand_partition, | 144 | .parts = cam60_nand_partition, |
144 | .num_parts = ARRAY_SIZE(cam60_nand_partition), | 145 | .num_parts = ARRAY_SIZE(cam60_nand_partition), |
145 | }; | 146 | }; |
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index 989e1c5a9ca0..5f3680e7c883 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -117,6 +117,7 @@ static struct atmel_nand_data __initdata cpu9krea_nand_data = { | |||
117 | .enable_pin = AT91_PIN_PC14, | 117 | .enable_pin = AT91_PIN_PC14, |
118 | .bus_width_16 = 0, | 118 | .bus_width_16 = 0, |
119 | .det_pin = -EINVAL, | 119 | .det_pin = -EINVAL, |
120 | .ecc_mode = NAND_ECC_SOFT, | ||
120 | }; | 121 | }; |
121 | 122 | ||
122 | #ifdef CONFIG_MACH_CPU9260 | 123 | #ifdef CONFIG_MACH_CPU9260 |
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c index 583b72472ad9..c18d4d307801 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt.c | |||
@@ -19,10 +19,7 @@ | |||
19 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | 21 | ||
22 | #include <mach/hardware.h> | ||
23 | #include <mach/board.h> | 22 | #include <mach/board.h> |
24 | #include <mach/system_rev.h> | ||
25 | #include <mach/at91sam9_smc.h> | ||
26 | 23 | ||
27 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
28 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
@@ -30,58 +27,9 @@ | |||
30 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
31 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
32 | 29 | ||
33 | #include "sam9_smc.h" | ||
34 | #include "generic.h" | 30 | #include "generic.h" |
35 | 31 | ||
36 | 32 | ||
37 | static void __init ek_init_early(void) | ||
38 | { | ||
39 | /* Initialize processor: 12.000 MHz crystal */ | ||
40 | at91_initialize(12000000); | ||
41 | } | ||
42 | |||
43 | /* det_pin is not connected */ | ||
44 | static struct atmel_nand_data __initdata ek_nand_data = { | ||
45 | .ale = 21, | ||
46 | .cle = 22, | ||
47 | .det_pin = -EINVAL, | ||
48 | .rdy_pin = AT91_PIN_PC8, | ||
49 | .enable_pin = AT91_PIN_PC14, | ||
50 | }; | ||
51 | |||
52 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
53 | .ncs_read_setup = 0, | ||
54 | .nrd_setup = 2, | ||
55 | .ncs_write_setup = 0, | ||
56 | .nwe_setup = 2, | ||
57 | |||
58 | .ncs_read_pulse = 4, | ||
59 | .nrd_pulse = 4, | ||
60 | .ncs_write_pulse = 4, | ||
61 | .nwe_pulse = 4, | ||
62 | |||
63 | .read_cycle = 7, | ||
64 | .write_cycle = 7, | ||
65 | |||
66 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
67 | .tdf_cycles = 3, | ||
68 | }; | ||
69 | |||
70 | static void __init ek_add_device_nand(void) | ||
71 | { | ||
72 | ek_nand_data.bus_width_16 = board_have_nand_16bit(); | ||
73 | /* setup bus-width (8 or 16) */ | ||
74 | if (ek_nand_data.bus_width_16) | ||
75 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
76 | else | ||
77 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
78 | |||
79 | /* configure chip-select 3 (NAND) */ | ||
80 | sam9_smc_configure(0, 3, &ek_nand_smc_config); | ||
81 | |||
82 | at91_add_device_nand(&ek_nand_data); | ||
83 | } | ||
84 | |||
85 | static const struct of_device_id irq_of_match[] __initconst = { | 33 | static const struct of_device_id irq_of_match[] __initconst = { |
86 | 34 | ||
87 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, | 35 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, |
@@ -98,9 +46,6 @@ static void __init at91_dt_init_irq(void) | |||
98 | static void __init at91_dt_device_init(void) | 46 | static void __init at91_dt_device_init(void) |
99 | { | 47 | { |
100 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 48 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
101 | |||
102 | /* NAND */ | ||
103 | ek_add_device_nand(); | ||
104 | } | 49 | } |
105 | 50 | ||
106 | static const char *at91_dt_board_compat[] __initdata = { | 51 | static const char *at91_dt_board_compat[] __initdata = { |
@@ -114,7 +59,7 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") | |||
114 | /* Maintainer: Atmel */ | 59 | /* Maintainer: Atmel */ |
115 | .timer = &at91sam926x_timer, | 60 | .timer = &at91sam926x_timer, |
116 | .map_io = at91_map_io, | 61 | .map_io = at91_map_io, |
117 | .init_early = ek_init_early, | 62 | .init_early = at91_dt_initialize, |
118 | .init_irq = at91_dt_init_irq, | 63 | .init_irq = at91_dt_init_irq, |
119 | .init_machine = at91_dt_device_init, | 64 | .init_machine = at91_dt_device_init, |
120 | .dt_compat = at91_dt_board_compat, | 65 | .dt_compat = at91_dt_board_compat, |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index bb9914582013..59b92aab9bcf 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -108,6 +108,7 @@ static struct atmel_nand_data __initdata kb9202_nand_data = { | |||
108 | .det_pin = -EINVAL, | 108 | .det_pin = -EINVAL, |
109 | .rdy_pin = AT91_PIN_PC29, | 109 | .rdy_pin = AT91_PIN_PC29, |
110 | .enable_pin = AT91_PIN_PC28, | 110 | .enable_pin = AT91_PIN_PC28, |
111 | .ecc_mode = NAND_ECC_SOFT, | ||
111 | .parts = kb9202_nand_partition, | 112 | .parts = kb9202_nand_partition, |
112 | .num_parts = ARRAY_SIZE(kb9202_nand_partition), | 113 | .num_parts = ARRAY_SIZE(kb9202_nand_partition), |
113 | }; | 114 | }; |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 3f8617c0e04e..57d5f6a4726a 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -190,6 +190,7 @@ static struct atmel_nand_data __initdata neocore926_nand_data = { | |||
190 | .rdy_pin = AT91_PIN_PB19, | 190 | .rdy_pin = AT91_PIN_PB19, |
191 | .rdy_pin_active_low = 1, | 191 | .rdy_pin_active_low = 1, |
192 | .enable_pin = AT91_PIN_PD15, | 192 | .enable_pin = AT91_PIN_PD15, |
193 | .ecc_mode = NAND_ECC_SOFT, | ||
193 | .parts = neocore926_nand_partition, | 194 | .parts = neocore926_nand_partition, |
194 | .num_parts = ARRAY_SIZE(neocore926_nand_partition), | 195 | .num_parts = ARRAY_SIZE(neocore926_nand_partition), |
195 | .det_pin = -EINVAL, | 196 | .det_pin = -EINVAL, |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index e029d220cb84..b6ed5ed7081a 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -138,6 +138,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
138 | .det_pin = -EINVAL, | 138 | .det_pin = -EINVAL, |
139 | .rdy_pin = AT91_PIN_PC13, | 139 | .rdy_pin = AT91_PIN_PC13, |
140 | .enable_pin = AT91_PIN_PC14, | 140 | .enable_pin = AT91_PIN_PC14, |
141 | .ecc_mode = NAND_ECC_SOFT, | ||
142 | .on_flash_bbt = 1, | ||
141 | .parts = ek_nand_partition, | 143 | .parts = ek_nand_partition, |
142 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 144 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
143 | }; | 145 | }; |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 9083df04e7ed..01332aa538b2 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -150,6 +150,8 @@ static struct atmel_nand_data __initdata dk_nand_data = { | |||
150 | .det_pin = AT91_PIN_PB1, | 150 | .det_pin = AT91_PIN_PB1, |
151 | .rdy_pin = AT91_PIN_PC2, | 151 | .rdy_pin = AT91_PIN_PC2, |
152 | .enable_pin = -EINVAL, | 152 | .enable_pin = -EINVAL, |
153 | .ecc_mode = NAND_ECC_SOFT, | ||
154 | .on_flash_bbt = 1, | ||
153 | .parts = dk_nand_partition, | 155 | .parts = dk_nand_partition, |
154 | .num_parts = ARRAY_SIZE(dk_nand_partition), | 156 | .num_parts = ARRAY_SIZE(dk_nand_partition), |
155 | }; | 157 | }; |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 84bce587735f..e8b116b6cba6 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -139,6 +139,7 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
139 | .det_pin = -EINVAL, | 139 | .det_pin = -EINVAL, |
140 | .rdy_pin = AT91_PIN_PC13, | 140 | .rdy_pin = AT91_PIN_PC13, |
141 | .enable_pin = AT91_PIN_PC14, | 141 | .enable_pin = AT91_PIN_PC14, |
142 | .ecc_mode = NAND_ECC_SOFT, | ||
142 | .parts = ek_nand_partition, | 143 | .parts = ek_nand_partition, |
143 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 144 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
144 | }; | 145 | }; |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index be8233bcabdc..d5aec55b0eb4 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -181,6 +181,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
181 | .det_pin = -EINVAL, | 181 | .det_pin = -EINVAL, |
182 | .rdy_pin = AT91_PIN_PC13, | 182 | .rdy_pin = AT91_PIN_PC13, |
183 | .enable_pin = AT91_PIN_PC14, | 183 | .enable_pin = AT91_PIN_PC14, |
184 | .ecc_mode = NAND_ECC_SOFT, | ||
185 | .on_flash_bbt = 1, | ||
184 | .parts = ek_nand_partition, | 186 | .parts = ek_nand_partition, |
185 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 187 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
186 | }; | 188 | }; |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 40895072a1a7..c3f994462864 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -187,6 +187,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
187 | .det_pin = -EINVAL, | 187 | .det_pin = -EINVAL, |
188 | .rdy_pin = AT91_PIN_PC15, | 188 | .rdy_pin = AT91_PIN_PC15, |
189 | .enable_pin = AT91_PIN_PC14, | 189 | .enable_pin = AT91_PIN_PC14, |
190 | .ecc_mode = NAND_ECC_SOFT, | ||
191 | .on_flash_bbt = 1, | ||
190 | .parts = ek_nand_partition, | 192 | .parts = ek_nand_partition, |
191 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 193 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
192 | }; | 194 | }; |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 29f66052fe63..66f0ddf4b2ae 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -187,6 +187,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
187 | .det_pin = -EINVAL, | 187 | .det_pin = -EINVAL, |
188 | .rdy_pin = AT91_PIN_PA22, | 188 | .rdy_pin = AT91_PIN_PA22, |
189 | .enable_pin = AT91_PIN_PD15, | 189 | .enable_pin = AT91_PIN_PD15, |
190 | .ecc_mode = NAND_ECC_SOFT, | ||
191 | .on_flash_bbt = 1, | ||
190 | .parts = ek_nand_partition, | 192 | .parts = ek_nand_partition, |
191 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 193 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
192 | }; | 194 | }; |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 843d6286c6f4..8923ec9f5831 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -166,6 +166,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
166 | .rdy_pin = AT91_PIN_PC13, | 166 | .rdy_pin = AT91_PIN_PC13, |
167 | .enable_pin = AT91_PIN_PC14, | 167 | .enable_pin = AT91_PIN_PC14, |
168 | .det_pin = -EINVAL, | 168 | .det_pin = -EINVAL, |
169 | .ecc_mode = NAND_ECC_SOFT, | ||
170 | .on_flash_bbt = 1, | ||
169 | .parts = ek_nand_partition, | 171 | .parts = ek_nand_partition, |
170 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 172 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
171 | }; | 173 | }; |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 57497e2b8878..e1bea73e6b30 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -148,6 +148,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
148 | .rdy_pin = AT91_PIN_PC8, | 148 | .rdy_pin = AT91_PIN_PC8, |
149 | .enable_pin = AT91_PIN_PC14, | 149 | .enable_pin = AT91_PIN_PC14, |
150 | .det_pin = -EINVAL, | 150 | .det_pin = -EINVAL, |
151 | .ecc_mode = NAND_ECC_SOFT, | ||
152 | .on_flash_bbt = 1, | ||
151 | .parts = ek_nand_partition, | 153 | .parts = ek_nand_partition, |
152 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 154 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
153 | }; | 155 | }; |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index c1366d0032bf..b109ce2ba864 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -94,6 +94,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
94 | .det_pin = -EINVAL, | 94 | .det_pin = -EINVAL, |
95 | .rdy_pin = AT91_PIN_PD17, | 95 | .rdy_pin = AT91_PIN_PD17, |
96 | .enable_pin = AT91_PIN_PB6, | 96 | .enable_pin = AT91_PIN_PB6, |
97 | .ecc_mode = NAND_ECC_SOFT, | ||
98 | .on_flash_bbt = 1, | ||
97 | .parts = ek_nand_partition, | 99 | .parts = ek_nand_partition, |
98 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 100 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
99 | }; | 101 | }; |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index 3c2e3fcc310c..ebc9d01ce742 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -110,6 +110,7 @@ static struct atmel_nand_data __initdata snapper9260_nand_data = { | |||
110 | .bus_width_16 = 0, | 110 | .bus_width_16 = 0, |
111 | .enable_pin = -EINVAL, | 111 | .enable_pin = -EINVAL, |
112 | .det_pin = -EINVAL, | 112 | .det_pin = -EINVAL, |
113 | .ecc_mode = NAND_ECC_SOFT, | ||
113 | }; | 114 | }; |
114 | 115 | ||
115 | static struct sam9_smc_config __initdata snapper9260_nand_smc_config = { | 116 | static struct sam9_smc_config __initdata snapper9260_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index 72eb3b4d9ab6..7640049410a0 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -86,6 +86,7 @@ static struct atmel_nand_data __initdata nand_data = { | |||
86 | .enable_pin = AT91_PIN_PC14, | 86 | .enable_pin = AT91_PIN_PC14, |
87 | .bus_width_16 = 0, | 87 | .bus_width_16 = 0, |
88 | .det_pin = -EINVAL, | 88 | .det_pin = -EINVAL, |
89 | .ecc_mode = NAND_ECC_SOFT, | ||
89 | }; | 90 | }; |
90 | 91 | ||
91 | static struct sam9_smc_config __initdata nand_smc_config = { | 92 | static struct sam9_smc_config __initdata nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index 26c36fc2d1e5..b7483a3d0980 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -198,6 +198,8 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
198 | .det_pin = -EINVAL, | 198 | .det_pin = -EINVAL, |
199 | .rdy_pin = AT91_PIN_PA22, | 199 | .rdy_pin = AT91_PIN_PA22, |
200 | .enable_pin = AT91_PIN_PD15, | 200 | .enable_pin = AT91_PIN_PD15, |
201 | .ecc_mode = NAND_ECC_SOFT, | ||
202 | .on_flash_bbt = 1, | ||
201 | .parts = ek_nand_partition, | 203 | .parts = ek_nand_partition, |
202 | .num_parts = ARRAY_SIZE(ek_nand_partition), | 204 | .num_parts = ARRAY_SIZE(ek_nand_partition), |
203 | }; | 205 | }; |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 52f460768f71..38dd279d30b2 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -182,6 +182,7 @@ static struct atmel_nand_data __initdata yl9200_nand_data = { | |||
182 | .det_pin = -EINVAL, | 182 | .det_pin = -EINVAL, |
183 | .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ | 183 | .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ |
184 | .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ | 184 | .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ |
185 | .ecc_mode = NAND_ECC_SOFT, | ||
185 | .parts = yl9200_nand_partition, | 186 | .parts = yl9200_nand_partition, |
186 | .num_parts = ARRAY_SIZE(yl9200_nand_partition), | 187 | .num_parts = ARRAY_SIZE(yl9200_nand_partition), |
187 | }; | 188 | }; |
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index be51ca7f694d..a0f4d7424cdc 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/of_address.h> | ||
26 | 27 | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <mach/at91_pmc.h> | 29 | #include <mach/at91_pmc.h> |
@@ -671,16 +672,12 @@ static void __init at91_upll_usbfs_clock_init(unsigned long main_clock) | |||
671 | uhpck.rate_hz /= 1 + ((at91_pmc_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8); | 672 | uhpck.rate_hz /= 1 + ((at91_pmc_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8); |
672 | } | 673 | } |
673 | 674 | ||
674 | int __init at91_clock_init(unsigned long main_clock) | 675 | static int __init at91_pmc_init(unsigned long main_clock) |
675 | { | 676 | { |
676 | unsigned tmp, freq, mckr; | 677 | unsigned tmp, freq, mckr; |
677 | int i; | 678 | int i; |
678 | int pll_overclock = false; | 679 | int pll_overclock = false; |
679 | 680 | ||
680 | at91_pmc_base = ioremap(AT91_PMC, 256); | ||
681 | if (!at91_pmc_base) | ||
682 | panic("Impossible to ioremap AT91_PMC 0x%x\n", AT91_PMC); | ||
683 | |||
684 | /* | 681 | /* |
685 | * When the bootloader initialized the main oscillator correctly, | 682 | * When the bootloader initialized the main oscillator correctly, |
686 | * there's no problem using the cycle counter. But if it didn't, | 683 | * there's no problem using the cycle counter. But if it didn't, |
@@ -802,6 +799,55 @@ int __init at91_clock_init(unsigned long main_clock) | |||
802 | return 0; | 799 | return 0; |
803 | } | 800 | } |
804 | 801 | ||
802 | #if defined(CONFIG_OF) | ||
803 | static struct of_device_id pmc_ids[] = { | ||
804 | { .compatible = "atmel,at91rm9200-pmc" }, | ||
805 | { /*sentinel*/ } | ||
806 | }; | ||
807 | |||
808 | static struct of_device_id osc_ids[] = { | ||
809 | { .compatible = "atmel,osc" }, | ||
810 | { /*sentinel*/ } | ||
811 | }; | ||
812 | |||
813 | int __init at91_dt_clock_init(void) | ||
814 | { | ||
815 | struct device_node *np; | ||
816 | u32 main_clock = 0; | ||
817 | |||
818 | np = of_find_matching_node(NULL, pmc_ids); | ||
819 | if (!np) | ||
820 | panic("unable to find compatible pmc node in dtb\n"); | ||
821 | |||
822 | at91_pmc_base = of_iomap(np, 0); | ||
823 | if (!at91_pmc_base) | ||
824 | panic("unable to map pmc cpu registers\n"); | ||
825 | |||
826 | of_node_put(np); | ||
827 | |||
828 | /* retrieve the freqency of fixed clocks from device tree */ | ||
829 | np = of_find_matching_node(NULL, osc_ids); | ||
830 | if (np) { | ||
831 | u32 rate; | ||
832 | if (!of_property_read_u32(np, "clock-frequency", &rate)) | ||
833 | main_clock = rate; | ||
834 | } | ||
835 | |||
836 | of_node_put(np); | ||
837 | |||
838 | return at91_pmc_init(main_clock); | ||
839 | } | ||
840 | #endif | ||
841 | |||
842 | int __init at91_clock_init(unsigned long main_clock) | ||
843 | { | ||
844 | at91_pmc_base = ioremap(AT91_PMC, 256); | ||
845 | if (!at91_pmc_base) | ||
846 | panic("Impossible to ioremap AT91_PMC 0x%x\n", AT91_PMC); | ||
847 | |||
848 | return at91_pmc_init(main_clock); | ||
849 | } | ||
850 | |||
805 | /* | 851 | /* |
806 | * Several unused clocks may be active. Turn them off. | 852 | * Several unused clocks may be active. Turn them off. |
807 | */ | 853 | */ |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 459f01a4a546..dd9b346c451d 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -20,6 +20,7 @@ extern void __init at91_init_sram(int bank, unsigned long base, | |||
20 | extern void __init at91rm9200_set_type(int type); | 20 | extern void __init at91rm9200_set_type(int type); |
21 | extern void __init at91_initialize(unsigned long main_clock); | 21 | extern void __init at91_initialize(unsigned long main_clock); |
22 | extern void __init at91x40_initialize(unsigned long main_clock); | 22 | extern void __init at91x40_initialize(unsigned long main_clock); |
23 | extern void __init at91_dt_initialize(void); | ||
23 | 24 | ||
24 | /* Interrupts */ | 25 | /* Interrupts */ |
25 | extern void __init at91_init_irq_default(void); | 26 | extern void __init at91_init_irq_default(void); |
@@ -52,6 +53,7 @@ extern void __init at91sam9rl_set_console_clock(int id); | |||
52 | extern void __init at91sam9g45_set_console_clock(int id); | 53 | extern void __init at91sam9g45_set_console_clock(int id); |
53 | #ifdef CONFIG_AT91_PMC_UNIT | 54 | #ifdef CONFIG_AT91_PMC_UNIT |
54 | extern int __init at91_clock_init(unsigned long main_clock); | 55 | extern int __init at91_clock_init(unsigned long main_clock); |
56 | extern int __init at91_dt_clock_init(void); | ||
55 | #else | 57 | #else |
56 | static int inline at91_clock_init(unsigned long main_clock) { return 0; } | 58 | static int inline at91_clock_init(unsigned long main_clock) { return 0; } |
57 | #endif | 59 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/at91_shdwc.h b/arch/arm/mach-at91/include/mach/at91_shdwc.h index 1d4fe822c77a..60478ea8bd46 100644 --- a/arch/arm/mach-at91/include/mach/at91_shdwc.h +++ b/arch/arm/mach-at91/include/mach/at91_shdwc.h | |||
@@ -36,9 +36,11 @@ extern void __iomem *at91_shdwc_base; | |||
36 | #define AT91_SHDW_WKMODE0_HIGH 1 | 36 | #define AT91_SHDW_WKMODE0_HIGH 1 |
37 | #define AT91_SHDW_WKMODE0_LOW 2 | 37 | #define AT91_SHDW_WKMODE0_LOW 2 |
38 | #define AT91_SHDW_WKMODE0_ANYLEVEL 3 | 38 | #define AT91_SHDW_WKMODE0_ANYLEVEL 3 |
39 | #define AT91_SHDW_CPTWK0 (0xf << 4) /* Counter On Wake Up 0 */ | 39 | #define AT91_SHDW_CPTWK0_MAX 0xf /* Maximum Counter On Wake Up 0 */ |
40 | #define AT91_SHDW_CPTWK0 (AT91_SHDW_CPTWK0_MAX << 4) /* Counter On Wake Up 0 */ | ||
40 | #define AT91_SHDW_CPTWK0_(x) ((x) << 4) | 41 | #define AT91_SHDW_CPTWK0_(x) ((x) << 4) |
41 | #define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */ | 42 | #define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */ |
43 | #define AT91_SHDW_RTCWKEN (1 << 17) /* Real Time Clock Wake-up Enable */ | ||
42 | 44 | ||
43 | #define AT91_SHDW_SR 0x08 /* Shut Down Status Register */ | 45 | #define AT91_SHDW_SR 0x08 /* Shut Down Status Register */ |
44 | #define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */ | 46 | #define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h index a297a77d88e2..88e43d534cdf 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9x5.h +++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h | |||
@@ -55,11 +55,6 @@ | |||
55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 | 55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * System Peripherals | ||
59 | */ | ||
60 | #define AT91SAM9X5_BASE_DDRSDRC0 0xffffe800 | ||
61 | |||
62 | /* | ||
63 | * Base addresses for early serial code (uncompress.h) | 58 | * Base addresses for early serial code (uncompress.h) |
64 | */ | 59 | */ |
65 | #define AT91_DBGU AT91_BASE_DBGU0 | 60 | #define AT91_DBGU AT91_BASE_DBGU0 |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index dc8d6d4f17cf..544a5d5ce416 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <sound/atmel-ac97c.h> | 41 | #include <sound/atmel-ac97c.h> |
42 | #include <linux/serial.h> | 42 | #include <linux/serial.h> |
43 | #include <linux/platform_data/macb.h> | 43 | #include <linux/platform_data/macb.h> |
44 | #include <linux/platform_data/atmel.h> | ||
44 | 45 | ||
45 | /* USB Device */ | 46 | /* USB Device */ |
46 | struct at91_udc_data { | 47 | struct at91_udc_data { |
@@ -98,20 +99,6 @@ extern void __init at91_add_device_usbh(struct at91_usbh_data *data); | |||
98 | extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); | 99 | extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); |
99 | extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); | 100 | extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); |
100 | 101 | ||
101 | /* NAND / SmartMedia */ | ||
102 | struct atmel_nand_data { | ||
103 | int enable_pin; /* chip enable */ | ||
104 | int det_pin; /* card detect */ | ||
105 | int rdy_pin; /* ready/busy */ | ||
106 | u8 rdy_pin_active_low; /* rdy_pin value is inverted */ | ||
107 | u8 ale; /* address line number connected to ALE */ | ||
108 | u8 cle; /* address line number connected to CLE */ | ||
109 | u8 bus_width_16; /* buswidth is 16 bit */ | ||
110 | u8 correction_cap; /* PMECC correction capability */ | ||
111 | u16 sector_size; /* Sector size for PMECC */ | ||
112 | struct mtd_partition *parts; | ||
113 | unsigned int num_parts; | ||
114 | }; | ||
115 | extern void __init at91_add_device_nand(struct atmel_nand_data *data); | 102 | extern void __init at91_add_device_nand(struct atmel_nand_data *data); |
116 | 103 | ||
117 | /* I2C*/ | 104 | /* I2C*/ |
diff --git a/arch/arm/mach-at91/include/mach/system_rev.h b/arch/arm/mach-at91/include/mach/system_rev.h index ec164a4124c9..ef79a9aafc08 100644 --- a/arch/arm/mach-at91/include/mach/system_rev.h +++ b/arch/arm/mach-at91/include/mach/system_rev.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifndef __ARCH_SYSTEM_REV_H__ | 7 | #ifndef __ARCH_SYSTEM_REV_H__ |
8 | #define __ARCH_SYSTEM_REV_H__ | 8 | #define __ARCH_SYSTEM_REV_H__ |
9 | 9 | ||
10 | #include <asm/system_info.h> | ||
11 | |||
10 | /* | 12 | /* |
11 | * board revision encoding | 13 | * board revision encoding |
12 | * mach specific | 14 | * mach specific |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 6c9d5e69ac28..f630250c6b87 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -197,19 +197,6 @@ extern void at91_slow_clock(void __iomem *pmc, void __iomem *ramc0, | |||
197 | extern u32 at91_slow_clock_sz; | 197 | extern u32 at91_slow_clock_sz; |
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | void __iomem *at91_ramc_base[2]; | ||
201 | |||
202 | void __init at91_ioremap_ramc(int id, u32 addr, u32 size) | ||
203 | { | ||
204 | if (id < 0 || id > 1) { | ||
205 | pr_emerg("Wrong RAM controller id (%d), cannot continue\n", id); | ||
206 | BUG(); | ||
207 | } | ||
208 | at91_ramc_base[id] = ioremap(addr, size); | ||
209 | if (!at91_ramc_base[id]) | ||
210 | panic("Impossible to ioremap ramc.%d 0x%x\n", id, addr); | ||
211 | } | ||
212 | |||
213 | static int at91_pm_enter(suspend_state_t state) | 200 | static int at91_pm_enter(suspend_state_t state) |
214 | { | 201 | { |
215 | at91_gpio_suspend(); | 202 | at91_gpio_suspend(); |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 372396c2ecb6..1083739e3065 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | #include <linux/of_address.h> | ||
12 | 13 | ||
13 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
14 | 15 | ||
@@ -51,6 +52,19 @@ void __init at91_init_interrupts(unsigned int *priority) | |||
51 | at91_gpio_irq_setup(); | 52 | at91_gpio_irq_setup(); |
52 | } | 53 | } |
53 | 54 | ||
55 | void __iomem *at91_ramc_base[2]; | ||
56 | |||
57 | void __init at91_ioremap_ramc(int id, u32 addr, u32 size) | ||
58 | { | ||
59 | if (id < 0 || id > 1) { | ||
60 | pr_emerg("Wrong RAM controller id (%d), cannot continue\n", id); | ||
61 | BUG(); | ||
62 | } | ||
63 | at91_ramc_base[id] = ioremap(addr, size); | ||
64 | if (!at91_ramc_base[id]) | ||
65 | panic("Impossible to ioremap ramc.%d 0x%x\n", id, addr); | ||
66 | } | ||
67 | |||
54 | static struct map_desc sram_desc[2] __initdata; | 68 | static struct map_desc sram_desc[2] __initdata; |
55 | 69 | ||
56 | void __init at91_init_sram(int bank, unsigned long base, unsigned int length) | 70 | void __init at91_init_sram(int bank, unsigned long base, unsigned int length) |
@@ -285,6 +299,150 @@ void __init at91_ioremap_matrix(u32 base_addr) | |||
285 | panic("Impossible to ioremap at91_matrix_base\n"); | 299 | panic("Impossible to ioremap at91_matrix_base\n"); |
286 | } | 300 | } |
287 | 301 | ||
302 | #if defined(CONFIG_OF) | ||
303 | static struct of_device_id rstc_ids[] = { | ||
304 | { .compatible = "atmel,at91sam9260-rstc", .data = at91sam9_alt_restart }, | ||
305 | { .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart }, | ||
306 | { /*sentinel*/ } | ||
307 | }; | ||
308 | |||
309 | static void at91_dt_rstc(void) | ||
310 | { | ||
311 | struct device_node *np; | ||
312 | const struct of_device_id *of_id; | ||
313 | |||
314 | np = of_find_matching_node(NULL, rstc_ids); | ||
315 | if (!np) | ||
316 | panic("unable to find compatible rstc node in dtb\n"); | ||
317 | |||
318 | at91_rstc_base = of_iomap(np, 0); | ||
319 | if (!at91_rstc_base) | ||
320 | panic("unable to map rstc cpu registers\n"); | ||
321 | |||
322 | of_id = of_match_node(rstc_ids, np); | ||
323 | if (!of_id) | ||
324 | panic("AT91: rtsc no restart function availlable\n"); | ||
325 | |||
326 | arm_pm_restart = of_id->data; | ||
327 | |||
328 | of_node_put(np); | ||
329 | } | ||
330 | |||
331 | static struct of_device_id ramc_ids[] = { | ||
332 | { .compatible = "atmel,at91sam9260-sdramc" }, | ||
333 | { .compatible = "atmel,at91sam9g45-ddramc" }, | ||
334 | { /*sentinel*/ } | ||
335 | }; | ||
336 | |||
337 | static void at91_dt_ramc(void) | ||
338 | { | ||
339 | struct device_node *np; | ||
340 | |||
341 | np = of_find_matching_node(NULL, ramc_ids); | ||
342 | if (!np) | ||
343 | panic("unable to find compatible ram conroller node in dtb\n"); | ||
344 | |||
345 | at91_ramc_base[0] = of_iomap(np, 0); | ||
346 | if (!at91_ramc_base[0]) | ||
347 | panic("unable to map ramc[0] cpu registers\n"); | ||
348 | /* the controller may have 2 banks */ | ||
349 | at91_ramc_base[1] = of_iomap(np, 1); | ||
350 | |||
351 | of_node_put(np); | ||
352 | } | ||
353 | |||
354 | static struct of_device_id shdwc_ids[] = { | ||
355 | { .compatible = "atmel,at91sam9260-shdwc", }, | ||
356 | { .compatible = "atmel,at91sam9rl-shdwc", }, | ||
357 | { .compatible = "atmel,at91sam9x5-shdwc", }, | ||
358 | { /*sentinel*/ } | ||
359 | }; | ||
360 | |||
361 | static const char *shdwc_wakeup_modes[] = { | ||
362 | [AT91_SHDW_WKMODE0_NONE] = "none", | ||
363 | [AT91_SHDW_WKMODE0_HIGH] = "high", | ||
364 | [AT91_SHDW_WKMODE0_LOW] = "low", | ||
365 | [AT91_SHDW_WKMODE0_ANYLEVEL] = "any", | ||
366 | }; | ||
367 | |||
368 | const int at91_dtget_shdwc_wakeup_mode(struct device_node *np) | ||
369 | { | ||
370 | const char *pm; | ||
371 | int err, i; | ||
372 | |||
373 | err = of_property_read_string(np, "atmel,wakeup-mode", &pm); | ||
374 | if (err < 0) | ||
375 | return AT91_SHDW_WKMODE0_ANYLEVEL; | ||
376 | |||
377 | for (i = 0; i < ARRAY_SIZE(shdwc_wakeup_modes); i++) | ||
378 | if (!strcasecmp(pm, shdwc_wakeup_modes[i])) | ||
379 | return i; | ||
380 | |||
381 | return -ENODEV; | ||
382 | } | ||
383 | |||
384 | static void at91_dt_shdwc(void) | ||
385 | { | ||
386 | struct device_node *np; | ||
387 | int wakeup_mode; | ||
388 | u32 reg; | ||
389 | u32 mode = 0; | ||
390 | |||
391 | np = of_find_matching_node(NULL, shdwc_ids); | ||
392 | if (!np) { | ||
393 | pr_debug("AT91: unable to find compatible shutdown (shdwc) conroller node in dtb\n"); | ||
394 | return; | ||
395 | } | ||
396 | |||
397 | at91_shdwc_base = of_iomap(np, 0); | ||
398 | if (!at91_shdwc_base) | ||
399 | panic("AT91: unable to map shdwc cpu registers\n"); | ||
400 | |||
401 | wakeup_mode = at91_dtget_shdwc_wakeup_mode(np); | ||
402 | if (wakeup_mode < 0) { | ||
403 | pr_warn("AT91: shdwc unknown wakeup mode\n"); | ||
404 | goto end; | ||
405 | } | ||
406 | |||
407 | if (!of_property_read_u32(np, "atmel,wakeup-counter", ®)) { | ||
408 | if (reg > AT91_SHDW_CPTWK0_MAX) { | ||
409 | pr_warn("AT91: shdwc wakeup conter 0x%x > 0x%x reduce it to 0x%x\n", | ||
410 | reg, AT91_SHDW_CPTWK0_MAX, AT91_SHDW_CPTWK0_MAX); | ||
411 | reg = AT91_SHDW_CPTWK0_MAX; | ||
412 | } | ||
413 | mode |= AT91_SHDW_CPTWK0_(reg); | ||
414 | } | ||
415 | |||
416 | if (of_property_read_bool(np, "atmel,wakeup-rtc-timer")) | ||
417 | mode |= AT91_SHDW_RTCWKEN; | ||
418 | |||
419 | if (of_property_read_bool(np, "atmel,wakeup-rtt-timer")) | ||
420 | mode |= AT91_SHDW_RTTWKEN; | ||
421 | |||
422 | at91_shdwc_write(AT91_SHDW_MR, wakeup_mode | mode); | ||
423 | |||
424 | end: | ||
425 | pm_power_off = at91sam9_poweroff; | ||
426 | |||
427 | of_node_put(np); | ||
428 | } | ||
429 | |||
430 | void __init at91_dt_initialize(void) | ||
431 | { | ||
432 | at91_dt_rstc(); | ||
433 | at91_dt_ramc(); | ||
434 | at91_dt_shdwc(); | ||
435 | |||
436 | /* Init clock subsystem */ | ||
437 | at91_dt_clock_init(); | ||
438 | |||
439 | /* Register the processor-specific clocks */ | ||
440 | at91_boot_soc.register_clocks(); | ||
441 | |||
442 | at91_boot_soc.init(); | ||
443 | } | ||
444 | #endif | ||
445 | |||
288 | void __init at91_initialize(unsigned long main_clock) | 446 | void __init at91_initialize(unsigned long main_clock) |
289 | { | 447 | { |
290 | at91_boot_soc.ioremap_registers(); | 448 | at91_boot_soc.ioremap_registers(); |
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index 8736c1acc166..3c5b5bbf24e5 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <asm/hardware/clps7111.h> | 39 | #include <asm/hardware/clps7111.h> |
40 | #include <asm/system_misc.h> | ||
40 | 41 | ||
41 | /* | 42 | /* |
42 | * This maps the generic CLPS711x registers | 43 | * This maps the generic CLPS711x registers |
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c index 15121446efc8..dd9a6cdbeb02 100644 --- a/arch/arm/mach-clps711x/p720t-leds.c +++ b/arch/arm/mach-clps711x/p720t-leds.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <asm/leds.h> | 27 | #include <asm/leds.h> |
28 | #include <asm/system.h> | ||
29 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
30 | 29 | ||
31 | #include <asm/hardware/clps7111.h> | 30 | #include <asm/hardware/clps7111.h> |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index d5088900af6c..a70de24d1cbc 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
39 | #include <asm/system_info.h> | ||
39 | 40 | ||
40 | #include <mach/cp_intc.h> | 41 | #include <mach/cp_intc.h> |
41 | #include <mach/da8xx.h> | 42 | #include <mach/da8xx.h> |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 864f676eccac..3683306e0245 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -613,6 +613,113 @@ static void __init evm_init_i2c(void) | |||
613 | i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info)); | 613 | i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info)); |
614 | } | 614 | } |
615 | 615 | ||
616 | #define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) | ||
617 | |||
618 | /* venc standard timings */ | ||
619 | static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | ||
620 | { | ||
621 | .name = "ntsc", | ||
622 | .timings_type = VPBE_ENC_STD, | ||
623 | .timings = {V4L2_STD_525_60}, | ||
624 | .interlaced = 1, | ||
625 | .xres = 720, | ||
626 | .yres = 480, | ||
627 | .aspect = {11, 10}, | ||
628 | .fps = {30000, 1001}, | ||
629 | .left_margin = 0x79, | ||
630 | .upper_margin = 0x10, | ||
631 | }, | ||
632 | { | ||
633 | .name = "pal", | ||
634 | .timings_type = VPBE_ENC_STD, | ||
635 | .timings = {V4L2_STD_625_50}, | ||
636 | .interlaced = 1, | ||
637 | .xres = 720, | ||
638 | .yres = 576, | ||
639 | .aspect = {54, 59}, | ||
640 | .fps = {25, 1}, | ||
641 | .left_margin = 0x7e, | ||
642 | .upper_margin = 0x16, | ||
643 | }, | ||
644 | }; | ||
645 | |||
646 | /* venc dv preset timings */ | ||
647 | static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { | ||
648 | { | ||
649 | .name = "480p59_94", | ||
650 | .timings_type = VPBE_ENC_DV_PRESET, | ||
651 | .timings = {V4L2_DV_480P59_94}, | ||
652 | .interlaced = 0, | ||
653 | .xres = 720, | ||
654 | .yres = 480, | ||
655 | .aspect = {1, 1}, | ||
656 | .fps = {5994, 100}, | ||
657 | .left_margin = 0x80, | ||
658 | .upper_margin = 0x20, | ||
659 | }, | ||
660 | { | ||
661 | .name = "576p50", | ||
662 | .timings_type = VPBE_ENC_DV_PRESET, | ||
663 | .timings = {V4L2_DV_576P50}, | ||
664 | .interlaced = 0, | ||
665 | .xres = 720, | ||
666 | .yres = 576, | ||
667 | .aspect = {1, 1}, | ||
668 | .fps = {50, 1}, | ||
669 | .left_margin = 0x7e, | ||
670 | .upper_margin = 0x30, | ||
671 | }, | ||
672 | }; | ||
673 | |||
674 | /* | ||
675 | * The outputs available from VPBE + encoders. Keep the order same | ||
676 | * as that of encoders. First those from venc followed by that from | ||
677 | * encoders. Index in the output refers to index on a particular encoder. | ||
678 | * Driver uses this index to pass it to encoder when it supports more | ||
679 | * than one output. Userspace applications use index of the array to | ||
680 | * set an output. | ||
681 | */ | ||
682 | static struct vpbe_output dm644xevm_vpbe_outputs[] = { | ||
683 | { | ||
684 | .output = { | ||
685 | .index = 0, | ||
686 | .name = "Composite", | ||
687 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
688 | .std = VENC_STD_ALL, | ||
689 | .capabilities = V4L2_OUT_CAP_STD, | ||
690 | }, | ||
691 | .subdev_name = VPBE_VENC_SUBDEV_NAME, | ||
692 | .default_mode = "ntsc", | ||
693 | .num_modes = ARRAY_SIZE(dm644xevm_enc_std_timing), | ||
694 | .modes = dm644xevm_enc_std_timing, | ||
695 | }, | ||
696 | { | ||
697 | .output = { | ||
698 | .index = 1, | ||
699 | .name = "Component", | ||
700 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
701 | .capabilities = V4L2_OUT_CAP_PRESETS, | ||
702 | }, | ||
703 | .subdev_name = VPBE_VENC_SUBDEV_NAME, | ||
704 | .default_mode = "480p59_94", | ||
705 | .num_modes = ARRAY_SIZE(dm644xevm_enc_preset_timing), | ||
706 | .modes = dm644xevm_enc_preset_timing, | ||
707 | }, | ||
708 | }; | ||
709 | |||
710 | static struct vpbe_config dm644xevm_display_cfg = { | ||
711 | .module_name = "dm644x-vpbe-display", | ||
712 | .i2c_adapter_id = 1, | ||
713 | .osd = { | ||
714 | .module_name = VPBE_OSD_SUBDEV_NAME, | ||
715 | }, | ||
716 | .venc = { | ||
717 | .module_name = VPBE_VENC_SUBDEV_NAME, | ||
718 | }, | ||
719 | .num_outputs = ARRAY_SIZE(dm644xevm_vpbe_outputs), | ||
720 | .outputs = dm644xevm_vpbe_outputs, | ||
721 | }; | ||
722 | |||
616 | static struct platform_device *davinci_evm_devices[] __initdata = { | 723 | static struct platform_device *davinci_evm_devices[] __initdata = { |
617 | &davinci_fb_device, | 724 | &davinci_fb_device, |
618 | &rtc_dev, | 725 | &rtc_dev, |
@@ -696,7 +803,7 @@ static __init void davinci_evm_init(void) | |||
696 | evm_init_i2c(); | 803 | evm_init_i2c(); |
697 | 804 | ||
698 | davinci_setup_mmc(0, &dm6446evm_mmc_config); | 805 | davinci_setup_mmc(0, &dm6446evm_mmc_config); |
699 | dm644x_init_video(&dm644xevm_capture_cfg); | 806 | dm644x_init_video(&dm644xevm_capture_cfg, &dm644xevm_display_cfg); |
700 | 807 | ||
701 | davinci_serial_init(&uart_config); | 808 | davinci_serial_init(&uart_config); |
702 | dm644x_init_asp(&dm644x_evm_snd_data); | 809 | dm644x_init_asp(&dm644x_evm_snd_data); |
diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h index 9d708034b57f..3e519dad5bb9 100644 --- a/arch/arm/mach-davinci/davinci.h +++ b/arch/arm/mach-davinci/davinci.h | |||
@@ -29,9 +29,15 @@ | |||
29 | 29 | ||
30 | #include <media/davinci/vpfe_capture.h> | 30 | #include <media/davinci/vpfe_capture.h> |
31 | #include <media/davinci/vpif_types.h> | 31 | #include <media/davinci/vpif_types.h> |
32 | #include <media/davinci/vpss.h> | ||
33 | #include <media/davinci/vpbe_types.h> | ||
34 | #include <media/davinci/vpbe_venc.h> | ||
35 | #include <media/davinci/vpbe.h> | ||
36 | #include <media/davinci/vpbe_osd.h> | ||
32 | 37 | ||
33 | #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000 | 38 | #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000 |
34 | #define SYSMOD_VIDCLKCTL 0x38 | 39 | #define SYSMOD_VIDCLKCTL 0x38 |
40 | #define SYSMOD_VPSS_CLKCTL 0x44 | ||
35 | #define SYSMOD_VDD3P3VPWDN 0x48 | 41 | #define SYSMOD_VDD3P3VPWDN 0x48 |
36 | #define SYSMOD_VSCLKDIS 0x6c | 42 | #define SYSMOD_VSCLKDIS 0x6c |
37 | #define SYSMOD_PUPDCTL1 0x7c | 43 | #define SYSMOD_PUPDCTL1 0x7c |
@@ -83,7 +89,7 @@ void dm365_set_vpfe_config(struct vpfe_config *cfg); | |||
83 | /* DM644x function declarations */ | 89 | /* DM644x function declarations */ |
84 | void __init dm644x_init(void); | 90 | void __init dm644x_init(void); |
85 | void __init dm644x_init_asp(struct snd_platform_data *pdata); | 91 | void __init dm644x_init_asp(struct snd_platform_data *pdata); |
86 | int __init dm644x_init_video(struct vpfe_config *); | 92 | int __init dm644x_init_video(struct vpfe_config *, struct vpbe_config *); |
87 | 93 | ||
88 | /* DM646x function declarations */ | 94 | /* DM646x function declarations */ |
89 | void __init dm646x_init(void); | 95 | void __init dm646x_init(void); |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 23e81cafba8d..c8b866657fcb 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -627,7 +627,7 @@ static struct resource dm644x_vpfe_resources[] = { | |||
627 | }, | 627 | }, |
628 | }; | 628 | }; |
629 | 629 | ||
630 | static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32); | 630 | static u64 dm644x_video_dma_mask = DMA_BIT_MASK(32); |
631 | static struct resource dm644x_ccdc_resource[] = { | 631 | static struct resource dm644x_ccdc_resource[] = { |
632 | /* CCDC Base address */ | 632 | /* CCDC Base address */ |
633 | { | 633 | { |
@@ -643,7 +643,7 @@ static struct platform_device dm644x_ccdc_dev = { | |||
643 | .num_resources = ARRAY_SIZE(dm644x_ccdc_resource), | 643 | .num_resources = ARRAY_SIZE(dm644x_ccdc_resource), |
644 | .resource = dm644x_ccdc_resource, | 644 | .resource = dm644x_ccdc_resource, |
645 | .dev = { | 645 | .dev = { |
646 | .dma_mask = &vpfe_capture_dma_mask, | 646 | .dma_mask = &dm644x_video_dma_mask, |
647 | .coherent_dma_mask = DMA_BIT_MASK(32), | 647 | .coherent_dma_mask = DMA_BIT_MASK(32), |
648 | }, | 648 | }, |
649 | }; | 649 | }; |
@@ -654,7 +654,134 @@ static struct platform_device dm644x_vpfe_dev = { | |||
654 | .num_resources = ARRAY_SIZE(dm644x_vpfe_resources), | 654 | .num_resources = ARRAY_SIZE(dm644x_vpfe_resources), |
655 | .resource = dm644x_vpfe_resources, | 655 | .resource = dm644x_vpfe_resources, |
656 | .dev = { | 656 | .dev = { |
657 | .dma_mask = &vpfe_capture_dma_mask, | 657 | .dma_mask = &dm644x_video_dma_mask, |
658 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
659 | }, | ||
660 | }; | ||
661 | |||
662 | #define DM644X_OSD_BASE 0x01c72600 | ||
663 | |||
664 | static struct resource dm644x_osd_resources[] = { | ||
665 | { | ||
666 | .start = DM644X_OSD_BASE, | ||
667 | .end = DM644X_OSD_BASE + 0x1ff, | ||
668 | .flags = IORESOURCE_MEM, | ||
669 | }, | ||
670 | }; | ||
671 | |||
672 | static struct osd_platform_data dm644x_osd_data = { | ||
673 | .vpbe_type = VPBE_VERSION_1, | ||
674 | }; | ||
675 | |||
676 | static struct platform_device dm644x_osd_dev = { | ||
677 | .name = VPBE_OSD_SUBDEV_NAME, | ||
678 | .id = -1, | ||
679 | .num_resources = ARRAY_SIZE(dm644x_osd_resources), | ||
680 | .resource = dm644x_osd_resources, | ||
681 | .dev = { | ||
682 | .dma_mask = &dm644x_video_dma_mask, | ||
683 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
684 | .platform_data = &dm644x_osd_data, | ||
685 | }, | ||
686 | }; | ||
687 | |||
688 | #define DM644X_VENC_BASE 0x01c72400 | ||
689 | |||
690 | static struct resource dm644x_venc_resources[] = { | ||
691 | { | ||
692 | .start = DM644X_VENC_BASE, | ||
693 | .end = DM644X_VENC_BASE + 0x17f, | ||
694 | .flags = IORESOURCE_MEM, | ||
695 | }, | ||
696 | }; | ||
697 | |||
698 | #define DM644X_VPSS_MUXSEL_PLL2_MODE BIT(0) | ||
699 | #define DM644X_VPSS_MUXSEL_VPBECLK_MODE BIT(1) | ||
700 | #define DM644X_VPSS_VENCLKEN BIT(3) | ||
701 | #define DM644X_VPSS_DACCLKEN BIT(4) | ||
702 | |||
703 | static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, | ||
704 | unsigned int mode) | ||
705 | { | ||
706 | int ret = 0; | ||
707 | u32 v = DM644X_VPSS_VENCLKEN; | ||
708 | |||
709 | switch (type) { | ||
710 | case VPBE_ENC_STD: | ||
711 | v |= DM644X_VPSS_DACCLKEN; | ||
712 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | ||
713 | break; | ||
714 | case VPBE_ENC_DV_PRESET: | ||
715 | switch (mode) { | ||
716 | case V4L2_DV_480P59_94: | ||
717 | case V4L2_DV_576P50: | ||
718 | v |= DM644X_VPSS_MUXSEL_PLL2_MODE | | ||
719 | DM644X_VPSS_DACCLKEN; | ||
720 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | ||
721 | break; | ||
722 | case V4L2_DV_720P60: | ||
723 | case V4L2_DV_1080I60: | ||
724 | case V4L2_DV_1080P30: | ||
725 | /* | ||
726 | * For HD, use external clock source since | ||
727 | * HD requires higher clock rate | ||
728 | */ | ||
729 | v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE; | ||
730 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | ||
731 | break; | ||
732 | default: | ||
733 | ret = -EINVAL; | ||
734 | break; | ||
735 | } | ||
736 | break; | ||
737 | default: | ||
738 | ret = -EINVAL; | ||
739 | } | ||
740 | |||
741 | return ret; | ||
742 | } | ||
743 | |||
744 | static struct resource dm644x_v4l2_disp_resources[] = { | ||
745 | { | ||
746 | .start = IRQ_VENCINT, | ||
747 | .end = IRQ_VENCINT, | ||
748 | .flags = IORESOURCE_IRQ, | ||
749 | }, | ||
750 | }; | ||
751 | |||
752 | static struct platform_device dm644x_vpbe_display = { | ||
753 | .name = "vpbe-v4l2", | ||
754 | .id = -1, | ||
755 | .num_resources = ARRAY_SIZE(dm644x_v4l2_disp_resources), | ||
756 | .resource = dm644x_v4l2_disp_resources, | ||
757 | .dev = { | ||
758 | .dma_mask = &dm644x_video_dma_mask, | ||
759 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
760 | }, | ||
761 | }; | ||
762 | |||
763 | static struct venc_platform_data dm644x_venc_pdata = { | ||
764 | .venc_type = VPBE_VERSION_1, | ||
765 | .setup_clock = dm644x_venc_setup_clock, | ||
766 | }; | ||
767 | |||
768 | static struct platform_device dm644x_venc_dev = { | ||
769 | .name = VPBE_VENC_SUBDEV_NAME, | ||
770 | .id = -1, | ||
771 | .num_resources = ARRAY_SIZE(dm644x_venc_resources), | ||
772 | .resource = dm644x_venc_resources, | ||
773 | .dev = { | ||
774 | .dma_mask = &dm644x_video_dma_mask, | ||
775 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
776 | .platform_data = &dm644x_venc_pdata, | ||
777 | }, | ||
778 | }; | ||
779 | |||
780 | static struct platform_device dm644x_vpbe_dev = { | ||
781 | .name = "vpbe_controller", | ||
782 | .id = -1, | ||
783 | .dev = { | ||
784 | .dma_mask = &dm644x_video_dma_mask, | ||
658 | .coherent_dma_mask = DMA_BIT_MASK(32), | 785 | .coherent_dma_mask = DMA_BIT_MASK(32), |
659 | }, | 786 | }, |
660 | }; | 787 | }; |
@@ -786,17 +913,30 @@ void __init dm644x_init(void) | |||
786 | davinci_map_sysmod(); | 913 | davinci_map_sysmod(); |
787 | } | 914 | } |
788 | 915 | ||
789 | int __init dm644x_init_video(struct vpfe_config *vpfe_cfg) | 916 | int __init dm644x_init_video(struct vpfe_config *vpfe_cfg, |
917 | struct vpbe_config *vpbe_cfg) | ||
790 | { | 918 | { |
791 | dm644x_vpfe_dev.dev.platform_data = vpfe_cfg; | 919 | if (vpfe_cfg || vpbe_cfg) |
792 | 920 | platform_device_register(&dm644x_vpss_device); | |
793 | /* Add ccdc clock aliases */ | 921 | |
794 | clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL); | 922 | if (vpfe_cfg) { |
795 | clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL); | 923 | dm644x_vpfe_dev.dev.platform_data = vpfe_cfg; |
796 | 924 | platform_device_register(&dm644x_ccdc_dev); | |
797 | platform_device_register(&dm644x_vpss_device); | 925 | platform_device_register(&dm644x_vpfe_dev); |
798 | platform_device_register(&dm644x_ccdc_dev); | 926 | /* Add ccdc clock aliases */ |
799 | platform_device_register(&dm644x_vpfe_dev); | 927 | clk_add_alias("master", dm644x_ccdc_dev.name, |
928 | "vpss_master", NULL); | ||
929 | clk_add_alias("slave", dm644x_ccdc_dev.name, | ||
930 | "vpss_slave", NULL); | ||
931 | } | ||
932 | |||
933 | if (vpbe_cfg) { | ||
934 | dm644x_vpbe_dev.dev.platform_data = vpbe_cfg; | ||
935 | platform_device_register(&dm644x_osd_dev); | ||
936 | platform_device_register(&dm644x_venc_dev); | ||
937 | platform_device_register(&dm644x_vpbe_dev); | ||
938 | platform_device_register(&dm644x_vpbe_display); | ||
939 | } | ||
800 | 940 | ||
801 | return 0; | 941 | return 0; |
802 | } | 942 | } |
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index e400d75d11ae..8c9f56a3e8ec 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/system.h> | 25 | #include <asm/system_misc.h> |
26 | 26 | ||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-ebsa110/leds.c b/arch/arm/mach-ebsa110/leds.c index d43121a30aa7..99e14e362500 100644 --- a/arch/arm/mach-ebsa110/leds.c +++ b/arch/arm/mach-ebsa110/leds.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include <asm/leds.h> | 19 | #include <asm/leds.h> |
20 | #include <asm/system.h> | ||
21 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
22 | 21 | ||
23 | #include "core.h" | 22 | #include "core.h" |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 2bf7d6e23989..0491ceef1cda 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -11,18 +11,19 @@ if ARCH_EXYNOS | |||
11 | 11 | ||
12 | menu "SAMSUNG EXYNOS SoCs Support" | 12 | menu "SAMSUNG EXYNOS SoCs Support" |
13 | 13 | ||
14 | choice | ||
15 | prompt "EXYNOS System Type" | ||
16 | default ARCH_EXYNOS4 | ||
17 | |||
18 | config ARCH_EXYNOS4 | 14 | config ARCH_EXYNOS4 |
19 | bool "SAMSUNG EXYNOS4" | 15 | bool "SAMSUNG EXYNOS4" |
16 | default y | ||
20 | select HAVE_SMP | 17 | select HAVE_SMP |
21 | select MIGHT_HAVE_CACHE_L2X0 | 18 | select MIGHT_HAVE_CACHE_L2X0 |
22 | help | 19 | help |
23 | Samsung EXYNOS4 SoCs based systems | 20 | Samsung EXYNOS4 SoCs based systems |
24 | 21 | ||
25 | endchoice | 22 | config ARCH_EXYNOS5 |
23 | bool "SAMSUNG EXYNOS5" | ||
24 | select HAVE_SMP | ||
25 | help | ||
26 | Samsung EXYNOS5 (Cortex-A15) SoC based systems | ||
26 | 27 | ||
27 | comment "EXYNOS SoCs" | 28 | comment "EXYNOS SoCs" |
28 | 29 | ||
@@ -56,6 +57,13 @@ config SOC_EXYNOS4412 | |||
56 | help | 57 | help |
57 | Enable EXYNOS4412 SoC support | 58 | Enable EXYNOS4412 SoC support |
58 | 59 | ||
60 | config SOC_EXYNOS5250 | ||
61 | bool "SAMSUNG EXYNOS5250" | ||
62 | default y | ||
63 | depends on ARCH_EXYNOS5 | ||
64 | help | ||
65 | Enable EXYNOS5250 SoC support | ||
66 | |||
59 | config EXYNOS4_MCT | 67 | config EXYNOS4_MCT |
60 | bool | 68 | bool |
61 | default y | 69 | default y |
@@ -356,7 +364,7 @@ config MACH_SMDK4412 | |||
356 | Machine support for Samsung SMDK4412 | 364 | Machine support for Samsung SMDK4412 |
357 | endif | 365 | endif |
358 | 366 | ||
359 | comment "Flattened Device Tree based board for Exynos4 based SoC" | 367 | comment "Flattened Device Tree based board for EXYNOS SoCs" |
360 | 368 | ||
361 | config MACH_EXYNOS4_DT | 369 | config MACH_EXYNOS4_DT |
362 | bool "Samsung Exynos4 Machine using device tree" | 370 | bool "Samsung Exynos4 Machine using device tree" |
@@ -370,6 +378,15 @@ config MACH_EXYNOS4_DT | |||
370 | Note: This is under development and not all peripherals can be supported | 378 | Note: This is under development and not all peripherals can be supported |
371 | with this machine file. | 379 | with this machine file. |
372 | 380 | ||
381 | config MACH_EXYNOS5_DT | ||
382 | bool "SAMSUNG EXYNOS5 Machine using device tree" | ||
383 | select SOC_EXYNOS5250 | ||
384 | select USE_OF | ||
385 | select ARM_AMBA | ||
386 | help | ||
387 | Machine support for Samsung Exynos4 machine with device tree enabled. | ||
388 | Select this if a fdt blob is available for the EXYNOS4 SoC based board. | ||
389 | |||
373 | if ARCH_EXYNOS4 | 390 | if ARCH_EXYNOS4 |
374 | 391 | ||
375 | comment "Configuration for HSMMC 8-bit bus width" | 392 | comment "Configuration for HSMMC 8-bit bus width" |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 9a4c09896509..8631840d1b5e 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
@@ -14,6 +14,7 @@ obj- := | |||
14 | 14 | ||
15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o | 15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o |
16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o | 16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o |
17 | obj-$(CONFIG_ARCH_EXYNOS5) += clock-exynos5.o | ||
17 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o | 18 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o |
18 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o | 19 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o |
19 | 20 | ||
@@ -42,9 +43,11 @@ obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o | |||
42 | obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o | 43 | obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o |
43 | 44 | ||
44 | obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o | 45 | obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o |
46 | obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o | ||
45 | 47 | ||
46 | # device support | 48 | # device support |
47 | 49 | ||
50 | obj-y += dev-uart.o | ||
48 | obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o | 51 | obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o |
49 | obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o | 52 | obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o |
50 | obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o | 53 | obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o |
@@ -52,7 +55,7 @@ obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o | |||
52 | obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o | 55 | obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o |
53 | obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o | 56 | obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o |
54 | 57 | ||
55 | obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o | 58 | obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o |
56 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o | 59 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o |
57 | obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o | 60 | obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o |
58 | obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o | 61 | obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o |
diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c index 200159dcb341..df54c2a92225 100644 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ b/arch/arm/mach-exynos/clock-exynos4.c | |||
@@ -496,11 +496,6 @@ static struct clk exynos4_init_clocks_off[] = { | |||
496 | .enable = exynos4_clk_ip_cam_ctrl, | 496 | .enable = exynos4_clk_ip_cam_ctrl, |
497 | .ctrlbit = (1 << 3), | 497 | .ctrlbit = (1 << 3), |
498 | }, { | 498 | }, { |
499 | .name = "fimd", | ||
500 | .devname = "exynos4-fb.0", | ||
501 | .enable = exynos4_clk_ip_lcd0_ctrl, | ||
502 | .ctrlbit = (1 << 0), | ||
503 | }, { | ||
504 | .name = "hsmmc", | 499 | .name = "hsmmc", |
505 | .devname = "s3c-sdhci.0", | 500 | .devname = "s3c-sdhci.0", |
506 | .parent = &exynos4_clk_aclk_133.clk, | 501 | .parent = &exynos4_clk_aclk_133.clk, |
@@ -796,6 +791,13 @@ static struct clk exynos4_clk_mdma1 = { | |||
796 | .ctrlbit = ((1 << 8) | (1 << 5) | (1 << 2)), | 791 | .ctrlbit = ((1 << 8) | (1 << 5) | (1 << 2)), |
797 | }; | 792 | }; |
798 | 793 | ||
794 | static struct clk exynos4_clk_fimd0 = { | ||
795 | .name = "fimd", | ||
796 | .devname = "exynos4-fb.0", | ||
797 | .enable = exynos4_clk_ip_lcd0_ctrl, | ||
798 | .ctrlbit = (1 << 0), | ||
799 | }; | ||
800 | |||
799 | struct clk *exynos4_clkset_group_list[] = { | 801 | struct clk *exynos4_clkset_group_list[] = { |
800 | [0] = &clk_ext_xtal_mux, | 802 | [0] = &clk_ext_xtal_mux, |
801 | [1] = &clk_xusbxti, | 803 | [1] = &clk_xusbxti, |
@@ -1315,6 +1317,7 @@ static struct clk *exynos4_clk_cdev[] = { | |||
1315 | &exynos4_clk_pdma0, | 1317 | &exynos4_clk_pdma0, |
1316 | &exynos4_clk_pdma1, | 1318 | &exynos4_clk_pdma1, |
1317 | &exynos4_clk_mdma1, | 1319 | &exynos4_clk_mdma1, |
1320 | &exynos4_clk_fimd0, | ||
1318 | }; | 1321 | }; |
1319 | 1322 | ||
1320 | static struct clksrc_clk *exynos4_clksrc_cdev[] = { | 1323 | static struct clksrc_clk *exynos4_clksrc_cdev[] = { |
@@ -1341,6 +1344,7 @@ static struct clk_lookup exynos4_clk_lookup[] = { | |||
1341 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &exynos4_clk_sclk_mmc1.clk), | 1344 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &exynos4_clk_sclk_mmc1.clk), |
1342 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &exynos4_clk_sclk_mmc2.clk), | 1345 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &exynos4_clk_sclk_mmc2.clk), |
1343 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk), | 1346 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk), |
1347 | CLKDEV_INIT("exynos4-fb.0", "lcd", &exynos4_clk_fimd0), | ||
1344 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0), | 1348 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0), |
1345 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1), | 1349 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1), |
1346 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos4_clk_mdma1), | 1350 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos4_clk_mdma1), |
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c new file mode 100644 index 000000000000..d013982d0f8e --- /dev/null +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -0,0 +1,1247 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Clock support for EXYNOS5 SoCs | ||
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 | #include <linux/kernel.h> | ||
13 | #include <linux/err.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/syscore_ops.h> | ||
16 | |||
17 | #include <plat/cpu-freq.h> | ||
18 | #include <plat/clock.h> | ||
19 | #include <plat/cpu.h> | ||
20 | #include <plat/pll.h> | ||
21 | #include <plat/s5p-clock.h> | ||
22 | #include <plat/clock-clksrc.h> | ||
23 | #include <plat/pm.h> | ||
24 | |||
25 | #include <mach/map.h> | ||
26 | #include <mach/regs-clock.h> | ||
27 | #include <mach/sysmmu.h> | ||
28 | |||
29 | #include "common.h" | ||
30 | |||
31 | #ifdef CONFIG_PM_SLEEP | ||
32 | static struct sleep_save exynos5_clock_save[] = { | ||
33 | /* will be implemented */ | ||
34 | }; | ||
35 | #endif | ||
36 | |||
37 | static struct clk exynos5_clk_sclk_dptxphy = { | ||
38 | .name = "sclk_dptx", | ||
39 | }; | ||
40 | |||
41 | static struct clk exynos5_clk_sclk_hdmi24m = { | ||
42 | .name = "sclk_hdmi24m", | ||
43 | .rate = 24000000, | ||
44 | }; | ||
45 | |||
46 | static struct clk exynos5_clk_sclk_hdmi27m = { | ||
47 | .name = "sclk_hdmi27m", | ||
48 | .rate = 27000000, | ||
49 | }; | ||
50 | |||
51 | static struct clk exynos5_clk_sclk_hdmiphy = { | ||
52 | .name = "sclk_hdmiphy", | ||
53 | }; | ||
54 | |||
55 | static struct clk exynos5_clk_sclk_usbphy = { | ||
56 | .name = "sclk_usbphy", | ||
57 | .rate = 48000000, | ||
58 | }; | ||
59 | |||
60 | static int exynos5_clksrc_mask_top_ctrl(struct clk *clk, int enable) | ||
61 | { | ||
62 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_TOP, clk, enable); | ||
63 | } | ||
64 | |||
65 | static int exynos5_clksrc_mask_disp1_0_ctrl(struct clk *clk, int enable) | ||
66 | { | ||
67 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_DISP1_0, clk, enable); | ||
68 | } | ||
69 | |||
70 | static int exynos5_clksrc_mask_fsys_ctrl(struct clk *clk, int enable) | ||
71 | { | ||
72 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_FSYS, clk, enable); | ||
73 | } | ||
74 | |||
75 | static int exynos5_clksrc_mask_gscl_ctrl(struct clk *clk, int enable) | ||
76 | { | ||
77 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_GSCL, clk, enable); | ||
78 | } | ||
79 | |||
80 | static int exynos5_clksrc_mask_peric0_ctrl(struct clk *clk, int enable) | ||
81 | { | ||
82 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_PERIC0, clk, enable); | ||
83 | } | ||
84 | |||
85 | static int exynos5_clk_ip_core_ctrl(struct clk *clk, int enable) | ||
86 | { | ||
87 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_CORE, clk, enable); | ||
88 | } | ||
89 | |||
90 | static int exynos5_clk_ip_disp1_ctrl(struct clk *clk, int enable) | ||
91 | { | ||
92 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_DISP1, clk, enable); | ||
93 | } | ||
94 | |||
95 | static int exynos5_clk_ip_fsys_ctrl(struct clk *clk, int enable) | ||
96 | { | ||
97 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_FSYS, clk, enable); | ||
98 | } | ||
99 | |||
100 | static int exynos5_clk_block_ctrl(struct clk *clk, int enable) | ||
101 | { | ||
102 | return s5p_gatectrl(EXYNOS5_CLKGATE_BLOCK, clk, enable); | ||
103 | } | ||
104 | |||
105 | static int exynos5_clk_ip_gen_ctrl(struct clk *clk, int enable) | ||
106 | { | ||
107 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_GEN, clk, enable); | ||
108 | } | ||
109 | |||
110 | static int exynos5_clk_ip_gps_ctrl(struct clk *clk, int enable) | ||
111 | { | ||
112 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_GPS, clk, enable); | ||
113 | } | ||
114 | |||
115 | static int exynos5_clk_ip_mfc_ctrl(struct clk *clk, int enable) | ||
116 | { | ||
117 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_MFC, clk, enable); | ||
118 | } | ||
119 | |||
120 | static int exynos5_clk_ip_peric_ctrl(struct clk *clk, int enable) | ||
121 | { | ||
122 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_PERIC, clk, enable); | ||
123 | } | ||
124 | |||
125 | static int exynos5_clk_ip_peris_ctrl(struct clk *clk, int enable) | ||
126 | { | ||
127 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_PERIS, clk, enable); | ||
128 | } | ||
129 | |||
130 | /* Core list of CMU_CPU side */ | ||
131 | |||
132 | static struct clksrc_clk exynos5_clk_mout_apll = { | ||
133 | .clk = { | ||
134 | .name = "mout_apll", | ||
135 | }, | ||
136 | .sources = &clk_src_apll, | ||
137 | .reg_src = { .reg = EXYNOS5_CLKSRC_CPU, .shift = 0, .size = 1 }, | ||
138 | }; | ||
139 | |||
140 | static struct clksrc_clk exynos5_clk_sclk_apll = { | ||
141 | .clk = { | ||
142 | .name = "sclk_apll", | ||
143 | .parent = &exynos5_clk_mout_apll.clk, | ||
144 | }, | ||
145 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 24, .size = 3 }, | ||
146 | }; | ||
147 | |||
148 | static struct clksrc_clk exynos5_clk_mout_bpll = { | ||
149 | .clk = { | ||
150 | .name = "mout_bpll", | ||
151 | }, | ||
152 | .sources = &clk_src_bpll, | ||
153 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 0, .size = 1 }, | ||
154 | }; | ||
155 | |||
156 | static struct clk *exynos5_clk_src_bpll_user_list[] = { | ||
157 | [0] = &clk_fin_mpll, | ||
158 | [1] = &exynos5_clk_mout_bpll.clk, | ||
159 | }; | ||
160 | |||
161 | static struct clksrc_sources exynos5_clk_src_bpll_user = { | ||
162 | .sources = exynos5_clk_src_bpll_user_list, | ||
163 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_bpll_user_list), | ||
164 | }; | ||
165 | |||
166 | static struct clksrc_clk exynos5_clk_mout_bpll_user = { | ||
167 | .clk = { | ||
168 | .name = "mout_bpll_user", | ||
169 | }, | ||
170 | .sources = &exynos5_clk_src_bpll_user, | ||
171 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 24, .size = 1 }, | ||
172 | }; | ||
173 | |||
174 | static struct clksrc_clk exynos5_clk_mout_cpll = { | ||
175 | .clk = { | ||
176 | .name = "mout_cpll", | ||
177 | }, | ||
178 | .sources = &clk_src_cpll, | ||
179 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 8, .size = 1 }, | ||
180 | }; | ||
181 | |||
182 | static struct clksrc_clk exynos5_clk_mout_epll = { | ||
183 | .clk = { | ||
184 | .name = "mout_epll", | ||
185 | }, | ||
186 | .sources = &clk_src_epll, | ||
187 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 12, .size = 1 }, | ||
188 | }; | ||
189 | |||
190 | struct clksrc_clk exynos5_clk_mout_mpll = { | ||
191 | .clk = { | ||
192 | .name = "mout_mpll", | ||
193 | }, | ||
194 | .sources = &clk_src_mpll, | ||
195 | .reg_src = { .reg = EXYNOS5_CLKSRC_CORE1, .shift = 8, .size = 1 }, | ||
196 | }; | ||
197 | |||
198 | static struct clk *exynos_clkset_vpllsrc_list[] = { | ||
199 | [0] = &clk_fin_vpll, | ||
200 | [1] = &exynos5_clk_sclk_hdmi27m, | ||
201 | }; | ||
202 | |||
203 | static struct clksrc_sources exynos5_clkset_vpllsrc = { | ||
204 | .sources = exynos_clkset_vpllsrc_list, | ||
205 | .nr_sources = ARRAY_SIZE(exynos_clkset_vpllsrc_list), | ||
206 | }; | ||
207 | |||
208 | static struct clksrc_clk exynos5_clk_vpllsrc = { | ||
209 | .clk = { | ||
210 | .name = "vpll_src", | ||
211 | .enable = exynos5_clksrc_mask_top_ctrl, | ||
212 | .ctrlbit = (1 << 0), | ||
213 | }, | ||
214 | .sources = &exynos5_clkset_vpllsrc, | ||
215 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 0, .size = 1 }, | ||
216 | }; | ||
217 | |||
218 | static struct clk *exynos5_clkset_sclk_vpll_list[] = { | ||
219 | [0] = &exynos5_clk_vpllsrc.clk, | ||
220 | [1] = &clk_fout_vpll, | ||
221 | }; | ||
222 | |||
223 | static struct clksrc_sources exynos5_clkset_sclk_vpll = { | ||
224 | .sources = exynos5_clkset_sclk_vpll_list, | ||
225 | .nr_sources = ARRAY_SIZE(exynos5_clkset_sclk_vpll_list), | ||
226 | }; | ||
227 | |||
228 | static struct clksrc_clk exynos5_clk_sclk_vpll = { | ||
229 | .clk = { | ||
230 | .name = "sclk_vpll", | ||
231 | }, | ||
232 | .sources = &exynos5_clkset_sclk_vpll, | ||
233 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 16, .size = 1 }, | ||
234 | }; | ||
235 | |||
236 | static struct clksrc_clk exynos5_clk_sclk_pixel = { | ||
237 | .clk = { | ||
238 | .name = "sclk_pixel", | ||
239 | .parent = &exynos5_clk_sclk_vpll.clk, | ||
240 | }, | ||
241 | .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 28, .size = 4 }, | ||
242 | }; | ||
243 | |||
244 | static struct clk *exynos5_clkset_sclk_hdmi_list[] = { | ||
245 | [0] = &exynos5_clk_sclk_pixel.clk, | ||
246 | [1] = &exynos5_clk_sclk_hdmiphy, | ||
247 | }; | ||
248 | |||
249 | static struct clksrc_sources exynos5_clkset_sclk_hdmi = { | ||
250 | .sources = exynos5_clkset_sclk_hdmi_list, | ||
251 | .nr_sources = ARRAY_SIZE(exynos5_clkset_sclk_hdmi_list), | ||
252 | }; | ||
253 | |||
254 | static struct clksrc_clk exynos5_clk_sclk_hdmi = { | ||
255 | .clk = { | ||
256 | .name = "sclk_hdmi", | ||
257 | .enable = exynos5_clksrc_mask_disp1_0_ctrl, | ||
258 | .ctrlbit = (1 << 20), | ||
259 | }, | ||
260 | .sources = &exynos5_clkset_sclk_hdmi, | ||
261 | .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 20, .size = 1 }, | ||
262 | }; | ||
263 | |||
264 | static struct clksrc_clk *exynos5_sclk_tv[] = { | ||
265 | &exynos5_clk_sclk_pixel, | ||
266 | &exynos5_clk_sclk_hdmi, | ||
267 | }; | ||
268 | |||
269 | static struct clk *exynos5_clk_src_mpll_user_list[] = { | ||
270 | [0] = &clk_fin_mpll, | ||
271 | [1] = &exynos5_clk_mout_mpll.clk, | ||
272 | }; | ||
273 | |||
274 | static struct clksrc_sources exynos5_clk_src_mpll_user = { | ||
275 | .sources = exynos5_clk_src_mpll_user_list, | ||
276 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_user_list), | ||
277 | }; | ||
278 | |||
279 | static struct clksrc_clk exynos5_clk_mout_mpll_user = { | ||
280 | .clk = { | ||
281 | .name = "mout_mpll_user", | ||
282 | }, | ||
283 | .sources = &exynos5_clk_src_mpll_user, | ||
284 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 20, .size = 1 }, | ||
285 | }; | ||
286 | |||
287 | static struct clk *exynos5_clkset_mout_cpu_list[] = { | ||
288 | [0] = &exynos5_clk_mout_apll.clk, | ||
289 | [1] = &exynos5_clk_mout_mpll.clk, | ||
290 | }; | ||
291 | |||
292 | static struct clksrc_sources exynos5_clkset_mout_cpu = { | ||
293 | .sources = exynos5_clkset_mout_cpu_list, | ||
294 | .nr_sources = ARRAY_SIZE(exynos5_clkset_mout_cpu_list), | ||
295 | }; | ||
296 | |||
297 | static struct clksrc_clk exynos5_clk_mout_cpu = { | ||
298 | .clk = { | ||
299 | .name = "mout_cpu", | ||
300 | }, | ||
301 | .sources = &exynos5_clkset_mout_cpu, | ||
302 | .reg_src = { .reg = EXYNOS5_CLKSRC_CPU, .shift = 16, .size = 1 }, | ||
303 | }; | ||
304 | |||
305 | static struct clksrc_clk exynos5_clk_dout_armclk = { | ||
306 | .clk = { | ||
307 | .name = "dout_armclk", | ||
308 | .parent = &exynos5_clk_mout_cpu.clk, | ||
309 | }, | ||
310 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 0, .size = 3 }, | ||
311 | }; | ||
312 | |||
313 | static struct clksrc_clk exynos5_clk_dout_arm2clk = { | ||
314 | .clk = { | ||
315 | .name = "dout_arm2clk", | ||
316 | .parent = &exynos5_clk_dout_armclk.clk, | ||
317 | }, | ||
318 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 28, .size = 3 }, | ||
319 | }; | ||
320 | |||
321 | static struct clk exynos5_clk_armclk = { | ||
322 | .name = "armclk", | ||
323 | .parent = &exynos5_clk_dout_arm2clk.clk, | ||
324 | }; | ||
325 | |||
326 | /* Core list of CMU_CDREX side */ | ||
327 | |||
328 | static struct clk *exynos5_clkset_cdrex_list[] = { | ||
329 | [0] = &exynos5_clk_mout_mpll.clk, | ||
330 | [1] = &exynos5_clk_mout_bpll.clk, | ||
331 | }; | ||
332 | |||
333 | static struct clksrc_sources exynos5_clkset_cdrex = { | ||
334 | .sources = exynos5_clkset_cdrex_list, | ||
335 | .nr_sources = ARRAY_SIZE(exynos5_clkset_cdrex_list), | ||
336 | }; | ||
337 | |||
338 | static struct clksrc_clk exynos5_clk_cdrex = { | ||
339 | .clk = { | ||
340 | .name = "clk_cdrex", | ||
341 | }, | ||
342 | .sources = &exynos5_clkset_cdrex, | ||
343 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 4, .size = 1 }, | ||
344 | .reg_div = { .reg = EXYNOS5_CLKDIV_CDREX, .shift = 16, .size = 3 }, | ||
345 | }; | ||
346 | |||
347 | static struct clksrc_clk exynos5_clk_aclk_acp = { | ||
348 | .clk = { | ||
349 | .name = "aclk_acp", | ||
350 | .parent = &exynos5_clk_mout_mpll.clk, | ||
351 | }, | ||
352 | .reg_div = { .reg = EXYNOS5_CLKDIV_ACP, .shift = 0, .size = 3 }, | ||
353 | }; | ||
354 | |||
355 | static struct clksrc_clk exynos5_clk_pclk_acp = { | ||
356 | .clk = { | ||
357 | .name = "pclk_acp", | ||
358 | .parent = &exynos5_clk_aclk_acp.clk, | ||
359 | }, | ||
360 | .reg_div = { .reg = EXYNOS5_CLKDIV_ACP, .shift = 4, .size = 3 }, | ||
361 | }; | ||
362 | |||
363 | /* Core list of CMU_TOP side */ | ||
364 | |||
365 | struct clk *exynos5_clkset_aclk_top_list[] = { | ||
366 | [0] = &exynos5_clk_mout_mpll_user.clk, | ||
367 | [1] = &exynos5_clk_mout_bpll_user.clk, | ||
368 | }; | ||
369 | |||
370 | struct clksrc_sources exynos5_clkset_aclk = { | ||
371 | .sources = exynos5_clkset_aclk_top_list, | ||
372 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_top_list), | ||
373 | }; | ||
374 | |||
375 | static struct clksrc_clk exynos5_clk_aclk_400 = { | ||
376 | .clk = { | ||
377 | .name = "aclk_400", | ||
378 | }, | ||
379 | .sources = &exynos5_clkset_aclk, | ||
380 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 20, .size = 1 }, | ||
381 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, | ||
382 | }; | ||
383 | |||
384 | struct clk *exynos5_clkset_aclk_333_166_list[] = { | ||
385 | [0] = &exynos5_clk_mout_cpll.clk, | ||
386 | [1] = &exynos5_clk_mout_mpll_user.clk, | ||
387 | }; | ||
388 | |||
389 | struct clksrc_sources exynos5_clkset_aclk_333_166 = { | ||
390 | .sources = exynos5_clkset_aclk_333_166_list, | ||
391 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_333_166_list), | ||
392 | }; | ||
393 | |||
394 | static struct clksrc_clk exynos5_clk_aclk_333 = { | ||
395 | .clk = { | ||
396 | .name = "aclk_333", | ||
397 | }, | ||
398 | .sources = &exynos5_clkset_aclk_333_166, | ||
399 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 16, .size = 1 }, | ||
400 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 20, .size = 3 }, | ||
401 | }; | ||
402 | |||
403 | static struct clksrc_clk exynos5_clk_aclk_166 = { | ||
404 | .clk = { | ||
405 | .name = "aclk_166", | ||
406 | }, | ||
407 | .sources = &exynos5_clkset_aclk_333_166, | ||
408 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 8, .size = 1 }, | ||
409 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 8, .size = 3 }, | ||
410 | }; | ||
411 | |||
412 | static struct clksrc_clk exynos5_clk_aclk_266 = { | ||
413 | .clk = { | ||
414 | .name = "aclk_266", | ||
415 | .parent = &exynos5_clk_mout_mpll_user.clk, | ||
416 | }, | ||
417 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 16, .size = 3 }, | ||
418 | }; | ||
419 | |||
420 | static struct clksrc_clk exynos5_clk_aclk_200 = { | ||
421 | .clk = { | ||
422 | .name = "aclk_200", | ||
423 | }, | ||
424 | .sources = &exynos5_clkset_aclk, | ||
425 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 12, .size = 1 }, | ||
426 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 12, .size = 3 }, | ||
427 | }; | ||
428 | |||
429 | static struct clksrc_clk exynos5_clk_aclk_66_pre = { | ||
430 | .clk = { | ||
431 | .name = "aclk_66_pre", | ||
432 | .parent = &exynos5_clk_mout_mpll_user.clk, | ||
433 | }, | ||
434 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP1, .shift = 24, .size = 3 }, | ||
435 | }; | ||
436 | |||
437 | static struct clksrc_clk exynos5_clk_aclk_66 = { | ||
438 | .clk = { | ||
439 | .name = "aclk_66", | ||
440 | .parent = &exynos5_clk_aclk_66_pre.clk, | ||
441 | }, | ||
442 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 0, .size = 3 }, | ||
443 | }; | ||
444 | |||
445 | static struct clk exynos5_init_clocks_off[] = { | ||
446 | { | ||
447 | .name = "timers", | ||
448 | .parent = &exynos5_clk_aclk_66.clk, | ||
449 | .enable = exynos5_clk_ip_peric_ctrl, | ||
450 | .ctrlbit = (1 << 24), | ||
451 | }, { | ||
452 | .name = "rtc", | ||
453 | .parent = &exynos5_clk_aclk_66.clk, | ||
454 | .enable = exynos5_clk_ip_peris_ctrl, | ||
455 | .ctrlbit = (1 << 20), | ||
456 | }, { | ||
457 | .name = "hsmmc", | ||
458 | .devname = "s3c-sdhci.0", | ||
459 | .parent = &exynos5_clk_aclk_200.clk, | ||
460 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
461 | .ctrlbit = (1 << 12), | ||
462 | }, { | ||
463 | .name = "hsmmc", | ||
464 | .devname = "s3c-sdhci.1", | ||
465 | .parent = &exynos5_clk_aclk_200.clk, | ||
466 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
467 | .ctrlbit = (1 << 13), | ||
468 | }, { | ||
469 | .name = "hsmmc", | ||
470 | .devname = "s3c-sdhci.2", | ||
471 | .parent = &exynos5_clk_aclk_200.clk, | ||
472 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
473 | .ctrlbit = (1 << 14), | ||
474 | }, { | ||
475 | .name = "hsmmc", | ||
476 | .devname = "s3c-sdhci.3", | ||
477 | .parent = &exynos5_clk_aclk_200.clk, | ||
478 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
479 | .ctrlbit = (1 << 15), | ||
480 | }, { | ||
481 | .name = "dwmci", | ||
482 | .parent = &exynos5_clk_aclk_200.clk, | ||
483 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
484 | .ctrlbit = (1 << 16), | ||
485 | }, { | ||
486 | .name = "sata", | ||
487 | .devname = "ahci", | ||
488 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
489 | .ctrlbit = (1 << 6), | ||
490 | }, { | ||
491 | .name = "sata_phy", | ||
492 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
493 | .ctrlbit = (1 << 24), | ||
494 | }, { | ||
495 | .name = "sata_phy_i2c", | ||
496 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
497 | .ctrlbit = (1 << 25), | ||
498 | }, { | ||
499 | .name = "mfc", | ||
500 | .devname = "s5p-mfc", | ||
501 | .enable = exynos5_clk_ip_mfc_ctrl, | ||
502 | .ctrlbit = (1 << 0), | ||
503 | }, { | ||
504 | .name = "hdmi", | ||
505 | .devname = "exynos4-hdmi", | ||
506 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
507 | .ctrlbit = (1 << 6), | ||
508 | }, { | ||
509 | .name = "mixer", | ||
510 | .devname = "s5p-mixer", | ||
511 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
512 | .ctrlbit = (1 << 5), | ||
513 | }, { | ||
514 | .name = "jpeg", | ||
515 | .enable = exynos5_clk_ip_gen_ctrl, | ||
516 | .ctrlbit = (1 << 2), | ||
517 | }, { | ||
518 | .name = "dsim0", | ||
519 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
520 | .ctrlbit = (1 << 3), | ||
521 | }, { | ||
522 | .name = "iis", | ||
523 | .devname = "samsung-i2s.1", | ||
524 | .enable = exynos5_clk_ip_peric_ctrl, | ||
525 | .ctrlbit = (1 << 20), | ||
526 | }, { | ||
527 | .name = "iis", | ||
528 | .devname = "samsung-i2s.2", | ||
529 | .enable = exynos5_clk_ip_peric_ctrl, | ||
530 | .ctrlbit = (1 << 21), | ||
531 | }, { | ||
532 | .name = "pcm", | ||
533 | .devname = "samsung-pcm.1", | ||
534 | .enable = exynos5_clk_ip_peric_ctrl, | ||
535 | .ctrlbit = (1 << 22), | ||
536 | }, { | ||
537 | .name = "pcm", | ||
538 | .devname = "samsung-pcm.2", | ||
539 | .enable = exynos5_clk_ip_peric_ctrl, | ||
540 | .ctrlbit = (1 << 23), | ||
541 | }, { | ||
542 | .name = "spdif", | ||
543 | .devname = "samsung-spdif", | ||
544 | .enable = exynos5_clk_ip_peric_ctrl, | ||
545 | .ctrlbit = (1 << 26), | ||
546 | }, { | ||
547 | .name = "ac97", | ||
548 | .devname = "samsung-ac97", | ||
549 | .enable = exynos5_clk_ip_peric_ctrl, | ||
550 | .ctrlbit = (1 << 27), | ||
551 | }, { | ||
552 | .name = "usbhost", | ||
553 | .enable = exynos5_clk_ip_fsys_ctrl , | ||
554 | .ctrlbit = (1 << 18), | ||
555 | }, { | ||
556 | .name = "usbotg", | ||
557 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
558 | .ctrlbit = (1 << 7), | ||
559 | }, { | ||
560 | .name = "gps", | ||
561 | .enable = exynos5_clk_ip_gps_ctrl, | ||
562 | .ctrlbit = ((1 << 3) | (1 << 2) | (1 << 0)), | ||
563 | }, { | ||
564 | .name = "nfcon", | ||
565 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
566 | .ctrlbit = (1 << 22), | ||
567 | }, { | ||
568 | .name = "iop", | ||
569 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
570 | .ctrlbit = ((1 << 30) | (1 << 26) | (1 << 23)), | ||
571 | }, { | ||
572 | .name = "core_iop", | ||
573 | .enable = exynos5_clk_ip_core_ctrl, | ||
574 | .ctrlbit = ((1 << 21) | (1 << 3)), | ||
575 | }, { | ||
576 | .name = "mcu_iop", | ||
577 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
578 | .ctrlbit = (1 << 0), | ||
579 | }, { | ||
580 | .name = "i2c", | ||
581 | .devname = "s3c2440-i2c.0", | ||
582 | .parent = &exynos5_clk_aclk_66.clk, | ||
583 | .enable = exynos5_clk_ip_peric_ctrl, | ||
584 | .ctrlbit = (1 << 6), | ||
585 | }, { | ||
586 | .name = "i2c", | ||
587 | .devname = "s3c2440-i2c.1", | ||
588 | .parent = &exynos5_clk_aclk_66.clk, | ||
589 | .enable = exynos5_clk_ip_peric_ctrl, | ||
590 | .ctrlbit = (1 << 7), | ||
591 | }, { | ||
592 | .name = "i2c", | ||
593 | .devname = "s3c2440-i2c.2", | ||
594 | .parent = &exynos5_clk_aclk_66.clk, | ||
595 | .enable = exynos5_clk_ip_peric_ctrl, | ||
596 | .ctrlbit = (1 << 8), | ||
597 | }, { | ||
598 | .name = "i2c", | ||
599 | .devname = "s3c2440-i2c.3", | ||
600 | .parent = &exynos5_clk_aclk_66.clk, | ||
601 | .enable = exynos5_clk_ip_peric_ctrl, | ||
602 | .ctrlbit = (1 << 9), | ||
603 | }, { | ||
604 | .name = "i2c", | ||
605 | .devname = "s3c2440-i2c.4", | ||
606 | .parent = &exynos5_clk_aclk_66.clk, | ||
607 | .enable = exynos5_clk_ip_peric_ctrl, | ||
608 | .ctrlbit = (1 << 10), | ||
609 | }, { | ||
610 | .name = "i2c", | ||
611 | .devname = "s3c2440-i2c.5", | ||
612 | .parent = &exynos5_clk_aclk_66.clk, | ||
613 | .enable = exynos5_clk_ip_peric_ctrl, | ||
614 | .ctrlbit = (1 << 11), | ||
615 | }, { | ||
616 | .name = "i2c", | ||
617 | .devname = "s3c2440-i2c.6", | ||
618 | .parent = &exynos5_clk_aclk_66.clk, | ||
619 | .enable = exynos5_clk_ip_peric_ctrl, | ||
620 | .ctrlbit = (1 << 12), | ||
621 | }, { | ||
622 | .name = "i2c", | ||
623 | .devname = "s3c2440-i2c.7", | ||
624 | .parent = &exynos5_clk_aclk_66.clk, | ||
625 | .enable = exynos5_clk_ip_peric_ctrl, | ||
626 | .ctrlbit = (1 << 13), | ||
627 | }, { | ||
628 | .name = "i2c", | ||
629 | .devname = "s3c2440-hdmiphy-i2c", | ||
630 | .parent = &exynos5_clk_aclk_66.clk, | ||
631 | .enable = exynos5_clk_ip_peric_ctrl, | ||
632 | .ctrlbit = (1 << 14), | ||
633 | } | ||
634 | }; | ||
635 | |||
636 | static struct clk exynos5_init_clocks_on[] = { | ||
637 | { | ||
638 | .name = "uart", | ||
639 | .devname = "s5pv210-uart.0", | ||
640 | .enable = exynos5_clk_ip_peric_ctrl, | ||
641 | .ctrlbit = (1 << 0), | ||
642 | }, { | ||
643 | .name = "uart", | ||
644 | .devname = "s5pv210-uart.1", | ||
645 | .enable = exynos5_clk_ip_peric_ctrl, | ||
646 | .ctrlbit = (1 << 1), | ||
647 | }, { | ||
648 | .name = "uart", | ||
649 | .devname = "s5pv210-uart.2", | ||
650 | .enable = exynos5_clk_ip_peric_ctrl, | ||
651 | .ctrlbit = (1 << 2), | ||
652 | }, { | ||
653 | .name = "uart", | ||
654 | .devname = "s5pv210-uart.3", | ||
655 | .enable = exynos5_clk_ip_peric_ctrl, | ||
656 | .ctrlbit = (1 << 3), | ||
657 | }, { | ||
658 | .name = "uart", | ||
659 | .devname = "s5pv210-uart.4", | ||
660 | .enable = exynos5_clk_ip_peric_ctrl, | ||
661 | .ctrlbit = (1 << 4), | ||
662 | }, { | ||
663 | .name = "uart", | ||
664 | .devname = "s5pv210-uart.5", | ||
665 | .enable = exynos5_clk_ip_peric_ctrl, | ||
666 | .ctrlbit = (1 << 5), | ||
667 | } | ||
668 | }; | ||
669 | |||
670 | static struct clk exynos5_clk_pdma0 = { | ||
671 | .name = "dma", | ||
672 | .devname = "dma-pl330.0", | ||
673 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
674 | .ctrlbit = (1 << 1), | ||
675 | }; | ||
676 | |||
677 | static struct clk exynos5_clk_pdma1 = { | ||
678 | .name = "dma", | ||
679 | .devname = "dma-pl330.1", | ||
680 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
681 | .ctrlbit = (1 << 1), | ||
682 | }; | ||
683 | |||
684 | static struct clk exynos5_clk_mdma1 = { | ||
685 | .name = "dma", | ||
686 | .devname = "dma-pl330.2", | ||
687 | .enable = exynos5_clk_ip_gen_ctrl, | ||
688 | .ctrlbit = (1 << 4), | ||
689 | }; | ||
690 | |||
691 | struct clk *exynos5_clkset_group_list[] = { | ||
692 | [0] = &clk_ext_xtal_mux, | ||
693 | [1] = NULL, | ||
694 | [2] = &exynos5_clk_sclk_hdmi24m, | ||
695 | [3] = &exynos5_clk_sclk_dptxphy, | ||
696 | [4] = &exynos5_clk_sclk_usbphy, | ||
697 | [5] = &exynos5_clk_sclk_hdmiphy, | ||
698 | [6] = &exynos5_clk_mout_mpll_user.clk, | ||
699 | [7] = &exynos5_clk_mout_epll.clk, | ||
700 | [8] = &exynos5_clk_sclk_vpll.clk, | ||
701 | [9] = &exynos5_clk_mout_cpll.clk, | ||
702 | }; | ||
703 | |||
704 | struct clksrc_sources exynos5_clkset_group = { | ||
705 | .sources = exynos5_clkset_group_list, | ||
706 | .nr_sources = ARRAY_SIZE(exynos5_clkset_group_list), | ||
707 | }; | ||
708 | |||
709 | /* Possible clock sources for aclk_266_gscl_sub Mux */ | ||
710 | static struct clk *clk_src_gscl_266_list[] = { | ||
711 | [0] = &clk_ext_xtal_mux, | ||
712 | [1] = &exynos5_clk_aclk_266.clk, | ||
713 | }; | ||
714 | |||
715 | static struct clksrc_sources clk_src_gscl_266 = { | ||
716 | .sources = clk_src_gscl_266_list, | ||
717 | .nr_sources = ARRAY_SIZE(clk_src_gscl_266_list), | ||
718 | }; | ||
719 | |||
720 | static struct clksrc_clk exynos5_clk_dout_mmc0 = { | ||
721 | .clk = { | ||
722 | .name = "dout_mmc0", | ||
723 | }, | ||
724 | .sources = &exynos5_clkset_group, | ||
725 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 0, .size = 4 }, | ||
726 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 0, .size = 4 }, | ||
727 | }; | ||
728 | |||
729 | static struct clksrc_clk exynos5_clk_dout_mmc1 = { | ||
730 | .clk = { | ||
731 | .name = "dout_mmc1", | ||
732 | }, | ||
733 | .sources = &exynos5_clkset_group, | ||
734 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 4, .size = 4 }, | ||
735 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 16, .size = 4 }, | ||
736 | }; | ||
737 | |||
738 | static struct clksrc_clk exynos5_clk_dout_mmc2 = { | ||
739 | .clk = { | ||
740 | .name = "dout_mmc2", | ||
741 | }, | ||
742 | .sources = &exynos5_clkset_group, | ||
743 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 8, .size = 4 }, | ||
744 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 0, .size = 4 }, | ||
745 | }; | ||
746 | |||
747 | static struct clksrc_clk exynos5_clk_dout_mmc3 = { | ||
748 | .clk = { | ||
749 | .name = "dout_mmc3", | ||
750 | }, | ||
751 | .sources = &exynos5_clkset_group, | ||
752 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 12, .size = 4 }, | ||
753 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 16, .size = 4 }, | ||
754 | }; | ||
755 | |||
756 | static struct clksrc_clk exynos5_clk_dout_mmc4 = { | ||
757 | .clk = { | ||
758 | .name = "dout_mmc4", | ||
759 | }, | ||
760 | .sources = &exynos5_clkset_group, | ||
761 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 16, .size = 4 }, | ||
762 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 0, .size = 4 }, | ||
763 | }; | ||
764 | |||
765 | static struct clksrc_clk exynos5_clk_sclk_uart0 = { | ||
766 | .clk = { | ||
767 | .name = "uclk1", | ||
768 | .devname = "exynos4210-uart.0", | ||
769 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
770 | .ctrlbit = (1 << 0), | ||
771 | }, | ||
772 | .sources = &exynos5_clkset_group, | ||
773 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 0, .size = 4 }, | ||
774 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 0, .size = 4 }, | ||
775 | }; | ||
776 | |||
777 | static struct clksrc_clk exynos5_clk_sclk_uart1 = { | ||
778 | .clk = { | ||
779 | .name = "uclk1", | ||
780 | .devname = "exynos4210-uart.1", | ||
781 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
782 | .ctrlbit = (1 << 4), | ||
783 | }, | ||
784 | .sources = &exynos5_clkset_group, | ||
785 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 4, .size = 4 }, | ||
786 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 4, .size = 4 }, | ||
787 | }; | ||
788 | |||
789 | static struct clksrc_clk exynos5_clk_sclk_uart2 = { | ||
790 | .clk = { | ||
791 | .name = "uclk1", | ||
792 | .devname = "exynos4210-uart.2", | ||
793 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
794 | .ctrlbit = (1 << 8), | ||
795 | }, | ||
796 | .sources = &exynos5_clkset_group, | ||
797 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 8, .size = 4 }, | ||
798 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 8, .size = 4 }, | ||
799 | }; | ||
800 | |||
801 | static struct clksrc_clk exynos5_clk_sclk_uart3 = { | ||
802 | .clk = { | ||
803 | .name = "uclk1", | ||
804 | .devname = "exynos4210-uart.3", | ||
805 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
806 | .ctrlbit = (1 << 12), | ||
807 | }, | ||
808 | .sources = &exynos5_clkset_group, | ||
809 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 12, .size = 4 }, | ||
810 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 12, .size = 4 }, | ||
811 | }; | ||
812 | |||
813 | static struct clksrc_clk exynos5_clk_sclk_mmc0 = { | ||
814 | .clk = { | ||
815 | .name = "sclk_mmc", | ||
816 | .devname = "s3c-sdhci.0", | ||
817 | .parent = &exynos5_clk_dout_mmc0.clk, | ||
818 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
819 | .ctrlbit = (1 << 0), | ||
820 | }, | ||
821 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 8, .size = 8 }, | ||
822 | }; | ||
823 | |||
824 | static struct clksrc_clk exynos5_clk_sclk_mmc1 = { | ||
825 | .clk = { | ||
826 | .name = "sclk_mmc", | ||
827 | .devname = "s3c-sdhci.1", | ||
828 | .parent = &exynos5_clk_dout_mmc1.clk, | ||
829 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
830 | .ctrlbit = (1 << 4), | ||
831 | }, | ||
832 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 24, .size = 8 }, | ||
833 | }; | ||
834 | |||
835 | static struct clksrc_clk exynos5_clk_sclk_mmc2 = { | ||
836 | .clk = { | ||
837 | .name = "sclk_mmc", | ||
838 | .devname = "s3c-sdhci.2", | ||
839 | .parent = &exynos5_clk_dout_mmc2.clk, | ||
840 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
841 | .ctrlbit = (1 << 8), | ||
842 | }, | ||
843 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 8, .size = 8 }, | ||
844 | }; | ||
845 | |||
846 | static struct clksrc_clk exynos5_clk_sclk_mmc3 = { | ||
847 | .clk = { | ||
848 | .name = "sclk_mmc", | ||
849 | .devname = "s3c-sdhci.3", | ||
850 | .parent = &exynos5_clk_dout_mmc3.clk, | ||
851 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
852 | .ctrlbit = (1 << 12), | ||
853 | }, | ||
854 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 24, .size = 8 }, | ||
855 | }; | ||
856 | |||
857 | static struct clksrc_clk exynos5_clksrcs[] = { | ||
858 | { | ||
859 | .clk = { | ||
860 | .name = "sclk_dwmci", | ||
861 | .parent = &exynos5_clk_dout_mmc4.clk, | ||
862 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
863 | .ctrlbit = (1 << 16), | ||
864 | }, | ||
865 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size = 8 }, | ||
866 | }, { | ||
867 | .clk = { | ||
868 | .name = "sclk_fimd", | ||
869 | .devname = "s3cfb.1", | ||
870 | .enable = exynos5_clksrc_mask_disp1_0_ctrl, | ||
871 | .ctrlbit = (1 << 0), | ||
872 | }, | ||
873 | .sources = &exynos5_clkset_group, | ||
874 | .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 }, | ||
875 | .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 }, | ||
876 | }, { | ||
877 | .clk = { | ||
878 | .name = "aclk_266_gscl", | ||
879 | }, | ||
880 | .sources = &clk_src_gscl_266, | ||
881 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP3, .shift = 8, .size = 1 }, | ||
882 | }, { | ||
883 | .clk = { | ||
884 | .name = "sclk_g3d", | ||
885 | .devname = "mali-t604.0", | ||
886 | .enable = exynos5_clk_block_ctrl, | ||
887 | .ctrlbit = (1 << 1), | ||
888 | }, | ||
889 | .sources = &exynos5_clkset_aclk, | ||
890 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 20, .size = 1 }, | ||
891 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, | ||
892 | }, { | ||
893 | .clk = { | ||
894 | .name = "sclk_gscl_wrap", | ||
895 | .devname = "s5p-mipi-csis.0", | ||
896 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
897 | .ctrlbit = (1 << 24), | ||
898 | }, | ||
899 | .sources = &exynos5_clkset_group, | ||
900 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 24, .size = 4 }, | ||
901 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 24, .size = 4 }, | ||
902 | }, { | ||
903 | .clk = { | ||
904 | .name = "sclk_gscl_wrap", | ||
905 | .devname = "s5p-mipi-csis.1", | ||
906 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
907 | .ctrlbit = (1 << 28), | ||
908 | }, | ||
909 | .sources = &exynos5_clkset_group, | ||
910 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 28, .size = 4 }, | ||
911 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 28, .size = 4 }, | ||
912 | }, { | ||
913 | .clk = { | ||
914 | .name = "sclk_cam0", | ||
915 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
916 | .ctrlbit = (1 << 16), | ||
917 | }, | ||
918 | .sources = &exynos5_clkset_group, | ||
919 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 16, .size = 4 }, | ||
920 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 16, .size = 4 }, | ||
921 | }, { | ||
922 | .clk = { | ||
923 | .name = "sclk_cam1", | ||
924 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
925 | .ctrlbit = (1 << 20), | ||
926 | }, | ||
927 | .sources = &exynos5_clkset_group, | ||
928 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 20, .size = 4 }, | ||
929 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 20, .size = 4 }, | ||
930 | }, { | ||
931 | .clk = { | ||
932 | .name = "sclk_jpeg", | ||
933 | .parent = &exynos5_clk_mout_cpll.clk, | ||
934 | }, | ||
935 | .reg_div = { .reg = EXYNOS5_CLKDIV_GEN, .shift = 4, .size = 3 }, | ||
936 | }, | ||
937 | }; | ||
938 | |||
939 | /* Clock initialization code */ | ||
940 | static struct clksrc_clk *exynos5_sysclks[] = { | ||
941 | &exynos5_clk_mout_apll, | ||
942 | &exynos5_clk_sclk_apll, | ||
943 | &exynos5_clk_mout_bpll, | ||
944 | &exynos5_clk_mout_bpll_user, | ||
945 | &exynos5_clk_mout_cpll, | ||
946 | &exynos5_clk_mout_epll, | ||
947 | &exynos5_clk_mout_mpll, | ||
948 | &exynos5_clk_mout_mpll_user, | ||
949 | &exynos5_clk_vpllsrc, | ||
950 | &exynos5_clk_sclk_vpll, | ||
951 | &exynos5_clk_mout_cpu, | ||
952 | &exynos5_clk_dout_armclk, | ||
953 | &exynos5_clk_dout_arm2clk, | ||
954 | &exynos5_clk_cdrex, | ||
955 | &exynos5_clk_aclk_400, | ||
956 | &exynos5_clk_aclk_333, | ||
957 | &exynos5_clk_aclk_266, | ||
958 | &exynos5_clk_aclk_200, | ||
959 | &exynos5_clk_aclk_166, | ||
960 | &exynos5_clk_aclk_66_pre, | ||
961 | &exynos5_clk_aclk_66, | ||
962 | &exynos5_clk_dout_mmc0, | ||
963 | &exynos5_clk_dout_mmc1, | ||
964 | &exynos5_clk_dout_mmc2, | ||
965 | &exynos5_clk_dout_mmc3, | ||
966 | &exynos5_clk_dout_mmc4, | ||
967 | &exynos5_clk_aclk_acp, | ||
968 | &exynos5_clk_pclk_acp, | ||
969 | }; | ||
970 | |||
971 | static struct clk *exynos5_clk_cdev[] = { | ||
972 | &exynos5_clk_pdma0, | ||
973 | &exynos5_clk_pdma1, | ||
974 | &exynos5_clk_mdma1, | ||
975 | }; | ||
976 | |||
977 | static struct clksrc_clk *exynos5_clksrc_cdev[] = { | ||
978 | &exynos5_clk_sclk_uart0, | ||
979 | &exynos5_clk_sclk_uart1, | ||
980 | &exynos5_clk_sclk_uart2, | ||
981 | &exynos5_clk_sclk_uart3, | ||
982 | &exynos5_clk_sclk_mmc0, | ||
983 | &exynos5_clk_sclk_mmc1, | ||
984 | &exynos5_clk_sclk_mmc2, | ||
985 | &exynos5_clk_sclk_mmc3, | ||
986 | }; | ||
987 | |||
988 | static struct clk_lookup exynos5_clk_lookup[] = { | ||
989 | CLKDEV_INIT("exynos4210-uart.0", "clk_uart_baud0", &exynos5_clk_sclk_uart0.clk), | ||
990 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos5_clk_sclk_uart1.clk), | ||
991 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos5_clk_sclk_uart2.clk), | ||
992 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos5_clk_sclk_uart3.clk), | ||
993 | CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &exynos5_clk_sclk_mmc0.clk), | ||
994 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &exynos5_clk_sclk_mmc1.clk), | ||
995 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &exynos5_clk_sclk_mmc2.clk), | ||
996 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos5_clk_sclk_mmc3.clk), | ||
997 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0), | ||
998 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1), | ||
999 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1), | ||
1000 | }; | ||
1001 | |||
1002 | static unsigned long exynos5_epll_get_rate(struct clk *clk) | ||
1003 | { | ||
1004 | return clk->rate; | ||
1005 | } | ||
1006 | |||
1007 | static struct clk *exynos5_clks[] __initdata = { | ||
1008 | &exynos5_clk_sclk_hdmi27m, | ||
1009 | &exynos5_clk_sclk_hdmiphy, | ||
1010 | &clk_fout_bpll, | ||
1011 | &clk_fout_cpll, | ||
1012 | &exynos5_clk_armclk, | ||
1013 | }; | ||
1014 | |||
1015 | static u32 epll_div[][6] = { | ||
1016 | { 192000000, 0, 48, 3, 1, 0 }, | ||
1017 | { 180000000, 0, 45, 3, 1, 0 }, | ||
1018 | { 73728000, 1, 73, 3, 3, 47710 }, | ||
1019 | { 67737600, 1, 90, 4, 3, 20762 }, | ||
1020 | { 49152000, 0, 49, 3, 3, 9961 }, | ||
1021 | { 45158400, 0, 45, 3, 3, 10381 }, | ||
1022 | { 180633600, 0, 45, 3, 1, 10381 }, | ||
1023 | }; | ||
1024 | |||
1025 | static int exynos5_epll_set_rate(struct clk *clk, unsigned long rate) | ||
1026 | { | ||
1027 | unsigned int epll_con, epll_con_k; | ||
1028 | unsigned int i; | ||
1029 | unsigned int tmp; | ||
1030 | unsigned int epll_rate; | ||
1031 | unsigned int locktime; | ||
1032 | unsigned int lockcnt; | ||
1033 | |||
1034 | /* Return if nothing changed */ | ||
1035 | if (clk->rate == rate) | ||
1036 | return 0; | ||
1037 | |||
1038 | if (clk->parent) | ||
1039 | epll_rate = clk_get_rate(clk->parent); | ||
1040 | else | ||
1041 | epll_rate = clk_ext_xtal_mux.rate; | ||
1042 | |||
1043 | if (epll_rate != 24000000) { | ||
1044 | pr_err("Invalid Clock : recommended clock is 24MHz.\n"); | ||
1045 | return -EINVAL; | ||
1046 | } | ||
1047 | |||
1048 | epll_con = __raw_readl(EXYNOS5_EPLL_CON0); | ||
1049 | epll_con &= ~(0x1 << 27 | \ | ||
1050 | PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | \ | ||
1051 | PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | \ | ||
1052 | PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT); | ||
1053 | |||
1054 | for (i = 0; i < ARRAY_SIZE(epll_div); i++) { | ||
1055 | if (epll_div[i][0] == rate) { | ||
1056 | epll_con_k = epll_div[i][5] << 0; | ||
1057 | epll_con |= epll_div[i][1] << 27; | ||
1058 | epll_con |= epll_div[i][2] << PLL46XX_MDIV_SHIFT; | ||
1059 | epll_con |= epll_div[i][3] << PLL46XX_PDIV_SHIFT; | ||
1060 | epll_con |= epll_div[i][4] << PLL46XX_SDIV_SHIFT; | ||
1061 | break; | ||
1062 | } | ||
1063 | } | ||
1064 | |||
1065 | if (i == ARRAY_SIZE(epll_div)) { | ||
1066 | printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n", | ||
1067 | __func__); | ||
1068 | return -EINVAL; | ||
1069 | } | ||
1070 | |||
1071 | epll_rate /= 1000000; | ||
1072 | |||
1073 | /* 3000 max_cycls : specification data */ | ||
1074 | locktime = 3000 / epll_rate * epll_div[i][3]; | ||
1075 | lockcnt = locktime * 10000 / (10000 / epll_rate); | ||
1076 | |||
1077 | __raw_writel(lockcnt, EXYNOS5_EPLL_LOCK); | ||
1078 | |||
1079 | __raw_writel(epll_con, EXYNOS5_EPLL_CON0); | ||
1080 | __raw_writel(epll_con_k, EXYNOS5_EPLL_CON1); | ||
1081 | |||
1082 | do { | ||
1083 | tmp = __raw_readl(EXYNOS5_EPLL_CON0); | ||
1084 | } while (!(tmp & 0x1 << EXYNOS5_EPLLCON0_LOCKED_SHIFT)); | ||
1085 | |||
1086 | clk->rate = rate; | ||
1087 | |||
1088 | return 0; | ||
1089 | } | ||
1090 | |||
1091 | static struct clk_ops exynos5_epll_ops = { | ||
1092 | .get_rate = exynos5_epll_get_rate, | ||
1093 | .set_rate = exynos5_epll_set_rate, | ||
1094 | }; | ||
1095 | |||
1096 | static int xtal_rate; | ||
1097 | |||
1098 | static unsigned long exynos5_fout_apll_get_rate(struct clk *clk) | ||
1099 | { | ||
1100 | return s5p_get_pll35xx(xtal_rate, __raw_readl(EXYNOS5_APLL_CON0)); | ||
1101 | } | ||
1102 | |||
1103 | static struct clk_ops exynos5_fout_apll_ops = { | ||
1104 | .get_rate = exynos5_fout_apll_get_rate, | ||
1105 | }; | ||
1106 | |||
1107 | #ifdef CONFIG_PM | ||
1108 | static int exynos5_clock_suspend(void) | ||
1109 | { | ||
1110 | s3c_pm_do_save(exynos5_clock_save, ARRAY_SIZE(exynos5_clock_save)); | ||
1111 | |||
1112 | return 0; | ||
1113 | } | ||
1114 | |||
1115 | static void exynos5_clock_resume(void) | ||
1116 | { | ||
1117 | s3c_pm_do_restore_core(exynos5_clock_save, ARRAY_SIZE(exynos5_clock_save)); | ||
1118 | } | ||
1119 | #else | ||
1120 | #define exynos5_clock_suspend NULL | ||
1121 | #define exynos5_clock_resume NULL | ||
1122 | #endif | ||
1123 | |||
1124 | struct syscore_ops exynos5_clock_syscore_ops = { | ||
1125 | .suspend = exynos5_clock_suspend, | ||
1126 | .resume = exynos5_clock_resume, | ||
1127 | }; | ||
1128 | |||
1129 | void __init_or_cpufreq exynos5_setup_clocks(void) | ||
1130 | { | ||
1131 | struct clk *xtal_clk; | ||
1132 | unsigned long apll; | ||
1133 | unsigned long bpll; | ||
1134 | unsigned long cpll; | ||
1135 | unsigned long mpll; | ||
1136 | unsigned long epll; | ||
1137 | unsigned long vpll; | ||
1138 | unsigned long vpllsrc; | ||
1139 | unsigned long xtal; | ||
1140 | unsigned long armclk; | ||
1141 | unsigned long mout_cdrex; | ||
1142 | unsigned long aclk_400; | ||
1143 | unsigned long aclk_333; | ||
1144 | unsigned long aclk_266; | ||
1145 | unsigned long aclk_200; | ||
1146 | unsigned long aclk_166; | ||
1147 | unsigned long aclk_66; | ||
1148 | unsigned int ptr; | ||
1149 | |||
1150 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); | ||
1151 | |||
1152 | xtal_clk = clk_get(NULL, "xtal"); | ||
1153 | BUG_ON(IS_ERR(xtal_clk)); | ||
1154 | |||
1155 | xtal = clk_get_rate(xtal_clk); | ||
1156 | |||
1157 | xtal_rate = xtal; | ||
1158 | |||
1159 | clk_put(xtal_clk); | ||
1160 | |||
1161 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | ||
1162 | |||
1163 | apll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_APLL_CON0)); | ||
1164 | bpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_BPLL_CON0)); | ||
1165 | cpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_CPLL_CON0)); | ||
1166 | mpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_MPLL_CON0)); | ||
1167 | epll = s5p_get_pll36xx(xtal, __raw_readl(EXYNOS5_EPLL_CON0), | ||
1168 | __raw_readl(EXYNOS5_EPLL_CON1)); | ||
1169 | |||
1170 | vpllsrc = clk_get_rate(&exynos5_clk_vpllsrc.clk); | ||
1171 | vpll = s5p_get_pll36xx(vpllsrc, __raw_readl(EXYNOS5_VPLL_CON0), | ||
1172 | __raw_readl(EXYNOS5_VPLL_CON1)); | ||
1173 | |||
1174 | clk_fout_apll.ops = &exynos5_fout_apll_ops; | ||
1175 | clk_fout_bpll.rate = bpll; | ||
1176 | clk_fout_cpll.rate = cpll; | ||
1177 | clk_fout_mpll.rate = mpll; | ||
1178 | clk_fout_epll.rate = epll; | ||
1179 | clk_fout_vpll.rate = vpll; | ||
1180 | |||
1181 | printk(KERN_INFO "EXYNOS5: PLL settings, A=%ld, B=%ld, C=%ld\n" | ||
1182 | "M=%ld, E=%ld V=%ld", | ||
1183 | apll, bpll, cpll, mpll, epll, vpll); | ||
1184 | |||
1185 | armclk = clk_get_rate(&exynos5_clk_armclk); | ||
1186 | mout_cdrex = clk_get_rate(&exynos5_clk_cdrex.clk); | ||
1187 | |||
1188 | aclk_400 = clk_get_rate(&exynos5_clk_aclk_400.clk); | ||
1189 | aclk_333 = clk_get_rate(&exynos5_clk_aclk_333.clk); | ||
1190 | aclk_266 = clk_get_rate(&exynos5_clk_aclk_266.clk); | ||
1191 | aclk_200 = clk_get_rate(&exynos5_clk_aclk_200.clk); | ||
1192 | aclk_166 = clk_get_rate(&exynos5_clk_aclk_166.clk); | ||
1193 | aclk_66 = clk_get_rate(&exynos5_clk_aclk_66.clk); | ||
1194 | |||
1195 | printk(KERN_INFO "EXYNOS5: ARMCLK=%ld, CDREX=%ld, ACLK400=%ld\n" | ||
1196 | "ACLK333=%ld, ACLK266=%ld, ACLK200=%ld\n" | ||
1197 | "ACLK166=%ld, ACLK66=%ld\n", | ||
1198 | armclk, mout_cdrex, aclk_400, | ||
1199 | aclk_333, aclk_266, aclk_200, | ||
1200 | aclk_166, aclk_66); | ||
1201 | |||
1202 | |||
1203 | clk_fout_epll.ops = &exynos5_epll_ops; | ||
1204 | |||
1205 | if (clk_set_parent(&exynos5_clk_mout_epll.clk, &clk_fout_epll)) | ||
1206 | printk(KERN_ERR "Unable to set parent %s of clock %s.\n", | ||
1207 | clk_fout_epll.name, exynos5_clk_mout_epll.clk.name); | ||
1208 | |||
1209 | clk_set_rate(&exynos5_clk_sclk_apll.clk, 100000000); | ||
1210 | clk_set_rate(&exynos5_clk_aclk_266.clk, 300000000); | ||
1211 | |||
1212 | clk_set_rate(&exynos5_clk_aclk_acp.clk, 267000000); | ||
1213 | clk_set_rate(&exynos5_clk_pclk_acp.clk, 134000000); | ||
1214 | |||
1215 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clksrcs); ptr++) | ||
1216 | s3c_set_clksrc(&exynos5_clksrcs[ptr], true); | ||
1217 | } | ||
1218 | |||
1219 | void __init exynos5_register_clocks(void) | ||
1220 | { | ||
1221 | int ptr; | ||
1222 | |||
1223 | s3c24xx_register_clocks(exynos5_clks, ARRAY_SIZE(exynos5_clks)); | ||
1224 | |||
1225 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_sysclks); ptr++) | ||
1226 | s3c_register_clksrc(exynos5_sysclks[ptr], 1); | ||
1227 | |||
1228 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_sclk_tv); ptr++) | ||
1229 | s3c_register_clksrc(exynos5_sclk_tv[ptr], 1); | ||
1230 | |||
1231 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clksrc_cdev); ptr++) | ||
1232 | s3c_register_clksrc(exynos5_clksrc_cdev[ptr], 1); | ||
1233 | |||
1234 | s3c_register_clksrc(exynos5_clksrcs, ARRAY_SIZE(exynos5_clksrcs)); | ||
1235 | s3c_register_clocks(exynos5_init_clocks_on, ARRAY_SIZE(exynos5_init_clocks_on)); | ||
1236 | |||
1237 | s3c24xx_register_clocks(exynos5_clk_cdev, ARRAY_SIZE(exynos5_clk_cdev)); | ||
1238 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clk_cdev); ptr++) | ||
1239 | s3c_disable_clocks(exynos5_clk_cdev[ptr], 1); | ||
1240 | |||
1241 | s3c_register_clocks(exynos5_init_clocks_off, ARRAY_SIZE(exynos5_init_clocks_off)); | ||
1242 | s3c_disable_clocks(exynos5_init_clocks_off, ARRAY_SIZE(exynos5_init_clocks_off)); | ||
1243 | clkdev_add_table(exynos5_clk_lookup, ARRAY_SIZE(exynos5_clk_lookup)); | ||
1244 | |||
1245 | register_syscore_ops(&exynos5_clock_syscore_ops); | ||
1246 | s3c_pwmclk_init(); | ||
1247 | } | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 97ca2592ce83..e6cc50e94a58 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -53,6 +53,14 @@ | |||
53 | static const char name_exynos4210[] = "EXYNOS4210"; | 53 | static const char name_exynos4210[] = "EXYNOS4210"; |
54 | static const char name_exynos4212[] = "EXYNOS4212"; | 54 | static const char name_exynos4212[] = "EXYNOS4212"; |
55 | static const char name_exynos4412[] = "EXYNOS4412"; | 55 | static const char name_exynos4412[] = "EXYNOS4412"; |
56 | static const char name_exynos5250[] = "EXYNOS5250"; | ||
57 | |||
58 | static void exynos4_map_io(void); | ||
59 | static void exynos5_map_io(void); | ||
60 | static void exynos4_init_clocks(int xtal); | ||
61 | static void exynos5_init_clocks(int xtal); | ||
62 | static void exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
63 | static int exynos_init(void); | ||
56 | 64 | ||
57 | static struct cpu_table cpu_ids[] __initdata = { | 65 | static struct cpu_table cpu_ids[] __initdata = { |
58 | { | 66 | { |
@@ -60,7 +68,7 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
60 | .idmask = EXYNOS4_CPU_MASK, | 68 | .idmask = EXYNOS4_CPU_MASK, |
61 | .map_io = exynos4_map_io, | 69 | .map_io = exynos4_map_io, |
62 | .init_clocks = exynos4_init_clocks, | 70 | .init_clocks = exynos4_init_clocks, |
63 | .init_uarts = exynos4_init_uarts, | 71 | .init_uarts = exynos_init_uarts, |
64 | .init = exynos_init, | 72 | .init = exynos_init, |
65 | .name = name_exynos4210, | 73 | .name = name_exynos4210, |
66 | }, { | 74 | }, { |
@@ -68,7 +76,7 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
68 | .idmask = EXYNOS4_CPU_MASK, | 76 | .idmask = EXYNOS4_CPU_MASK, |
69 | .map_io = exynos4_map_io, | 77 | .map_io = exynos4_map_io, |
70 | .init_clocks = exynos4_init_clocks, | 78 | .init_clocks = exynos4_init_clocks, |
71 | .init_uarts = exynos4_init_uarts, | 79 | .init_uarts = exynos_init_uarts, |
72 | .init = exynos_init, | 80 | .init = exynos_init, |
73 | .name = name_exynos4212, | 81 | .name = name_exynos4212, |
74 | }, { | 82 | }, { |
@@ -76,9 +84,17 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
76 | .idmask = EXYNOS4_CPU_MASK, | 84 | .idmask = EXYNOS4_CPU_MASK, |
77 | .map_io = exynos4_map_io, | 85 | .map_io = exynos4_map_io, |
78 | .init_clocks = exynos4_init_clocks, | 86 | .init_clocks = exynos4_init_clocks, |
79 | .init_uarts = exynos4_init_uarts, | 87 | .init_uarts = exynos_init_uarts, |
80 | .init = exynos_init, | 88 | .init = exynos_init, |
81 | .name = name_exynos4412, | 89 | .name = name_exynos4412, |
90 | }, { | ||
91 | .idcode = EXYNOS5250_SOC_ID, | ||
92 | .idmask = EXYNOS5_SOC_MASK, | ||
93 | .map_io = exynos5_map_io, | ||
94 | .init_clocks = exynos5_init_clocks, | ||
95 | .init_uarts = exynos_init_uarts, | ||
96 | .init = exynos_init, | ||
97 | .name = name_exynos5250, | ||
82 | }, | 98 | }, |
83 | }; | 99 | }; |
84 | 100 | ||
@@ -87,10 +103,14 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
87 | static struct map_desc exynos_iodesc[] __initdata = { | 103 | static struct map_desc exynos_iodesc[] __initdata = { |
88 | { | 104 | { |
89 | .virtual = (unsigned long)S5P_VA_CHIPID, | 105 | .virtual = (unsigned long)S5P_VA_CHIPID, |
90 | .pfn = __phys_to_pfn(EXYNOS4_PA_CHIPID), | 106 | .pfn = __phys_to_pfn(EXYNOS_PA_CHIPID), |
91 | .length = SZ_4K, | 107 | .length = SZ_4K, |
92 | .type = MT_DEVICE, | 108 | .type = MT_DEVICE, |
93 | }, { | 109 | }, |
110 | }; | ||
111 | |||
112 | static struct map_desc exynos4_iodesc[] __initdata = { | ||
113 | { | ||
94 | .virtual = (unsigned long)S3C_VA_SYS, | 114 | .virtual = (unsigned long)S3C_VA_SYS, |
95 | .pfn = __phys_to_pfn(EXYNOS4_PA_SYSCON), | 115 | .pfn = __phys_to_pfn(EXYNOS4_PA_SYSCON), |
96 | .length = SZ_64K, | 116 | .length = SZ_64K, |
@@ -140,11 +160,7 @@ static struct map_desc exynos_iodesc[] __initdata = { | |||
140 | .pfn = __phys_to_pfn(EXYNOS4_PA_UART), | 160 | .pfn = __phys_to_pfn(EXYNOS4_PA_UART), |
141 | .length = SZ_512K, | 161 | .length = SZ_512K, |
142 | .type = MT_DEVICE, | 162 | .type = MT_DEVICE, |
143 | }, | 163 | }, { |
144 | }; | ||
145 | |||
146 | static struct map_desc exynos4_iodesc[] __initdata = { | ||
147 | { | ||
148 | .virtual = (unsigned long)S5P_VA_CMU, | 164 | .virtual = (unsigned long)S5P_VA_CMU, |
149 | .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), | 165 | .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), |
150 | .length = SZ_128K, | 166 | .length = SZ_128K, |
@@ -160,21 +176,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { | |||
160 | .length = SZ_4K, | 176 | .length = SZ_4K, |
161 | .type = MT_DEVICE, | 177 | .type = MT_DEVICE, |
162 | }, { | 178 | }, { |
163 | .virtual = (unsigned long)S5P_VA_GPIO1, | ||
164 | .pfn = __phys_to_pfn(EXYNOS4_PA_GPIO1), | ||
165 | .length = SZ_4K, | ||
166 | .type = MT_DEVICE, | ||
167 | }, { | ||
168 | .virtual = (unsigned long)S5P_VA_GPIO2, | ||
169 | .pfn = __phys_to_pfn(EXYNOS4_PA_GPIO2), | ||
170 | .length = SZ_4K, | ||
171 | .type = MT_DEVICE, | ||
172 | }, { | ||
173 | .virtual = (unsigned long)S5P_VA_GPIO3, | ||
174 | .pfn = __phys_to_pfn(EXYNOS4_PA_GPIO3), | ||
175 | .length = SZ_256, | ||
176 | .type = MT_DEVICE, | ||
177 | }, { | ||
178 | .virtual = (unsigned long)S5P_VA_DMC0, | 179 | .virtual = (unsigned long)S5P_VA_DMC0, |
179 | .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0), | 180 | .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0), |
180 | .length = SZ_64K, | 181 | .length = SZ_64K, |
@@ -210,11 +211,80 @@ static struct map_desc exynos4_iodesc1[] __initdata = { | |||
210 | }, | 211 | }, |
211 | }; | 212 | }; |
212 | 213 | ||
214 | static struct map_desc exynos5_iodesc[] __initdata = { | ||
215 | { | ||
216 | .virtual = (unsigned long)S3C_VA_SYS, | ||
217 | .pfn = __phys_to_pfn(EXYNOS5_PA_SYSCON), | ||
218 | .length = SZ_64K, | ||
219 | .type = MT_DEVICE, | ||
220 | }, { | ||
221 | .virtual = (unsigned long)S3C_VA_TIMER, | ||
222 | .pfn = __phys_to_pfn(EXYNOS5_PA_TIMER), | ||
223 | .length = SZ_16K, | ||
224 | .type = MT_DEVICE, | ||
225 | }, { | ||
226 | .virtual = (unsigned long)S3C_VA_WATCHDOG, | ||
227 | .pfn = __phys_to_pfn(EXYNOS5_PA_WATCHDOG), | ||
228 | .length = SZ_4K, | ||
229 | .type = MT_DEVICE, | ||
230 | }, { | ||
231 | .virtual = (unsigned long)S5P_VA_SROMC, | ||
232 | .pfn = __phys_to_pfn(EXYNOS5_PA_SROMC), | ||
233 | .length = SZ_4K, | ||
234 | .type = MT_DEVICE, | ||
235 | }, { | ||
236 | .virtual = (unsigned long)S5P_VA_SYSTIMER, | ||
237 | .pfn = __phys_to_pfn(EXYNOS5_PA_SYSTIMER), | ||
238 | .length = SZ_4K, | ||
239 | .type = MT_DEVICE, | ||
240 | }, { | ||
241 | .virtual = (unsigned long)S5P_VA_SYSRAM, | ||
242 | .pfn = __phys_to_pfn(EXYNOS5_PA_SYSRAM), | ||
243 | .length = SZ_4K, | ||
244 | .type = MT_DEVICE, | ||
245 | }, { | ||
246 | .virtual = (unsigned long)S5P_VA_CMU, | ||
247 | .pfn = __phys_to_pfn(EXYNOS5_PA_CMU), | ||
248 | .length = 144 * SZ_1K, | ||
249 | .type = MT_DEVICE, | ||
250 | }, { | ||
251 | .virtual = (unsigned long)S5P_VA_PMU, | ||
252 | .pfn = __phys_to_pfn(EXYNOS5_PA_PMU), | ||
253 | .length = SZ_64K, | ||
254 | .type = MT_DEVICE, | ||
255 | }, { | ||
256 | .virtual = (unsigned long)S5P_VA_COMBINER_BASE, | ||
257 | .pfn = __phys_to_pfn(EXYNOS5_PA_COMBINER), | ||
258 | .length = SZ_4K, | ||
259 | .type = MT_DEVICE, | ||
260 | }, { | ||
261 | .virtual = (unsigned long)S3C_VA_UART, | ||
262 | .pfn = __phys_to_pfn(EXYNOS5_PA_UART), | ||
263 | .length = SZ_512K, | ||
264 | .type = MT_DEVICE, | ||
265 | }, { | ||
266 | .virtual = (unsigned long)S5P_VA_GIC_CPU, | ||
267 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_CPU), | ||
268 | .length = SZ_64K, | ||
269 | .type = MT_DEVICE, | ||
270 | }, { | ||
271 | .virtual = (unsigned long)S5P_VA_GIC_DIST, | ||
272 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_DIST), | ||
273 | .length = SZ_64K, | ||
274 | .type = MT_DEVICE, | ||
275 | }, | ||
276 | }; | ||
277 | |||
213 | void exynos4_restart(char mode, const char *cmd) | 278 | void exynos4_restart(char mode, const char *cmd) |
214 | { | 279 | { |
215 | __raw_writel(0x1, S5P_SWRESET); | 280 | __raw_writel(0x1, S5P_SWRESET); |
216 | } | 281 | } |
217 | 282 | ||
283 | void exynos5_restart(char mode, const char *cmd) | ||
284 | { | ||
285 | __raw_writel(0x1, EXYNOS_SWRESET); | ||
286 | } | ||
287 | |||
218 | /* | 288 | /* |
219 | * exynos_map_io | 289 | * exynos_map_io |
220 | * | 290 | * |
@@ -234,7 +304,7 @@ void __init exynos_init_io(struct map_desc *mach_desc, int size) | |||
234 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | 304 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); |
235 | } | 305 | } |
236 | 306 | ||
237 | void __init exynos4_map_io(void) | 307 | static void __init exynos4_map_io(void) |
238 | { | 308 | { |
239 | iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); | 309 | iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); |
240 | 310 | ||
@@ -265,7 +335,22 @@ void __init exynos4_map_io(void) | |||
265 | s5p_hdmi_setname("exynos4-hdmi"); | 335 | s5p_hdmi_setname("exynos4-hdmi"); |
266 | } | 336 | } |
267 | 337 | ||
268 | void __init exynos4_init_clocks(int xtal) | 338 | static void __init exynos5_map_io(void) |
339 | { | ||
340 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); | ||
341 | |||
342 | s3c_device_i2c0.resource[0].start = EXYNOS5_PA_IIC(0); | ||
343 | s3c_device_i2c0.resource[0].end = EXYNOS5_PA_IIC(0) + SZ_4K - 1; | ||
344 | s3c_device_i2c0.resource[1].start = EXYNOS5_IRQ_IIC; | ||
345 | s3c_device_i2c0.resource[1].end = EXYNOS5_IRQ_IIC; | ||
346 | |||
347 | /* The I2C bus controllers are directly compatible with s3c2440 */ | ||
348 | s3c_i2c0_setname("s3c2440-i2c"); | ||
349 | s3c_i2c1_setname("s3c2440-i2c"); | ||
350 | s3c_i2c2_setname("s3c2440-i2c"); | ||
351 | } | ||
352 | |||
353 | static void __init exynos4_init_clocks(int xtal) | ||
269 | { | 354 | { |
270 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 355 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); |
271 | 356 | ||
@@ -281,6 +366,17 @@ void __init exynos4_init_clocks(int xtal) | |||
281 | exynos4_setup_clocks(); | 366 | exynos4_setup_clocks(); |
282 | } | 367 | } |
283 | 368 | ||
369 | static void __init exynos5_init_clocks(int xtal) | ||
370 | { | ||
371 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | ||
372 | |||
373 | s3c24xx_register_baseclocks(xtal); | ||
374 | s5p_register_clocks(xtal); | ||
375 | |||
376 | exynos5_register_clocks(); | ||
377 | exynos5_setup_clocks(); | ||
378 | } | ||
379 | |||
284 | #define COMBINER_ENABLE_SET 0x0 | 380 | #define COMBINER_ENABLE_SET 0x0 |
285 | #define COMBINER_ENABLE_CLEAR 0x4 | 381 | #define COMBINER_ENABLE_CLEAR 0x4 |
286 | #define COMBINER_INT_STATUS 0xC | 382 | #define COMBINER_INT_STATUS 0xC |
@@ -354,7 +450,14 @@ static struct irq_chip combiner_chip = { | |||
354 | 450 | ||
355 | static void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq) | 451 | static void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq) |
356 | { | 452 | { |
357 | if (combiner_nr >= MAX_COMBINER_NR) | 453 | unsigned int max_nr; |
454 | |||
455 | if (soc_is_exynos5250()) | ||
456 | max_nr = EXYNOS5_MAX_COMBINER_NR; | ||
457 | else | ||
458 | max_nr = EXYNOS4_MAX_COMBINER_NR; | ||
459 | |||
460 | if (combiner_nr >= max_nr) | ||
358 | BUG(); | 461 | BUG(); |
359 | if (irq_set_handler_data(irq, &combiner_data[combiner_nr]) != 0) | 462 | if (irq_set_handler_data(irq, &combiner_data[combiner_nr]) != 0) |
360 | BUG(); | 463 | BUG(); |
@@ -365,8 +468,14 @@ static void __init combiner_init(unsigned int combiner_nr, void __iomem *base, | |||
365 | unsigned int irq_start) | 468 | unsigned int irq_start) |
366 | { | 469 | { |
367 | unsigned int i; | 470 | unsigned int i; |
471 | unsigned int max_nr; | ||
368 | 472 | ||
369 | if (combiner_nr >= MAX_COMBINER_NR) | 473 | if (soc_is_exynos5250()) |
474 | max_nr = EXYNOS5_MAX_COMBINER_NR; | ||
475 | else | ||
476 | max_nr = EXYNOS4_MAX_COMBINER_NR; | ||
477 | |||
478 | if (combiner_nr >= max_nr) | ||
370 | BUG(); | 479 | BUG(); |
371 | 480 | ||
372 | combiner_data[combiner_nr].base = base; | 481 | combiner_data[combiner_nr].base = base; |
@@ -409,8 +518,28 @@ void __init exynos4_init_irq(void) | |||
409 | of_irq_init(exynos4_dt_irq_match); | 518 | of_irq_init(exynos4_dt_irq_match); |
410 | #endif | 519 | #endif |
411 | 520 | ||
412 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { | 521 | for (irq = 0; irq < EXYNOS4_MAX_COMBINER_NR; irq++) { |
522 | |||
523 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), | ||
524 | COMBINER_IRQ(irq, 0)); | ||
525 | combiner_cascade_irq(irq, IRQ_SPI(irq)); | ||
526 | } | ||
527 | |||
528 | /* | ||
529 | * The parameters of s5p_init_irq() are for VIC init. | ||
530 | * Theses parameters should be NULL and 0 because EXYNOS4 | ||
531 | * uses GIC instead of VIC. | ||
532 | */ | ||
533 | s5p_init_irq(NULL, 0); | ||
534 | } | ||
535 | |||
536 | void __init exynos5_init_irq(void) | ||
537 | { | ||
538 | int irq; | ||
539 | |||
540 | gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); | ||
413 | 541 | ||
542 | for (irq = 0; irq < EXYNOS5_MAX_COMBINER_NR; irq++) { | ||
414 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), | 543 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), |
415 | COMBINER_IRQ(irq, 0)); | 544 | COMBINER_IRQ(irq, 0)); |
416 | combiner_cascade_irq(irq, IRQ_SPI(irq)); | 545 | combiner_cascade_irq(irq, IRQ_SPI(irq)); |
@@ -429,19 +558,34 @@ struct bus_type exynos4_subsys = { | |||
429 | .dev_name = "exynos4-core", | 558 | .dev_name = "exynos4-core", |
430 | }; | 559 | }; |
431 | 560 | ||
561 | struct bus_type exynos5_subsys = { | ||
562 | .name = "exynos5-core", | ||
563 | .dev_name = "exynos5-core", | ||
564 | }; | ||
565 | |||
432 | static struct device exynos4_dev = { | 566 | static struct device exynos4_dev = { |
433 | .bus = &exynos4_subsys, | 567 | .bus = &exynos4_subsys, |
434 | }; | 568 | }; |
435 | 569 | ||
436 | static int __init exynos4_core_init(void) | 570 | static struct device exynos5_dev = { |
571 | .bus = &exynos5_subsys, | ||
572 | }; | ||
573 | |||
574 | static int __init exynos_core_init(void) | ||
437 | { | 575 | { |
438 | return subsys_system_register(&exynos4_subsys, NULL); | 576 | if (soc_is_exynos5250()) |
577 | return subsys_system_register(&exynos5_subsys, NULL); | ||
578 | else | ||
579 | return subsys_system_register(&exynos4_subsys, NULL); | ||
439 | } | 580 | } |
440 | core_initcall(exynos4_core_init); | 581 | core_initcall(exynos_core_init); |
441 | 582 | ||
442 | #ifdef CONFIG_CACHE_L2X0 | 583 | #ifdef CONFIG_CACHE_L2X0 |
443 | static int __init exynos4_l2x0_cache_init(void) | 584 | static int __init exynos4_l2x0_cache_init(void) |
444 | { | 585 | { |
586 | if (soc_is_exynos5250()) | ||
587 | return 0; | ||
588 | |||
445 | int ret; | 589 | int ret; |
446 | ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); | 590 | ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); |
447 | if (!ret) { | 591 | if (!ret) { |
@@ -486,19 +630,47 @@ static int __init exynos4_l2x0_cache_init(void) | |||
486 | l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK); | 630 | l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK); |
487 | return 0; | 631 | return 0; |
488 | } | 632 | } |
489 | |||
490 | early_initcall(exynos4_l2x0_cache_init); | 633 | early_initcall(exynos4_l2x0_cache_init); |
491 | #endif | 634 | #endif |
492 | 635 | ||
493 | int __init exynos_init(void) | 636 | static int __init exynos5_l2_cache_init(void) |
637 | { | ||
638 | unsigned int val; | ||
639 | |||
640 | if (!soc_is_exynos5250()) | ||
641 | return 0; | ||
642 | |||
643 | asm volatile("mrc p15, 0, %0, c1, c0, 0\n" | ||
644 | "bic %0, %0, #(1 << 2)\n" /* cache disable */ | ||
645 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
646 | "mrc p15, 1, %0, c9, c0, 2\n" | ||
647 | : "=r"(val)); | ||
648 | |||
649 | val |= (1 << 9) | (1 << 5) | (2 << 6) | (2 << 0); | ||
650 | |||
651 | asm volatile("mcr p15, 1, %0, c9, c0, 2\n" : : "r"(val)); | ||
652 | asm volatile("mrc p15, 0, %0, c1, c0, 0\n" | ||
653 | "orr %0, %0, #(1 << 2)\n" /* cache enable */ | ||
654 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
655 | : : "r"(val)); | ||
656 | |||
657 | return 0; | ||
658 | } | ||
659 | early_initcall(exynos5_l2_cache_init); | ||
660 | |||
661 | static int __init exynos_init(void) | ||
494 | { | 662 | { |
495 | printk(KERN_INFO "EXYNOS: Initializing architecture\n"); | 663 | printk(KERN_INFO "EXYNOS: Initializing architecture\n"); |
496 | return device_register(&exynos4_dev); | 664 | |
665 | if (soc_is_exynos5250()) | ||
666 | return device_register(&exynos5_dev); | ||
667 | else | ||
668 | return device_register(&exynos4_dev); | ||
497 | } | 669 | } |
498 | 670 | ||
499 | /* uart registration process */ | 671 | /* uart registration process */ |
500 | 672 | ||
501 | void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 673 | static void __init exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
502 | { | 674 | { |
503 | struct s3c2410_uartcfg *tcfg = cfg; | 675 | struct s3c2410_uartcfg *tcfg = cfg; |
504 | u32 ucnt; | 676 | u32 ucnt; |
@@ -506,69 +678,138 @@ void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
506 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) | 678 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) |
507 | tcfg->has_fracval = 1; | 679 | tcfg->has_fracval = 1; |
508 | 680 | ||
509 | s3c24xx_init_uartdevs("exynos4210-uart", s5p_uart_resources, cfg, no); | 681 | if (soc_is_exynos5250()) |
682 | s3c24xx_init_uartdevs("exynos4210-uart", exynos5_uart_resources, cfg, no); | ||
683 | else | ||
684 | s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); | ||
510 | } | 685 | } |
511 | 686 | ||
687 | static void __iomem *exynos_eint_base; | ||
688 | |||
512 | static DEFINE_SPINLOCK(eint_lock); | 689 | static DEFINE_SPINLOCK(eint_lock); |
513 | 690 | ||
514 | static unsigned int eint0_15_data[16]; | 691 | static unsigned int eint0_15_data[16]; |
515 | 692 | ||
516 | static unsigned int exynos4_get_irq_nr(unsigned int number) | 693 | static inline int exynos4_irq_to_gpio(unsigned int irq) |
517 | { | 694 | { |
518 | u32 ret = 0; | 695 | if (irq < IRQ_EINT(0)) |
696 | return -EINVAL; | ||
519 | 697 | ||
520 | switch (number) { | 698 | irq -= IRQ_EINT(0); |
521 | case 0 ... 3: | 699 | if (irq < 8) |
522 | ret = (number + IRQ_EINT0); | 700 | return EXYNOS4_GPX0(irq); |
523 | break; | 701 | |
524 | case 4 ... 7: | 702 | irq -= 8; |
525 | ret = (number + (IRQ_EINT4 - 4)); | 703 | if (irq < 8) |
526 | break; | 704 | return EXYNOS4_GPX1(irq); |
527 | case 8 ... 15: | 705 | |
528 | ret = (number + (IRQ_EINT8 - 8)); | 706 | irq -= 8; |
529 | break; | 707 | if (irq < 8) |
530 | default: | 708 | return EXYNOS4_GPX2(irq); |
531 | printk(KERN_ERR "number available : %d\n", number); | 709 | |
532 | } | 710 | irq -= 8; |
711 | if (irq < 8) | ||
712 | return EXYNOS4_GPX3(irq); | ||
713 | |||
714 | return -EINVAL; | ||
715 | } | ||
533 | 716 | ||
534 | return ret; | 717 | static inline int exynos5_irq_to_gpio(unsigned int irq) |
718 | { | ||
719 | if (irq < IRQ_EINT(0)) | ||
720 | return -EINVAL; | ||
721 | |||
722 | irq -= IRQ_EINT(0); | ||
723 | if (irq < 8) | ||
724 | return EXYNOS5_GPX0(irq); | ||
725 | |||
726 | irq -= 8; | ||
727 | if (irq < 8) | ||
728 | return EXYNOS5_GPX1(irq); | ||
729 | |||
730 | irq -= 8; | ||
731 | if (irq < 8) | ||
732 | return EXYNOS5_GPX2(irq); | ||
733 | |||
734 | irq -= 8; | ||
735 | if (irq < 8) | ||
736 | return EXYNOS5_GPX3(irq); | ||
737 | |||
738 | return -EINVAL; | ||
535 | } | 739 | } |
536 | 740 | ||
537 | static inline void exynos4_irq_eint_mask(struct irq_data *data) | 741 | static unsigned int exynos4_eint0_15_src_int[16] = { |
742 | EXYNOS4_IRQ_EINT0, | ||
743 | EXYNOS4_IRQ_EINT1, | ||
744 | EXYNOS4_IRQ_EINT2, | ||
745 | EXYNOS4_IRQ_EINT3, | ||
746 | EXYNOS4_IRQ_EINT4, | ||
747 | EXYNOS4_IRQ_EINT5, | ||
748 | EXYNOS4_IRQ_EINT6, | ||
749 | EXYNOS4_IRQ_EINT7, | ||
750 | EXYNOS4_IRQ_EINT8, | ||
751 | EXYNOS4_IRQ_EINT9, | ||
752 | EXYNOS4_IRQ_EINT10, | ||
753 | EXYNOS4_IRQ_EINT11, | ||
754 | EXYNOS4_IRQ_EINT12, | ||
755 | EXYNOS4_IRQ_EINT13, | ||
756 | EXYNOS4_IRQ_EINT14, | ||
757 | EXYNOS4_IRQ_EINT15, | ||
758 | }; | ||
759 | |||
760 | static unsigned int exynos5_eint0_15_src_int[16] = { | ||
761 | EXYNOS5_IRQ_EINT0, | ||
762 | EXYNOS5_IRQ_EINT1, | ||
763 | EXYNOS5_IRQ_EINT2, | ||
764 | EXYNOS5_IRQ_EINT3, | ||
765 | EXYNOS5_IRQ_EINT4, | ||
766 | EXYNOS5_IRQ_EINT5, | ||
767 | EXYNOS5_IRQ_EINT6, | ||
768 | EXYNOS5_IRQ_EINT7, | ||
769 | EXYNOS5_IRQ_EINT8, | ||
770 | EXYNOS5_IRQ_EINT9, | ||
771 | EXYNOS5_IRQ_EINT10, | ||
772 | EXYNOS5_IRQ_EINT11, | ||
773 | EXYNOS5_IRQ_EINT12, | ||
774 | EXYNOS5_IRQ_EINT13, | ||
775 | EXYNOS5_IRQ_EINT14, | ||
776 | EXYNOS5_IRQ_EINT15, | ||
777 | }; | ||
778 | static inline void exynos_irq_eint_mask(struct irq_data *data) | ||
538 | { | 779 | { |
539 | u32 mask; | 780 | u32 mask; |
540 | 781 | ||
541 | spin_lock(&eint_lock); | 782 | spin_lock(&eint_lock); |
542 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); | 783 | mask = __raw_readl(EINT_MASK(exynos_eint_base, data->irq)); |
543 | mask |= eint_irq_to_bit(data->irq); | 784 | mask |= EINT_OFFSET_BIT(data->irq); |
544 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); | 785 | __raw_writel(mask, EINT_MASK(exynos_eint_base, data->irq)); |
545 | spin_unlock(&eint_lock); | 786 | spin_unlock(&eint_lock); |
546 | } | 787 | } |
547 | 788 | ||
548 | static void exynos4_irq_eint_unmask(struct irq_data *data) | 789 | static void exynos_irq_eint_unmask(struct irq_data *data) |
549 | { | 790 | { |
550 | u32 mask; | 791 | u32 mask; |
551 | 792 | ||
552 | spin_lock(&eint_lock); | 793 | spin_lock(&eint_lock); |
553 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); | 794 | mask = __raw_readl(EINT_MASK(exynos_eint_base, data->irq)); |
554 | mask &= ~(eint_irq_to_bit(data->irq)); | 795 | mask &= ~(EINT_OFFSET_BIT(data->irq)); |
555 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); | 796 | __raw_writel(mask, EINT_MASK(exynos_eint_base, data->irq)); |
556 | spin_unlock(&eint_lock); | 797 | spin_unlock(&eint_lock); |
557 | } | 798 | } |
558 | 799 | ||
559 | static inline void exynos4_irq_eint_ack(struct irq_data *data) | 800 | static inline void exynos_irq_eint_ack(struct irq_data *data) |
560 | { | 801 | { |
561 | __raw_writel(eint_irq_to_bit(data->irq), | 802 | __raw_writel(EINT_OFFSET_BIT(data->irq), |
562 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | 803 | EINT_PEND(exynos_eint_base, data->irq)); |
563 | } | 804 | } |
564 | 805 | ||
565 | static void exynos4_irq_eint_maskack(struct irq_data *data) | 806 | static void exynos_irq_eint_maskack(struct irq_data *data) |
566 | { | 807 | { |
567 | exynos4_irq_eint_mask(data); | 808 | exynos_irq_eint_mask(data); |
568 | exynos4_irq_eint_ack(data); | 809 | exynos_irq_eint_ack(data); |
569 | } | 810 | } |
570 | 811 | ||
571 | static int exynos4_irq_eint_set_type(struct irq_data *data, unsigned int type) | 812 | static int exynos_irq_eint_set_type(struct irq_data *data, unsigned int type) |
572 | { | 813 | { |
573 | int offs = EINT_OFFSET(data->irq); | 814 | int offs = EINT_OFFSET(data->irq); |
574 | int shift; | 815 | int shift; |
@@ -605,39 +846,27 @@ static int exynos4_irq_eint_set_type(struct irq_data *data, unsigned int type) | |||
605 | mask = 0x7 << shift; | 846 | mask = 0x7 << shift; |
606 | 847 | ||
607 | spin_lock(&eint_lock); | 848 | spin_lock(&eint_lock); |
608 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(data->irq))); | 849 | ctrl = __raw_readl(EINT_CON(exynos_eint_base, data->irq)); |
609 | ctrl &= ~mask; | 850 | ctrl &= ~mask; |
610 | ctrl |= newvalue << shift; | 851 | ctrl |= newvalue << shift; |
611 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(data->irq))); | 852 | __raw_writel(ctrl, EINT_CON(exynos_eint_base, data->irq)); |
612 | spin_unlock(&eint_lock); | 853 | spin_unlock(&eint_lock); |
613 | 854 | ||
614 | switch (offs) { | 855 | if (soc_is_exynos5250()) |
615 | case 0 ... 7: | 856 | s3c_gpio_cfgpin(exynos5_irq_to_gpio(data->irq), S3C_GPIO_SFN(0xf)); |
616 | s3c_gpio_cfgpin(EINT_GPIO_0(offs & 0x7), EINT_MODE); | 857 | else |
617 | break; | 858 | s3c_gpio_cfgpin(exynos4_irq_to_gpio(data->irq), S3C_GPIO_SFN(0xf)); |
618 | case 8 ... 15: | ||
619 | s3c_gpio_cfgpin(EINT_GPIO_1(offs & 0x7), EINT_MODE); | ||
620 | break; | ||
621 | case 16 ... 23: | ||
622 | s3c_gpio_cfgpin(EINT_GPIO_2(offs & 0x7), EINT_MODE); | ||
623 | break; | ||
624 | case 24 ... 31: | ||
625 | s3c_gpio_cfgpin(EINT_GPIO_3(offs & 0x7), EINT_MODE); | ||
626 | break; | ||
627 | default: | ||
628 | printk(KERN_ERR "No such irq number %d", offs); | ||
629 | } | ||
630 | 859 | ||
631 | return 0; | 860 | return 0; |
632 | } | 861 | } |
633 | 862 | ||
634 | static struct irq_chip exynos4_irq_eint = { | 863 | static struct irq_chip exynos_irq_eint = { |
635 | .name = "exynos4-eint", | 864 | .name = "exynos-eint", |
636 | .irq_mask = exynos4_irq_eint_mask, | 865 | .irq_mask = exynos_irq_eint_mask, |
637 | .irq_unmask = exynos4_irq_eint_unmask, | 866 | .irq_unmask = exynos_irq_eint_unmask, |
638 | .irq_mask_ack = exynos4_irq_eint_maskack, | 867 | .irq_mask_ack = exynos_irq_eint_maskack, |
639 | .irq_ack = exynos4_irq_eint_ack, | 868 | .irq_ack = exynos_irq_eint_ack, |
640 | .irq_set_type = exynos4_irq_eint_set_type, | 869 | .irq_set_type = exynos_irq_eint_set_type, |
641 | #ifdef CONFIG_PM | 870 | #ifdef CONFIG_PM |
642 | .irq_set_wake = s3c_irqext_wake, | 871 | .irq_set_wake = s3c_irqext_wake, |
643 | #endif | 872 | #endif |
@@ -652,12 +881,12 @@ static struct irq_chip exynos4_irq_eint = { | |||
652 | * | 881 | * |
653 | * Each EINT pend/mask registers handle eight of them. | 882 | * Each EINT pend/mask registers handle eight of them. |
654 | */ | 883 | */ |
655 | static inline void exynos4_irq_demux_eint(unsigned int start) | 884 | static inline void exynos_irq_demux_eint(unsigned int start) |
656 | { | 885 | { |
657 | unsigned int irq; | 886 | unsigned int irq; |
658 | 887 | ||
659 | u32 status = __raw_readl(S5P_EINT_PEND(EINT_REG_NR(start))); | 888 | u32 status = __raw_readl(EINT_PEND(exynos_eint_base, start)); |
660 | u32 mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(start))); | 889 | u32 mask = __raw_readl(EINT_MASK(exynos_eint_base, start)); |
661 | 890 | ||
662 | status &= ~mask; | 891 | status &= ~mask; |
663 | status &= 0xff; | 892 | status &= 0xff; |
@@ -669,16 +898,16 @@ static inline void exynos4_irq_demux_eint(unsigned int start) | |||
669 | } | 898 | } |
670 | } | 899 | } |
671 | 900 | ||
672 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | 901 | static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) |
673 | { | 902 | { |
674 | struct irq_chip *chip = irq_get_chip(irq); | 903 | struct irq_chip *chip = irq_get_chip(irq); |
675 | chained_irq_enter(chip, desc); | 904 | chained_irq_enter(chip, desc); |
676 | exynos4_irq_demux_eint(IRQ_EINT(16)); | 905 | exynos_irq_demux_eint(IRQ_EINT(16)); |
677 | exynos4_irq_demux_eint(IRQ_EINT(24)); | 906 | exynos_irq_demux_eint(IRQ_EINT(24)); |
678 | chained_irq_exit(chip, desc); | 907 | chained_irq_exit(chip, desc); |
679 | } | 908 | } |
680 | 909 | ||
681 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | 910 | static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) |
682 | { | 911 | { |
683 | u32 *irq_data = irq_get_handler_data(irq); | 912 | u32 *irq_data = irq_get_handler_data(irq); |
684 | struct irq_chip *chip = irq_get_chip(irq); | 913 | struct irq_chip *chip = irq_get_chip(irq); |
@@ -695,27 +924,44 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
695 | chained_irq_exit(chip, desc); | 924 | chained_irq_exit(chip, desc); |
696 | } | 925 | } |
697 | 926 | ||
698 | static int __init exynos4_init_irq_eint(void) | 927 | static int __init exynos_init_irq_eint(void) |
699 | { | 928 | { |
700 | int irq; | 929 | int irq; |
701 | 930 | ||
931 | if (soc_is_exynos5250()) | ||
932 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); | ||
933 | else | ||
934 | exynos_eint_base = ioremap(EXYNOS4_PA_GPIO2, SZ_4K); | ||
935 | |||
936 | if (exynos_eint_base == NULL) { | ||
937 | pr_err("unable to ioremap for EINT base address\n"); | ||
938 | return -ENOMEM; | ||
939 | } | ||
940 | |||
702 | for (irq = 0 ; irq <= 31 ; irq++) { | 941 | for (irq = 0 ; irq <= 31 ; irq++) { |
703 | irq_set_chip_and_handler(IRQ_EINT(irq), &exynos4_irq_eint, | 942 | irq_set_chip_and_handler(IRQ_EINT(irq), &exynos_irq_eint, |
704 | handle_level_irq); | 943 | handle_level_irq); |
705 | set_irq_flags(IRQ_EINT(irq), IRQF_VALID); | 944 | set_irq_flags(IRQ_EINT(irq), IRQF_VALID); |
706 | } | 945 | } |
707 | 946 | ||
708 | irq_set_chained_handler(IRQ_EINT16_31, exynos4_irq_demux_eint16_31); | 947 | irq_set_chained_handler(EXYNOS_IRQ_EINT16_31, exynos_irq_demux_eint16_31); |
709 | 948 | ||
710 | for (irq = 0 ; irq <= 15 ; irq++) { | 949 | for (irq = 0 ; irq <= 15 ; irq++) { |
711 | eint0_15_data[irq] = IRQ_EINT(irq); | 950 | eint0_15_data[irq] = IRQ_EINT(irq); |
712 | 951 | ||
713 | irq_set_handler_data(exynos4_get_irq_nr(irq), | 952 | if (soc_is_exynos5250()) { |
714 | &eint0_15_data[irq]); | 953 | irq_set_handler_data(exynos5_eint0_15_src_int[irq], |
715 | irq_set_chained_handler(exynos4_get_irq_nr(irq), | 954 | &eint0_15_data[irq]); |
716 | exynos4_irq_eint0_15); | 955 | irq_set_chained_handler(exynos5_eint0_15_src_int[irq], |
956 | exynos_irq_eint0_15); | ||
957 | } else { | ||
958 | irq_set_handler_data(exynos4_eint0_15_src_int[irq], | ||
959 | &eint0_15_data[irq]); | ||
960 | irq_set_chained_handler(exynos4_eint0_15_src_int[irq], | ||
961 | exynos_irq_eint0_15); | ||
962 | } | ||
717 | } | 963 | } |
718 | 964 | ||
719 | return 0; | 965 | return 0; |
720 | } | 966 | } |
721 | arch_initcall(exynos4_init_irq_eint); | 967 | arch_initcall(exynos_init_irq_eint); |
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 8c1efe692c20..677b5467df18 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
@@ -12,39 +12,44 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H |
13 | #define __ARCH_ARM_MACH_EXYNOS_COMMON_H | 13 | #define __ARCH_ARM_MACH_EXYNOS_COMMON_H |
14 | 14 | ||
15 | extern struct sys_timer exynos4_timer; | ||
16 | |||
15 | void exynos_init_io(struct map_desc *mach_desc, int size); | 17 | void exynos_init_io(struct map_desc *mach_desc, int size); |
16 | void exynos4_init_irq(void); | 18 | void exynos4_init_irq(void); |
19 | void exynos5_init_irq(void); | ||
20 | void exynos4_restart(char mode, const char *cmd); | ||
21 | void exynos5_restart(char mode, const char *cmd); | ||
17 | 22 | ||
18 | #ifdef CONFIG_ARCH_EXYNOS4 | 23 | #ifdef CONFIG_ARCH_EXYNOS4 |
19 | void exynos4_register_clocks(void); | 24 | void exynos4_register_clocks(void); |
20 | void exynos4_setup_clocks(void); | 25 | void exynos4_setup_clocks(void); |
21 | 26 | ||
22 | void exynos4210_register_clocks(void); | ||
23 | void exynos4212_register_clocks(void); | ||
24 | |||
25 | #else | 27 | #else |
26 | #define exynos4_register_clocks() | 28 | #define exynos4_register_clocks() |
27 | #define exynos4_setup_clocks() | 29 | #define exynos4_setup_clocks() |
30 | #endif | ||
28 | 31 | ||
29 | #define exynos4210_register_clocks() | 32 | #ifdef CONFIG_ARCH_EXYNOS5 |
30 | #define exynos4212_register_clocks() | 33 | void exynos5_register_clocks(void); |
34 | void exynos5_setup_clocks(void); | ||
35 | |||
36 | #else | ||
37 | #define exynos5_register_clocks() | ||
38 | #define exynos5_setup_clocks() | ||
31 | #endif | 39 | #endif |
32 | 40 | ||
33 | void exynos4_restart(char mode, const char *cmd); | 41 | #ifdef CONFIG_CPU_EXYNOS4210 |
42 | void exynos4210_register_clocks(void); | ||
34 | 43 | ||
35 | extern struct sys_timer exynos4_timer; | 44 | #else |
45 | #define exynos4210_register_clocks() | ||
46 | #endif | ||
36 | 47 | ||
37 | #ifdef CONFIG_ARCH_EXYNOS | 48 | #ifdef CONFIG_SOC_EXYNOS4212 |
38 | extern int exynos_init(void); | 49 | void exynos4212_register_clocks(void); |
39 | extern void exynos4_map_io(void); | ||
40 | extern void exynos4_init_clocks(int xtal); | ||
41 | extern void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
42 | 50 | ||
43 | #else | 51 | #else |
44 | #define exynos4_init_clocks NULL | 52 | #define exynos4212_register_clocks() |
45 | #define exynos4_init_uarts NULL | ||
46 | #define exynos4_map_io NULL | ||
47 | #define exynos_init NULL | ||
48 | #endif | 53 | #endif |
49 | 54 | ||
50 | #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ | 55 | #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ |
diff --git a/arch/arm/mach-exynos/dev-ahci.c b/arch/arm/mach-exynos/dev-ahci.c index f57a3de8e1d2..50ce5b0adcf1 100644 --- a/arch/arm/mach-exynos/dev-ahci.c +++ b/arch/arm/mach-exynos/dev-ahci.c | |||
@@ -242,8 +242,8 @@ static struct resource exynos4_ahci_resource[] = { | |||
242 | .flags = IORESOURCE_MEM, | 242 | .flags = IORESOURCE_MEM, |
243 | }, | 243 | }, |
244 | [1] = { | 244 | [1] = { |
245 | .start = IRQ_SATA, | 245 | .start = EXYNOS4_IRQ_SATA, |
246 | .end = IRQ_SATA, | 246 | .end = EXYNOS4_IRQ_SATA, |
247 | .flags = IORESOURCE_IRQ, | 247 | .flags = IORESOURCE_IRQ, |
248 | }, | 248 | }, |
249 | }; | 249 | }; |
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c index 5a9f9c2e53bf..7199e1ae79b4 100644 --- a/arch/arm/mach-exynos/dev-audio.c +++ b/arch/arm/mach-exynos/dev-audio.c | |||
@@ -304,8 +304,8 @@ static struct resource exynos4_ac97_resource[] = { | |||
304 | .flags = IORESOURCE_DMA, | 304 | .flags = IORESOURCE_DMA, |
305 | }, | 305 | }, |
306 | [4] = { | 306 | [4] = { |
307 | .start = IRQ_AC97, | 307 | .start = EXYNOS4_IRQ_AC97, |
308 | .end = IRQ_AC97, | 308 | .end = EXYNOS4_IRQ_AC97, |
309 | .flags = IORESOURCE_IRQ, | 309 | .flags = IORESOURCE_IRQ, |
310 | }, | 310 | }, |
311 | }; | 311 | }; |
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c new file mode 100644 index 000000000000..2e85c022fd16 --- /dev/null +++ b/arch/arm/mach-exynos/dev-uart.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Base EXYNOS UART resource and device definitions | ||
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 | #include <linux/kernel.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/ioport.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <asm/mach/arch.h> | ||
20 | #include <asm/mach/irq.h> | ||
21 | #include <mach/hardware.h> | ||
22 | #include <mach/map.h> | ||
23 | |||
24 | #include <plat/devs.h> | ||
25 | |||
26 | #define EXYNOS_UART_RESOURCE(_series, _nr) \ | ||
27 | static struct resource exynos##_series##_uart##_nr##_resource[] = { \ | ||
28 | [0] = DEFINE_RES_MEM(EXYNOS##_series##_PA_UART##_nr, EXYNOS##_series##_SZ_UART), \ | ||
29 | [1] = DEFINE_RES_IRQ(EXYNOS##_series##_IRQ_UART##_nr), \ | ||
30 | }; | ||
31 | |||
32 | EXYNOS_UART_RESOURCE(4, 0) | ||
33 | EXYNOS_UART_RESOURCE(4, 1) | ||
34 | EXYNOS_UART_RESOURCE(4, 2) | ||
35 | EXYNOS_UART_RESOURCE(4, 3) | ||
36 | |||
37 | struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = { | ||
38 | [0] = { | ||
39 | .resources = exynos4_uart0_resource, | ||
40 | .nr_resources = ARRAY_SIZE(exynos4_uart0_resource), | ||
41 | }, | ||
42 | [1] = { | ||
43 | .resources = exynos4_uart1_resource, | ||
44 | .nr_resources = ARRAY_SIZE(exynos4_uart1_resource), | ||
45 | }, | ||
46 | [2] = { | ||
47 | .resources = exynos4_uart2_resource, | ||
48 | .nr_resources = ARRAY_SIZE(exynos4_uart2_resource), | ||
49 | }, | ||
50 | [3] = { | ||
51 | .resources = exynos4_uart3_resource, | ||
52 | .nr_resources = ARRAY_SIZE(exynos4_uart3_resource), | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | EXYNOS_UART_RESOURCE(5, 0) | ||
57 | EXYNOS_UART_RESOURCE(5, 1) | ||
58 | EXYNOS_UART_RESOURCE(5, 2) | ||
59 | EXYNOS_UART_RESOURCE(5, 3) | ||
60 | |||
61 | struct s3c24xx_uart_resources exynos5_uart_resources[] __initdata = { | ||
62 | [0] = { | ||
63 | .resources = exynos5_uart0_resource, | ||
64 | .nr_resources = ARRAY_SIZE(exynos5_uart0_resource), | ||
65 | }, | ||
66 | [1] = { | ||
67 | .resources = exynos5_uart1_resource, | ||
68 | .nr_resources = ARRAY_SIZE(exynos5_uart0_resource), | ||
69 | }, | ||
70 | [2] = { | ||
71 | .resources = exynos5_uart2_resource, | ||
72 | .nr_resources = ARRAY_SIZE(exynos5_uart2_resource), | ||
73 | }, | ||
74 | [3] = { | ||
75 | .resources = exynos5_uart3_resource, | ||
76 | .nr_resources = ARRAY_SIZE(exynos5_uart3_resource), | ||
77 | }, | ||
78 | }; | ||
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c index 13607c4328b3..3983abee4264 100644 --- a/arch/arm/mach-exynos/dma.c +++ b/arch/arm/mach-exynos/dma.c | |||
@@ -108,7 +108,7 @@ static u8 exynos4212_pdma0_peri[] = { | |||
108 | struct dma_pl330_platdata exynos4_pdma0_pdata; | 108 | struct dma_pl330_platdata exynos4_pdma0_pdata; |
109 | 109 | ||
110 | static AMBA_AHB_DEVICE(exynos4_pdma0, "dma-pl330.0", 0x00041330, | 110 | static AMBA_AHB_DEVICE(exynos4_pdma0, "dma-pl330.0", 0x00041330, |
111 | EXYNOS4_PA_PDMA0, {IRQ_PDMA0}, &exynos4_pdma0_pdata); | 111 | EXYNOS4_PA_PDMA0, {EXYNOS4_IRQ_PDMA0}, &exynos4_pdma0_pdata); |
112 | 112 | ||
113 | static u8 exynos4210_pdma1_peri[] = { | 113 | static u8 exynos4210_pdma1_peri[] = { |
114 | DMACH_PCM0_RX, | 114 | DMACH_PCM0_RX, |
@@ -174,7 +174,7 @@ static u8 exynos4212_pdma1_peri[] = { | |||
174 | static struct dma_pl330_platdata exynos4_pdma1_pdata; | 174 | static struct dma_pl330_platdata exynos4_pdma1_pdata; |
175 | 175 | ||
176 | static AMBA_AHB_DEVICE(exynos4_pdma1, "dma-pl330.1", 0x00041330, | 176 | static AMBA_AHB_DEVICE(exynos4_pdma1, "dma-pl330.1", 0x00041330, |
177 | EXYNOS4_PA_PDMA1, {IRQ_PDMA1}, &exynos4_pdma1_pdata); | 177 | EXYNOS4_PA_PDMA1, {EXYNOS4_IRQ_PDMA1}, &exynos4_pdma1_pdata); |
178 | 178 | ||
179 | static u8 mdma_peri[] = { | 179 | static u8 mdma_peri[] = { |
180 | DMACH_MTOM_0, | 180 | DMACH_MTOM_0, |
@@ -193,7 +193,7 @@ static struct dma_pl330_platdata exynos4_mdma1_pdata = { | |||
193 | }; | 193 | }; |
194 | 194 | ||
195 | static AMBA_AHB_DEVICE(exynos4_mdma1, "dma-pl330.2", 0x00041330, | 195 | static AMBA_AHB_DEVICE(exynos4_mdma1, "dma-pl330.2", 0x00041330, |
196 | EXYNOS4_PA_MDMA1, {IRQ_MDMA1}, &exynos4_mdma1_pdata); | 196 | EXYNOS4_PA_MDMA1, {EXYNOS4_IRQ_MDMA1}, &exynos4_mdma1_pdata); |
197 | 197 | ||
198 | static int __init exynos4_dma_init(void) | 198 | static int __init exynos4_dma_init(void) |
199 | { | 199 | { |
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index dd1ad55524c9..9c17a0a43858 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/cp15.h> | ||
19 | #include <asm/smp_plat.h> | 20 | #include <asm/smp_plat.h> |
20 | 21 | ||
21 | #include <mach/regs-pmu.h> | 22 | #include <mach/regs-pmu.h> |
diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/mach-exynos/include/mach/debug-macro.S index 6cacf16a67a6..6c857ff0b5d8 100644 --- a/arch/arm/mach-exynos/include/mach/debug-macro.S +++ b/arch/arm/mach-exynos/include/mach/debug-macro.S | |||
@@ -21,8 +21,13 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | .macro addruart, rp, rv, tmp | 23 | .macro addruart, rp, rv, tmp |
24 | ldr \rp, = S3C_PA_UART | 24 | mov \rp, #0x10000000 |
25 | ldr \rv, = S3C_VA_UART | 25 | ldr \rp, [\rp, #0x0] |
26 | and \rp, \rp, #0xf00000 | ||
27 | teq \rp, #0x500000 @@ EXYNOS5 | ||
28 | ldreq \rp, =EXYNOS5_PA_UART | ||
29 | movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 | ||
30 | ldr \rv, =S3C_VA_UART | ||
26 | #if CONFIG_DEBUG_S3C_UART != 0 | 31 | #if CONFIG_DEBUG_S3C_UART != 0 |
27 | add \rp, \rp, #(0x10000 * CONFIG_DEBUG_S3C_UART) | 32 | add \rp, \rp, #(0x10000 * CONFIG_DEBUG_S3C_UART) |
28 | add \rv, \rv, #(0x10000 * CONFIG_DEBUG_S3C_UART) | 33 | add \rv, \rv, #(0x10000 * CONFIG_DEBUG_S3C_UART) |
diff --git a/arch/arm/mach-exynos/include/mach/gpio.h b/arch/arm/mach-exynos/include/mach/gpio.h index 80523ca9bb49..d7498afe036a 100644 --- a/arch/arm/mach-exynos/include/mach/gpio.h +++ b/arch/arm/mach-exynos/include/mach/gpio.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/include/mach/gpio.h | 1 | /* |
2 | * | 2 | * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. |
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | 3 | * http://www.samsung.com |
5 | * | 4 | * |
6 | * EXYNOS4 - GPIO lib support | 5 | * EXYNOS - GPIO lib support |
7 | * | 6 | * |
8 | * 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 |
9 | * 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 |
@@ -13,9 +12,13 @@ | |||
13 | #ifndef __ASM_ARCH_GPIO_H | 12 | #ifndef __ASM_ARCH_GPIO_H |
14 | #define __ASM_ARCH_GPIO_H __FILE__ | 13 | #define __ASM_ARCH_GPIO_H __FILE__ |
15 | 14 | ||
16 | /* Practically, GPIO banks up to GPZ are the configurable gpio banks */ | 15 | /* Macro for EXYNOS GPIO numbering */ |
16 | |||
17 | #define EXYNOS_GPIO_NEXT(__gpio) \ | ||
18 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | ||
19 | |||
20 | /* EXYNOS4 GPIO bank sizes */ | ||
17 | 21 | ||
18 | /* GPIO bank sizes */ | ||
19 | #define EXYNOS4_GPIO_A0_NR (8) | 22 | #define EXYNOS4_GPIO_A0_NR (8) |
20 | #define EXYNOS4_GPIO_A1_NR (6) | 23 | #define EXYNOS4_GPIO_A1_NR (6) |
21 | #define EXYNOS4_GPIO_B_NR (8) | 24 | #define EXYNOS4_GPIO_B_NR (8) |
@@ -54,52 +57,50 @@ | |||
54 | #define EXYNOS4_GPIO_Y6_NR (8) | 57 | #define EXYNOS4_GPIO_Y6_NR (8) |
55 | #define EXYNOS4_GPIO_Z_NR (7) | 58 | #define EXYNOS4_GPIO_Z_NR (7) |
56 | 59 | ||
57 | /* GPIO bank numbers */ | 60 | /* EXYNOS4 GPIO bank numbers */ |
58 | |||
59 | #define EXYNOS4_GPIO_NEXT(__gpio) \ | ||
60 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | ||
61 | 61 | ||
62 | enum s5p_gpio_number { | 62 | enum exynos4_gpio_number { |
63 | EXYNOS4_GPIO_A0_START = 0, | 63 | EXYNOS4_GPIO_A0_START = 0, |
64 | EXYNOS4_GPIO_A1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_A0), | 64 | EXYNOS4_GPIO_A1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_A0), |
65 | EXYNOS4_GPIO_B_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_A1), | 65 | EXYNOS4_GPIO_B_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_A1), |
66 | EXYNOS4_GPIO_C0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_B), | 66 | EXYNOS4_GPIO_C0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_B), |
67 | EXYNOS4_GPIO_C1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_C0), | 67 | EXYNOS4_GPIO_C1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_C0), |
68 | EXYNOS4_GPIO_D0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_C1), | 68 | EXYNOS4_GPIO_D0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_C1), |
69 | EXYNOS4_GPIO_D1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_D0), | 69 | EXYNOS4_GPIO_D1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_D0), |
70 | EXYNOS4_GPIO_E0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_D1), | 70 | EXYNOS4_GPIO_E0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_D1), |
71 | EXYNOS4_GPIO_E1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E0), | 71 | EXYNOS4_GPIO_E1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E0), |
72 | EXYNOS4_GPIO_E2_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E1), | 72 | EXYNOS4_GPIO_E2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E1), |
73 | EXYNOS4_GPIO_E3_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E2), | 73 | EXYNOS4_GPIO_E3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E2), |
74 | EXYNOS4_GPIO_E4_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E3), | 74 | EXYNOS4_GPIO_E4_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E3), |
75 | EXYNOS4_GPIO_F0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E4), | 75 | EXYNOS4_GPIO_F0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E4), |
76 | EXYNOS4_GPIO_F1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F0), | 76 | EXYNOS4_GPIO_F1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F0), |
77 | EXYNOS4_GPIO_F2_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F1), | 77 | EXYNOS4_GPIO_F2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F1), |
78 | EXYNOS4_GPIO_F3_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F2), | 78 | EXYNOS4_GPIO_F3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F2), |
79 | EXYNOS4_GPIO_J0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F3), | 79 | EXYNOS4_GPIO_J0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F3), |
80 | EXYNOS4_GPIO_J1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_J0), | 80 | EXYNOS4_GPIO_J1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_J0), |
81 | EXYNOS4_GPIO_K0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_J1), | 81 | EXYNOS4_GPIO_K0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_J1), |
82 | EXYNOS4_GPIO_K1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K0), | 82 | EXYNOS4_GPIO_K1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K0), |
83 | EXYNOS4_GPIO_K2_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K1), | 83 | EXYNOS4_GPIO_K2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K1), |
84 | EXYNOS4_GPIO_K3_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K2), | 84 | EXYNOS4_GPIO_K3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K2), |
85 | EXYNOS4_GPIO_L0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K3), | 85 | EXYNOS4_GPIO_L0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K3), |
86 | EXYNOS4_GPIO_L1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_L0), | 86 | EXYNOS4_GPIO_L1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_L0), |
87 | EXYNOS4_GPIO_L2_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_L1), | 87 | EXYNOS4_GPIO_L2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_L1), |
88 | EXYNOS4_GPIO_X0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_L2), | 88 | EXYNOS4_GPIO_X0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_L2), |
89 | EXYNOS4_GPIO_X1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X0), | 89 | EXYNOS4_GPIO_X1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X0), |
90 | EXYNOS4_GPIO_X2_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X1), | 90 | EXYNOS4_GPIO_X2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X1), |
91 | EXYNOS4_GPIO_X3_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X2), | 91 | EXYNOS4_GPIO_X3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X2), |
92 | EXYNOS4_GPIO_Y0_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X3), | 92 | EXYNOS4_GPIO_Y0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X3), |
93 | EXYNOS4_GPIO_Y1_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y0), | 93 | EXYNOS4_GPIO_Y1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y0), |
94 | EXYNOS4_GPIO_Y2_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y1), | 94 | EXYNOS4_GPIO_Y2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y1), |
95 | EXYNOS4_GPIO_Y3_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y2), | 95 | EXYNOS4_GPIO_Y3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y2), |
96 | EXYNOS4_GPIO_Y4_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y3), | 96 | EXYNOS4_GPIO_Y4_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y3), |
97 | EXYNOS4_GPIO_Y5_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y4), | 97 | EXYNOS4_GPIO_Y5_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y4), |
98 | EXYNOS4_GPIO_Y6_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y5), | 98 | EXYNOS4_GPIO_Y6_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y5), |
99 | EXYNOS4_GPIO_Z_START = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y6), | 99 | EXYNOS4_GPIO_Z_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y6), |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* EXYNOS4 GPIO number definitions */ | 102 | /* EXYNOS4 GPIO number definitions */ |
103 | |||
103 | #define EXYNOS4_GPA0(_nr) (EXYNOS4_GPIO_A0_START + (_nr)) | 104 | #define EXYNOS4_GPA0(_nr) (EXYNOS4_GPIO_A0_START + (_nr)) |
104 | #define EXYNOS4_GPA1(_nr) (EXYNOS4_GPIO_A1_START + (_nr)) | 105 | #define EXYNOS4_GPA1(_nr) (EXYNOS4_GPIO_A1_START + (_nr)) |
105 | #define EXYNOS4_GPB(_nr) (EXYNOS4_GPIO_B_START + (_nr)) | 106 | #define EXYNOS4_GPB(_nr) (EXYNOS4_GPIO_B_START + (_nr)) |
@@ -139,11 +140,147 @@ enum s5p_gpio_number { | |||
139 | #define EXYNOS4_GPZ(_nr) (EXYNOS4_GPIO_Z_START + (_nr)) | 140 | #define EXYNOS4_GPZ(_nr) (EXYNOS4_GPIO_Z_START + (_nr)) |
140 | 141 | ||
141 | /* the end of the EXYNOS4 specific gpios */ | 142 | /* the end of the EXYNOS4 specific gpios */ |
143 | |||
142 | #define EXYNOS4_GPIO_END (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + 1) | 144 | #define EXYNOS4_GPIO_END (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + 1) |
143 | #define S3C_GPIO_END EXYNOS4_GPIO_END | ||
144 | 145 | ||
145 | /* define the number of gpios we need to the one after the GPZ() range */ | 146 | /* EXYNOS5 GPIO bank sizes */ |
146 | #define ARCH_NR_GPIOS (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + \ | 147 | |
147 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | 148 | #define EXYNOS5_GPIO_A0_NR (8) |
149 | #define EXYNOS5_GPIO_A1_NR (6) | ||
150 | #define EXYNOS5_GPIO_A2_NR (8) | ||
151 | #define EXYNOS5_GPIO_B0_NR (5) | ||
152 | #define EXYNOS5_GPIO_B1_NR (5) | ||
153 | #define EXYNOS5_GPIO_B2_NR (4) | ||
154 | #define EXYNOS5_GPIO_B3_NR (4) | ||
155 | #define EXYNOS5_GPIO_C0_NR (7) | ||
156 | #define EXYNOS5_GPIO_C1_NR (7) | ||
157 | #define EXYNOS5_GPIO_C2_NR (7) | ||
158 | #define EXYNOS5_GPIO_C3_NR (7) | ||
159 | #define EXYNOS5_GPIO_D0_NR (8) | ||
160 | #define EXYNOS5_GPIO_D1_NR (8) | ||
161 | #define EXYNOS5_GPIO_Y0_NR (6) | ||
162 | #define EXYNOS5_GPIO_Y1_NR (4) | ||
163 | #define EXYNOS5_GPIO_Y2_NR (6) | ||
164 | #define EXYNOS5_GPIO_Y3_NR (8) | ||
165 | #define EXYNOS5_GPIO_Y4_NR (8) | ||
166 | #define EXYNOS5_GPIO_Y5_NR (8) | ||
167 | #define EXYNOS5_GPIO_Y6_NR (8) | ||
168 | #define EXYNOS5_GPIO_X0_NR (8) | ||
169 | #define EXYNOS5_GPIO_X1_NR (8) | ||
170 | #define EXYNOS5_GPIO_X2_NR (8) | ||
171 | #define EXYNOS5_GPIO_X3_NR (8) | ||
172 | #define EXYNOS5_GPIO_E0_NR (8) | ||
173 | #define EXYNOS5_GPIO_E1_NR (2) | ||
174 | #define EXYNOS5_GPIO_F0_NR (4) | ||
175 | #define EXYNOS5_GPIO_F1_NR (4) | ||
176 | #define EXYNOS5_GPIO_G0_NR (8) | ||
177 | #define EXYNOS5_GPIO_G1_NR (8) | ||
178 | #define EXYNOS5_GPIO_G2_NR (2) | ||
179 | #define EXYNOS5_GPIO_H0_NR (4) | ||
180 | #define EXYNOS5_GPIO_H1_NR (8) | ||
181 | #define EXYNOS5_GPIO_V0_NR (8) | ||
182 | #define EXYNOS5_GPIO_V1_NR (8) | ||
183 | #define EXYNOS5_GPIO_V2_NR (8) | ||
184 | #define EXYNOS5_GPIO_V3_NR (8) | ||
185 | #define EXYNOS5_GPIO_V4_NR (2) | ||
186 | #define EXYNOS5_GPIO_Z_NR (7) | ||
187 | |||
188 | /* EXYNOS5 GPIO bank numbers */ | ||
189 | |||
190 | enum exynos5_gpio_number { | ||
191 | EXYNOS5_GPIO_A0_START = 0, | ||
192 | EXYNOS5_GPIO_A1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_A0), | ||
193 | EXYNOS5_GPIO_A2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_A1), | ||
194 | EXYNOS5_GPIO_B0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_A2), | ||
195 | EXYNOS5_GPIO_B1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B0), | ||
196 | EXYNOS5_GPIO_B2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B1), | ||
197 | EXYNOS5_GPIO_B3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B2), | ||
198 | EXYNOS5_GPIO_C0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B3), | ||
199 | EXYNOS5_GPIO_C1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C0), | ||
200 | EXYNOS5_GPIO_C2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C1), | ||
201 | EXYNOS5_GPIO_C3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C2), | ||
202 | EXYNOS5_GPIO_D0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C3), | ||
203 | EXYNOS5_GPIO_D1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D0), | ||
204 | EXYNOS5_GPIO_Y0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D1), | ||
205 | EXYNOS5_GPIO_Y1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y0), | ||
206 | EXYNOS5_GPIO_Y2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y1), | ||
207 | EXYNOS5_GPIO_Y3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y2), | ||
208 | EXYNOS5_GPIO_Y4_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y3), | ||
209 | EXYNOS5_GPIO_Y5_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y4), | ||
210 | EXYNOS5_GPIO_Y6_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y5), | ||
211 | EXYNOS5_GPIO_X0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y6), | ||
212 | EXYNOS5_GPIO_X1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X0), | ||
213 | EXYNOS5_GPIO_X2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X1), | ||
214 | EXYNOS5_GPIO_X3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X2), | ||
215 | EXYNOS5_GPIO_E0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X3), | ||
216 | EXYNOS5_GPIO_E1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_E0), | ||
217 | EXYNOS5_GPIO_F0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_E1), | ||
218 | EXYNOS5_GPIO_F1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_F0), | ||
219 | EXYNOS5_GPIO_G0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_F1), | ||
220 | EXYNOS5_GPIO_G1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_G0), | ||
221 | EXYNOS5_GPIO_G2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_G1), | ||
222 | EXYNOS5_GPIO_H0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_G2), | ||
223 | EXYNOS5_GPIO_H1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_H0), | ||
224 | EXYNOS5_GPIO_V0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_H1), | ||
225 | EXYNOS5_GPIO_V1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V0), | ||
226 | EXYNOS5_GPIO_V2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V1), | ||
227 | EXYNOS5_GPIO_V3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V2), | ||
228 | EXYNOS5_GPIO_V4_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V3), | ||
229 | EXYNOS5_GPIO_Z_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V4), | ||
230 | }; | ||
231 | |||
232 | /* EXYNOS5 GPIO number definitions */ | ||
233 | |||
234 | #define EXYNOS5_GPA0(_nr) (EXYNOS5_GPIO_A0_START + (_nr)) | ||
235 | #define EXYNOS5_GPA1(_nr) (EXYNOS5_GPIO_A1_START + (_nr)) | ||
236 | #define EXYNOS5_GPA2(_nr) (EXYNOS5_GPIO_A2_START + (_nr)) | ||
237 | #define EXYNOS5_GPB0(_nr) (EXYNOS5_GPIO_B0_START + (_nr)) | ||
238 | #define EXYNOS5_GPB1(_nr) (EXYNOS5_GPIO_B1_START + (_nr)) | ||
239 | #define EXYNOS5_GPB2(_nr) (EXYNOS5_GPIO_B2_START + (_nr)) | ||
240 | #define EXYNOS5_GPB3(_nr) (EXYNOS5_GPIO_B3_START + (_nr)) | ||
241 | #define EXYNOS5_GPC0(_nr) (EXYNOS5_GPIO_C0_START + (_nr)) | ||
242 | #define EXYNOS5_GPC1(_nr) (EXYNOS5_GPIO_C1_START + (_nr)) | ||
243 | #define EXYNOS5_GPC2(_nr) (EXYNOS5_GPIO_C2_START + (_nr)) | ||
244 | #define EXYNOS5_GPC3(_nr) (EXYNOS5_GPIO_C3_START + (_nr)) | ||
245 | #define EXYNOS5_GPD0(_nr) (EXYNOS5_GPIO_D0_START + (_nr)) | ||
246 | #define EXYNOS5_GPD1(_nr) (EXYNOS5_GPIO_D1_START + (_nr)) | ||
247 | #define EXYNOS5_GPY0(_nr) (EXYNOS5_GPIO_Y0_START + (_nr)) | ||
248 | #define EXYNOS5_GPY1(_nr) (EXYNOS5_GPIO_Y1_START + (_nr)) | ||
249 | #define EXYNOS5_GPY2(_nr) (EXYNOS5_GPIO_Y2_START + (_nr)) | ||
250 | #define EXYNOS5_GPY3(_nr) (EXYNOS5_GPIO_Y3_START + (_nr)) | ||
251 | #define EXYNOS5_GPY4(_nr) (EXYNOS5_GPIO_Y4_START + (_nr)) | ||
252 | #define EXYNOS5_GPY5(_nr) (EXYNOS5_GPIO_Y5_START + (_nr)) | ||
253 | #define EXYNOS5_GPY6(_nr) (EXYNOS5_GPIO_Y6_START + (_nr)) | ||
254 | #define EXYNOS5_GPX0(_nr) (EXYNOS5_GPIO_X0_START + (_nr)) | ||
255 | #define EXYNOS5_GPX1(_nr) (EXYNOS5_GPIO_X1_START + (_nr)) | ||
256 | #define EXYNOS5_GPX2(_nr) (EXYNOS5_GPIO_X2_START + (_nr)) | ||
257 | #define EXYNOS5_GPX3(_nr) (EXYNOS5_GPIO_X3_START + (_nr)) | ||
258 | #define EXYNOS5_GPE0(_nr) (EXYNOS5_GPIO_E0_START + (_nr)) | ||
259 | #define EXYNOS5_GPE1(_nr) (EXYNOS5_GPIO_E1_START + (_nr)) | ||
260 | #define EXYNOS5_GPF0(_nr) (EXYNOS5_GPIO_F0_START + (_nr)) | ||
261 | #define EXYNOS5_GPF1(_nr) (EXYNOS5_GPIO_F1_START + (_nr)) | ||
262 | #define EXYNOS5_GPG0(_nr) (EXYNOS5_GPIO_G0_START + (_nr)) | ||
263 | #define EXYNOS5_GPG1(_nr) (EXYNOS5_GPIO_G1_START + (_nr)) | ||
264 | #define EXYNOS5_GPG2(_nr) (EXYNOS5_GPIO_G2_START + (_nr)) | ||
265 | #define EXYNOS5_GPH0(_nr) (EXYNOS5_GPIO_H0_START + (_nr)) | ||
266 | #define EXYNOS5_GPH1(_nr) (EXYNOS5_GPIO_H1_START + (_nr)) | ||
267 | #define EXYNOS5_GPV0(_nr) (EXYNOS5_GPIO_V0_START + (_nr)) | ||
268 | #define EXYNOS5_GPV1(_nr) (EXYNOS5_GPIO_V1_START + (_nr)) | ||
269 | #define EXYNOS5_GPV2(_nr) (EXYNOS5_GPIO_V2_START + (_nr)) | ||
270 | #define EXYNOS5_GPV3(_nr) (EXYNOS5_GPIO_V3_START + (_nr)) | ||
271 | #define EXYNOS5_GPV4(_nr) (EXYNOS5_GPIO_V4_START + (_nr)) | ||
272 | #define EXYNOS5_GPZ(_nr) (EXYNOS5_GPIO_Z_START + (_nr)) | ||
273 | |||
274 | /* the end of the EXYNOS5 specific gpios */ | ||
275 | |||
276 | #define EXYNOS5_GPIO_END (EXYNOS5_GPZ(EXYNOS5_GPIO_Z_NR) + 1) | ||
277 | |||
278 | /* actually, EXYNOS5_GPIO_END is bigger than EXYNOS4 */ | ||
279 | |||
280 | #define S3C_GPIO_END (EXYNOS5_GPIO_END) | ||
281 | |||
282 | /* define the number of gpios */ | ||
283 | |||
284 | #define ARCH_NR_GPIOS (CONFIG_SAMSUNG_GPIO_EXTRA + S3C_GPIO_END) | ||
148 | 285 | ||
149 | #endif /* __ASM_ARCH_GPIO_H */ | 286 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index 1d401c957835..9bee8535d9e0 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/include/mach/irqs.h | 1 | /* |
2 | * | 2 | * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. |
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | 3 | * http://www.samsung.com |
5 | * | 4 | * |
6 | * EXYNOS4 - IRQ definitions | 5 | * EXYNOS - IRQ definitions |
7 | * | 6 | * |
8 | * 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 |
9 | * 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 |
@@ -17,160 +16,450 @@ | |||
17 | 16 | ||
18 | /* PPI: Private Peripheral Interrupt */ | 17 | /* PPI: Private Peripheral Interrupt */ |
19 | 18 | ||
20 | #define IRQ_PPI(x) (x+16) | 19 | #define IRQ_PPI(x) (x + 16) |
21 | |||
22 | #define IRQ_MCT_LOCALTIMER IRQ_PPI(12) | ||
23 | 20 | ||
24 | /* SPI: Shared Peripheral Interrupt */ | 21 | /* SPI: Shared Peripheral Interrupt */ |
25 | 22 | ||
26 | #define IRQ_SPI(x) (x+32) | 23 | #define IRQ_SPI(x) (x + 32) |
27 | 24 | ||
28 | #define IRQ_EINT0 IRQ_SPI(16) | 25 | /* COMBINER */ |
29 | #define IRQ_EINT1 IRQ_SPI(17) | 26 | |
30 | #define IRQ_EINT2 IRQ_SPI(18) | 27 | #define MAX_IRQ_IN_COMBINER 8 |
31 | #define IRQ_EINT3 IRQ_SPI(19) | 28 | #define COMBINER_GROUP(x) ((x) * MAX_IRQ_IN_COMBINER + IRQ_SPI(128)) |
32 | #define IRQ_EINT4 IRQ_SPI(20) | 29 | #define COMBINER_IRQ(x, y) (COMBINER_GROUP(x) + y) |
33 | #define IRQ_EINT5 IRQ_SPI(21) | 30 | |
34 | #define IRQ_EINT6 IRQ_SPI(22) | 31 | /* For EXYNOS4 and EXYNOS5 */ |
35 | #define IRQ_EINT7 IRQ_SPI(23) | 32 | |
36 | #define IRQ_EINT8 IRQ_SPI(24) | 33 | #define EXYNOS_IRQ_MCT_LOCALTIMER IRQ_PPI(12) |
37 | #define IRQ_EINT9 IRQ_SPI(25) | 34 | |
38 | #define IRQ_EINT10 IRQ_SPI(26) | 35 | #define EXYNOS_IRQ_EINT16_31 IRQ_SPI(32) |
39 | #define IRQ_EINT11 IRQ_SPI(27) | 36 | |
40 | #define IRQ_EINT12 IRQ_SPI(28) | 37 | /* For EXYNOS4 SoCs */ |
41 | #define IRQ_EINT13 IRQ_SPI(29) | 38 | |
42 | #define IRQ_EINT14 IRQ_SPI(30) | 39 | #define EXYNOS4_IRQ_EINT0 IRQ_SPI(16) |
43 | #define IRQ_EINT15 IRQ_SPI(31) | 40 | #define EXYNOS4_IRQ_EINT1 IRQ_SPI(17) |
44 | #define IRQ_EINT16_31 IRQ_SPI(32) | 41 | #define EXYNOS4_IRQ_EINT2 IRQ_SPI(18) |
45 | 42 | #define EXYNOS4_IRQ_EINT3 IRQ_SPI(19) | |
46 | #define IRQ_MDMA0 IRQ_SPI(33) | 43 | #define EXYNOS4_IRQ_EINT4 IRQ_SPI(20) |
47 | #define IRQ_MDMA1 IRQ_SPI(34) | 44 | #define EXYNOS4_IRQ_EINT5 IRQ_SPI(21) |
48 | #define IRQ_PDMA0 IRQ_SPI(35) | 45 | #define EXYNOS4_IRQ_EINT6 IRQ_SPI(22) |
49 | #define IRQ_PDMA1 IRQ_SPI(36) | 46 | #define EXYNOS4_IRQ_EINT7 IRQ_SPI(23) |
50 | #define IRQ_TIMER0_VIC IRQ_SPI(37) | 47 | #define EXYNOS4_IRQ_EINT8 IRQ_SPI(24) |
51 | #define IRQ_TIMER1_VIC IRQ_SPI(38) | 48 | #define EXYNOS4_IRQ_EINT9 IRQ_SPI(25) |
52 | #define IRQ_TIMER2_VIC IRQ_SPI(39) | 49 | #define EXYNOS4_IRQ_EINT10 IRQ_SPI(26) |
53 | #define IRQ_TIMER3_VIC IRQ_SPI(40) | 50 | #define EXYNOS4_IRQ_EINT11 IRQ_SPI(27) |
54 | #define IRQ_TIMER4_VIC IRQ_SPI(41) | 51 | #define EXYNOS4_IRQ_EINT12 IRQ_SPI(28) |
55 | #define IRQ_MCT_L0 IRQ_SPI(42) | 52 | #define EXYNOS4_IRQ_EINT13 IRQ_SPI(29) |
56 | #define IRQ_WDT IRQ_SPI(43) | 53 | #define EXYNOS4_IRQ_EINT14 IRQ_SPI(30) |
57 | #define IRQ_RTC_ALARM IRQ_SPI(44) | 54 | #define EXYNOS4_IRQ_EINT15 IRQ_SPI(31) |
58 | #define IRQ_RTC_TIC IRQ_SPI(45) | 55 | |
59 | #define IRQ_GPIO_XB IRQ_SPI(46) | 56 | #define EXYNOS4_IRQ_MDMA0 IRQ_SPI(33) |
60 | #define IRQ_GPIO_XA IRQ_SPI(47) | 57 | #define EXYNOS4_IRQ_MDMA1 IRQ_SPI(34) |
61 | #define IRQ_MCT_L1 IRQ_SPI(48) | 58 | #define EXYNOS4_IRQ_PDMA0 IRQ_SPI(35) |
62 | 59 | #define EXYNOS4_IRQ_PDMA1 IRQ_SPI(36) | |
63 | #define IRQ_UART0 IRQ_SPI(52) | 60 | #define EXYNOS4_IRQ_TIMER0_VIC IRQ_SPI(37) |
64 | #define IRQ_UART1 IRQ_SPI(53) | 61 | #define EXYNOS4_IRQ_TIMER1_VIC IRQ_SPI(38) |
65 | #define IRQ_UART2 IRQ_SPI(54) | 62 | #define EXYNOS4_IRQ_TIMER2_VIC IRQ_SPI(39) |
66 | #define IRQ_UART3 IRQ_SPI(55) | 63 | #define EXYNOS4_IRQ_TIMER3_VIC IRQ_SPI(40) |
67 | #define IRQ_UART4 IRQ_SPI(56) | 64 | #define EXYNOS4_IRQ_TIMER4_VIC IRQ_SPI(41) |
68 | #define IRQ_MCT_G0 IRQ_SPI(57) | 65 | #define EXYNOS4_IRQ_MCT_L0 IRQ_SPI(42) |
69 | #define IRQ_IIC IRQ_SPI(58) | 66 | #define EXYNOS4_IRQ_WDT IRQ_SPI(43) |
70 | #define IRQ_IIC1 IRQ_SPI(59) | 67 | #define EXYNOS4_IRQ_RTC_ALARM IRQ_SPI(44) |
71 | #define IRQ_IIC2 IRQ_SPI(60) | 68 | #define EXYNOS4_IRQ_RTC_TIC IRQ_SPI(45) |
72 | #define IRQ_IIC3 IRQ_SPI(61) | 69 | #define EXYNOS4_IRQ_GPIO_XB IRQ_SPI(46) |
73 | #define IRQ_IIC4 IRQ_SPI(62) | 70 | #define EXYNOS4_IRQ_GPIO_XA IRQ_SPI(47) |
74 | #define IRQ_IIC5 IRQ_SPI(63) | 71 | #define EXYNOS4_IRQ_MCT_L1 IRQ_SPI(48) |
75 | #define IRQ_IIC6 IRQ_SPI(64) | 72 | |
76 | #define IRQ_IIC7 IRQ_SPI(65) | 73 | #define EXYNOS4_IRQ_UART0 IRQ_SPI(52) |
77 | #define IRQ_SPI0 IRQ_SPI(66) | 74 | #define EXYNOS4_IRQ_UART1 IRQ_SPI(53) |
78 | #define IRQ_SPI1 IRQ_SPI(67) | 75 | #define EXYNOS4_IRQ_UART2 IRQ_SPI(54) |
79 | #define IRQ_SPI2 IRQ_SPI(68) | 76 | #define EXYNOS4_IRQ_UART3 IRQ_SPI(55) |
80 | 77 | #define EXYNOS4_IRQ_UART4 IRQ_SPI(56) | |
81 | #define IRQ_USB_HOST IRQ_SPI(70) | 78 | #define EXYNOS4_IRQ_MCT_G0 IRQ_SPI(57) |
82 | #define IRQ_USB_HSOTG IRQ_SPI(71) | 79 | #define EXYNOS4_IRQ_IIC IRQ_SPI(58) |
83 | #define IRQ_MODEM_IF IRQ_SPI(72) | 80 | #define EXYNOS4_IRQ_IIC1 IRQ_SPI(59) |
84 | #define IRQ_HSMMC0 IRQ_SPI(73) | 81 | #define EXYNOS4_IRQ_IIC2 IRQ_SPI(60) |
85 | #define IRQ_HSMMC1 IRQ_SPI(74) | 82 | #define EXYNOS4_IRQ_IIC3 IRQ_SPI(61) |
86 | #define IRQ_HSMMC2 IRQ_SPI(75) | 83 | #define EXYNOS4_IRQ_IIC4 IRQ_SPI(62) |
87 | #define IRQ_HSMMC3 IRQ_SPI(76) | 84 | #define EXYNOS4_IRQ_IIC5 IRQ_SPI(63) |
88 | #define IRQ_DWMCI IRQ_SPI(77) | 85 | #define EXYNOS4_IRQ_IIC6 IRQ_SPI(64) |
89 | 86 | #define EXYNOS4_IRQ_IIC7 IRQ_SPI(65) | |
90 | #define IRQ_MIPI_CSIS0 IRQ_SPI(78) | 87 | #define EXYNOS4_IRQ_SPI0 IRQ_SPI(66) |
91 | #define IRQ_MIPI_CSIS1 IRQ_SPI(80) | 88 | #define EXYNOS4_IRQ_SPI1 IRQ_SPI(67) |
92 | 89 | #define EXYNOS4_IRQ_SPI2 IRQ_SPI(68) | |
93 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) | 90 | |
94 | #define IRQ_ROTATOR IRQ_SPI(83) | 91 | #define EXYNOS4_IRQ_USB_HOST IRQ_SPI(70) |
95 | #define IRQ_FIMC0 IRQ_SPI(84) | 92 | #define EXYNOS4_IRQ_USB_HSOTG IRQ_SPI(71) |
96 | #define IRQ_FIMC1 IRQ_SPI(85) | 93 | #define EXYNOS4_IRQ_MODEM_IF IRQ_SPI(72) |
97 | #define IRQ_FIMC2 IRQ_SPI(86) | 94 | #define EXYNOS4_IRQ_HSMMC0 IRQ_SPI(73) |
98 | #define IRQ_FIMC3 IRQ_SPI(87) | 95 | #define EXYNOS4_IRQ_HSMMC1 IRQ_SPI(74) |
99 | #define IRQ_JPEG IRQ_SPI(88) | 96 | #define EXYNOS4_IRQ_HSMMC2 IRQ_SPI(75) |
100 | #define IRQ_2D IRQ_SPI(89) | 97 | #define EXYNOS4_IRQ_HSMMC3 IRQ_SPI(76) |
101 | #define IRQ_PCIE IRQ_SPI(90) | 98 | #define EXYNOS4_IRQ_DWMCI IRQ_SPI(77) |
102 | 99 | ||
103 | #define IRQ_MIXER IRQ_SPI(91) | 100 | #define EXYNOS4_IRQ_MIPI_CSIS0 IRQ_SPI(78) |
104 | #define IRQ_HDMI IRQ_SPI(92) | 101 | #define EXYNOS4_IRQ_MIPI_CSIS1 IRQ_SPI(80) |
105 | #define IRQ_IIC_HDMIPHY IRQ_SPI(93) | 102 | |
106 | #define IRQ_MFC IRQ_SPI(94) | 103 | #define EXYNOS4_IRQ_ONENAND_AUDI IRQ_SPI(82) |
107 | #define IRQ_SDO IRQ_SPI(95) | 104 | #define EXYNOS4_IRQ_ROTATOR IRQ_SPI(83) |
108 | 105 | #define EXYNOS4_IRQ_FIMC0 IRQ_SPI(84) | |
109 | #define IRQ_AUDIO_SS IRQ_SPI(96) | 106 | #define EXYNOS4_IRQ_FIMC1 IRQ_SPI(85) |
110 | #define IRQ_I2S0 IRQ_SPI(97) | 107 | #define EXYNOS4_IRQ_FIMC2 IRQ_SPI(86) |
111 | #define IRQ_I2S1 IRQ_SPI(98) | 108 | #define EXYNOS4_IRQ_FIMC3 IRQ_SPI(87) |
112 | #define IRQ_I2S2 IRQ_SPI(99) | 109 | #define EXYNOS4_IRQ_JPEG IRQ_SPI(88) |
113 | #define IRQ_AC97 IRQ_SPI(100) | 110 | #define EXYNOS4_IRQ_2D IRQ_SPI(89) |
114 | 111 | #define EXYNOS4_IRQ_PCIE IRQ_SPI(90) | |
115 | #define IRQ_SPDIF IRQ_SPI(104) | 112 | |
116 | #define IRQ_ADC0 IRQ_SPI(105) | 113 | #define EXYNOS4_IRQ_MIXER IRQ_SPI(91) |
117 | #define IRQ_PEN0 IRQ_SPI(106) | 114 | #define EXYNOS4_IRQ_HDMI IRQ_SPI(92) |
118 | #define IRQ_ADC1 IRQ_SPI(107) | 115 | #define EXYNOS4_IRQ_IIC_HDMIPHY IRQ_SPI(93) |
119 | #define IRQ_PEN1 IRQ_SPI(108) | 116 | #define EXYNOS4_IRQ_MFC IRQ_SPI(94) |
120 | #define IRQ_KEYPAD IRQ_SPI(109) | 117 | #define EXYNOS4_IRQ_SDO IRQ_SPI(95) |
121 | #define IRQ_PMU IRQ_SPI(110) | 118 | |
122 | #define IRQ_GPS IRQ_SPI(111) | 119 | #define EXYNOS4_IRQ_AUDIO_SS IRQ_SPI(96) |
123 | #define IRQ_INTFEEDCTRL_SSS IRQ_SPI(112) | 120 | #define EXYNOS4_IRQ_I2S0 IRQ_SPI(97) |
124 | #define IRQ_SLIMBUS IRQ_SPI(113) | 121 | #define EXYNOS4_IRQ_I2S1 IRQ_SPI(98) |
125 | 122 | #define EXYNOS4_IRQ_I2S2 IRQ_SPI(99) | |
126 | #define IRQ_TSI IRQ_SPI(115) | 123 | #define EXYNOS4_IRQ_AC97 IRQ_SPI(100) |
127 | #define IRQ_SATA IRQ_SPI(116) | 124 | |
128 | 125 | #define EXYNOS4_IRQ_SPDIF IRQ_SPI(104) | |
129 | #define MAX_IRQ_IN_COMBINER 8 | 126 | #define EXYNOS4_IRQ_ADC0 IRQ_SPI(105) |
130 | #define COMBINER_GROUP(x) ((x) * MAX_IRQ_IN_COMBINER + IRQ_SPI(128)) | 127 | #define EXYNOS4_IRQ_PEN0 IRQ_SPI(106) |
131 | #define COMBINER_IRQ(x, y) (COMBINER_GROUP(x) + y) | 128 | #define EXYNOS4_IRQ_ADC1 IRQ_SPI(107) |
132 | 129 | #define EXYNOS4_IRQ_PEN1 IRQ_SPI(108) | |
133 | #define IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(4, 0) | 130 | #define EXYNOS4_IRQ_KEYPAD IRQ_SPI(109) |
134 | #define IRQ_SYSMMU_SSS_0 COMBINER_IRQ(4, 1) | 131 | #define EXYNOS4_IRQ_PMU IRQ_SPI(110) |
135 | #define IRQ_SYSMMU_FIMC0_0 COMBINER_IRQ(4, 2) | 132 | #define EXYNOS4_IRQ_GPS IRQ_SPI(111) |
136 | #define IRQ_SYSMMU_FIMC1_0 COMBINER_IRQ(4, 3) | 133 | #define EXYNOS4_IRQ_INTFEEDCTRL_SSS IRQ_SPI(112) |
137 | #define IRQ_SYSMMU_FIMC2_0 COMBINER_IRQ(4, 4) | 134 | #define EXYNOS4_IRQ_SLIMBUS IRQ_SPI(113) |
138 | #define IRQ_SYSMMU_FIMC3_0 COMBINER_IRQ(4, 5) | 135 | |
139 | #define IRQ_SYSMMU_JPEG_0 COMBINER_IRQ(4, 6) | 136 | #define EXYNOS4_IRQ_TSI IRQ_SPI(115) |
140 | #define IRQ_SYSMMU_2D_0 COMBINER_IRQ(4, 7) | 137 | #define EXYNOS4_IRQ_SATA IRQ_SPI(116) |
141 | 138 | ||
142 | #define IRQ_SYSMMU_ROTATOR_0 COMBINER_IRQ(5, 0) | 139 | #define EXYNOS4_IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(4, 0) |
143 | #define IRQ_SYSMMU_MDMA1_0 COMBINER_IRQ(5, 1) | 140 | #define EXYNOS4_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(4, 1) |
144 | #define IRQ_SYSMMU_LCD0_M0_0 COMBINER_IRQ(5, 2) | 141 | #define EXYNOS4_IRQ_SYSMMU_FIMC0_0 COMBINER_IRQ(4, 2) |
145 | #define IRQ_SYSMMU_LCD1_M1_0 COMBINER_IRQ(5, 3) | 142 | #define EXYNOS4_IRQ_SYSMMU_FIMC1_0 COMBINER_IRQ(4, 3) |
146 | #define IRQ_SYSMMU_TV_M0_0 COMBINER_IRQ(5, 4) | 143 | #define EXYNOS4_IRQ_SYSMMU_FIMC2_0 COMBINER_IRQ(4, 4) |
147 | #define IRQ_SYSMMU_MFC_M0_0 COMBINER_IRQ(5, 5) | 144 | #define EXYNOS4_IRQ_SYSMMU_FIMC3_0 COMBINER_IRQ(4, 5) |
148 | #define IRQ_SYSMMU_MFC_M1_0 COMBINER_IRQ(5, 6) | 145 | #define EXYNOS4_IRQ_SYSMMU_JPEG_0 COMBINER_IRQ(4, 6) |
149 | #define IRQ_SYSMMU_PCIE_0 COMBINER_IRQ(5, 7) | 146 | #define EXYNOS4_IRQ_SYSMMU_2D_0 COMBINER_IRQ(4, 7) |
150 | 147 | ||
151 | #define IRQ_FIMD0_FIFO COMBINER_IRQ(11, 0) | 148 | #define EXYNOS4_IRQ_SYSMMU_ROTATOR_0 COMBINER_IRQ(5, 0) |
152 | #define IRQ_FIMD0_VSYNC COMBINER_IRQ(11, 1) | 149 | #define EXYNOS4_IRQ_SYSMMU_MDMA1_0 COMBINER_IRQ(5, 1) |
153 | #define IRQ_FIMD0_SYSTEM COMBINER_IRQ(11, 2) | 150 | #define EXYNOS4_IRQ_SYSMMU_LCD0_M0_0 COMBINER_IRQ(5, 2) |
154 | 151 | #define EXYNOS4_IRQ_SYSMMU_LCD1_M1_0 COMBINER_IRQ(5, 3) | |
155 | #define MAX_COMBINER_NR 16 | 152 | #define EXYNOS4_IRQ_SYSMMU_TV_M0_0 COMBINER_IRQ(5, 4) |
156 | 153 | #define EXYNOS4_IRQ_SYSMMU_MFC_M0_0 COMBINER_IRQ(5, 5) | |
157 | #define IRQ_ADC IRQ_ADC0 | 154 | #define EXYNOS4_IRQ_SYSMMU_MFC_M1_0 COMBINER_IRQ(5, 6) |
158 | #define IRQ_TC IRQ_PEN0 | 155 | #define EXYNOS4_IRQ_SYSMMU_PCIE_0 COMBINER_IRQ(5, 7) |
159 | 156 | ||
160 | #define S5P_IRQ_EINT_BASE COMBINER_IRQ(MAX_COMBINER_NR, 0) | 157 | #define EXYNOS4_IRQ_FIMD0_FIFO COMBINER_IRQ(11, 0) |
161 | 158 | #define EXYNOS4_IRQ_FIMD0_VSYNC COMBINER_IRQ(11, 1) | |
162 | #define S5P_EINT_BASE1 (S5P_IRQ_EINT_BASE + 0) | 159 | #define EXYNOS4_IRQ_FIMD0_SYSTEM COMBINER_IRQ(11, 2) |
163 | #define S5P_EINT_BASE2 (S5P_IRQ_EINT_BASE + 16) | 160 | |
164 | 161 | #define EXYNOS4_MAX_COMBINER_NR 16 | |
165 | /* optional GPIO interrupts */ | 162 | |
166 | #define S5P_GPIOINT_BASE (S5P_IRQ_EINT_BASE + 32) | 163 | #define EXYNOS4_IRQ_GPIO1_NR_GROUPS 16 |
167 | #define IRQ_GPIO1_NR_GROUPS 16 | 164 | #define EXYNOS4_IRQ_GPIO2_NR_GROUPS 9 |
168 | #define IRQ_GPIO2_NR_GROUPS 9 | 165 | |
169 | #define IRQ_GPIO_END (S5P_GPIOINT_BASE + S5P_GPIOINT_COUNT) | 166 | /* |
170 | 167 | * For Compatibility: | |
171 | #define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) | 168 | * the default is for EXYNOS4, and |
169 | * for exynos5, should be re-mapped at function | ||
170 | */ | ||
171 | |||
172 | #define IRQ_TIMER0_VIC EXYNOS4_IRQ_TIMER0_VIC | ||
173 | #define IRQ_TIMER1_VIC EXYNOS4_IRQ_TIMER1_VIC | ||
174 | #define IRQ_TIMER2_VIC EXYNOS4_IRQ_TIMER2_VIC | ||
175 | #define IRQ_TIMER3_VIC EXYNOS4_IRQ_TIMER3_VIC | ||
176 | #define IRQ_TIMER4_VIC EXYNOS4_IRQ_TIMER4_VIC | ||
177 | |||
178 | #define IRQ_WDT EXYNOS4_IRQ_WDT | ||
179 | #define IRQ_RTC_ALARM EXYNOS4_IRQ_RTC_ALARM | ||
180 | #define IRQ_RTC_TIC EXYNOS4_IRQ_RTC_TIC | ||
181 | #define IRQ_GPIO_XB EXYNOS4_IRQ_GPIO_XB | ||
182 | #define IRQ_GPIO_XA EXYNOS4_IRQ_GPIO_XA | ||
183 | |||
184 | #define IRQ_IIC EXYNOS4_IRQ_IIC | ||
185 | #define IRQ_IIC1 EXYNOS4_IRQ_IIC1 | ||
186 | #define IRQ_IIC3 EXYNOS4_IRQ_IIC3 | ||
187 | #define IRQ_IIC5 EXYNOS4_IRQ_IIC5 | ||
188 | #define IRQ_IIC6 EXYNOS4_IRQ_IIC6 | ||
189 | #define IRQ_IIC7 EXYNOS4_IRQ_IIC7 | ||
190 | |||
191 | #define IRQ_USB_HOST EXYNOS4_IRQ_USB_HOST | ||
192 | |||
193 | #define IRQ_HSMMC0 EXYNOS4_IRQ_HSMMC0 | ||
194 | #define IRQ_HSMMC1 EXYNOS4_IRQ_HSMMC1 | ||
195 | #define IRQ_HSMMC2 EXYNOS4_IRQ_HSMMC2 | ||
196 | #define IRQ_HSMMC3 EXYNOS4_IRQ_HSMMC3 | ||
197 | |||
198 | #define IRQ_MIPI_CSIS0 EXYNOS4_IRQ_MIPI_CSIS0 | ||
199 | |||
200 | #define IRQ_ONENAND_AUDI EXYNOS4_IRQ_ONENAND_AUDI | ||
201 | |||
202 | #define IRQ_FIMC0 EXYNOS4_IRQ_FIMC0 | ||
203 | #define IRQ_FIMC1 EXYNOS4_IRQ_FIMC1 | ||
204 | #define IRQ_FIMC2 EXYNOS4_IRQ_FIMC2 | ||
205 | #define IRQ_FIMC3 EXYNOS4_IRQ_FIMC3 | ||
206 | #define IRQ_JPEG EXYNOS4_IRQ_JPEG | ||
207 | #define IRQ_2D EXYNOS4_IRQ_2D | ||
208 | |||
209 | #define IRQ_MIXER EXYNOS4_IRQ_MIXER | ||
210 | #define IRQ_HDMI EXYNOS4_IRQ_HDMI | ||
211 | #define IRQ_IIC_HDMIPHY EXYNOS4_IRQ_IIC_HDMIPHY | ||
212 | #define IRQ_MFC EXYNOS4_IRQ_MFC | ||
213 | #define IRQ_SDO EXYNOS4_IRQ_SDO | ||
214 | |||
215 | #define IRQ_ADC EXYNOS4_IRQ_ADC0 | ||
216 | #define IRQ_TC EXYNOS4_IRQ_PEN0 | ||
217 | |||
218 | #define IRQ_KEYPAD EXYNOS4_IRQ_KEYPAD | ||
219 | #define IRQ_PMU EXYNOS4_IRQ_PMU | ||
220 | |||
221 | #define IRQ_SYSMMU_MDMA0_0 EXYNOS4_IRQ_SYSMMU_MDMA0_0 | ||
222 | #define IRQ_SYSMMU_SSS_0 EXYNOS4_IRQ_SYSMMU_SSS_0 | ||
223 | #define IRQ_SYSMMU_FIMC0_0 EXYNOS4_IRQ_SYSMMU_FIMC0_0 | ||
224 | #define IRQ_SYSMMU_FIMC1_0 EXYNOS4_IRQ_SYSMMU_FIMC1_0 | ||
225 | #define IRQ_SYSMMU_FIMC2_0 EXYNOS4_IRQ_SYSMMU_FIMC2_0 | ||
226 | #define IRQ_SYSMMU_FIMC3_0 EXYNOS4_IRQ_SYSMMU_FIMC3_0 | ||
227 | #define IRQ_SYSMMU_JPEG_0 EXYNOS4_IRQ_SYSMMU_JPEG_0 | ||
228 | #define IRQ_SYSMMU_2D_0 EXYNOS4_IRQ_SYSMMU_2D_0 | ||
229 | |||
230 | #define IRQ_SYSMMU_ROTATOR_0 EXYNOS4_IRQ_SYSMMU_ROTATOR_0 | ||
231 | #define IRQ_SYSMMU_MDMA1_0 EXYNOS4_IRQ_SYSMMU_MDMA1_0 | ||
232 | #define IRQ_SYSMMU_LCD0_M0_0 EXYNOS4_IRQ_SYSMMU_LCD0_M0_0 | ||
233 | #define IRQ_SYSMMU_LCD1_M1_0 EXYNOS4_IRQ_SYSMMU_LCD1_M1_0 | ||
234 | #define IRQ_SYSMMU_TV_M0_0 EXYNOS4_IRQ_SYSMMU_TV_M0_0 | ||
235 | #define IRQ_SYSMMU_MFC_M0_0 EXYNOS4_IRQ_SYSMMU_MFC_M0_0 | ||
236 | #define IRQ_SYSMMU_MFC_M1_0 EXYNOS4_IRQ_SYSMMU_MFC_M1_0 | ||
237 | #define IRQ_SYSMMU_PCIE_0 EXYNOS4_IRQ_SYSMMU_PCIE_0 | ||
238 | |||
239 | #define IRQ_FIMD0_FIFO EXYNOS4_IRQ_FIMD0_FIFO | ||
240 | #define IRQ_FIMD0_VSYNC EXYNOS4_IRQ_FIMD0_VSYNC | ||
241 | #define IRQ_FIMD0_SYSTEM EXYNOS4_IRQ_FIMD0_SYSTEM | ||
242 | |||
243 | #define IRQ_GPIO1_NR_GROUPS EXYNOS4_IRQ_GPIO1_NR_GROUPS | ||
244 | #define IRQ_GPIO2_NR_GROUPS EXYNOS4_IRQ_GPIO2_NR_GROUPS | ||
245 | |||
246 | /* For EXYNOS5 SoCs */ | ||
247 | |||
248 | #define EXYNOS5_IRQ_MDMA0 IRQ_SPI(33) | ||
249 | #define EXYNOS5_IRQ_PDMA0 IRQ_SPI(34) | ||
250 | #define EXYNOS5_IRQ_PDMA1 IRQ_SPI(35) | ||
251 | #define EXYNOS5_IRQ_TIMER0_VIC IRQ_SPI(36) | ||
252 | #define EXYNOS5_IRQ_TIMER1_VIC IRQ_SPI(37) | ||
253 | #define EXYNOS5_IRQ_TIMER2_VIC IRQ_SPI(38) | ||
254 | #define EXYNOS5_IRQ_TIMER3_VIC IRQ_SPI(39) | ||
255 | #define EXYNOS5_IRQ_TIMER4_VIC IRQ_SPI(40) | ||
256 | #define EXYNOS5_IRQ_RTIC IRQ_SPI(41) | ||
257 | #define EXYNOS5_IRQ_WDT IRQ_SPI(42) | ||
258 | #define EXYNOS5_IRQ_RTC_ALARM IRQ_SPI(43) | ||
259 | #define EXYNOS5_IRQ_RTC_TIC IRQ_SPI(44) | ||
260 | #define EXYNOS5_IRQ_GPIO_XB IRQ_SPI(45) | ||
261 | #define EXYNOS5_IRQ_GPIO_XA IRQ_SPI(46) | ||
262 | #define EXYNOS5_IRQ_GPIO IRQ_SPI(47) | ||
263 | #define EXYNOS5_IRQ_IEM_IEC IRQ_SPI(48) | ||
264 | #define EXYNOS5_IRQ_IEM_APC IRQ_SPI(49) | ||
265 | #define EXYNOS5_IRQ_GPIO_C2C IRQ_SPI(50) | ||
266 | #define EXYNOS5_IRQ_UART0 IRQ_SPI(51) | ||
267 | #define EXYNOS5_IRQ_UART1 IRQ_SPI(52) | ||
268 | #define EXYNOS5_IRQ_UART2 IRQ_SPI(53) | ||
269 | #define EXYNOS5_IRQ_UART3 IRQ_SPI(54) | ||
270 | #define EXYNOS5_IRQ_UART4 IRQ_SPI(55) | ||
271 | #define EXYNOS5_IRQ_IIC IRQ_SPI(56) | ||
272 | #define EXYNOS5_IRQ_IIC1 IRQ_SPI(57) | ||
273 | #define EXYNOS5_IRQ_IIC2 IRQ_SPI(58) | ||
274 | #define EXYNOS5_IRQ_IIC3 IRQ_SPI(59) | ||
275 | #define EXYNOS5_IRQ_IIC4 IRQ_SPI(60) | ||
276 | #define EXYNOS5_IRQ_IIC5 IRQ_SPI(61) | ||
277 | #define EXYNOS5_IRQ_IIC6 IRQ_SPI(62) | ||
278 | #define EXYNOS5_IRQ_IIC7 IRQ_SPI(63) | ||
279 | #define EXYNOS5_IRQ_IIC_HDMIPHY IRQ_SPI(64) | ||
280 | #define EXYNOS5_IRQ_TMU IRQ_SPI(65) | ||
281 | #define EXYNOS5_IRQ_FIQ_0 IRQ_SPI(66) | ||
282 | #define EXYNOS5_IRQ_FIQ_1 IRQ_SPI(67) | ||
283 | #define EXYNOS5_IRQ_SPI0 IRQ_SPI(68) | ||
284 | #define EXYNOS5_IRQ_SPI1 IRQ_SPI(69) | ||
285 | #define EXYNOS5_IRQ_SPI2 IRQ_SPI(70) | ||
286 | #define EXYNOS5_IRQ_USB_HOST IRQ_SPI(71) | ||
287 | #define EXYNOS5_IRQ_USB3_DRD IRQ_SPI(72) | ||
288 | #define EXYNOS5_IRQ_MIPI_HSI IRQ_SPI(73) | ||
289 | #define EXYNOS5_IRQ_USB_HSOTG IRQ_SPI(74) | ||
290 | #define EXYNOS5_IRQ_HSMMC0 IRQ_SPI(75) | ||
291 | #define EXYNOS5_IRQ_HSMMC1 IRQ_SPI(76) | ||
292 | #define EXYNOS5_IRQ_HSMMC2 IRQ_SPI(77) | ||
293 | #define EXYNOS5_IRQ_HSMMC3 IRQ_SPI(78) | ||
294 | #define EXYNOS5_IRQ_MIPICSI0 IRQ_SPI(79) | ||
295 | #define EXYNOS5_IRQ_MIPICSI1 IRQ_SPI(80) | ||
296 | #define EXYNOS5_IRQ_EFNFCON_DMA_ABORT IRQ_SPI(81) | ||
297 | #define EXYNOS5_IRQ_MIPIDSI0 IRQ_SPI(82) | ||
298 | #define EXYNOS5_IRQ_ROTATOR IRQ_SPI(84) | ||
299 | #define EXYNOS5_IRQ_GSC0 IRQ_SPI(85) | ||
300 | #define EXYNOS5_IRQ_GSC1 IRQ_SPI(86) | ||
301 | #define EXYNOS5_IRQ_GSC2 IRQ_SPI(87) | ||
302 | #define EXYNOS5_IRQ_GSC3 IRQ_SPI(88) | ||
303 | #define EXYNOS5_IRQ_JPEG IRQ_SPI(89) | ||
304 | #define EXYNOS5_IRQ_EFNFCON_DMA IRQ_SPI(90) | ||
305 | #define EXYNOS5_IRQ_2D IRQ_SPI(91) | ||
306 | #define EXYNOS5_IRQ_SFMC0 IRQ_SPI(92) | ||
307 | #define EXYNOS5_IRQ_SFMC1 IRQ_SPI(93) | ||
308 | #define EXYNOS5_IRQ_MIXER IRQ_SPI(94) | ||
309 | #define EXYNOS5_IRQ_HDMI IRQ_SPI(95) | ||
310 | #define EXYNOS5_IRQ_MFC IRQ_SPI(96) | ||
311 | #define EXYNOS5_IRQ_AUDIO_SS IRQ_SPI(97) | ||
312 | #define EXYNOS5_IRQ_I2S0 IRQ_SPI(98) | ||
313 | #define EXYNOS5_IRQ_I2S1 IRQ_SPI(99) | ||
314 | #define EXYNOS5_IRQ_I2S2 IRQ_SPI(100) | ||
315 | #define EXYNOS5_IRQ_AC97 IRQ_SPI(101) | ||
316 | #define EXYNOS5_IRQ_PCM0 IRQ_SPI(102) | ||
317 | #define EXYNOS5_IRQ_PCM1 IRQ_SPI(103) | ||
318 | #define EXYNOS5_IRQ_PCM2 IRQ_SPI(104) | ||
319 | #define EXYNOS5_IRQ_SPDIF IRQ_SPI(105) | ||
320 | #define EXYNOS5_IRQ_ADC0 IRQ_SPI(106) | ||
321 | |||
322 | #define EXYNOS5_IRQ_SATA_PHY IRQ_SPI(108) | ||
323 | #define EXYNOS5_IRQ_SATA_PMEMREQ IRQ_SPI(109) | ||
324 | #define EXYNOS5_IRQ_CAM_C IRQ_SPI(110) | ||
325 | #define EXYNOS5_IRQ_EAGLE_PMU IRQ_SPI(111) | ||
326 | #define EXYNOS5_IRQ_INTFEEDCTRL_SSS IRQ_SPI(112) | ||
327 | #define EXYNOS5_IRQ_DP1_INTP1 IRQ_SPI(113) | ||
328 | #define EXYNOS5_IRQ_CEC IRQ_SPI(114) | ||
329 | #define EXYNOS5_IRQ_SATA IRQ_SPI(115) | ||
330 | #define EXYNOS5_IRQ_NFCON IRQ_SPI(116) | ||
331 | |||
332 | #define EXYNOS5_IRQ_MMC44 IRQ_SPI(123) | ||
333 | #define EXYNOS5_IRQ_MDMA1 IRQ_SPI(124) | ||
334 | #define EXYNOS5_IRQ_FIMC_LITE0 IRQ_SPI(125) | ||
335 | #define EXYNOS5_IRQ_FIMC_LITE1 IRQ_SPI(126) | ||
336 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) | ||
337 | |||
338 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) | ||
339 | #define EXYNOS5_IRQ_PMU_CPU1 COMBINER_IRQ(1, 6) | ||
340 | |||
341 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) | ||
342 | #define EXYNOS5_IRQ_SYSMMU_GSC0_1 COMBINER_IRQ(2, 1) | ||
343 | #define EXYNOS5_IRQ_SYSMMU_GSC1_0 COMBINER_IRQ(2, 2) | ||
344 | #define EXYNOS5_IRQ_SYSMMU_GSC1_1 COMBINER_IRQ(2, 3) | ||
345 | #define EXYNOS5_IRQ_SYSMMU_GSC2_0 COMBINER_IRQ(2, 4) | ||
346 | #define EXYNOS5_IRQ_SYSMMU_GSC2_1 COMBINER_IRQ(2, 5) | ||
347 | #define EXYNOS5_IRQ_SYSMMU_GSC3_0 COMBINER_IRQ(2, 6) | ||
348 | #define EXYNOS5_IRQ_SYSMMU_GSC3_1 COMBINER_IRQ(2, 7) | ||
349 | |||
350 | #define EXYNOS5_IRQ_SYSMMU_FIMD1_0 COMBINER_IRQ(3, 2) | ||
351 | #define EXYNOS5_IRQ_SYSMMU_FIMD1_1 COMBINER_IRQ(3, 3) | ||
352 | #define EXYNOS5_IRQ_SYSMMU_LITE0_0 COMBINER_IRQ(3, 4) | ||
353 | #define EXYNOS5_IRQ_SYSMMU_LITE0_1 COMBINER_IRQ(3, 5) | ||
354 | #define EXYNOS5_IRQ_SYSMMU_SCALERPISP_0 COMBINER_IRQ(3, 6) | ||
355 | #define EXYNOS5_IRQ_SYSMMU_SCALERPISP_1 COMBINER_IRQ(3, 7) | ||
356 | |||
357 | #define EXYNOS5_IRQ_SYSMMU_ROTATOR_0 COMBINER_IRQ(4, 0) | ||
358 | #define EXYNOS5_IRQ_SYSMMU_ROTATOR_1 COMBINER_IRQ(4, 1) | ||
359 | #define EXYNOS5_IRQ_SYSMMU_JPEG_0 COMBINER_IRQ(4, 2) | ||
360 | #define EXYNOS5_IRQ_SYSMMU_JPEG_1 COMBINER_IRQ(4, 3) | ||
361 | |||
362 | #define EXYNOS5_IRQ_SYSMMU_FD_0 COMBINER_IRQ(5, 0) | ||
363 | #define EXYNOS5_IRQ_SYSMMU_FD_1 COMBINER_IRQ(5, 1) | ||
364 | #define EXYNOS5_IRQ_SYSMMU_SCALERCISP_0 COMBINER_IRQ(5, 2) | ||
365 | #define EXYNOS5_IRQ_SYSMMU_SCALERCISP_1 COMBINER_IRQ(5, 3) | ||
366 | #define EXYNOS5_IRQ_SYSMMU_MCUISP_0 COMBINER_IRQ(5, 4) | ||
367 | #define EXYNOS5_IRQ_SYSMMU_MCUISP_1 COMBINER_IRQ(5, 5) | ||
368 | #define EXYNOS5_IRQ_SYSMMU_3DNR_0 COMBINER_IRQ(5, 6) | ||
369 | #define EXYNOS5_IRQ_SYSMMU_3DNR_1 COMBINER_IRQ(5, 7) | ||
370 | |||
371 | #define EXYNOS5_IRQ_SYSMMU_ARM_0 COMBINER_IRQ(6, 0) | ||
372 | #define EXYNOS5_IRQ_SYSMMU_ARM_1 COMBINER_IRQ(6, 1) | ||
373 | #define EXYNOS5_IRQ_SYSMMU_MFC_L_0 COMBINER_IRQ(6, 2) | ||
374 | #define EXYNOS5_IRQ_SYSMMU_MFC_L_1 COMBINER_IRQ(6, 3) | ||
375 | #define EXYNOS5_IRQ_SYSMMU_RTIC_0 COMBINER_IRQ(6, 4) | ||
376 | #define EXYNOS5_IRQ_SYSMMU_RTIC_1 COMBINER_IRQ(6, 5) | ||
377 | #define EXYNOS5_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(6, 6) | ||
378 | #define EXYNOS5_IRQ_SYSMMU_SSS_1 COMBINER_IRQ(6, 7) | ||
379 | |||
380 | #define EXYNOS5_IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(7, 0) | ||
381 | #define EXYNOS5_IRQ_SYSMMU_MDMA0_1 COMBINER_IRQ(7, 1) | ||
382 | #define EXYNOS5_IRQ_SYSMMU_MDMA1_0 COMBINER_IRQ(7, 2) | ||
383 | #define EXYNOS5_IRQ_SYSMMU_MDMA1_1 COMBINER_IRQ(7, 3) | ||
384 | #define EXYNOS5_IRQ_SYSMMU_TV_0 COMBINER_IRQ(7, 4) | ||
385 | #define EXYNOS5_IRQ_SYSMMU_TV_1 COMBINER_IRQ(7, 5) | ||
386 | #define EXYNOS5_IRQ_SYSMMU_GPSX_0 COMBINER_IRQ(7, 6) | ||
387 | #define EXYNOS5_IRQ_SYSMMU_GPSX_1 COMBINER_IRQ(7, 7) | ||
388 | |||
389 | #define EXYNOS5_IRQ_SYSMMU_MFC_R_0 COMBINER_IRQ(8, 5) | ||
390 | #define EXYNOS5_IRQ_SYSMMU_MFC_R_1 COMBINER_IRQ(8, 6) | ||
391 | |||
392 | #define EXYNOS5_IRQ_SYSMMU_DIS1_0 COMBINER_IRQ(9, 4) | ||
393 | #define EXYNOS5_IRQ_SYSMMU_DIS1_1 COMBINER_IRQ(9, 5) | ||
394 | |||
395 | #define EXYNOS5_IRQ_DP COMBINER_IRQ(10, 3) | ||
396 | #define EXYNOS5_IRQ_SYSMMU_DIS0_0 COMBINER_IRQ(10, 4) | ||
397 | #define EXYNOS5_IRQ_SYSMMU_DIS0_1 COMBINER_IRQ(10, 5) | ||
398 | #define EXYNOS5_IRQ_SYSMMU_ISP_0 COMBINER_IRQ(10, 6) | ||
399 | #define EXYNOS5_IRQ_SYSMMU_ISP_1 COMBINER_IRQ(10, 7) | ||
400 | |||
401 | #define EXYNOS5_IRQ_SYSMMU_ODC_0 COMBINER_IRQ(11, 0) | ||
402 | #define EXYNOS5_IRQ_SYSMMU_ODC_1 COMBINER_IRQ(11, 1) | ||
403 | #define EXYNOS5_IRQ_SYSMMU_DRC_0 COMBINER_IRQ(11, 6) | ||
404 | #define EXYNOS5_IRQ_SYSMMU_DRC_1 COMBINER_IRQ(11, 7) | ||
405 | |||
406 | #define EXYNOS5_IRQ_FIMD1_FIFO COMBINER_IRQ(18, 4) | ||
407 | #define EXYNOS5_IRQ_FIMD1_VSYNC COMBINER_IRQ(18, 5) | ||
408 | #define EXYNOS5_IRQ_FIMD1_SYSTEM COMBINER_IRQ(18, 6) | ||
409 | |||
410 | #define EXYNOS5_IRQ_EINT0 COMBINER_IRQ(23, 0) | ||
411 | #define EXYNOS5_IRQ_MCT_L0 COMBINER_IRQ(23, 1) | ||
412 | #define EXYNOS5_IRQ_MCT_L1 COMBINER_IRQ(23, 2) | ||
413 | #define EXYNOS5_IRQ_MCT_G0 COMBINER_IRQ(23, 3) | ||
414 | #define EXYNOS5_IRQ_MCT_G1 COMBINER_IRQ(23, 4) | ||
415 | #define EXYNOS5_IRQ_MCT_G2 COMBINER_IRQ(23, 5) | ||
416 | #define EXYNOS5_IRQ_MCT_G3 COMBINER_IRQ(23, 6) | ||
417 | |||
418 | #define EXYNOS5_IRQ_EINT1 COMBINER_IRQ(24, 0) | ||
419 | #define EXYNOS5_IRQ_SYSMMU_LITE1_0 COMBINER_IRQ(24, 1) | ||
420 | #define EXYNOS5_IRQ_SYSMMU_LITE1_1 COMBINER_IRQ(24, 2) | ||
421 | #define EXYNOS5_IRQ_SYSMMU_2D_0 COMBINER_IRQ(24, 5) | ||
422 | #define EXYNOS5_IRQ_SYSMMU_2D_1 COMBINER_IRQ(24, 6) | ||
423 | |||
424 | #define EXYNOS5_IRQ_EINT2 COMBINER_IRQ(25, 0) | ||
425 | #define EXYNOS5_IRQ_EINT3 COMBINER_IRQ(25, 1) | ||
426 | |||
427 | #define EXYNOS5_IRQ_EINT4 COMBINER_IRQ(26, 0) | ||
428 | #define EXYNOS5_IRQ_EINT5 COMBINER_IRQ(26, 1) | ||
429 | |||
430 | #define EXYNOS5_IRQ_EINT6 COMBINER_IRQ(27, 0) | ||
431 | #define EXYNOS5_IRQ_EINT7 COMBINER_IRQ(27, 1) | ||
432 | |||
433 | #define EXYNOS5_IRQ_EINT8 COMBINER_IRQ(28, 0) | ||
434 | #define EXYNOS5_IRQ_EINT9 COMBINER_IRQ(28, 1) | ||
435 | |||
436 | #define EXYNOS5_IRQ_EINT10 COMBINER_IRQ(29, 0) | ||
437 | #define EXYNOS5_IRQ_EINT11 COMBINER_IRQ(29, 1) | ||
438 | |||
439 | #define EXYNOS5_IRQ_EINT12 COMBINER_IRQ(30, 0) | ||
440 | #define EXYNOS5_IRQ_EINT13 COMBINER_IRQ(30, 1) | ||
441 | |||
442 | #define EXYNOS5_IRQ_EINT14 COMBINER_IRQ(31, 0) | ||
443 | #define EXYNOS5_IRQ_EINT15 COMBINER_IRQ(31, 1) | ||
444 | |||
445 | #define EXYNOS5_MAX_COMBINER_NR 32 | ||
446 | |||
447 | #define EXYNOS5_IRQ_GPIO1_NR_GROUPS 13 | ||
448 | #define EXYNOS5_IRQ_GPIO2_NR_GROUPS 9 | ||
449 | #define EXYNOS5_IRQ_GPIO3_NR_GROUPS 5 | ||
450 | #define EXYNOS5_IRQ_GPIO4_NR_GROUPS 1 | ||
451 | |||
452 | #define MAX_COMBINER_NR (EXYNOS4_MAX_COMBINER_NR > EXYNOS5_MAX_COMBINER_NR ? \ | ||
453 | EXYNOS4_MAX_COMBINER_NR : EXYNOS5_MAX_COMBINER_NR) | ||
454 | |||
455 | #define S5P_EINT_BASE1 COMBINER_IRQ(MAX_COMBINER_NR, 0) | ||
456 | #define S5P_EINT_BASE2 (S5P_EINT_BASE1 + 16) | ||
457 | #define S5P_GPIOINT_BASE (S5P_EINT_BASE1 + 32) | ||
458 | #define IRQ_GPIO_END (S5P_GPIOINT_BASE + S5P_GPIOINT_COUNT) | ||
459 | #define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) | ||
172 | 460 | ||
173 | /* Set the default NR_IRQS */ | 461 | /* Set the default NR_IRQS */ |
174 | #define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) | 462 | |
463 | #define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) | ||
175 | 464 | ||
176 | #endif /* __ASM_ARCH_IRQS_H */ | 465 | #endif /* __ASM_ARCH_IRQS_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 609127df9b02..024d38ff1718 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define EXYNOS4_PA_SYSRAM0 0x02025000 | 26 | #define EXYNOS4_PA_SYSRAM0 0x02025000 |
27 | #define EXYNOS4_PA_SYSRAM1 0x02020000 | 27 | #define EXYNOS4_PA_SYSRAM1 0x02020000 |
28 | #define EXYNOS5_PA_SYSRAM 0x02020000 | ||
28 | 29 | ||
29 | #define EXYNOS4_PA_FIMC0 0x11800000 | 30 | #define EXYNOS4_PA_FIMC0 0x11800000 |
30 | #define EXYNOS4_PA_FIMC1 0x11810000 | 31 | #define EXYNOS4_PA_FIMC1 0x11810000 |
@@ -48,14 +49,23 @@ | |||
48 | #define EXYNOS4_PA_ONENAND 0x0C000000 | 49 | #define EXYNOS4_PA_ONENAND 0x0C000000 |
49 | #define EXYNOS4_PA_ONENAND_DMA 0x0C600000 | 50 | #define EXYNOS4_PA_ONENAND_DMA 0x0C600000 |
50 | 51 | ||
51 | #define EXYNOS4_PA_CHIPID 0x10000000 | 52 | #define EXYNOS_PA_CHIPID 0x10000000 |
52 | 53 | ||
53 | #define EXYNOS4_PA_SYSCON 0x10010000 | 54 | #define EXYNOS4_PA_SYSCON 0x10010000 |
55 | #define EXYNOS5_PA_SYSCON 0x10050100 | ||
56 | |||
54 | #define EXYNOS4_PA_PMU 0x10020000 | 57 | #define EXYNOS4_PA_PMU 0x10020000 |
58 | #define EXYNOS5_PA_PMU 0x10040000 | ||
59 | |||
55 | #define EXYNOS4_PA_CMU 0x10030000 | 60 | #define EXYNOS4_PA_CMU 0x10030000 |
61 | #define EXYNOS5_PA_CMU 0x10010000 | ||
56 | 62 | ||
57 | #define EXYNOS4_PA_SYSTIMER 0x10050000 | 63 | #define EXYNOS4_PA_SYSTIMER 0x10050000 |
64 | #define EXYNOS5_PA_SYSTIMER 0x101C0000 | ||
65 | |||
58 | #define EXYNOS4_PA_WATCHDOG 0x10060000 | 66 | #define EXYNOS4_PA_WATCHDOG 0x10060000 |
67 | #define EXYNOS5_PA_WATCHDOG 0x101D0000 | ||
68 | |||
59 | #define EXYNOS4_PA_RTC 0x10070000 | 69 | #define EXYNOS4_PA_RTC 0x10070000 |
60 | 70 | ||
61 | #define EXYNOS4_PA_KEYPAD 0x100A0000 | 71 | #define EXYNOS4_PA_KEYPAD 0x100A0000 |
@@ -64,9 +74,12 @@ | |||
64 | #define EXYNOS4_PA_DMC1 0x10410000 | 74 | #define EXYNOS4_PA_DMC1 0x10410000 |
65 | 75 | ||
66 | #define EXYNOS4_PA_COMBINER 0x10440000 | 76 | #define EXYNOS4_PA_COMBINER 0x10440000 |
77 | #define EXYNOS5_PA_COMBINER 0x10440000 | ||
67 | 78 | ||
68 | #define EXYNOS4_PA_GIC_CPU 0x10480000 | 79 | #define EXYNOS4_PA_GIC_CPU 0x10480000 |
69 | #define EXYNOS4_PA_GIC_DIST 0x10490000 | 80 | #define EXYNOS4_PA_GIC_DIST 0x10490000 |
81 | #define EXYNOS5_PA_GIC_CPU 0x10480000 | ||
82 | #define EXYNOS5_PA_GIC_DIST 0x10490000 | ||
70 | 83 | ||
71 | #define EXYNOS4_PA_COREPERI 0x10500000 | 84 | #define EXYNOS4_PA_COREPERI 0x10500000 |
72 | #define EXYNOS4_PA_TWD 0x10500600 | 85 | #define EXYNOS4_PA_TWD 0x10500600 |
@@ -97,10 +110,13 @@ | |||
97 | #define EXYNOS4_PA_SPI1 0x13930000 | 110 | #define EXYNOS4_PA_SPI1 0x13930000 |
98 | #define EXYNOS4_PA_SPI2 0x13940000 | 111 | #define EXYNOS4_PA_SPI2 0x13940000 |
99 | 112 | ||
100 | |||
101 | #define EXYNOS4_PA_GPIO1 0x11400000 | 113 | #define EXYNOS4_PA_GPIO1 0x11400000 |
102 | #define EXYNOS4_PA_GPIO2 0x11000000 | 114 | #define EXYNOS4_PA_GPIO2 0x11000000 |
103 | #define EXYNOS4_PA_GPIO3 0x03860000 | 115 | #define EXYNOS4_PA_GPIO3 0x03860000 |
116 | #define EXYNOS5_PA_GPIO1 0x11400000 | ||
117 | #define EXYNOS5_PA_GPIO2 0x13400000 | ||
118 | #define EXYNOS5_PA_GPIO3 0x10D10000 | ||
119 | #define EXYNOS5_PA_GPIO4 0x03860000 | ||
104 | 120 | ||
105 | #define EXYNOS4_PA_MIPI_CSIS0 0x11880000 | 121 | #define EXYNOS4_PA_MIPI_CSIS0 0x11880000 |
106 | #define EXYNOS4_PA_MIPI_CSIS1 0x11890000 | 122 | #define EXYNOS4_PA_MIPI_CSIS1 0x11890000 |
@@ -115,6 +131,7 @@ | |||
115 | #define EXYNOS4_PA_SATAPHY_CTRL 0x126B0000 | 131 | #define EXYNOS4_PA_SATAPHY_CTRL 0x126B0000 |
116 | 132 | ||
117 | #define EXYNOS4_PA_SROMC 0x12570000 | 133 | #define EXYNOS4_PA_SROMC 0x12570000 |
134 | #define EXYNOS5_PA_SROMC 0x12250000 | ||
118 | 135 | ||
119 | #define EXYNOS4_PA_EHCI 0x12580000 | 136 | #define EXYNOS4_PA_EHCI 0x12580000 |
120 | #define EXYNOS4_PA_OHCI 0x12590000 | 137 | #define EXYNOS4_PA_OHCI 0x12590000 |
@@ -122,6 +139,7 @@ | |||
122 | #define EXYNOS4_PA_MFC 0x13400000 | 139 | #define EXYNOS4_PA_MFC 0x13400000 |
123 | 140 | ||
124 | #define EXYNOS4_PA_UART 0x13800000 | 141 | #define EXYNOS4_PA_UART 0x13800000 |
142 | #define EXYNOS5_PA_UART 0x12C00000 | ||
125 | 143 | ||
126 | #define EXYNOS4_PA_VP 0x12C00000 | 144 | #define EXYNOS4_PA_VP 0x12C00000 |
127 | #define EXYNOS4_PA_MIXER 0x12C10000 | 145 | #define EXYNOS4_PA_MIXER 0x12C10000 |
@@ -130,6 +148,7 @@ | |||
130 | #define EXYNOS4_PA_IIC_HDMIPHY 0x138E0000 | 148 | #define EXYNOS4_PA_IIC_HDMIPHY 0x138E0000 |
131 | 149 | ||
132 | #define EXYNOS4_PA_IIC(x) (0x13860000 + ((x) * 0x10000)) | 150 | #define EXYNOS4_PA_IIC(x) (0x13860000 + ((x) * 0x10000)) |
151 | #define EXYNOS5_PA_IIC(x) (0x12C60000 + ((x) * 0x10000)) | ||
133 | 152 | ||
134 | #define EXYNOS4_PA_ADC 0x13910000 | 153 | #define EXYNOS4_PA_ADC 0x13910000 |
135 | #define EXYNOS4_PA_ADC1 0x13911000 | 154 | #define EXYNOS4_PA_ADC1 0x13911000 |
@@ -139,8 +158,10 @@ | |||
139 | #define EXYNOS4_PA_SPDIF 0x139B0000 | 158 | #define EXYNOS4_PA_SPDIF 0x139B0000 |
140 | 159 | ||
141 | #define EXYNOS4_PA_TIMER 0x139D0000 | 160 | #define EXYNOS4_PA_TIMER 0x139D0000 |
161 | #define EXYNOS5_PA_TIMER 0x12DD0000 | ||
142 | 162 | ||
143 | #define EXYNOS4_PA_SDRAM 0x40000000 | 163 | #define EXYNOS4_PA_SDRAM 0x40000000 |
164 | #define EXYNOS5_PA_SDRAM 0x40000000 | ||
144 | 165 | ||
145 | /* Compatibiltiy Defines */ | 166 | /* Compatibiltiy Defines */ |
146 | 167 | ||
@@ -158,7 +179,6 @@ | |||
158 | #define S3C_PA_IIC7 EXYNOS4_PA_IIC(7) | 179 | #define S3C_PA_IIC7 EXYNOS4_PA_IIC(7) |
159 | #define S3C_PA_RTC EXYNOS4_PA_RTC | 180 | #define S3C_PA_RTC EXYNOS4_PA_RTC |
160 | #define S3C_PA_WDT EXYNOS4_PA_WATCHDOG | 181 | #define S3C_PA_WDT EXYNOS4_PA_WATCHDOG |
161 | #define S3C_PA_UART EXYNOS4_PA_UART | ||
162 | #define S3C_PA_SPI0 EXYNOS4_PA_SPI0 | 182 | #define S3C_PA_SPI0 EXYNOS4_PA_SPI0 |
163 | #define S3C_PA_SPI1 EXYNOS4_PA_SPI1 | 183 | #define S3C_PA_SPI1 EXYNOS4_PA_SPI1 |
164 | #define S3C_PA_SPI2 EXYNOS4_PA_SPI2 | 184 | #define S3C_PA_SPI2 EXYNOS4_PA_SPI2 |
@@ -189,15 +209,18 @@ | |||
189 | 209 | ||
190 | /* Compatibility UART */ | 210 | /* Compatibility UART */ |
191 | 211 | ||
192 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) | 212 | #define EXYNOS4_PA_UART0 0x13800000 |
213 | #define EXYNOS4_PA_UART1 0x13810000 | ||
214 | #define EXYNOS4_PA_UART2 0x13820000 | ||
215 | #define EXYNOS4_PA_UART3 0x13830000 | ||
216 | #define EXYNOS4_SZ_UART SZ_256 | ||
193 | 217 | ||
194 | #define S5P_PA_UART(x) (EXYNOS4_PA_UART + ((x) * S3C_UART_OFFSET)) | 218 | #define EXYNOS5_PA_UART0 0x12C00000 |
195 | #define S5P_PA_UART0 S5P_PA_UART(0) | 219 | #define EXYNOS5_PA_UART1 0x12C10000 |
196 | #define S5P_PA_UART1 S5P_PA_UART(1) | 220 | #define EXYNOS5_PA_UART2 0x12C20000 |
197 | #define S5P_PA_UART2 S5P_PA_UART(2) | 221 | #define EXYNOS5_PA_UART3 0x12C30000 |
198 | #define S5P_PA_UART3 S5P_PA_UART(3) | 222 | #define EXYNOS5_SZ_UART SZ_256 |
199 | #define S5P_PA_UART4 S5P_PA_UART(4) | ||
200 | 223 | ||
201 | #define S5P_SZ_UART SZ_256 | 224 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) |
202 | 225 | ||
203 | #endif /* __ASM_ARCH_MAP_H */ | 226 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/regs-clock.h b/arch/arm/mach-exynos/include/mach/regs-clock.h index 1e4abd64a547..e141c1fd68d8 100644 --- a/arch/arm/mach-exynos/include/mach/regs-clock.h +++ b/arch/arm/mach-exynos/include/mach/regs-clock.h | |||
@@ -253,6 +253,68 @@ | |||
253 | #define EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT (0) | 253 | #define EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT (0) |
254 | #define EXYNOS4_CLKDIV_CAM1_JPEG_MASK (0xf << EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT) | 254 | #define EXYNOS4_CLKDIV_CAM1_JPEG_MASK (0xf << EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT) |
255 | 255 | ||
256 | /* For EXYNOS5250 */ | ||
257 | |||
258 | #define EXYNOS5_APLL_CON0 EXYNOS_CLKREG(0x00100) | ||
259 | #define EXYNOS5_CLKSRC_CPU EXYNOS_CLKREG(0x00200) | ||
260 | #define EXYNOS5_CLKDIV_CPU0 EXYNOS_CLKREG(0x00500) | ||
261 | #define EXYNOS5_MPLL_CON0 EXYNOS_CLKREG(0x04100) | ||
262 | #define EXYNOS5_CLKSRC_CORE1 EXYNOS_CLKREG(0x04204) | ||
263 | |||
264 | #define EXYNOS5_CLKGATE_IP_CORE EXYNOS_CLKREG(0x04900) | ||
265 | |||
266 | #define EXYNOS5_CLKDIV_ACP EXYNOS_CLKREG(0x08500) | ||
267 | |||
268 | #define EXYNOS5_CLKSRC_TOP2 EXYNOS_CLKREG(0x10218) | ||
269 | #define EXYNOS5_EPLL_CON0 EXYNOS_CLKREG(0x10130) | ||
270 | #define EXYNOS5_EPLL_CON1 EXYNOS_CLKREG(0x10134) | ||
271 | #define EXYNOS5_VPLL_CON0 EXYNOS_CLKREG(0x10140) | ||
272 | #define EXYNOS5_VPLL_CON1 EXYNOS_CLKREG(0x10144) | ||
273 | #define EXYNOS5_CPLL_CON0 EXYNOS_CLKREG(0x10120) | ||
274 | |||
275 | #define EXYNOS5_CLKSRC_TOP0 EXYNOS_CLKREG(0x10210) | ||
276 | #define EXYNOS5_CLKSRC_TOP3 EXYNOS_CLKREG(0x1021C) | ||
277 | #define EXYNOS5_CLKSRC_GSCL EXYNOS_CLKREG(0x10220) | ||
278 | #define EXYNOS5_CLKSRC_DISP1_0 EXYNOS_CLKREG(0x1022C) | ||
279 | #define EXYNOS5_CLKSRC_FSYS EXYNOS_CLKREG(0x10244) | ||
280 | #define EXYNOS5_CLKSRC_PERIC0 EXYNOS_CLKREG(0x10250) | ||
281 | |||
282 | #define EXYNOS5_CLKSRC_MASK_TOP EXYNOS_CLKREG(0x10310) | ||
283 | #define EXYNOS5_CLKSRC_MASK_GSCL EXYNOS_CLKREG(0x10320) | ||
284 | #define EXYNOS5_CLKSRC_MASK_DISP1_0 EXYNOS_CLKREG(0x1032C) | ||
285 | #define EXYNOS5_CLKSRC_MASK_FSYS EXYNOS_CLKREG(0x10340) | ||
286 | #define EXYNOS5_CLKSRC_MASK_PERIC0 EXYNOS_CLKREG(0x10350) | ||
287 | |||
288 | #define EXYNOS5_CLKDIV_TOP0 EXYNOS_CLKREG(0x10510) | ||
289 | #define EXYNOS5_CLKDIV_TOP1 EXYNOS_CLKREG(0x10514) | ||
290 | #define EXYNOS5_CLKDIV_GSCL EXYNOS_CLKREG(0x10520) | ||
291 | #define EXYNOS5_CLKDIV_DISP1_0 EXYNOS_CLKREG(0x1052C) | ||
292 | #define EXYNOS5_CLKDIV_GEN EXYNOS_CLKREG(0x1053C) | ||
293 | #define EXYNOS5_CLKDIV_FSYS0 EXYNOS_CLKREG(0x10548) | ||
294 | #define EXYNOS5_CLKDIV_FSYS1 EXYNOS_CLKREG(0x1054C) | ||
295 | #define EXYNOS5_CLKDIV_FSYS2 EXYNOS_CLKREG(0x10550) | ||
296 | #define EXYNOS5_CLKDIV_FSYS3 EXYNOS_CLKREG(0x10554) | ||
297 | #define EXYNOS5_CLKDIV_PERIC0 EXYNOS_CLKREG(0x10558) | ||
298 | |||
299 | #define EXYNOS5_CLKGATE_IP_ACP EXYNOS_CLKREG(0x08800) | ||
300 | #define EXYNOS5_CLKGATE_IP_GSCL EXYNOS_CLKREG(0x10920) | ||
301 | #define EXYNOS5_CLKGATE_IP_DISP1 EXYNOS_CLKREG(0x10928) | ||
302 | #define EXYNOS5_CLKGATE_IP_MFC EXYNOS_CLKREG(0x1092C) | ||
303 | #define EXYNOS5_CLKGATE_IP_GEN EXYNOS_CLKREG(0x10934) | ||
304 | #define EXYNOS5_CLKGATE_IP_FSYS EXYNOS_CLKREG(0x10944) | ||
305 | #define EXYNOS5_CLKGATE_IP_GPS EXYNOS_CLKREG(0x1094C) | ||
306 | #define EXYNOS5_CLKGATE_IP_PERIC EXYNOS_CLKREG(0x10950) | ||
307 | #define EXYNOS5_CLKGATE_IP_PERIS EXYNOS_CLKREG(0x10960) | ||
308 | #define EXYNOS5_CLKGATE_BLOCK EXYNOS_CLKREG(0x10980) | ||
309 | |||
310 | #define EXYNOS5_BPLL_CON0 EXYNOS_CLKREG(0x20110) | ||
311 | #define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200) | ||
312 | #define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500) | ||
313 | |||
314 | #define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030) | ||
315 | |||
316 | #define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29) | ||
317 | |||
256 | /* Compatibility defines and inclusion */ | 318 | /* Compatibility defines and inclusion */ |
257 | 319 | ||
258 | #include <mach/regs-pmu.h> | 320 | #include <mach/regs-pmu.h> |
diff --git a/arch/arm/mach-exynos/include/mach/regs-gpio.h b/arch/arm/mach-exynos/include/mach/regs-gpio.h index 1401b21663a5..e4b5b60dcb85 100644 --- a/arch/arm/mach-exynos/include/mach/regs-gpio.h +++ b/arch/arm/mach-exynos/include/mach/regs-gpio.h | |||
@@ -16,6 +16,15 @@ | |||
16 | #include <mach/map.h> | 16 | #include <mach/map.h> |
17 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
18 | 18 | ||
19 | #define EINT_REG_NR(x) (EINT_OFFSET(x) >> 3) | ||
20 | #define EINT_CON(b, x) (b + 0xE00 + (EINT_REG_NR(x) * 4)) | ||
21 | #define EINT_FLTCON(b, x) (b + 0xE80 + (EINT_REG_NR(x) * 4)) | ||
22 | #define EINT_MASK(b, x) (b + 0xF00 + (EINT_REG_NR(x) * 4)) | ||
23 | #define EINT_PEND(b, x) (b + 0xF40 + (EINT_REG_NR(x) * 4)) | ||
24 | |||
25 | #define EINT_OFFSET_BIT(x) (1 << (EINT_OFFSET(x) & 0x7)) | ||
26 | |||
27 | /* compatibility for plat-s5p/irq-pm.c */ | ||
19 | #define EXYNOS4_EINT40CON (S5P_VA_GPIO2 + 0xE00) | 28 | #define EXYNOS4_EINT40CON (S5P_VA_GPIO2 + 0xE00) |
20 | #define S5P_EINT_CON(x) (EXYNOS4_EINT40CON + ((x) * 0x4)) | 29 | #define S5P_EINT_CON(x) (EXYNOS4_EINT40CON + ((x) * 0x4)) |
21 | 30 | ||
@@ -28,15 +37,4 @@ | |||
28 | #define EXYNOS4_EINT40PEND (S5P_VA_GPIO2 + 0xF40) | 37 | #define EXYNOS4_EINT40PEND (S5P_VA_GPIO2 + 0xF40) |
29 | #define S5P_EINT_PEND(x) (EXYNOS4_EINT40PEND + ((x) * 0x4)) | 38 | #define S5P_EINT_PEND(x) (EXYNOS4_EINT40PEND + ((x) * 0x4)) |
30 | 39 | ||
31 | #define EINT_REG_NR(x) (EINT_OFFSET(x) >> 3) | ||
32 | |||
33 | #define eint_irq_to_bit(irq) (1 << (EINT_OFFSET(irq) & 0x7)) | ||
34 | |||
35 | #define EINT_MODE S3C_GPIO_SFN(0xf) | ||
36 | |||
37 | #define EINT_GPIO_0(x) EXYNOS4_GPX0(x) | ||
38 | #define EINT_GPIO_1(x) EXYNOS4_GPX1(x) | ||
39 | #define EINT_GPIO_2(x) EXYNOS4_GPX2(x) | ||
40 | #define EINT_GPIO_3(x) EXYNOS4_GPX3(x) | ||
41 | |||
42 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | 40 | #endif /* __ASM_ARCH_REGS_GPIO_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index 4fff8e938fec..4c53f38b5a9e 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define S5P_USE_STANDBYWFE_ISP_ARM (1 << 26) | 31 | #define S5P_USE_STANDBYWFE_ISP_ARM (1 << 26) |
32 | 32 | ||
33 | #define S5P_SWRESET S5P_PMUREG(0x0400) | 33 | #define S5P_SWRESET S5P_PMUREG(0x0400) |
34 | #define EXYNOS_SWRESET S5P_PMUREG(0x0400) | ||
34 | 35 | ||
35 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 36 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
36 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 37 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h index 21d97bcd9acb..493f4f365ddf 100644 --- a/arch/arm/mach-exynos/include/mach/uncompress.h +++ b/arch/arm/mach-exynos/include/mach/uncompress.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/include/mach/uncompress.h | 1 | /* |
2 | * | 2 | * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. |
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | 3 | * http://www.samsung.com |
5 | * | 4 | * |
6 | * EXYNOS4 - uncompress code | 5 | * EXYNOS - uncompress code |
7 | * | 6 | * |
8 | * 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 |
9 | * 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 |
@@ -13,12 +12,20 @@ | |||
13 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 12 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
14 | #define __ASM_ARCH_UNCOMPRESS_H __FILE__ | 13 | #define __ASM_ARCH_UNCOMPRESS_H __FILE__ |
15 | 14 | ||
15 | #include <asm/mach-types.h> | ||
16 | |||
16 | #include <mach/map.h> | 17 | #include <mach/map.h> |
18 | |||
19 | volatile u8 *uart_base; | ||
20 | |||
17 | #include <plat/uncompress.h> | 21 | #include <plat/uncompress.h> |
18 | 22 | ||
19 | static void arch_detect_cpu(void) | 23 | static void arch_detect_cpu(void) |
20 | { | 24 | { |
21 | /* we do not need to do any cpu detection here at the moment. */ | 25 | if (machine_is_smdk5250()) |
26 | uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); | ||
27 | else | ||
28 | uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); | ||
22 | 29 | ||
23 | /* | 30 | /* |
24 | * For preventing FIFO overrun or infinite loop of UART console, | 31 | * For preventing FIFO overrun or infinite loop of UART console, |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index e6b02fdf1b09..8245f1c761d9 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -37,13 +37,13 @@ | |||
37 | * data from the device tree. | 37 | * data from the device tree. |
38 | */ | 38 | */ |
39 | static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { | 39 | static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { |
40 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART0, | 40 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART0, |
41 | "exynos4210-uart.0", NULL), | 41 | "exynos4210-uart.0", NULL), |
42 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART1, | 42 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART1, |
43 | "exynos4210-uart.1", NULL), | 43 | "exynos4210-uart.1", NULL), |
44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART2, | 44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART2, |
45 | "exynos4210-uart.2", NULL), | 45 | "exynos4210-uart.2", NULL), |
46 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART3, | 46 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART3, |
47 | "exynos4210-uart.3", NULL), | 47 | "exynos4210-uart.3", NULL), |
48 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(0), | 48 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(0), |
49 | "exynos4-sdhci.0", NULL), | 49 | "exynos4-sdhci.0", NULL), |
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c new file mode 100644 index 000000000000..0d26f50081ad --- /dev/null +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * SAMSUNG EXYNOS5250 Flattened Device Tree enabled machine | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
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 | #include <linux/of_platform.h> | ||
13 | #include <linux/serial_core.h> | ||
14 | |||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | #include <mach/map.h> | ||
18 | |||
19 | #include <plat/cpu.h> | ||
20 | #include <plat/regs-serial.h> | ||
21 | |||
22 | #include "common.h" | ||
23 | |||
24 | /* | ||
25 | * The following lookup table is used to override device names when devices | ||
26 | * are registered from device tree. This is temporarily added to enable | ||
27 | * device tree support addition for the EXYNOS5 architecture. | ||
28 | * | ||
29 | * For drivers that require platform data to be provided from the machine | ||
30 | * file, a platform data pointer can also be supplied along with the | ||
31 | * devices names. Usually, the platform data elements that cannot be parsed | ||
32 | * from the device tree by the drivers (example: function pointers) are | ||
33 | * supplied. But it should be noted that this is a temporary mechanism and | ||
34 | * at some point, the drivers should be capable of parsing all the platform | ||
35 | * data from the device tree. | ||
36 | */ | ||
37 | static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { | ||
38 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART0, | ||
39 | "exynos4210-uart.0", NULL), | ||
40 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART1, | ||
41 | "exynos4210-uart.1", NULL), | ||
42 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART2, | ||
43 | "exynos4210-uart.2", NULL), | ||
44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART3, | ||
45 | "exynos4210-uart.3", NULL), | ||
46 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL), | ||
47 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL), | ||
48 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.2", NULL), | ||
49 | {}, | ||
50 | }; | ||
51 | |||
52 | static void __init exynos5250_dt_map_io(void) | ||
53 | { | ||
54 | exynos_init_io(NULL, 0); | ||
55 | s3c24xx_init_clocks(24000000); | ||
56 | } | ||
57 | |||
58 | static void __init exynos5250_dt_machine_init(void) | ||
59 | { | ||
60 | of_platform_populate(NULL, of_default_bus_match_table, | ||
61 | exynos5250_auxdata_lookup, NULL); | ||
62 | } | ||
63 | |||
64 | static char const *exynos5250_dt_compat[] __initdata = { | ||
65 | "samsung,exynos5250", | ||
66 | NULL | ||
67 | }; | ||
68 | |||
69 | DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") | ||
70 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | ||
71 | .init_irq = exynos5_init_irq, | ||
72 | .map_io = exynos5250_dt_map_io, | ||
73 | .handle_irq = gic_handle_irq, | ||
74 | .init_machine = exynos5250_dt_machine_init, | ||
75 | .timer = &exynos4_timer, | ||
76 | .dt_compat = exynos5250_dt_compat, | ||
77 | .restart = exynos5_restart, | ||
78 | MACHINE_END | ||
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index e8a1caaf1902..897d9a9cf226 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c | |||
@@ -261,7 +261,10 @@ static void exynos4_clockevent_init(void) | |||
261 | mct_comp_device.cpumask = cpumask_of(0); | 261 | mct_comp_device.cpumask = cpumask_of(0); |
262 | clockevents_register_device(&mct_comp_device); | 262 | clockevents_register_device(&mct_comp_device); |
263 | 263 | ||
264 | setup_irq(IRQ_MCT_G0, &mct_comp_event_irq); | 264 | if (soc_is_exynos5250()) |
265 | setup_irq(EXYNOS5_IRQ_MCT_G0, &mct_comp_event_irq); | ||
266 | else | ||
267 | setup_irq(EXYNOS4_IRQ_MCT_G0, &mct_comp_event_irq); | ||
265 | } | 268 | } |
266 | 269 | ||
267 | #ifdef CONFIG_LOCAL_TIMERS | 270 | #ifdef CONFIG_LOCAL_TIMERS |
@@ -412,16 +415,16 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) | |||
412 | if (mct_int_type == MCT_INT_SPI) { | 415 | if (mct_int_type == MCT_INT_SPI) { |
413 | if (cpu == 0) { | 416 | if (cpu == 0) { |
414 | mct_tick0_event_irq.dev_id = mevt; | 417 | mct_tick0_event_irq.dev_id = mevt; |
415 | evt->irq = IRQ_MCT_L0; | 418 | evt->irq = EXYNOS4_IRQ_MCT_L0; |
416 | setup_irq(IRQ_MCT_L0, &mct_tick0_event_irq); | 419 | setup_irq(EXYNOS4_IRQ_MCT_L0, &mct_tick0_event_irq); |
417 | } else { | 420 | } else { |
418 | mct_tick1_event_irq.dev_id = mevt; | 421 | mct_tick1_event_irq.dev_id = mevt; |
419 | evt->irq = IRQ_MCT_L1; | 422 | evt->irq = EXYNOS4_IRQ_MCT_L1; |
420 | setup_irq(IRQ_MCT_L1, &mct_tick1_event_irq); | 423 | setup_irq(EXYNOS4_IRQ_MCT_L1, &mct_tick1_event_irq); |
421 | irq_set_affinity(IRQ_MCT_L1, cpumask_of(1)); | 424 | irq_set_affinity(EXYNOS4_IRQ_MCT_L1, cpumask_of(1)); |
422 | } | 425 | } |
423 | } else { | 426 | } else { |
424 | enable_percpu_irq(IRQ_MCT_LOCALTIMER, 0); | 427 | enable_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER, 0); |
425 | } | 428 | } |
426 | 429 | ||
427 | return 0; | 430 | return 0; |
@@ -437,7 +440,7 @@ static void exynos4_local_timer_stop(struct clock_event_device *evt) | |||
437 | else | 440 | else |
438 | remove_irq(evt->irq, &mct_tick1_event_irq); | 441 | remove_irq(evt->irq, &mct_tick1_event_irq); |
439 | else | 442 | else |
440 | disable_percpu_irq(IRQ_MCT_LOCALTIMER); | 443 | disable_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER); |
441 | } | 444 | } |
442 | 445 | ||
443 | static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { | 446 | static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { |
@@ -457,11 +460,11 @@ static void __init exynos4_timer_resources(void) | |||
457 | if (mct_int_type == MCT_INT_PPI) { | 460 | if (mct_int_type == MCT_INT_PPI) { |
458 | int err; | 461 | int err; |
459 | 462 | ||
460 | err = request_percpu_irq(IRQ_MCT_LOCALTIMER, | 463 | err = request_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER, |
461 | exynos4_mct_tick_isr, "MCT", | 464 | exynos4_mct_tick_isr, "MCT", |
462 | &percpu_mct_tick); | 465 | &percpu_mct_tick); |
463 | WARN(err, "MCT: can't request IRQ %d (%d)\n", | 466 | WARN(err, "MCT: can't request IRQ %d (%d)\n", |
464 | IRQ_MCT_LOCALTIMER, err); | 467 | EXYNOS_IRQ_MCT_LOCALTIMER, err); |
465 | } | 468 | } |
466 | 469 | ||
467 | local_timer_register(&exynos4_mct_tick_ops); | 470 | local_timer_register(&exynos4_mct_tick_ops); |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 0f2035a1eb6e..36c3984aaa47 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -166,7 +166,10 @@ void __init smp_init_cpus(void) | |||
166 | void __iomem *scu_base = scu_base_addr(); | 166 | void __iomem *scu_base = scu_base_addr(); |
167 | unsigned int i, ncores; | 167 | unsigned int i, ncores; |
168 | 168 | ||
169 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | 169 | if (soc_is_exynos5250()) |
170 | ncores = 2; | ||
171 | else | ||
172 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | ||
170 | 173 | ||
171 | /* sanity check */ | 174 | /* sanity check */ |
172 | if (ncores > nr_cpu_ids) { | 175 | if (ncores > nr_cpu_ids) { |
@@ -183,8 +186,8 @@ void __init smp_init_cpus(void) | |||
183 | 186 | ||
184 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 187 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
185 | { | 188 | { |
186 | 189 | if (!soc_is_exynos5250()) | |
187 | scu_enable(scu_base_addr()); | 190 | scu_enable(scu_base_addr()); |
188 | 191 | ||
189 | /* | 192 | /* |
190 | * Write the address of secondary startup into the | 193 | * Write the address of secondary startup into the |
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 0b04af2b13cc..13b306808b42 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
@@ -183,6 +183,12 @@ static __init int exynos4_pm_init_power_domain(void) | |||
183 | #ifdef CONFIG_S5P_DEV_CSIS1 | 183 | #ifdef CONFIG_S5P_DEV_CSIS1 |
184 | exynos_pm_add_dev_to_genpd(&s5p_device_mipi_csis1, &exynos4_pd_cam); | 184 | exynos_pm_add_dev_to_genpd(&s5p_device_mipi_csis1, &exynos4_pd_cam); |
185 | #endif | 185 | #endif |
186 | #ifdef CONFIG_S5P_DEV_G2D | ||
187 | exynos_pm_add_dev_to_genpd(&s5p_device_g2d, &exynos4_pd_lcd0); | ||
188 | #endif | ||
189 | #ifdef CONFIG_S5P_DEV_JPEG | ||
190 | exynos_pm_add_dev_to_genpd(&s5p_device_jpeg, &exynos4_pd_cam); | ||
191 | #endif | ||
186 | return 0; | 192 | return 0; |
187 | } | 193 | } |
188 | arch_initcall(exynos4_pm_init_power_domain); | 194 | arch_initcall(exynos4_pm_init_power_domain); |
diff --git a/arch/arm/mach-exynos/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c index d395bd17c38b..b90d94c17f7c 100644 --- a/arch/arm/mach-exynos/setup-i2c0.c +++ b/arch/arm/mach-exynos/setup-i2c0.c | |||
@@ -1,7 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mach-exynos4/setup-i2c0.c | 2 | * Copyright (c) 2009-2012 Samsung Electronics Co., Ltd. |
3 | * | ||
4 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com/ | 3 | * http://www.samsung.com/ |
6 | * | 4 | * |
7 | * I2C0 GPIO configuration. | 5 | * I2C0 GPIO configuration. |
@@ -18,9 +16,14 @@ struct platform_device; /* don't need the contents */ | |||
18 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
19 | #include <plat/iic.h> | 17 | #include <plat/iic.h> |
20 | #include <plat/gpio-cfg.h> | 18 | #include <plat/gpio-cfg.h> |
19 | #include <plat/cpu.h> | ||
21 | 20 | ||
22 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | 21 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) |
23 | { | 22 | { |
23 | if (soc_is_exynos5250()) | ||
24 | /* will be implemented with gpio function */ | ||
25 | return; | ||
26 | |||
24 | s3c_gpio_cfgall_range(EXYNOS4_GPD1(0), 2, | 27 | s3c_gpio_cfgall_range(EXYNOS4_GPD1(0), 2, |
25 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | 28 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); |
26 | } | 29 | } |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index 41978ee4f9d0..3e6aaa6361da 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/system_misc.h> | ||
24 | #include <asm/hardware/dec21285.h> | 25 | #include <asm/hardware/dec21285.h> |
25 | 26 | ||
26 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 121ad1d4fa39..3b54196447c7 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/hardware/dec21285.h> | 15 | #include <asm/hardware/dec21285.h> |
16 | #include <asm/mach/time.h> | 16 | #include <asm/mach/time.h> |
17 | #include <asm/system_info.h> | ||
17 | 18 | ||
18 | #include "common.h" | 19 | #include "common.h" |
19 | 20 | ||
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 3194d3f73503..e17e11de4f5e 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <video/vga.h> | 21 | #include <video/vga.h> |
22 | 22 | ||
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | #include <asm/system.h> | ||
25 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
26 | #include <asm/hardware/dec21285.h> | 25 | #include <asm/hardware/dec21285.h> |
27 | 26 | ||
diff --git a/arch/arm/mach-footbridge/ebsa285-leds.c b/arch/arm/mach-footbridge/ebsa285-leds.c index 4e10090cd87f..5bd266754b95 100644 --- a/arch/arm/mach-footbridge/ebsa285-leds.c +++ b/arch/arm/mach-footbridge/ebsa285-leds.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <asm/leds.h> | 25 | #include <asm/leds.h> |
26 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
27 | #include <asm/system.h> | ||
28 | 27 | ||
29 | #define LED_STATE_ENABLED 1 | 28 | #define LED_STATE_ENABLED 1 |
30 | #define LED_STATE_CLAIMED 2 | 29 | #define LED_STATE_CLAIMED 2 |
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 80a1c5cc9071..cac9f67e7da7 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/leds.h> | 17 | #include <asm/leds.h> |
18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
19 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
20 | #include <asm/system_misc.h> | ||
20 | 21 | ||
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | 23 | ||
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c index e57102e871fc..5a2bd89cbdca 100644 --- a/arch/arm/mach-footbridge/netwinder-leds.c +++ b/arch/arm/mach-footbridge/netwinder-leds.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <asm/leds.h> | 25 | #include <asm/leds.h> |
26 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
27 | #include <asm/system.h> | ||
28 | 27 | ||
29 | #define LED_STATE_ENABLED 1 | 28 | #define LED_STATE_ENABLED 1 |
30 | #define LED_STATE_CLAIMED 2 | 29 | #define LED_STATE_CLAIMED 2 |
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index 42afc29a7da8..3189a6004cf9 100644 --- a/arch/arm/mach-imx/dma-v1.c +++ b/arch/arm/mach-imx/dma-v1.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/scatterlist.h> | 32 | #include <linux/scatterlist.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | 34 | ||
35 | #include <asm/system.h> | ||
36 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
37 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
38 | #include <mach/dma-v1.h> | 37 | #include <mach/dma-v1.h> |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 7696dfa2bdba..da6c1d9af768 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/hardware/gic.h> | 26 | #include <asm/hardware/gic.h> |
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | #include <asm/system_misc.h> | ||
29 | #include <mach/common.h> | 30 | #include <mach/common.h> |
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | 32 | ||
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c index 3a5ed2dd885a..586e9f822124 100644 --- a/arch/arm/mach-imx/mach-mx51_efikamx.c +++ b/arch/arm/mach-imx/mach-mx51_efikamx.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <mach/iomux-mx51.h> | 33 | #include <mach/iomux-mx51.h> |
34 | 34 | ||
35 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
36 | #include <asm/system_info.h> | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c index ea5f65b0381a..24aded9e109f 100644 --- a/arch/arm/mach-imx/mach-mx51_efikasb.c +++ b/arch/arm/mach-imx/mach-mx51_efikasb.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <mach/iomux-mx51.h> | 36 | #include <mach/iomux-mx51.h> |
37 | 37 | ||
38 | #include <asm/setup.h> | 38 | #include <asm/setup.h> |
39 | #include <asm/system_info.h> | ||
39 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/time.h> | 42 | #include <asm/mach/time.h> |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 15b87f26ac96..1a65d77bd55d 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <mach/platform.h> | 27 | #include <mach/platform.h> |
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <mach/cm.h> | 29 | #include <mach/cm.h> |
30 | #include <asm/system.h> | ||
31 | #include <asm/leds.h> | 30 | #include <asm/leds.h> |
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
diff --git a/arch/arm/mach-integrator/leds.c b/arch/arm/mach-integrator/leds.c index 28be186adb89..466defa97842 100644 --- a/arch/arm/mach-integrator/leds.c +++ b/arch/arm/mach-integrator/leds.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/platform.h> | 30 | #include <mach/platform.h> |
31 | #include <asm/leds.h> | 31 | #include <asm/leds.h> |
32 | #include <asm/system.h> | ||
33 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
34 | #include <mach/cm.h> | 33 | #include <mach/cm.h> |
35 | 34 | ||
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index 520b6bf81bb1..36068f438f2b 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | 28 | ||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/system.h> | ||
31 | #include <asm/mach/pci.h> | 30 | #include <asm/mach/pci.h> |
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | 32 | ||
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 015be770c1d8..4be172c3cbe0 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <mach/platform.h> | 32 | #include <mach/platform.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/signal.h> | 34 | #include <asm/signal.h> |
35 | #include <asm/system.h> | ||
36 | #include <asm/mach/pci.h> | 35 | #include <asm/mach/pci.h> |
37 | #include <asm/irq_regs.h> | 36 | #include <asm/irq_regs.h> |
38 | 37 | ||
diff --git a/arch/arm/mach-iop33x/uart.c b/arch/arm/mach-iop33x/uart.c index cdae24e46eea..bbf54d794ce8 100644 --- a/arch/arm/mach-iop33x/uart.c +++ b/arch/arm/mach-iop33x/uart.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/page.h> | 22 | #include <asm/page.h> |
23 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
24 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
25 | #include <asm/system.h> | ||
26 | #include <asm/memory.h> | 25 | #include <asm/memory.h> |
27 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
28 | #include <asm/hardware/iop3xx.h> | 27 | #include <asm/hardware/iop3xx.h> |
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 81c45370a4e6..f214cdff01cb 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/memory.h> | 32 | #include <asm/memory.h> |
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
35 | #include <asm/system.h> | ||
36 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
37 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
38 | 37 | ||
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index e872d238cd0f..4867f408617c 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/system.h> | ||
40 | #include <mach/hardware.h> | 39 | #include <mach/hardware.h> |
41 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
42 | 41 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index d519944653ad..915ad49e3b8f 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
31 | #include <asm/page.h> | 31 | #include <asm/page.h> |
32 | #include <asm/system.h> | ||
33 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
34 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
35 | 34 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index b415febd2025..a9f1819ea049 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
31 | #include <asm/page.h> | 31 | #include <asm/page.h> |
32 | #include <asm/system.h> | ||
33 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
34 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
35 | 34 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index dd9838299068..421e38dc0fac 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
32 | #include <asm/page.h> | 32 | #include <asm/page.h> |
33 | #include <asm/system.h> | ||
34 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
35 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
36 | 35 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 7632beadabf6..5196c39cdba4 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/page.h> | 36 | #include <asm/page.h> |
37 | #include <asm/system.h> | ||
38 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
39 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
40 | 39 | ||
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c index 49c36f3cd602..9c02de932fac 100644 --- a/arch/arm/mach-ixp2000/pci.c +++ b/arch/arm/mach-ixp2000/pci.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | 27 | ||
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/system.h> | ||
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | 30 | ||
32 | #include <asm/mach/pci.h> | 31 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index 7c1495e4fe7a..d2c2dc35cbdd 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/memory.h> | 34 | #include <asm/memory.h> |
35 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
37 | #include <asm/system.h> | ||
38 | #include <asm/tlbflush.h> | 37 | #include <asm/tlbflush.h> |
39 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
40 | 39 | ||
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c index 8f2487e1fc4e..d142d45dea12 100644 --- a/arch/arm/mach-ixp23xx/espresso.c +++ b/arch/arm/mach-ixp23xx/espresso.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
34 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
35 | #include <asm/system.h> | ||
36 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
37 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
38 | 37 | ||
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index 5d5dd3e8d069..b0e07db5ceaf 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/memory.h> | 36 | #include <asm/memory.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
39 | #include <asm/system.h> | ||
40 | #include <asm/tlbflush.h> | 39 | #include <asm/tlbflush.h> |
41 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
42 | 41 | ||
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c index 3cbbd3208fa8..911f5a58e006 100644 --- a/arch/arm/mach-ixp23xx/pci.c +++ b/arch/arm/mach-ixp23xx/pci.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/sizes.h> | 30 | #include <asm/sizes.h> |
31 | #include <asm/system.h> | ||
32 | #include <asm/mach/pci.h> | 31 | #include <asm/mach/pci.h> |
33 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
34 | 33 | ||
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c index 377283fc658c..eaaa3fa9fd05 100644 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ b/arch/arm/mach-ixp23xx/roadrunner.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
38 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
39 | #include <asm/system.h> | ||
40 | #include <asm/tlbflush.h> | 39 | #include <asm/tlbflush.h> |
41 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
42 | 41 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 8508882b13f0..d5719eb42591 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/cputype.h> | 32 | #include <asm/cputype.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/sizes.h> | 34 | #include <asm/sizes.h> |
35 | #include <asm/system.h> | ||
36 | #include <asm/mach/pci.h> | 35 | #include <asm/mach/pci.h> |
37 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
38 | 37 | ||
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index c0e3d69a8aec..78ae12c46261 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/serial_8250.h> | 13 | #include <linux/serial_8250.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | #include <asm/system.h> | ||
16 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/flash.h> | 16 | #include <asm/mach/flash.h> |
18 | #include <asm/mach/pci.h> | 17 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index acbc5e1db06f..e299a9576bf0 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -21,3 +21,4 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup.o | |||
21 | 21 | ||
22 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 22 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
23 | obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o | 23 | obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o |
24 | obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o | ||
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c new file mode 100644 index 000000000000..985453994dd3 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-dreamplug.c | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-dreamplug.c | ||
5 | * | ||
6 | * Marvell DreamPlug Reference Board Init for drivers not converted to | ||
7 | * flattened device tree yet. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mtd/partitions.h> | ||
18 | #include <linux/ata_platform.h> | ||
19 | #include <linux/mv643xx_eth.h> | ||
20 | #include <linux/of.h> | ||
21 | #include <linux/of_address.h> | ||
22 | #include <linux/of_fdt.h> | ||
23 | #include <linux/of_irq.h> | ||
24 | #include <linux/of_platform.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/leds.h> | ||
27 | #include <linux/mtd/physmap.h> | ||
28 | #include <linux/spi/flash.h> | ||
29 | #include <linux/spi/spi.h> | ||
30 | #include <linux/spi/orion_spi.h> | ||
31 | #include <asm/mach-types.h> | ||
32 | #include <asm/mach/arch.h> | ||
33 | #include <asm/mach/map.h> | ||
34 | #include <mach/kirkwood.h> | ||
35 | #include <mach/bridge-regs.h> | ||
36 | #include <plat/mvsdio.h> | ||
37 | #include "common.h" | ||
38 | #include "mpp.h" | ||
39 | |||
40 | struct mtd_partition dreamplug_partitions[] = { | ||
41 | { | ||
42 | .name = "u-boot", | ||
43 | .size = SZ_512K, | ||
44 | .offset = 0, | ||
45 | }, | ||
46 | { | ||
47 | .name = "u-boot env", | ||
48 | .size = SZ_64K, | ||
49 | .offset = SZ_512K + SZ_512K, | ||
50 | }, | ||
51 | { | ||
52 | .name = "dtb", | ||
53 | .size = SZ_64K, | ||
54 | .offset = SZ_512K + SZ_512K + SZ_512K, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | static const struct flash_platform_data dreamplug_spi_slave_data = { | ||
59 | .type = "mx25l1606e", | ||
60 | .name = "spi_flash", | ||
61 | .parts = dreamplug_partitions, | ||
62 | .nr_parts = ARRAY_SIZE(dreamplug_partitions), | ||
63 | }; | ||
64 | |||
65 | static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { | ||
66 | { | ||
67 | .modalias = "m25p80", | ||
68 | .platform_data = &dreamplug_spi_slave_data, | ||
69 | .irq = -1, | ||
70 | .max_speed_hz = 50000000, | ||
71 | .bus_num = 0, | ||
72 | .chip_select = 0, | ||
73 | }, | ||
74 | }; | ||
75 | |||
76 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | ||
77 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
78 | }; | ||
79 | |||
80 | static struct mv643xx_eth_platform_data dreamplug_ge01_data = { | ||
81 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
82 | }; | ||
83 | |||
84 | static struct mv_sata_platform_data dreamplug_sata_data = { | ||
85 | .n_ports = 1, | ||
86 | }; | ||
87 | |||
88 | static struct mvsdio_platform_data dreamplug_mvsdio_data = { | ||
89 | /* unfortunately the CD signal has not been connected */ | ||
90 | }; | ||
91 | |||
92 | static struct gpio_led dreamplug_led_pins[] = { | ||
93 | { | ||
94 | .name = "dreamplug:blue:bluetooth", | ||
95 | .gpio = 47, | ||
96 | .active_low = 1, | ||
97 | }, | ||
98 | { | ||
99 | .name = "dreamplug:green:wifi", | ||
100 | .gpio = 48, | ||
101 | .active_low = 1, | ||
102 | }, | ||
103 | { | ||
104 | .name = "dreamplug:green:wifi_ap", | ||
105 | .gpio = 49, | ||
106 | .active_low = 1, | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | static struct gpio_led_platform_data dreamplug_led_data = { | ||
111 | .leds = dreamplug_led_pins, | ||
112 | .num_leds = ARRAY_SIZE(dreamplug_led_pins), | ||
113 | }; | ||
114 | |||
115 | static struct platform_device dreamplug_leds = { | ||
116 | .name = "leds-gpio", | ||
117 | .id = -1, | ||
118 | .dev = { | ||
119 | .platform_data = &dreamplug_led_data, | ||
120 | } | ||
121 | }; | ||
122 | |||
123 | static unsigned int dreamplug_mpp_config[] __initdata = { | ||
124 | MPP0_SPI_SCn, | ||
125 | MPP1_SPI_MOSI, | ||
126 | MPP2_SPI_SCK, | ||
127 | MPP3_SPI_MISO, | ||
128 | MPP47_GPIO, /* Bluetooth LED */ | ||
129 | MPP48_GPIO, /* Wifi LED */ | ||
130 | MPP49_GPIO, /* Wifi AP LED */ | ||
131 | 0 | ||
132 | }; | ||
133 | |||
134 | void __init dreamplug_init(void) | ||
135 | { | ||
136 | /* | ||
137 | * Basic setup. Needs to be called early. | ||
138 | */ | ||
139 | kirkwood_mpp_conf(dreamplug_mpp_config); | ||
140 | |||
141 | spi_register_board_info(dreamplug_spi_slave_info, | ||
142 | ARRAY_SIZE(dreamplug_spi_slave_info)); | ||
143 | kirkwood_spi_init(); | ||
144 | |||
145 | kirkwood_ehci_init(); | ||
146 | kirkwood_ge00_init(&dreamplug_ge00_data); | ||
147 | kirkwood_ge01_init(&dreamplug_ge01_data); | ||
148 | kirkwood_sata_init(&dreamplug_sata_data); | ||
149 | kirkwood_sdio_init(&dreamplug_mvsdio_data); | ||
150 | |||
151 | platform_device_register(&dreamplug_leds); | ||
152 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index fbe6405602ed..1c672d9e6656 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * arch/arm/mach-kirkwood/board-dt.c | 4 | * arch/arm/mach-kirkwood/board-dt.c |
5 | * | 5 | * |
6 | * Marvell DreamPlug Reference Board Setup | 6 | * Flattened Device Tree board initialization |
7 | * | 7 | * |
8 | * This file is licensed under the terms of the GNU General Public | 8 | * This file is licensed under the terms of the GNU General Public |
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
@@ -12,150 +12,45 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/mtd/partitions.h> | ||
17 | #include <linux/ata_platform.h> | ||
18 | #include <linux/mv643xx_eth.h> | ||
19 | #include <linux/of.h> | 15 | #include <linux/of.h> |
20 | #include <linux/of_address.h> | ||
21 | #include <linux/of_fdt.h> | ||
22 | #include <linux/of_irq.h> | ||
23 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
24 | #include <linux/gpio.h> | ||
25 | #include <linux/leds.h> | ||
26 | #include <linux/mtd/physmap.h> | ||
27 | #include <linux/spi/flash.h> | ||
28 | #include <linux/spi/spi.h> | ||
29 | #include <linux/spi/orion_spi.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
32 | #include <mach/kirkwood.h> | 18 | #include <asm/mach/map.h> |
33 | #include <plat/mvsdio.h> | 19 | #include <mach/bridge-regs.h> |
34 | #include "common.h" | 20 | #include "common.h" |
35 | #include "mpp.h" | ||
36 | 21 | ||
37 | static struct of_device_id kirkwood_dt_match_table[] __initdata = { | 22 | static struct of_device_id kirkwood_dt_match_table[] __initdata = { |
38 | { .compatible = "simple-bus", }, | 23 | { .compatible = "simple-bus", }, |
39 | { } | 24 | { } |
40 | }; | 25 | }; |
41 | 26 | ||
42 | struct mtd_partition dreamplug_partitions[] = { | 27 | static void __init kirkwood_dt_init(void) |
43 | { | ||
44 | .name = "u-boot", | ||
45 | .size = SZ_512K, | ||
46 | .offset = 0, | ||
47 | }, | ||
48 | { | ||
49 | .name = "u-boot env", | ||
50 | .size = SZ_64K, | ||
51 | .offset = SZ_512K + SZ_512K, | ||
52 | }, | ||
53 | { | ||
54 | .name = "dtb", | ||
55 | .size = SZ_64K, | ||
56 | .offset = SZ_512K + SZ_512K + SZ_512K, | ||
57 | }, | ||
58 | }; | ||
59 | |||
60 | static const struct flash_platform_data dreamplug_spi_slave_data = { | ||
61 | .type = "mx25l1606e", | ||
62 | .name = "spi_flash", | ||
63 | .parts = dreamplug_partitions, | ||
64 | .nr_parts = ARRAY_SIZE(dreamplug_partitions), | ||
65 | }; | ||
66 | |||
67 | static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { | ||
68 | { | ||
69 | .modalias = "m25p80", | ||
70 | .platform_data = &dreamplug_spi_slave_data, | ||
71 | .irq = -1, | ||
72 | .max_speed_hz = 50000000, | ||
73 | .bus_num = 0, | ||
74 | .chip_select = 0, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | ||
79 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
80 | }; | ||
81 | |||
82 | static struct mv643xx_eth_platform_data dreamplug_ge01_data = { | ||
83 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
84 | }; | ||
85 | |||
86 | static struct mv_sata_platform_data dreamplug_sata_data = { | ||
87 | .n_ports = 1, | ||
88 | }; | ||
89 | |||
90 | static struct mvsdio_platform_data dreamplug_mvsdio_data = { | ||
91 | /* unfortunately the CD signal has not been connected */ | ||
92 | }; | ||
93 | |||
94 | static struct gpio_led dreamplug_led_pins[] = { | ||
95 | { | ||
96 | .name = "dreamplug:blue:bluetooth", | ||
97 | .gpio = 47, | ||
98 | .active_low = 1, | ||
99 | }, | ||
100 | { | ||
101 | .name = "dreamplug:green:wifi", | ||
102 | .gpio = 48, | ||
103 | .active_low = 1, | ||
104 | }, | ||
105 | { | ||
106 | .name = "dreamplug:green:wifi_ap", | ||
107 | .gpio = 49, | ||
108 | .active_low = 1, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | static struct gpio_led_platform_data dreamplug_led_data = { | ||
113 | .leds = dreamplug_led_pins, | ||
114 | .num_leds = ARRAY_SIZE(dreamplug_led_pins), | ||
115 | }; | ||
116 | |||
117 | static struct platform_device dreamplug_leds = { | ||
118 | .name = "leds-gpio", | ||
119 | .id = -1, | ||
120 | .dev = { | ||
121 | .platform_data = &dreamplug_led_data, | ||
122 | } | ||
123 | }; | ||
124 | |||
125 | static unsigned int dreamplug_mpp_config[] __initdata = { | ||
126 | MPP0_SPI_SCn, | ||
127 | MPP1_SPI_MOSI, | ||
128 | MPP2_SPI_SCK, | ||
129 | MPP3_SPI_MISO, | ||
130 | MPP47_GPIO, /* Bluetooth LED */ | ||
131 | MPP48_GPIO, /* Wifi LED */ | ||
132 | MPP49_GPIO, /* Wifi AP LED */ | ||
133 | 0 | ||
134 | }; | ||
135 | |||
136 | static void __init dreamplug_init(void) | ||
137 | { | 28 | { |
29 | pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); | ||
30 | |||
138 | /* | 31 | /* |
139 | * Basic setup. Needs to be called early. | 32 | * Disable propagation of mbus errors to the CPU local bus, |
33 | * as this causes mbus errors (which can occur for example | ||
34 | * for PCI aborts) to throw CPU aborts, which we're not set | ||
35 | * up to deal with. | ||
140 | */ | 36 | */ |
141 | kirkwood_mpp_conf(dreamplug_mpp_config); | 37 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); |
142 | 38 | ||
143 | spi_register_board_info(dreamplug_spi_slave_info, | 39 | kirkwood_setup_cpu_mbus(); |
144 | ARRAY_SIZE(dreamplug_spi_slave_info)); | ||
145 | kirkwood_spi_init(); | ||
146 | 40 | ||
147 | kirkwood_ehci_init(); | 41 | #ifdef CONFIG_CACHE_FEROCEON_L2 |
148 | kirkwood_ge00_init(&dreamplug_ge00_data); | 42 | kirkwood_l2_init(); |
149 | kirkwood_ge01_init(&dreamplug_ge01_data); | 43 | #endif |
150 | kirkwood_sata_init(&dreamplug_sata_data); | ||
151 | kirkwood_sdio_init(&dreamplug_mvsdio_data); | ||
152 | 44 | ||
153 | platform_device_register(&dreamplug_leds); | 45 | /* internal devices that every board has */ |
154 | } | 46 | kirkwood_wdt_init(); |
47 | kirkwood_xor0_init(); | ||
48 | kirkwood_xor1_init(); | ||
49 | kirkwood_crypto_init(); | ||
155 | 50 | ||
156 | static void __init kirkwood_dt_init(void) | 51 | #ifdef CONFIG_KEXEC |
157 | { | 52 | kexec_reinit = kirkwood_enable_pcie; |
158 | kirkwood_init(); | 53 | #endif |
159 | 54 | ||
160 | if (of_machine_is_compatible("globalscale,dreamplug")) | 55 | if (of_machine_is_compatible("globalscale,dreamplug")) |
161 | dreamplug_init(); | 56 | dreamplug_init(); |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 77d4852e19f2..a02cae881f2f 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -279,7 +279,7 @@ void __init kirkwood_crypto_init(void) | |||
279 | /***************************************************************************** | 279 | /***************************************************************************** |
280 | * XOR0 | 280 | * XOR0 |
281 | ****************************************************************************/ | 281 | ****************************************************************************/ |
282 | static void __init kirkwood_xor0_init(void) | 282 | void __init kirkwood_xor0_init(void) |
283 | { | 283 | { |
284 | kirkwood_clk_ctrl |= CGC_XOR0; | 284 | kirkwood_clk_ctrl |= CGC_XOR0; |
285 | 285 | ||
@@ -291,7 +291,7 @@ static void __init kirkwood_xor0_init(void) | |||
291 | /***************************************************************************** | 291 | /***************************************************************************** |
292 | * XOR1 | 292 | * XOR1 |
293 | ****************************************************************************/ | 293 | ****************************************************************************/ |
294 | static void __init kirkwood_xor1_init(void) | 294 | void __init kirkwood_xor1_init(void) |
295 | { | 295 | { |
296 | kirkwood_clk_ctrl |= CGC_XOR1; | 296 | kirkwood_clk_ctrl |= CGC_XOR1; |
297 | 297 | ||
@@ -303,7 +303,7 @@ static void __init kirkwood_xor1_init(void) | |||
303 | /***************************************************************************** | 303 | /***************************************************************************** |
304 | * Watchdog | 304 | * Watchdog |
305 | ****************************************************************************/ | 305 | ****************************************************************************/ |
306 | static void __init kirkwood_wdt_init(void) | 306 | void __init kirkwood_wdt_init(void) |
307 | { | 307 | { |
308 | orion_wdt_init(kirkwood_tclk); | 308 | orion_wdt_init(kirkwood_tclk); |
309 | } | 309 | } |
@@ -392,7 +392,7 @@ void __init kirkwood_audio_init(void) | |||
392 | /* | 392 | /* |
393 | * Identify device ID and revision. | 393 | * Identify device ID and revision. |
394 | */ | 394 | */ |
395 | static char * __init kirkwood_id(void) | 395 | char * __init kirkwood_id(void) |
396 | { | 396 | { |
397 | u32 dev, rev; | 397 | u32 dev, rev; |
398 | 398 | ||
@@ -435,7 +435,7 @@ static char * __init kirkwood_id(void) | |||
435 | } | 435 | } |
436 | } | 436 | } |
437 | 437 | ||
438 | static void __init kirkwood_l2_init(void) | 438 | void __init kirkwood_l2_init(void) |
439 | { | 439 | { |
440 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH | 440 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH |
441 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); | 441 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); |
@@ -450,7 +450,6 @@ void __init kirkwood_init(void) | |||
450 | { | 450 | { |
451 | printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n", | 451 | printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n", |
452 | kirkwood_id(), kirkwood_tclk); | 452 | kirkwood_id(), kirkwood_tclk); |
453 | kirkwood_i2s_data.tclk = kirkwood_tclk; | ||
454 | 453 | ||
455 | /* | 454 | /* |
456 | * Disable propagation of mbus errors to the CPU local bus, | 455 | * Disable propagation of mbus errors to the CPU local bus, |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 9071a397136d..fa8e7689c436 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -51,6 +51,21 @@ void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev | |||
51 | void kirkwood_audio_init(void); | 51 | void kirkwood_audio_init(void); |
52 | void kirkwood_restart(char, const char *); | 52 | void kirkwood_restart(char, const char *); |
53 | 53 | ||
54 | /* board init functions for boards not fully converted to fdt */ | ||
55 | #ifdef CONFIG_MACH_DREAMPLUG_DT | ||
56 | void dreamplug_init(void); | ||
57 | #else | ||
58 | static inline void dreamplug_init(void) {}; | ||
59 | #endif | ||
60 | |||
61 | /* early init functions not converted to fdt yet */ | ||
62 | char *kirkwood_id(void); | ||
63 | void kirkwood_l2_init(void); | ||
64 | void kirkwood_wdt_init(void); | ||
65 | void kirkwood_xor0_init(void); | ||
66 | void kirkwood_xor1_init(void); | ||
67 | void kirkwood_crypto_init(void); | ||
68 | |||
54 | extern int kirkwood_tclk; | 69 | extern int kirkwood_tclk; |
55 | extern struct sys_timer kirkwood_timer; | 70 | extern struct sys_timer kirkwood_timer; |
56 | 71 | ||
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c index 37dfcd5bd2ad..ec783a3070ae 100644 --- a/arch/arm/mach-ks8695/time.c +++ b/arch/arm/mach-ks8695/time.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | 28 | ||
29 | #include <asm/mach/time.h> | 29 | #include <asm/mach/time.h> |
30 | #include <asm/system_misc.h> | ||
30 | 31 | ||
31 | #include <mach/regs-timer.h> | 32 | #include <mach/regs-timer.h> |
32 | #include <mach/regs-irq.h> | 33 | #include <mach/regs-irq.h> |
diff --git a/arch/arm/mach-lpc32xx/Kconfig b/arch/arm/mach-lpc32xx/Kconfig index fde663508696..75946ac89ee9 100644 --- a/arch/arm/mach-lpc32xx/Kconfig +++ b/arch/arm/mach-lpc32xx/Kconfig | |||
@@ -29,5 +29,30 @@ config ARCH_LPC32XX_UART6_SELECT | |||
29 | 29 | ||
30 | endmenu | 30 | endmenu |
31 | 31 | ||
32 | menu "LPC32XX chip components" | ||
33 | |||
34 | config ARCH_LPC32XX_IRAM_FOR_NET | ||
35 | bool "Use IRAM for network buffers" | ||
36 | default y | ||
37 | help | ||
38 | Say Y here to use the LPC internal fast IRAM (i.e. 256KB SRAM) as | ||
39 | network buffer. If the total combined required buffer sizes is | ||
40 | larger than the size of IRAM, then SDRAM will be used instead. | ||
41 | |||
42 | This can be enabled safely if the IRAM is not intended for other | ||
43 | uses. | ||
44 | |||
45 | config ARCH_LPC32XX_MII_SUPPORT | ||
46 | bool "Check to enable MII support or leave disabled for RMII support" | ||
47 | help | ||
48 | Say Y here to enable MII support, or N for RMII support. Regardless of | ||
49 | which support is selected, the ethernet interface driver needs to be | ||
50 | selected in the device driver networking section. | ||
51 | |||
52 | The PHY3250 reference board uses RMII, so users of this board should | ||
53 | say N. | ||
54 | |||
55 | endmenu | ||
56 | |||
32 | endif | 57 | endif |
33 | 58 | ||
diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index f55c772d1816..b7ef51119d37 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c | |||
@@ -87,6 +87,7 @@ | |||
87 | #include <linux/list.h> | 87 | #include <linux/list.h> |
88 | #include <linux/errno.h> | 88 | #include <linux/errno.h> |
89 | #include <linux/device.h> | 89 | #include <linux/device.h> |
90 | #include <linux/delay.h> | ||
90 | #include <linux/err.h> | 91 | #include <linux/err.h> |
91 | #include <linux/clk.h> | 92 | #include <linux/clk.h> |
92 | #include <linux/amba/bus.h> | 93 | #include <linux/amba/bus.h> |
@@ -100,6 +101,8 @@ | |||
100 | 101 | ||
101 | static DEFINE_SPINLOCK(global_clkregs_lock); | 102 | static DEFINE_SPINLOCK(global_clkregs_lock); |
102 | 103 | ||
104 | static int usb_pll_enable, usb_pll_valid; | ||
105 | |||
103 | static struct clk clk_armpll; | 106 | static struct clk clk_armpll; |
104 | static struct clk clk_usbpll; | 107 | static struct clk clk_usbpll; |
105 | 108 | ||
@@ -384,30 +387,62 @@ static u32 local_clk_usbpll_setup(struct clk_pll_setup *pHCLKPllSetup) | |||
384 | static int local_usbpll_enable(struct clk *clk, int enable) | 387 | static int local_usbpll_enable(struct clk *clk, int enable) |
385 | { | 388 | { |
386 | u32 reg; | 389 | u32 reg; |
387 | int ret = -ENODEV; | 390 | int ret = 0; |
388 | unsigned long timeout = jiffies + msecs_to_jiffies(10); | 391 | unsigned long timeout = jiffies + msecs_to_jiffies(20); |
389 | 392 | ||
390 | reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); | 393 | reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); |
391 | 394 | ||
392 | if (enable == 0) { | 395 | __raw_writel(reg & ~(LPC32XX_CLKPWR_USBCTRL_CLK_EN2 | |
393 | reg &= ~(LPC32XX_CLKPWR_USBCTRL_CLK_EN1 | | 396 | LPC32XX_CLKPWR_USBCTRL_PLL_PWRUP), |
394 | LPC32XX_CLKPWR_USBCTRL_CLK_EN2); | 397 | LPC32XX_CLKPWR_USB_CTRL); |
395 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); | 398 | __raw_writel(reg & ~LPC32XX_CLKPWR_USBCTRL_CLK_EN1, |
396 | } else if (reg & LPC32XX_CLKPWR_USBCTRL_PLL_PWRUP) { | 399 | LPC32XX_CLKPWR_USB_CTRL); |
400 | |||
401 | if (enable && usb_pll_valid && usb_pll_enable) { | ||
402 | ret = -ENODEV; | ||
403 | /* | ||
404 | * If the PLL rate has been previously set, then the rate | ||
405 | * in the PLL register is valid and can be enabled here. | ||
406 | * Otherwise, it needs to be enabled as part of setrate. | ||
407 | */ | ||
408 | |||
409 | /* | ||
410 | * Gate clock into PLL | ||
411 | */ | ||
397 | reg |= LPC32XX_CLKPWR_USBCTRL_CLK_EN1; | 412 | reg |= LPC32XX_CLKPWR_USBCTRL_CLK_EN1; |
398 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); | 413 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); |
399 | 414 | ||
400 | /* Wait for PLL lock */ | 415 | /* |
416 | * Enable PLL | ||
417 | */ | ||
418 | reg |= LPC32XX_CLKPWR_USBCTRL_PLL_PWRUP; | ||
419 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); | ||
420 | |||
421 | /* | ||
422 | * Wait for PLL to lock | ||
423 | */ | ||
401 | while (time_before(jiffies, timeout) && (ret == -ENODEV)) { | 424 | while (time_before(jiffies, timeout) && (ret == -ENODEV)) { |
402 | reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); | 425 | reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); |
403 | if (reg & LPC32XX_CLKPWR_USBCTRL_PLL_STS) | 426 | if (reg & LPC32XX_CLKPWR_USBCTRL_PLL_STS) |
404 | ret = 0; | 427 | ret = 0; |
428 | else | ||
429 | udelay(10); | ||
405 | } | 430 | } |
406 | 431 | ||
432 | /* | ||
433 | * Gate clock from PLL if PLL is locked | ||
434 | */ | ||
407 | if (ret == 0) { | 435 | if (ret == 0) { |
408 | reg |= LPC32XX_CLKPWR_USBCTRL_CLK_EN2; | 436 | __raw_writel(reg | LPC32XX_CLKPWR_USBCTRL_CLK_EN2, |
409 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); | 437 | LPC32XX_CLKPWR_USB_CTRL); |
438 | } else { | ||
439 | __raw_writel(reg & ~(LPC32XX_CLKPWR_USBCTRL_CLK_EN1 | | ||
440 | LPC32XX_CLKPWR_USBCTRL_PLL_PWRUP), | ||
441 | LPC32XX_CLKPWR_USB_CTRL); | ||
410 | } | 442 | } |
443 | } else if ((enable == 0) && usb_pll_valid && usb_pll_enable) { | ||
444 | usb_pll_valid = 0; | ||
445 | usb_pll_enable = 0; | ||
411 | } | 446 | } |
412 | 447 | ||
413 | return ret; | 448 | return ret; |
@@ -425,7 +460,7 @@ static unsigned long local_usbpll_round_rate(struct clk *clk, | |||
425 | */ | 460 | */ |
426 | rate = rate * 1000; | 461 | rate = rate * 1000; |
427 | 462 | ||
428 | clkin = clk->parent->rate; | 463 | clkin = clk->get_rate(clk); |
429 | usbdiv = (__raw_readl(LPC32XX_CLKPWR_USBCLK_PDIV) & | 464 | usbdiv = (__raw_readl(LPC32XX_CLKPWR_USBCLK_PDIV) & |
430 | LPC32XX_CLKPWR_USBPDIV_PLL_MASK) + 1; | 465 | LPC32XX_CLKPWR_USBPDIV_PLL_MASK) + 1; |
431 | clkin = clkin / usbdiv; | 466 | clkin = clkin / usbdiv; |
@@ -439,7 +474,8 @@ static unsigned long local_usbpll_round_rate(struct clk *clk, | |||
439 | 474 | ||
440 | static int local_usbpll_set_rate(struct clk *clk, unsigned long rate) | 475 | static int local_usbpll_set_rate(struct clk *clk, unsigned long rate) |
441 | { | 476 | { |
442 | u32 clkin, reg, usbdiv; | 477 | int ret = -ENODEV; |
478 | u32 clkin, usbdiv; | ||
443 | struct clk_pll_setup pllsetup; | 479 | struct clk_pll_setup pllsetup; |
444 | 480 | ||
445 | /* | 481 | /* |
@@ -448,7 +484,7 @@ static int local_usbpll_set_rate(struct clk *clk, unsigned long rate) | |||
448 | */ | 484 | */ |
449 | rate = rate * 1000; | 485 | rate = rate * 1000; |
450 | 486 | ||
451 | clkin = clk->get_rate(clk); | 487 | clkin = clk->get_rate(clk->parent); |
452 | usbdiv = (__raw_readl(LPC32XX_CLKPWR_USBCLK_PDIV) & | 488 | usbdiv = (__raw_readl(LPC32XX_CLKPWR_USBCLK_PDIV) & |
453 | LPC32XX_CLKPWR_USBPDIV_PLL_MASK) + 1; | 489 | LPC32XX_CLKPWR_USBPDIV_PLL_MASK) + 1; |
454 | clkin = clkin / usbdiv; | 490 | clkin = clkin / usbdiv; |
@@ -457,22 +493,25 @@ static int local_usbpll_set_rate(struct clk *clk, unsigned long rate) | |||
457 | if (local_clk_find_pll_cfg(clkin, rate, &pllsetup) == 0) | 493 | if (local_clk_find_pll_cfg(clkin, rate, &pllsetup) == 0) |
458 | return -EINVAL; | 494 | return -EINVAL; |
459 | 495 | ||
496 | /* | ||
497 | * Disable PLL clocks during PLL change | ||
498 | */ | ||
460 | local_usbpll_enable(clk, 0); | 499 | local_usbpll_enable(clk, 0); |
461 | 500 | pllsetup.analog_on = 0; | |
462 | reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); | ||
463 | reg |= LPC32XX_CLKPWR_USBCTRL_CLK_EN1; | ||
464 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); | ||
465 | |||
466 | pllsetup.analog_on = 1; | ||
467 | local_clk_usbpll_setup(&pllsetup); | 501 | local_clk_usbpll_setup(&pllsetup); |
468 | 502 | ||
469 | clk->rate = clk_check_pll_setup(clkin, &pllsetup); | 503 | /* |
504 | * Start USB PLL and check PLL status | ||
505 | */ | ||
506 | |||
507 | usb_pll_valid = 1; | ||
508 | usb_pll_enable = 1; | ||
470 | 509 | ||
471 | reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL); | 510 | ret = local_usbpll_enable(clk, 1); |
472 | reg |= LPC32XX_CLKPWR_USBCTRL_CLK_EN2; | 511 | if (ret >= 0) |
473 | __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL); | 512 | clk->rate = clk_check_pll_setup(clkin, &pllsetup); |
474 | 513 | ||
475 | return 0; | 514 | return ret; |
476 | } | 515 | } |
477 | 516 | ||
478 | static struct clk clk_usbpll = { | 517 | static struct clk clk_usbpll = { |
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index 6c76bb36559b..bbbf063a74c2 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c | |||
@@ -160,6 +160,53 @@ struct platform_device lpc32xx_adc_device = { | |||
160 | }; | 160 | }; |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * USB support | ||
164 | */ | ||
165 | /* The dmamask must be set for OHCI to work */ | ||
166 | static u64 ohci_dmamask = ~(u32) 0; | ||
167 | static struct resource ohci_resources[] = { | ||
168 | { | ||
169 | .start = IO_ADDRESS(LPC32XX_USB_BASE), | ||
170 | .end = IO_ADDRESS(LPC32XX_USB_BASE + 0x100 - 1), | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }, { | ||
173 | .start = IRQ_LPC32XX_USB_HOST, | ||
174 | .flags = IORESOURCE_IRQ, | ||
175 | }, | ||
176 | }; | ||
177 | struct platform_device lpc32xx_ohci_device = { | ||
178 | .name = "usb-ohci", | ||
179 | .id = -1, | ||
180 | .dev = { | ||
181 | .dma_mask = &ohci_dmamask, | ||
182 | .coherent_dma_mask = 0xFFFFFFFF, | ||
183 | }, | ||
184 | .num_resources = ARRAY_SIZE(ohci_resources), | ||
185 | .resource = ohci_resources, | ||
186 | }; | ||
187 | |||
188 | /* | ||
189 | * Network Support | ||
190 | */ | ||
191 | static struct resource net_resources[] = { | ||
192 | [0] = DEFINE_RES_MEM(LPC32XX_ETHERNET_BASE, SZ_4K), | ||
193 | [1] = DEFINE_RES_MEM(LPC32XX_IRAM_BASE, SZ_128K), | ||
194 | [2] = DEFINE_RES_IRQ(IRQ_LPC32XX_ETHERNET), | ||
195 | }; | ||
196 | |||
197 | static u64 lpc32xx_mac_dma_mask = 0xffffffffUL; | ||
198 | struct platform_device lpc32xx_net_device = { | ||
199 | .name = "lpc-eth", | ||
200 | .id = 0, | ||
201 | .dev = { | ||
202 | .dma_mask = &lpc32xx_mac_dma_mask, | ||
203 | .coherent_dma_mask = 0xffffffffUL, | ||
204 | }, | ||
205 | .num_resources = ARRAY_SIZE(net_resources), | ||
206 | .resource = net_resources, | ||
207 | }; | ||
208 | |||
209 | /* | ||
163 | * Returns the unique ID for the device | 210 | * Returns the unique ID for the device |
164 | */ | 211 | */ |
165 | void lpc32xx_get_uid(u32 devid[4]) | 212 | void lpc32xx_get_uid(u32 devid[4]) |
diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h index 68f2e46d98ad..68e45e8c9486 100644 --- a/arch/arm/mach-lpc32xx/common.h +++ b/arch/arm/mach-lpc32xx/common.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef __LPC32XX_COMMON_H | 19 | #ifndef __LPC32XX_COMMON_H |
20 | #define __LPC32XX_COMMON_H | 20 | #define __LPC32XX_COMMON_H |
21 | 21 | ||
22 | #include <mach/board.h> | ||
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | 24 | ||
24 | /* | 25 | /* |
@@ -31,6 +32,8 @@ extern struct platform_device lpc32xx_i2c2_device; | |||
31 | extern struct platform_device lpc32xx_tsc_device; | 32 | extern struct platform_device lpc32xx_tsc_device; |
32 | extern struct platform_device lpc32xx_adc_device; | 33 | extern struct platform_device lpc32xx_adc_device; |
33 | extern struct platform_device lpc32xx_rtc_device; | 34 | extern struct platform_device lpc32xx_rtc_device; |
35 | extern struct platform_device lpc32xx_ohci_device; | ||
36 | extern struct platform_device lpc32xx_net_device; | ||
34 | 37 | ||
35 | /* | 38 | /* |
36 | * Other arch specific structures and functions | 39 | * Other arch specific structures and functions |
@@ -67,7 +70,6 @@ extern u32 clk_get_pclk_div(void); | |||
67 | extern void lpc32xx_get_uid(u32 devid[4]); | 70 | extern void lpc32xx_get_uid(u32 devid[4]); |
68 | 71 | ||
69 | extern u32 lpc32xx_return_iram_size(void); | 72 | extern u32 lpc32xx_return_iram_size(void); |
70 | |||
71 | /* | 73 | /* |
72 | * Pointers used for sizing and copying suspend function data | 74 | * Pointers used for sizing and copying suspend function data |
73 | */ | 75 | */ |
diff --git a/arch/arm/mach-lpc32xx/include/mach/board.h b/arch/arm/mach-lpc32xx/include/mach/board.h new file mode 100644 index 000000000000..52531ca7bd1d --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/board.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arm/arch/mach-lpc32xx/include/mach/board.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_BOARD_H | ||
20 | #define __ASM_ARCH_BOARD_H | ||
21 | |||
22 | extern u32 lpc32xx_return_iram_size(void); | ||
23 | |||
24 | #endif /* __ASM_ARCH_BOARD_H */ | ||
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index c74de01ab5b6..d080cb1123dd 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -150,6 +150,10 @@ static const struct lpc32xx_event_info lpc32xx_events[NR_IRQS] = { | |||
150 | .event_group = &lpc32xx_event_int_regs, | 150 | .event_group = &lpc32xx_event_int_regs, |
151 | .mask = LPC32XX_CLKPWR_INTSRC_KEY_BIT, | 151 | .mask = LPC32XX_CLKPWR_INTSRC_KEY_BIT, |
152 | }, | 152 | }, |
153 | [IRQ_LPC32XX_ETHERNET] = { | ||
154 | .event_group = &lpc32xx_event_int_regs, | ||
155 | .mask = LPC32XX_CLKPWR_INTSRC_MAC_BIT, | ||
156 | }, | ||
153 | [IRQ_LPC32XX_USB_OTG_ATX] = { | 157 | [IRQ_LPC32XX_USB_OTG_ATX] = { |
154 | .event_group = &lpc32xx_event_int_regs, | 158 | .event_group = &lpc32xx_event_int_regs, |
155 | .mask = LPC32XX_CLKPWR_INTSRC_USBATXINT_BIT, | 159 | .mask = LPC32XX_CLKPWR_INTSRC_USBATXINT_BIT, |
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index 0d79a3f8a5e0..7f7401ec7487 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
39 | #include <mach/platform.h> | 39 | #include <mach/platform.h> |
40 | #include <mach/board.h> | ||
40 | #include <mach/gpio-lpc32xx.h> | 41 | #include <mach/gpio-lpc32xx.h> |
41 | #include "common.h" | 42 | #include "common.h" |
42 | 43 | ||
@@ -255,6 +256,8 @@ static struct platform_device *phy3250_devs[] __initdata = { | |||
255 | &lpc32xx_watchdog_device, | 256 | &lpc32xx_watchdog_device, |
256 | &lpc32xx_gpio_led_device, | 257 | &lpc32xx_gpio_led_device, |
257 | &lpc32xx_adc_device, | 258 | &lpc32xx_adc_device, |
259 | &lpc32xx_ohci_device, | ||
260 | &lpc32xx_net_device, | ||
258 | }; | 261 | }; |
259 | 262 | ||
260 | static struct amba_device *amba_devs[] __initdata = { | 263 | static struct amba_device *amba_devs[] __initdata = { |
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c index 062b5b93c50e..9292b7966e3b 100644 --- a/arch/arm/mach-mmp/common.c +++ b/arch/arm/mach-mmp/common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | #include <asm/system_misc.h> | ||
17 | #include <mach/addr-map.h> | 18 | #include <mach/addr-map.h> |
18 | #include <mach/cputype.h> | 19 | #include <mach/cputype.h> |
19 | 20 | ||
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index f7d59c03fc67..b24d2c32cba9 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | 17 | ||
18 | #include <asm/mach/time.h> | 18 | #include <asm/mach/time.h> |
19 | #include <asm/system_misc.h> | ||
19 | #include <mach/addr-map.h> | 20 | #include <mach/addr-map.h> |
20 | #include <mach/cputype.h> | 21 | #include <mach/cputype.h> |
21 | #include <mach/regs-apbc.h> | 22 | #include <mach/regs-apbc.h> |
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index 97b8191d9d38..4a8ea0d40b6f 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <asm/mach/flash.h> | 29 | #include <asm/mach/flash.h> |
30 | #include <asm/system.h> | ||
31 | #include <mach/system.h> | 30 | #include <mach/system.h> |
32 | #include <mach/vreg.h> | 31 | #include <mach/vreg.h> |
33 | #include <mach/board.h> | 32 | #include <mach/board.h> |
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c index 7aa5ac5d78bf..80ac1fca8a00 100644 --- a/arch/arm/mach-mxs/system.c +++ b/arch/arm/mach-mxs/system.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | 26 | ||
27 | #include <asm/proc-fns.h> | 27 | #include <asm/proc-fns.h> |
28 | #include <asm/system.h> | 28 | #include <asm/system_misc.h> |
29 | 29 | ||
30 | #include <mach/mxs.h> | 30 | #include <mach/mxs.h> |
31 | #include <mach/common.h> | 31 | #include <mach/common.h> |
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index f24c1e2c5044..2b28e1da14b0 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <asm/system_info.h> | ||
18 | 19 | ||
19 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
20 | 21 | ||
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index 4b818eb9f911..f6b14a14a957 100644 --- a/arch/arm/mach-omap1/leds-h2p2-debug.c +++ b/arch/arm/mach-omap1/leds-h2p2-debug.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include <asm/leds.h> | 19 | #include <asm/leds.h> |
20 | #include <asm/system.h> | ||
21 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
22 | 21 | ||
23 | #include <plat/fpga.h> | 22 | #include <plat/fpga.h> |
diff --git a/arch/arm/mach-omap1/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c index 9b99c2894623..3a066ee8d02c 100644 --- a/arch/arm/mach-omap1/leds-innovator.c +++ b/arch/arm/mach-omap1/leds-innovator.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <mach/hardware.h> | 6 | #include <mach/hardware.h> |
7 | #include <asm/leds.h> | 7 | #include <asm/leds.h> |
8 | #include <asm/system.h> | ||
9 | 8 | ||
10 | #include "leds.h" | 9 | #include "leds.h" |
11 | 10 | ||
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c index da09f4364979..936ed426b84f 100644 --- a/arch/arm/mach-omap1/leds-osk.c +++ b/arch/arm/mach-omap1/leds-osk.c | |||
@@ -8,7 +8,6 @@ | |||
8 | 8 | ||
9 | #include <mach/hardware.h> | 9 | #include <mach/hardware.h> |
10 | #include <asm/leds.h> | 10 | #include <asm/leds.h> |
11 | #include <asm/system.h> | ||
12 | 11 | ||
13 | #include "leds.h" | 12 | #include "leds.h" |
14 | 13 | ||
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 5fdef7a34828..087dba0df47e 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
29 | 29 | ||
30 | #include <asm/system.h> | ||
31 | 30 | ||
32 | #include <plat/mux.h> | 31 | #include <plat/mux.h> |
33 | 32 | ||
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 2fae6a2740f1..4d8dd9a1b04c 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/clockchips.h> | 44 | #include <linux/clockchips.h> |
45 | #include <linux/io.h> | 45 | #include <linux/io.h> |
46 | 46 | ||
47 | #include <asm/system.h> | ||
48 | #include <asm/leds.h> | 47 | #include <asm/leds.h> |
49 | #include <asm/irq.h> | 48 | #include <asm/irq.h> |
50 | #include <asm/sched_clock.h> | 49 | #include <asm/sched_clock.h> |
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index a2e6d0709df2..325b9a0aa4a0 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/clockchips.h> | 46 | #include <linux/clockchips.h> |
47 | #include <linux/io.h> | 47 | #include <linux/io.h> |
48 | 48 | ||
49 | #include <asm/system.h> | ||
50 | #include <asm/leds.h> | 49 | #include <asm/leds.h> |
51 | #include <asm/irq.h> | 50 | #include <asm/irq.h> |
52 | #include <asm/mach/irq.h> | 51 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 30768c2f53fd..37dcb1bc025e 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -490,21 +490,22 @@ static struct platform_device omap_vwlan_device = { | |||
490 | 490 | ||
491 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 491 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
492 | { | 492 | { |
493 | int ret = 0; | 493 | int irq = 0; |
494 | struct platform_device *pdev = container_of(dev, | 494 | struct platform_device *pdev = container_of(dev, |
495 | struct platform_device, dev); | 495 | struct platform_device, dev); |
496 | struct omap_mmc_platform_data *pdata = dev->platform_data; | 496 | struct omap_mmc_platform_data *pdata = dev->platform_data; |
497 | 497 | ||
498 | /* Setting MMC1 Card detect Irq */ | 498 | /* Setting MMC1 Card detect Irq */ |
499 | if (pdev->id == 0) { | 499 | if (pdev->id == 0) { |
500 | ret = twl6030_mmc_card_detect_config(); | 500 | irq = twl6030_mmc_card_detect_config(); |
501 | if (ret) | 501 | if (irq < 0) { |
502 | pr_err("Failed configuring MMC1 card detect\n"); | 502 | pr_err("Failed configuring MMC1 card detect\n"); |
503 | pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + | 503 | return irq; |
504 | MMCDETECT_INTR_OFFSET; | 504 | } |
505 | pdata->slots[0].card_detect_irq = irq; | ||
505 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; | 506 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; |
506 | } | 507 | } |
507 | return ret; | 508 | return 0; |
508 | } | 509 | } |
509 | 510 | ||
510 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) | 511 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 8842e04aef01..ae2251fa4a69 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/mach/arch.h> | 42 | #include <asm/mach/arch.h> |
43 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
44 | #include <asm/mach/flash.h> | 44 | #include <asm/mach/flash.h> |
45 | #include <asm/system_info.h> | ||
45 | 46 | ||
46 | #include <plat/board.h> | 47 | #include <plat/board.h> |
47 | #include "common.h" | 48 | #include "common.h" |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e9071a57c37b..8bf8e99c358e 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -238,7 +238,7 @@ struct wl12xx_platform_data omap_panda_wlan_data __initdata = { | |||
238 | 238 | ||
239 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 239 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
240 | { | 240 | { |
241 | int ret = 0; | 241 | int irq = 0; |
242 | struct platform_device *pdev = container_of(dev, | 242 | struct platform_device *pdev = container_of(dev, |
243 | struct platform_device, dev); | 243 | struct platform_device, dev); |
244 | struct omap_mmc_platform_data *pdata = dev->platform_data; | 244 | struct omap_mmc_platform_data *pdata = dev->platform_data; |
@@ -249,14 +249,15 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) | |||
249 | } | 249 | } |
250 | /* Setting MMC1 Card detect Irq */ | 250 | /* Setting MMC1 Card detect Irq */ |
251 | if (pdev->id == 0) { | 251 | if (pdev->id == 0) { |
252 | ret = twl6030_mmc_card_detect_config(); | 252 | irq = twl6030_mmc_card_detect_config(); |
253 | if (ret) | 253 | if (irq < 0) { |
254 | dev_err(dev, "%s: Error card detect config(%d)\n", | 254 | dev_err(dev, "%s: Error card detect config(%d)\n", |
255 | __func__, ret); | 255 | __func__, irq); |
256 | else | 256 | return irq; |
257 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; | 257 | } |
258 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; | ||
258 | } | 259 | } |
259 | return ret; | 260 | return 0; |
260 | } | 261 | } |
261 | 262 | ||
262 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) | 263 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 16aebfb8a7ec..f120997309af 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | #include <linux/mmc/host.h> | 26 | #include <linux/mmc/host.h> |
27 | #include <linux/power/isp1704_charger.h> | 27 | #include <linux/power/isp1704_charger.h> |
28 | #include <asm/system_info.h> | ||
28 | 29 | ||
29 | #include <plat/mcspi.h> | 30 | #include <plat/mcspi.h> |
30 | #include <plat/board.h> | 31 | #include <plat/board.h> |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index f26b2faa1694..65c33911341f 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | 37 | ||
38 | #include <asm/system.h> | ||
39 | 38 | ||
40 | #include <plat/omap_hwmod.h> | 39 | #include <plat/omap_hwmod.h> |
41 | 40 | ||
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 63ab686834c1..13670aa84e58 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <asm/cacheflush.h> | 46 | #include <asm/cacheflush.h> |
47 | #include <asm/tlbflush.h> | 47 | #include <asm/tlbflush.h> |
48 | #include <asm/smp_scu.h> | 48 | #include <asm/smp_scu.h> |
49 | #include <asm/system.h> | ||
50 | #include <asm/pgalloc.h> | 49 | #include <asm/pgalloc.h> |
51 | #include <asm/suspend.h> | 50 | #include <asm/suspend.h> |
52 | #include <asm/hardware/cache-l2x0.h> | 51 | #include <asm/hardware/cache-l2x0.h> |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 5ca45ca76946..95442b69ae27 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | #include <asm/mach/irq.h> | 34 | #include <asm/mach/irq.h> |
35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
36 | #include <asm/system_misc.h> | ||
36 | 37 | ||
37 | #include <plat/clock.h> | 38 | #include <plat/clock.h> |
38 | #include <plat/sram.h> | 39 | #include <plat/sram.h> |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 027a537d72b2..238defc6f6df 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <trace/events/power.h> | 31 | #include <trace/events/power.h> |
32 | 32 | ||
33 | #include <asm/suspend.h> | 33 | #include <asm/suspend.h> |
34 | #include <asm/system_misc.h> | ||
34 | 35 | ||
35 | #include <plat/sram.h> | 36 | #include <plat/sram.h> |
36 | #include "clockdomain.h" | 37 | #include "clockdomain.h" |
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 91e0b1c9b76c..9ccaadc2cf07 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <asm/system_misc.h> | ||
19 | 20 | ||
20 | #include "common.h" | 21 | #include "common.h" |
21 | #include "clockdomain.h" | 22 | #include "clockdomain.h" |
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S index abd283400490..9f6b83d1b193 100644 --- a/arch/arm/mach-omap2/sleep44xx.S +++ b/arch/arm/mach-omap2/sleep44xx.S | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <asm/system.h> | ||
14 | #include <asm/smp_scu.h> | 13 | #include <asm/smp_scu.h> |
15 | #include <asm/memory.h> | 14 | #include <asm/memory.h> |
16 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 5dad38ec00ea..24481666d2cd 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <net/dsa.h> | 21 | #include <net/dsa.h> |
22 | #include <asm/page.h> | 22 | #include <asm/page.h> |
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/system_misc.h> | ||
24 | #include <asm/timex.h> | 25 | #include <asm/timex.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 91b0f4788597..c3ed15b8ea25 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/pci.h> | 34 | #include <asm/mach/pci.h> |
35 | #include <asm/system_info.h> | ||
35 | #include <mach/orion5x.h> | 36 | #include <mach/orion5x.h> |
36 | #include "common.h" | 37 | #include "common.h" |
37 | #include "mpp.h" | 38 | #include "mpp.h" |
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c index 527213169db0..0c9e413b5805 100644 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ b/arch/arm/mach-orion5x/ls-chl-setup.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/system.h> | ||
26 | #include <mach/orion5x.h> | 25 | #include <mach/orion5x.h> |
27 | #include "common.h" | 26 | #include "common.h" |
28 | #include "mpp.h" | 27 | #include "mpp.h" |
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index 9a8697b97dd7..c1b5d8a58037 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/system.h> | ||
25 | #include <mach/orion5x.h> | 24 | #include <mach/orion5x.h> |
26 | #include "common.h" | 25 | #include "common.h" |
27 | #include "mpp.h" | 26 | #include "mpp.h" |
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c index 09c73659f467..949eaa8f12e3 100644 --- a/arch/arm/mach-orion5x/lsmini-setup.c +++ b/arch/arm/mach-orion5x/lsmini-setup.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/system.h> | ||
25 | #include <mach/orion5x.h> | 24 | #include <mach/orion5x.h> |
26 | #include "common.h" | 25 | #include "common.h" |
27 | #include "mpp.h" | 26 | #include "mpp.h" |
diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c index 4cfb40b2ec19..be4c92858509 100644 --- a/arch/arm/mach-pnx4008/core.c +++ b/arch/arm/mach-pnx4008/core.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/page.h> | 34 | #include <asm/page.h> |
35 | #include <asm/system.h> | 35 | #include <asm/system_misc.h> |
36 | 36 | ||
37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index 7fa4bf2e2125..a4739e9fb2fb 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/gfp.h> | 25 | #include <linux/gfp.h> |
26 | 26 | ||
27 | #include <asm/system.h> | ||
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
29 | #include <mach/dma.h> | 28 | #include <mach/dma.h> |
30 | #include <asm/dma-mapping.h> | 29 | #include <asm/dma-mapping.h> |
diff --git a/arch/arm/mach-pnx4008/irq.c b/arch/arm/mach-pnx4008/irq.c index 7608c7a288cf..41e4201972d5 100644 --- a/arch/arm/mach-pnx4008/irq.c +++ b/arch/arm/mach-pnx4008/irq.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
29 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #include <asm/system.h> | ||
32 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/irq.h> | 32 | #include <asm/mach/irq.h> |
34 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index 0c8aad4bb0dc..0cfe8af3d3be 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | 26 | ||
27 | #include <asm/system.h> | ||
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
29 | #include <asm/leds.h> | 28 | #include <asm/leds.h> |
30 | #include <asm/mach/time.h> | 29 | #include <asm/mach/time.h> |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 4b981b82d2a5..895ee8c45009 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
45 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
46 | #include <asm/setup.h> | 46 | #include <asm/setup.h> |
47 | #include <asm/system_info.h> | ||
47 | 48 | ||
48 | #include <mach/pxa300.h> | 49 | #include <mach/pxa300.h> |
49 | #include <mach/pxa27x-udc.h> | 50 | #include <mach/pxa27x-udc.h> |
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 2b8ca0de8a3d..68cc75fac219 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | #include <asm/sizes.h> | 20 | #include <asm/sizes.h> |
21 | #include <asm/system_info.h> | ||
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/irq.h> | 23 | #include <asm/mach/irq.h> |
23 | #include <mach/pxa3xx-regs.h> | 24 | #include <mach/pxa3xx-regs.h> |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 11f1e735966e..de9d45e673fd 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
41 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/system.h> | ||
44 | 43 | ||
45 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
46 | #include <asm/mach/map.h> | 45 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 5432ecb15def..42254175fcf4 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <asm/system.h> | ||
26 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
27 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
28 | 27 | ||
diff --git a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c index 8b9c17142d5a..06b060025d11 100644 --- a/arch/arm/mach-pxa/leds-idp.c +++ b/arch/arm/mach-pxa/leds-idp.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <asm/leds.h> | 18 | #include <asm/leds.h> |
19 | #include <asm/system.h> | ||
20 | 19 | ||
21 | #include <mach/pxa25x.h> | 20 | #include <mach/pxa25x.h> |
22 | #include <mach/idp.h> | 21 | #include <mach/idp.h> |
diff --git a/arch/arm/mach-pxa/leds-lubbock.c b/arch/arm/mach-pxa/leds-lubbock.c index e26d5efe1969..0bd85c884a7c 100644 --- a/arch/arm/mach-pxa/leds-lubbock.c +++ b/arch/arm/mach-pxa/leds-lubbock.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <asm/leds.h> | 17 | #include <asm/leds.h> |
18 | #include <asm/system.h> | ||
19 | #include <mach/pxa25x.h> | 18 | #include <mach/pxa25x.h> |
20 | #include <mach/lubbock.h> | 19 | #include <mach/lubbock.h> |
21 | 20 | ||
diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c index db4af5eee8b2..4058ab340fe6 100644 --- a/arch/arm/mach-pxa/leds-mainstone.c +++ b/arch/arm/mach-pxa/leds-mainstone.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
16 | #include <asm/leds.h> | 16 | #include <asm/leds.h> |
17 | #include <asm/system.h> | ||
18 | 17 | ||
19 | #include <mach/pxa27x.h> | 18 | #include <mach/pxa27x.h> |
20 | #include <mach/mainstone.h> | 19 | #include <mach/mainstone.h> |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 5e26f3e93fdd..6f4785b347c2 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
37 | #include <asm/system_info.h> | ||
37 | 38 | ||
38 | #include <mach/pxa27x.h> | 39 | #include <mach/pxa27x.h> |
39 | #include <mach/magician.h> | 40 | #include <mach/magician.h> |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 744baee12c0c..89d98c832189 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
36 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
37 | #include <asm/system.h> | ||
38 | 37 | ||
39 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index c8497b00cdfe..b4528899ef08 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <asm/proc-fns.h> | 11 | #include <asm/proc-fns.h> |
12 | #include <asm/system_misc.h> | ||
12 | 13 | ||
13 | #include <mach/regs-ost.h> | 14 | #include <mach/regs-ost.h> |
14 | #include <mach/reset.h> | 15 | #include <mach/reset.h> |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 023d6ca789de..7a3d342a7732 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <asm/mach-types.h> | 57 | #include <asm/mach-types.h> |
58 | #include <asm/irq.h> | 58 | #include <asm/irq.h> |
59 | #include <asm/sizes.h> | 59 | #include <asm/sizes.h> |
60 | #include <asm/system_info.h> | ||
60 | 61 | ||
61 | #include <asm/mach/arch.h> | 62 | #include <asm/mach/arch.h> |
62 | #include <asm/mach/map.h> | 63 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index a4dd1c347050..af3d4f7646d7 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
34 | #include <asm/suspend.h> | 34 | #include <asm/suspend.h> |
35 | #include <asm/system_info.h> | ||
35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
37 | 38 | ||
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index acd329afc3ac..45868bb43cbd 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/clkdev.h> | 33 | #include <linux/clkdev.h> |
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | 35 | ||
36 | #include <asm/system.h> | ||
37 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
38 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
39 | #include <asm/leds.h> | 38 | #include <asm/leds.h> |
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index eb55f05bef3a..57d9efba2956 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/cp15.h> | ||
16 | #include <asm/smp_plat.h> | 17 | #include <asm/smp_plat.h> |
17 | 18 | ||
18 | extern volatile int pen_release; | 19 | extern volatile int pen_release; |
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index 731552d68adf..f3fa259ce01f 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
29 | #include <asm/domain.h> | 29 | #include <asm/domain.h> |
30 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
31 | #include <asm/system_misc.h> | ||
31 | 32 | ||
32 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index 061b6bb1a557..a3c5cb086ee2 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
33 | #include <asm/system_misc.h> | ||
33 | 34 | ||
34 | #include <plat/cpu-freq.h> | 35 | #include <plat/cpu-freq.h> |
35 | 36 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index c6eac9871093..d4bc7f960bbb 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <asm/proc-fns.h> | 32 | #include <asm/proc-fns.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/system_misc.h> | ||
34 | 35 | ||
35 | #include <plat/cpu-freq.h> | 36 | #include <plat/cpu-freq.h> |
36 | 37 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index 0e9a71c90ed7..7743fade50df 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
44 | #include <asm/proc-fns.h> | 44 | #include <asm/proc-fns.h> |
45 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
46 | #include <asm/system_misc.h> | ||
46 | 47 | ||
47 | #include <mach/regs-s3c2443-clock.h> | 48 | #include <mach/regs-s3c2443-clock.h> |
48 | 49 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index b7778a9dafaf..ab648ad8fa50 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | #include <asm/system_misc.h> | ||
32 | 33 | ||
33 | #include <mach/regs-s3c2443-clock.h> | 34 | #include <mach/regs-s3c2443-clock.h> |
34 | 35 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index d15852f642b7..6f74118f60c6 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | 25 | ||
26 | #include <asm/system_misc.h> | ||
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
28 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index bee7dcd4df7c..b313380342a5 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | #include <asm/hardware/vic.h> | 31 | #include <asm/hardware/vic.h> |
32 | #include <asm/system_misc.h> | ||
32 | 33 | ||
33 | #include <mach/map.h> | 34 | #include <mach/map.h> |
34 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index b6a67728cc88..0ace108c3e3d 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/mfd/wm831x/gpio.h> | 17 | #include <linux/mfd/wm831x/gpio.h> |
18 | #include <linux/mfd/wm8994/pdata.h> | 18 | #include <linux/mfd/wm8994/pdata.h> |
19 | 19 | ||
20 | #include <linux/regulator/machine.h> | ||
21 | |||
20 | #include <sound/wm5100.h> | 22 | #include <sound/wm5100.h> |
21 | #include <sound/wm8996.h> | 23 | #include <sound/wm8996.h> |
22 | #include <sound/wm8962.h> | 24 | #include <sound/wm8962.h> |
@@ -153,6 +155,14 @@ static const struct i2c_board_info wm1259_devs[] = { | |||
153 | }, | 155 | }, |
154 | }; | 156 | }; |
155 | 157 | ||
158 | static struct regulator_init_data wm8994_ldo1 = { | ||
159 | .supply_regulator = "WALLVDD", | ||
160 | }; | ||
161 | |||
162 | static struct regulator_init_data wm8994_ldo2 = { | ||
163 | .supply_regulator = "WALLVDD", | ||
164 | }; | ||
165 | |||
156 | static struct wm8994_pdata wm8994_pdata = { | 166 | static struct wm8994_pdata wm8994_pdata = { |
157 | .gpio_base = CODEC_GPIO_BASE, | 167 | .gpio_base = CODEC_GPIO_BASE, |
158 | .gpio_defaults = { | 168 | .gpio_defaults = { |
@@ -160,8 +170,8 @@ static struct wm8994_pdata wm8994_pdata = { | |||
160 | }, | 170 | }, |
161 | .irq_base = CODEC_IRQ_BASE, | 171 | .irq_base = CODEC_IRQ_BASE, |
162 | .ldo = { | 172 | .ldo = { |
163 | { .supply = "WALLVDD" }, | 173 | { .init_data = &wm8994_ldo1, }, |
164 | { .supply = "WALLVDD" }, | 174 | { .init_data = &wm8994_ldo2, }, |
165 | }, | 175 | }, |
166 | }; | 176 | }; |
167 | 177 | ||
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 9143f8b19962..6e6a0a9d6778 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/proc-fns.h> | 29 | #include <asm/proc-fns.h> |
30 | #include <asm/system_misc.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index ff71e2d467c6..621908658861 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/proc-fns.h> | 29 | #include <asm/proc-fns.h> |
30 | #include <asm/system_misc.h> | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 1d0f71b17a26..7c524b4e415d 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -23,10 +23,10 @@ | |||
23 | #include <video/sa1100fb.h> | 23 | #include <video/sa1100fb.h> |
24 | 24 | ||
25 | #include <asm/div64.h> | 25 | #include <asm/div64.h> |
26 | #include <asm/system.h> | ||
27 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
28 | #include <asm/mach/flash.h> | 27 | #include <asm/mach/flash.h> |
29 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/system_misc.h> | ||
30 | 30 | ||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/irqs.h> | 32 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-sa1100/leds-assabet.c b/arch/arm/mach-sa1100/leds-assabet.c index 64e9b4b11b54..3699176bca94 100644 --- a/arch/arm/mach-sa1100/leds-assabet.c +++ b/arch/arm/mach-sa1100/leds-assabet.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <asm/leds.h> | 15 | #include <asm/leds.h> |
16 | #include <asm/system.h> | ||
17 | #include <mach/assabet.h> | 16 | #include <mach/assabet.h> |
18 | 17 | ||
19 | #include "leds.h" | 18 | #include "leds.h" |
diff --git a/arch/arm/mach-sa1100/leds-badge4.c b/arch/arm/mach-sa1100/leds-badge4.c index cf1e38458b81..f99fac3eedb6 100644 --- a/arch/arm/mach-sa1100/leds-badge4.c +++ b/arch/arm/mach-sa1100/leds-badge4.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
16 | #include <asm/leds.h> | 16 | #include <asm/leds.h> |
17 | #include <asm/system.h> | ||
18 | 17 | ||
19 | #include "leds.h" | 18 | #include "leds.h" |
20 | 19 | ||
diff --git a/arch/arm/mach-sa1100/leds-cerf.c b/arch/arm/mach-sa1100/leds-cerf.c index 259b48e0be89..040540fb7d8a 100644 --- a/arch/arm/mach-sa1100/leds-cerf.c +++ b/arch/arm/mach-sa1100/leds-cerf.c | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #include <mach/hardware.h> | 8 | #include <mach/hardware.h> |
9 | #include <asm/leds.h> | 9 | #include <asm/leds.h> |
10 | #include <asm/system.h> | ||
11 | 10 | ||
12 | #include "leds.h" | 11 | #include "leds.h" |
13 | 12 | ||
diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c index 2bce137462e4..6a2352436e62 100644 --- a/arch/arm/mach-sa1100/leds-hackkit.c +++ b/arch/arm/mach-sa1100/leds-hackkit.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <asm/leds.h> | 15 | #include <asm/leds.h> |
16 | #include <asm/system.h> | ||
17 | 16 | ||
18 | #include "leds.h" | 17 | #include "leds.h" |
19 | 18 | ||
diff --git a/arch/arm/mach-sa1100/leds-lart.c b/arch/arm/mach-sa1100/leds-lart.c index 0505a1fdcdb2..a51830c60e53 100644 --- a/arch/arm/mach-sa1100/leds-lart.c +++ b/arch/arm/mach-sa1100/leds-lart.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <asm/leds.h> | 15 | #include <asm/leds.h> |
16 | #include <asm/system.h> | ||
17 | 16 | ||
18 | #include "leds.h" | 17 | #include "leds.h" |
19 | 18 | ||
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index bf85b8b259d5..2fa499ec6afe 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <asm/memory.h> | 31 | #include <asm/memory.h> |
32 | #include <asm/suspend.h> | 32 | #include <asm/suspend.h> |
33 | #include <asm/system.h> | ||
34 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
35 | 34 | ||
36 | extern int sa1100_finish_suspend(unsigned long); | 35 | extern int sa1100_finish_suspend(unsigned long); |
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c index ccd49189bbd0..25609076921f 100644 --- a/arch/arm/mach-shark/leds.c +++ b/arch/arm/mach-shark/leds.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | ||
25 | #include <asm/leds.h> | 25 | #include <asm/leds.h> |
26 | #include <asm/system.h> | ||
27 | 26 | ||
28 | #define LED_STATE_ENABLED 1 | 27 | #define LED_STATE_ENABLED 1 |
29 | #define LED_STATE_CLAIMED 2 | 28 | #define LED_STATE_CLAIMED 2 |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 262f8def5577..b56dde2732bb 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -1186,6 +1186,7 @@ static struct i2c_board_info i2c1_devices[] = { | |||
1186 | }, | 1186 | }, |
1187 | }; | 1187 | }; |
1188 | 1188 | ||
1189 | |||
1189 | #define GPIO_PORT9CR 0xE6051009 | 1190 | #define GPIO_PORT9CR 0xE6051009 |
1190 | #define GPIO_PORT10CR 0xE605100A | 1191 | #define GPIO_PORT10CR 0xE605100A |
1191 | #define USCCR1 0xE6058144 | 1192 | #define USCCR1 0xE6058144 |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index bd4253ba05b6..ca609502d6cd 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -1327,15 +1327,6 @@ static struct i2c_board_info i2c1_devices[] = { | |||
1327 | }, | 1327 | }, |
1328 | }; | 1328 | }; |
1329 | 1329 | ||
1330 | static void __init mackerel_map_io(void) | ||
1331 | { | ||
1332 | sh7372_map_io(); | ||
1333 | /* DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't | ||
1334 | * enough to allocate the frame buffer memory. | ||
1335 | */ | ||
1336 | init_consistent_dma_size(12 << 20); | ||
1337 | } | ||
1338 | |||
1339 | #define GPIO_PORT9CR 0xE6051009 | 1330 | #define GPIO_PORT9CR 0xE6051009 |
1340 | #define GPIO_PORT10CR 0xE605100A | 1331 | #define GPIO_PORT10CR 0xE605100A |
1341 | #define GPIO_PORT167CR 0xE60520A7 | 1332 | #define GPIO_PORT167CR 0xE60520A7 |
@@ -1555,7 +1546,7 @@ static void __init mackerel_init(void) | |||
1555 | } | 1546 | } |
1556 | 1547 | ||
1557 | MACHINE_START(MACKEREL, "mackerel") | 1548 | MACHINE_START(MACKEREL, "mackerel") |
1558 | .map_io = mackerel_map_io, | 1549 | .map_io = sh7372_map_io, |
1559 | .init_early = sh7372_add_early_devices, | 1550 | .init_early = sh7372_add_early_devices, |
1560 | .init_irq = sh7372_init_irq, | 1551 | .init_irq = sh7372_init_irq, |
1561 | .handle_irq = shmobile_handle_irq_intc, | 1552 | .handle_irq = shmobile_handle_irq_intc, |
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index 1b2334277e85..21b09b6455e4 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/suspend.h> | 13 | #include <linux/suspend.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <asm/system.h> | ||
17 | #include <asm/io.h> | 16 | #include <asm/io.h> |
18 | 17 | ||
19 | static void shmobile_enter_wfi(void) | 18 | static void shmobile_enter_wfi(void) |
diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h index 3bbcb3fa0775..540eaff08f34 100644 --- a/arch/arm/mach-shmobile/include/mach/system.h +++ b/arch/arm/mach-shmobile/include/mach/system.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_ARCH_SYSTEM_H | 1 | #ifndef __ASM_ARCH_SYSTEM_H |
2 | #define __ASM_ARCH_SYSTEM_H | 2 | #define __ASM_ARCH_SYSTEM_H |
3 | 3 | ||
4 | #include <asm/system_misc.h> | ||
5 | |||
4 | static inline void arch_reset(char mode, const char *cmd) | 6 | static inline void arch_reset(char mode, const char *cmd) |
5 | { | 7 | { |
6 | soft_restart(0); | 8 | soft_restart(0); |
diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c index c38ba7b43ef8..a18a4ae16d2b 100644 --- a/arch/arm/mach-shmobile/pm-r8a7779.c +++ b/arch/arm/mach-shmobile/pm-r8a7779.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/console.h> | 20 | #include <linux/console.h> |
21 | #include <asm/system.h> | ||
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
23 | #include <mach/common.h> | 22 | #include <mach/common.h> |
24 | #include <mach/r8a7779.h> | 23 | #include <mach/r8a7779.h> |
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index fcf8b1761aef..a3bdb12acde9 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/bitrev.h> | 22 | #include <linux/bitrev.h> |
23 | #include <linux/console.h> | 23 | #include <linux/console.h> |
24 | #include <asm/system.h> | ||
25 | #include <asm/io.h> | 24 | #include <asm/io.h> |
26 | #include <asm/tlbflush.h> | 25 | #include <asm/tlbflush.h> |
27 | #include <asm/suspend.h> | 26 | #include <asm/suspend.h> |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 5375325d7ca7..4e818b7de781 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/sh_intc.h> | 31 | #include <linux/sh_intc.h> |
32 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
33 | #include <linux/pm_domain.h> | 33 | #include <linux/pm_domain.h> |
34 | #include <linux/dma-mapping.h> | ||
34 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
35 | #include <mach/sh7372.h> | 36 | #include <mach/sh7372.h> |
36 | #include <mach/common.h> | 37 | #include <mach/common.h> |
@@ -54,6 +55,12 @@ static struct map_desc sh7372_io_desc[] __initdata = { | |||
54 | void __init sh7372_map_io(void) | 55 | void __init sh7372_map_io(void) |
55 | { | 56 | { |
56 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); | 57 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); |
58 | |||
59 | /* | ||
60 | * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't | ||
61 | * enough to allocate the frame buffer memory. | ||
62 | */ | ||
63 | init_consistent_dma_size(12 << 20); | ||
57 | } | 64 | } |
58 | 65 | ||
59 | /* SCIFA0 */ | 66 | /* SCIFA0 */ |
diff --git a/arch/arm/mach-shmobile/suspend.c b/arch/arm/mach-shmobile/suspend.c index c1febe13f709..4d1b86a49923 100644 --- a/arch/arm/mach-shmobile/suspend.c +++ b/arch/arm/mach-shmobile/suspend.c | |||
@@ -12,8 +12,8 @@ | |||
12 | #include <linux/suspend.h> | 12 | #include <linux/suspend.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <asm/system.h> | ||
16 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/system_misc.h> | ||
17 | 17 | ||
18 | static int shmobile_suspend_default_enter(suspend_state_t suspend_state) | 18 | static int shmobile_suspend_default_enter(suspend_state_t suspend_state) |
19 | { | 19 | { |
diff --git a/arch/arm/mach-spear6xx/Kconfig b/arch/arm/mach-spear6xx/Kconfig index ff4ae5ba00f1..fbe298bd1d92 100644 --- a/arch/arm/mach-spear6xx/Kconfig +++ b/arch/arm/mach-spear6xx/Kconfig | |||
@@ -5,11 +5,12 @@ | |||
5 | if ARCH_SPEAR6XX | 5 | if ARCH_SPEAR6XX |
6 | 6 | ||
7 | menu "SPEAr6xx Implementations" | 7 | menu "SPEAr6xx Implementations" |
8 | config BOARD_SPEAR600_EVB | 8 | config BOARD_SPEAR600_DT |
9 | bool "SPEAr600 Evaluation Board" | 9 | bool "SPEAr600 generic board configured via device-tree" |
10 | select MACH_SPEAR600 | 10 | select MACH_SPEAR600 |
11 | select USE_OF | ||
11 | help | 12 | help |
12 | Supports ST SPEAr600 Evaluation Board | 13 | Supports ST SPEAr600 boards configured via the device-tree |
13 | 14 | ||
14 | endmenu | 15 | endmenu |
15 | 16 | ||
diff --git a/arch/arm/mach-spear6xx/Makefile b/arch/arm/mach-spear6xx/Makefile index cc1a4d82d459..76e5750552fc 100644 --- a/arch/arm/mach-spear6xx/Makefile +++ b/arch/arm/mach-spear6xx/Makefile | |||
@@ -4,9 +4,3 @@ | |||
4 | 4 | ||
5 | # common files | 5 | # common files |
6 | obj-y += clock.o spear6xx.o | 6 | obj-y += clock.o spear6xx.o |
7 | |||
8 | # spear600 specific files | ||
9 | obj-$(CONFIG_MACH_SPEAR600) += spear600.o | ||
10 | |||
11 | # spear600 boards files | ||
12 | obj-$(CONFIG_BOARD_SPEAR600_EVB) += spear600_evb.o | ||
diff --git a/arch/arm/mach-spear6xx/clock.c b/arch/arm/mach-spear6xx/clock.c index ac70e0d88fef..358f2800f17b 100644 --- a/arch/arm/mach-spear6xx/clock.c +++ b/arch/arm/mach-spear6xx/clock.c | |||
@@ -641,8 +641,8 @@ static struct clk_lookup spear_clk_lookups[] = { | |||
641 | { .con_id = "gpt0_synth_clk", .clk = &gpt0_synth_clk}, | 641 | { .con_id = "gpt0_synth_clk", .clk = &gpt0_synth_clk}, |
642 | { .con_id = "gpt2_synth_clk", .clk = &gpt2_synth_clk}, | 642 | { .con_id = "gpt2_synth_clk", .clk = &gpt2_synth_clk}, |
643 | { .con_id = "gpt3_synth_clk", .clk = &gpt3_synth_clk}, | 643 | { .con_id = "gpt3_synth_clk", .clk = &gpt3_synth_clk}, |
644 | { .dev_id = "uart0", .clk = &uart0_clk}, | 644 | { .dev_id = "d0000000.serial", .clk = &uart0_clk}, |
645 | { .dev_id = "uart1", .clk = &uart1_clk}, | 645 | { .dev_id = "d0080000.serial", .clk = &uart1_clk}, |
646 | { .dev_id = "firda", .clk = &firda_clk}, | 646 | { .dev_id = "firda", .clk = &firda_clk}, |
647 | { .dev_id = "clcd", .clk = &clcd_clk}, | 647 | { .dev_id = "clcd", .clk = &clcd_clk}, |
648 | { .dev_id = "gpt0", .clk = &gpt0_clk}, | 648 | { .dev_id = "gpt0", .clk = &gpt0_clk}, |
@@ -655,20 +655,20 @@ static struct clk_lookup spear_clk_lookups[] = { | |||
655 | { .con_id = "usbh.1_clk", .clk = &usbh1_clk}, | 655 | { .con_id = "usbh.1_clk", .clk = &usbh1_clk}, |
656 | /* clock derived from ahb clk */ | 656 | /* clock derived from ahb clk */ |
657 | { .con_id = "apb_clk", .clk = &apb_clk}, | 657 | { .con_id = "apb_clk", .clk = &apb_clk}, |
658 | { .dev_id = "i2c_designware.0", .clk = &i2c_clk}, | 658 | { .dev_id = "d0200000.i2c", .clk = &i2c_clk}, |
659 | { .dev_id = "dma", .clk = &dma_clk}, | 659 | { .dev_id = "dma", .clk = &dma_clk}, |
660 | { .dev_id = "jpeg", .clk = &jpeg_clk}, | 660 | { .dev_id = "jpeg", .clk = &jpeg_clk}, |
661 | { .dev_id = "gmac", .clk = &gmac_clk}, | 661 | { .dev_id = "gmac", .clk = &gmac_clk}, |
662 | { .dev_id = "smi", .clk = &smi_clk}, | 662 | { .dev_id = "smi", .clk = &smi_clk}, |
663 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 663 | { .dev_id = "fsmc-nand", .clk = &fsmc_clk}, |
664 | /* clock derived from apb clk */ | 664 | /* clock derived from apb clk */ |
665 | { .dev_id = "adc", .clk = &adc_clk}, | 665 | { .dev_id = "adc", .clk = &adc_clk}, |
666 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, | 666 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, |
667 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, | 667 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, |
668 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, | 668 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, |
669 | { .dev_id = "gpio0", .clk = &gpio0_clk}, | 669 | { .dev_id = "f0100000.gpio", .clk = &gpio0_clk}, |
670 | { .dev_id = "gpio1", .clk = &gpio1_clk}, | 670 | { .dev_id = "fc980000.gpio", .clk = &gpio1_clk}, |
671 | { .dev_id = "gpio2", .clk = &gpio2_clk}, | 671 | { .dev_id = "d8100000.gpio", .clk = &gpio2_clk}, |
672 | }; | 672 | }; |
673 | 673 | ||
674 | void __init spear6xx_clk_init(void) | 674 | void __init spear6xx_clk_init(void) |
diff --git a/arch/arm/mach-spear6xx/spear600.c b/arch/arm/mach-spear6xx/spear600.c deleted file mode 100644 index d0e6eeae9b04..000000000000 --- a/arch/arm/mach-spear6xx/spear600.c +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/spear600.c | ||
3 | * | ||
4 | * SPEAr600 machine source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/ptrace.h> | ||
15 | #include <asm/irq.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | /* Add spear600 specific devices here */ | ||
20 | |||
21 | void __init spear600_init(void) | ||
22 | { | ||
23 | /* call spear6xx family common init function */ | ||
24 | spear6xx_init(); | ||
25 | } | ||
diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c deleted file mode 100644 index c6e4254741cc..000000000000 --- a/arch/arm/mach-spear6xx/spear600_evb.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/spear600_evb.c | ||
3 | * | ||
4 | * SPEAr600 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/hardware/vic.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach-types.h> | ||
17 | #include <mach/generic.h> | ||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | static struct amba_device *amba_devs[] __initdata = { | ||
21 | &gpio_device[0], | ||
22 | &gpio_device[1], | ||
23 | &gpio_device[2], | ||
24 | &uart_device[0], | ||
25 | &uart_device[1], | ||
26 | }; | ||
27 | |||
28 | static struct platform_device *plat_devs[] __initdata = { | ||
29 | }; | ||
30 | |||
31 | static void __init spear600_evb_init(void) | ||
32 | { | ||
33 | unsigned int i; | ||
34 | |||
35 | /* call spear600 machine init function */ | ||
36 | spear600_init(); | ||
37 | |||
38 | /* Add Platform Devices */ | ||
39 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
40 | |||
41 | /* Add Amba Devices */ | ||
42 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
43 | amba_device_register(amba_devs[i], &iomem_resource); | ||
44 | } | ||
45 | |||
46 | MACHINE_START(SPEAR600, "ST-SPEAR600-EVB") | ||
47 | .atag_offset = 0x100, | ||
48 | .map_io = spear6xx_map_io, | ||
49 | .init_irq = spear6xx_init_irq, | ||
50 | .handle_irq = vic_handle_irq, | ||
51 | .timer = &spear6xx_timer, | ||
52 | .init_machine = spear600_evb_init, | ||
53 | .restart = spear_restart, | ||
54 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c index b997b1b10ba0..2ed8b14c82c8 100644 --- a/arch/arm/mach-spear6xx/spear6xx.c +++ b/arch/arm/mach-spear6xx/spear6xx.c | |||
@@ -6,111 +6,21 @@ | |||
6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | 7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> |
8 | * | 8 | * |
9 | * Copyright 2012 Stefan Roese <sr@denx.de> | ||
10 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | 11 | * This file is licensed under the terms of the GNU General Public |
10 | * License version 2. This program is licensed "as is" without any | 12 | * License version 2. This program is licensed "as is" without any |
11 | * warranty of any kind, whether express or implied. | 13 | * warranty of any kind, whether express or implied. |
12 | */ | 14 | */ |
13 | 15 | ||
14 | #include <linux/types.h> | 16 | #include <linux/of.h> |
15 | #include <linux/amba/pl061.h> | 17 | #include <linux/of_address.h> |
16 | #include <linux/ptrace.h> | 18 | #include <linux/of_irq.h> |
17 | #include <linux/io.h> | 19 | #include <linux/of_platform.h> |
18 | #include <asm/hardware/vic.h> | 20 | #include <asm/hardware/vic.h> |
19 | #include <asm/irq.h> | ||
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | #include <mach/generic.h> | 22 | #include <mach/generic.h> |
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <mach/irqs.h> | ||
24 | |||
25 | /* Add spear6xx machines common devices here */ | ||
26 | /* uart device registration */ | ||
27 | struct amba_device uart_device[] = { | ||
28 | { | ||
29 | .dev = { | ||
30 | .init_name = "uart0", | ||
31 | }, | ||
32 | .res = { | ||
33 | .start = SPEAR6XX_ICM1_UART0_BASE, | ||
34 | .end = SPEAR6XX_ICM1_UART0_BASE + SZ_4K - 1, | ||
35 | .flags = IORESOURCE_MEM, | ||
36 | }, | ||
37 | .irq = {IRQ_UART_0}, | ||
38 | }, { | ||
39 | .dev = { | ||
40 | .init_name = "uart1", | ||
41 | }, | ||
42 | .res = { | ||
43 | .start = SPEAR6XX_ICM1_UART1_BASE, | ||
44 | .end = SPEAR6XX_ICM1_UART1_BASE + SZ_4K - 1, | ||
45 | .flags = IORESOURCE_MEM, | ||
46 | }, | ||
47 | .irq = {IRQ_UART_1}, | ||
48 | } | ||
49 | }; | ||
50 | |||
51 | /* gpio device registration */ | ||
52 | static struct pl061_platform_data gpio_plat_data[] = { | ||
53 | { | ||
54 | .gpio_base = 0, | ||
55 | .irq_base = SPEAR_GPIO0_INT_BASE, | ||
56 | }, { | ||
57 | .gpio_base = 8, | ||
58 | .irq_base = SPEAR_GPIO1_INT_BASE, | ||
59 | }, { | ||
60 | .gpio_base = 16, | ||
61 | .irq_base = SPEAR_GPIO2_INT_BASE, | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | struct amba_device gpio_device[] = { | ||
66 | { | ||
67 | .dev = { | ||
68 | .init_name = "gpio0", | ||
69 | .platform_data = &gpio_plat_data[0], | ||
70 | }, | ||
71 | .res = { | ||
72 | .start = SPEAR6XX_CPU_GPIO_BASE, | ||
73 | .end = SPEAR6XX_CPU_GPIO_BASE + SZ_4K - 1, | ||
74 | .flags = IORESOURCE_MEM, | ||
75 | }, | ||
76 | .irq = {IRQ_LOCAL_GPIO}, | ||
77 | }, { | ||
78 | .dev = { | ||
79 | .init_name = "gpio1", | ||
80 | .platform_data = &gpio_plat_data[1], | ||
81 | }, | ||
82 | .res = { | ||
83 | .start = SPEAR6XX_ICM3_GPIO_BASE, | ||
84 | .end = SPEAR6XX_ICM3_GPIO_BASE + SZ_4K - 1, | ||
85 | .flags = IORESOURCE_MEM, | ||
86 | }, | ||
87 | .irq = {IRQ_BASIC_GPIO}, | ||
88 | }, { | ||
89 | .dev = { | ||
90 | .init_name = "gpio2", | ||
91 | .platform_data = &gpio_plat_data[2], | ||
92 | }, | ||
93 | .res = { | ||
94 | .start = SPEAR6XX_ICM2_GPIO_BASE, | ||
95 | .end = SPEAR6XX_ICM2_GPIO_BASE + SZ_4K - 1, | ||
96 | .flags = IORESOURCE_MEM, | ||
97 | }, | ||
98 | .irq = {IRQ_APPL_GPIO}, | ||
99 | } | ||
100 | }; | ||
101 | |||
102 | /* This will add devices, and do machine specific tasks */ | ||
103 | void __init spear6xx_init(void) | ||
104 | { | ||
105 | /* nothing to do for now */ | ||
106 | } | ||
107 | |||
108 | /* This will initialize vic */ | ||
109 | void __init spear6xx_init_irq(void) | ||
110 | { | ||
111 | vic_init((void __iomem *)VA_SPEAR6XX_CPU_VIC_PRI_BASE, 0, ~0, 0); | ||
112 | vic_init((void __iomem *)VA_SPEAR6XX_CPU_VIC_SEC_BASE, 32, ~0, 0); | ||
113 | } | ||
114 | 24 | ||
115 | /* Following will create static virtual/physical mappings */ | 25 | /* Following will create static virtual/physical mappings */ |
116 | static struct map_desc spear6xx_io_desc[] __initdata = { | 26 | static struct map_desc spear6xx_io_desc[] __initdata = { |
@@ -181,3 +91,33 @@ static void __init spear6xx_timer_init(void) | |||
181 | struct sys_timer spear6xx_timer = { | 91 | struct sys_timer spear6xx_timer = { |
182 | .init = spear6xx_timer_init, | 92 | .init = spear6xx_timer_init, |
183 | }; | 93 | }; |
94 | |||
95 | static void __init spear600_dt_init(void) | ||
96 | { | ||
97 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
98 | } | ||
99 | |||
100 | static const char *spear600_dt_board_compat[] = { | ||
101 | "st,spear600", | ||
102 | NULL | ||
103 | }; | ||
104 | |||
105 | static const struct of_device_id vic_of_match[] __initconst = { | ||
106 | { .compatible = "arm,pl190-vic", .data = vic_of_init, }, | ||
107 | { /* Sentinel */ } | ||
108 | }; | ||
109 | |||
110 | static void __init spear6xx_dt_init_irq(void) | ||
111 | { | ||
112 | of_irq_init(vic_of_match); | ||
113 | } | ||
114 | |||
115 | DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") | ||
116 | .map_io = spear6xx_map_io, | ||
117 | .init_irq = spear6xx_dt_init_irq, | ||
118 | .handle_irq = vic_handle_irq, | ||
119 | .timer = &spear6xx_timer, | ||
120 | .init_machine = spear600_dt_init, | ||
121 | .restart = spear_restart, | ||
122 | .dt_compat = spear600_dt_board_compat, | ||
123 | MACHINE_END | ||
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 1dd2726986cf..d87d968115ec 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile | |||
@@ -8,6 +8,7 @@ obj-y += timer.o | |||
8 | obj-y += pinmux.o | 8 | obj-y += pinmux.o |
9 | obj-y += fuse.o | 9 | obj-y += fuse.o |
10 | obj-y += pmc.o | 10 | obj-y += pmc.o |
11 | obj-y += flowctrl.o | ||
11 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 12 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
12 | obj-$(CONFIG_CPU_IDLE) += sleep.o | 13 | obj-$(CONFIG_CPU_IDLE) += sleep.o |
13 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += powergate.o | 14 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += powergate.o |
@@ -18,6 +19,7 @@ obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += pinmux-tegra30-tables.o | |||
18 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o | 19 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o |
19 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o | 20 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o |
20 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 21 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
22 | obj-$(CONFIG_SMP) += reset.o | ||
21 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 23 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
22 | obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o apbio.o | 24 | obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o apbio.o |
23 | obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o | 25 | obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o |
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index 96f6c0d030bd..5f7c03e972f3 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -56,7 +56,7 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { | |||
56 | 56 | ||
57 | static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { | 57 | static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { |
58 | /* name parent rate enabled */ | 58 | /* name parent rate enabled */ |
59 | { "uartd", "pll_p", 408000000, true }, | 59 | { "uarta", "pll_p", 408000000, true }, |
60 | { NULL, NULL, 0, 0}, | 60 | { NULL, NULL, 0, 0}, |
61 | }; | 61 | }; |
62 | 62 | ||
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 2f86fcca64a6..22df10fb9972 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | 28 | ||
29 | #include <mach/iomap.h> | 29 | #include <mach/iomap.h> |
30 | #include <mach/powergate.h> | ||
30 | 31 | ||
31 | #include "board.h" | 32 | #include "board.h" |
32 | #include "clock.h" | 33 | #include "clock.h" |
@@ -118,13 +119,16 @@ void __init tegra20_init_early(void) | |||
118 | tegra_clk_init_from_table(tegra20_clk_init_table); | 119 | tegra_clk_init_from_table(tegra20_clk_init_table); |
119 | tegra_init_cache(0x331, 0x441); | 120 | tegra_init_cache(0x331, 0x441); |
120 | tegra_pmc_init(); | 121 | tegra_pmc_init(); |
122 | tegra_powergate_init(); | ||
121 | } | 123 | } |
122 | #endif | 124 | #endif |
123 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | 125 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC |
124 | void __init tegra30_init_early(void) | 126 | void __init tegra30_init_early(void) |
125 | { | 127 | { |
128 | tegra_init_fuse(); | ||
126 | tegra30_init_clocks(); | 129 | tegra30_init_clocks(); |
127 | tegra_init_cache(0x441, 0x551); | 130 | tegra_init_cache(0x441, 0x551); |
128 | tegra_pmc_init(); | 131 | tegra_pmc_init(); |
132 | tegra_powergate_init(); | ||
129 | } | 133 | } |
130 | #endif | 134 | #endif |
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index bb5ce39b733b..7a065f0cf633 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/suspend.h> | 31 | #include <linux/suspend.h> |
32 | 32 | ||
33 | #include <asm/system.h> | ||
34 | 33 | ||
35 | #include <mach/clk.h> | 34 | #include <mach/clk.h> |
36 | 35 | ||
diff --git a/arch/arm/mach-tegra/flowctrl.c b/arch/arm/mach-tegra/flowctrl.c new file mode 100644 index 000000000000..fef66a7486ed --- /dev/null +++ b/arch/arm/mach-tegra/flowctrl.c | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/flowctrl.c | ||
3 | * | ||
4 | * functions and macros to control the flowcontroller | ||
5 | * | ||
6 | * Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/io.h> | ||
24 | |||
25 | #include <mach/iomap.h> | ||
26 | |||
27 | #include "flowctrl.h" | ||
28 | |||
29 | u8 flowctrl_offset_halt_cpu[] = { | ||
30 | FLOW_CTRL_HALT_CPU0_EVENTS, | ||
31 | FLOW_CTRL_HALT_CPU1_EVENTS, | ||
32 | FLOW_CTRL_HALT_CPU1_EVENTS + 8, | ||
33 | FLOW_CTRL_HALT_CPU1_EVENTS + 16, | ||
34 | }; | ||
35 | |||
36 | u8 flowctrl_offset_cpu_csr[] = { | ||
37 | FLOW_CTRL_CPU0_CSR, | ||
38 | FLOW_CTRL_CPU1_CSR, | ||
39 | FLOW_CTRL_CPU1_CSR + 8, | ||
40 | FLOW_CTRL_CPU1_CSR + 16, | ||
41 | }; | ||
42 | |||
43 | static void flowctrl_update(u8 offset, u32 value) | ||
44 | { | ||
45 | void __iomem *addr = IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + offset; | ||
46 | |||
47 | writel(value, addr); | ||
48 | |||
49 | /* ensure the update has reached the flow controller */ | ||
50 | wmb(); | ||
51 | readl_relaxed(addr); | ||
52 | } | ||
53 | |||
54 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) | ||
55 | { | ||
56 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); | ||
57 | } | ||
58 | |||
59 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) | ||
60 | { | ||
61 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); | ||
62 | } | ||
diff --git a/arch/arm/mach-tegra/flowctrl.h b/arch/arm/mach-tegra/flowctrl.h index 74c6efbe52fa..19428173855e 100644 --- a/arch/arm/mach-tegra/flowctrl.h +++ b/arch/arm/mach-tegra/flowctrl.h | |||
@@ -34,4 +34,9 @@ | |||
34 | #define FLOW_CTRL_HALT_CPU1_EVENTS 0x14 | 34 | #define FLOW_CTRL_HALT_CPU1_EVENTS 0x14 |
35 | #define FLOW_CTRL_CPU1_CSR 0x18 | 35 | #define FLOW_CTRL_CPU1_CSR 0x18 |
36 | 36 | ||
37 | #ifndef __ASSEMBLY__ | ||
38 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value); | ||
39 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); | ||
40 | #endif | ||
41 | |||
37 | #endif | 42 | #endif |
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index c1afb2738769..f946d129423c 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c | |||
@@ -34,6 +34,7 @@ | |||
34 | int tegra_sku_id; | 34 | int tegra_sku_id; |
35 | int tegra_cpu_process_id; | 35 | int tegra_cpu_process_id; |
36 | int tegra_core_process_id; | 36 | int tegra_core_process_id; |
37 | int tegra_chip_id; | ||
37 | enum tegra_revision tegra_revision; | 38 | enum tegra_revision tegra_revision; |
38 | 39 | ||
39 | /* The BCT to use at boot is specified by board straps that can be read | 40 | /* The BCT to use at boot is specified by board straps that can be read |
@@ -66,12 +67,9 @@ static inline bool get_spare_fuse(int bit) | |||
66 | return tegra_fuse_readl(FUSE_SPARE_BIT + bit * 4); | 67 | return tegra_fuse_readl(FUSE_SPARE_BIT + bit * 4); |
67 | } | 68 | } |
68 | 69 | ||
69 | static enum tegra_revision tegra_get_revision(void) | 70 | static enum tegra_revision tegra_get_revision(u32 id) |
70 | { | 71 | { |
71 | void __iomem *chip_id = IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804; | ||
72 | u32 id = readl(chip_id); | ||
73 | u32 minor_rev = (id >> 16) & 0xf; | 72 | u32 minor_rev = (id >> 16) & 0xf; |
74 | u32 chipid = (id >> 8) & 0xff; | ||
75 | 73 | ||
76 | switch (minor_rev) { | 74 | switch (minor_rev) { |
77 | case 1: | 75 | case 1: |
@@ -79,7 +77,8 @@ static enum tegra_revision tegra_get_revision(void) | |||
79 | case 2: | 77 | case 2: |
80 | return TEGRA_REVISION_A02; | 78 | return TEGRA_REVISION_A02; |
81 | case 3: | 79 | case 3: |
82 | if (chipid == 0x20 && (get_spare_fuse(18) || get_spare_fuse(19))) | 80 | if (tegra_chip_id == TEGRA20 && |
81 | (get_spare_fuse(18) || get_spare_fuse(19))) | ||
83 | return TEGRA_REVISION_A03p; | 82 | return TEGRA_REVISION_A03p; |
84 | else | 83 | else |
85 | return TEGRA_REVISION_A03; | 84 | return TEGRA_REVISION_A03; |
@@ -92,6 +91,8 @@ static enum tegra_revision tegra_get_revision(void) | |||
92 | 91 | ||
93 | void tegra_init_fuse(void) | 92 | void tegra_init_fuse(void) |
94 | { | 93 | { |
94 | u32 id; | ||
95 | |||
95 | u32 reg = readl(IO_TO_VIRT(TEGRA_CLK_RESET_BASE + 0x48)); | 96 | u32 reg = readl(IO_TO_VIRT(TEGRA_CLK_RESET_BASE + 0x48)); |
96 | reg |= 1 << 28; | 97 | reg |= 1 << 28; |
97 | writel(reg, IO_TO_VIRT(TEGRA_CLK_RESET_BASE + 0x48)); | 98 | writel(reg, IO_TO_VIRT(TEGRA_CLK_RESET_BASE + 0x48)); |
@@ -108,10 +109,13 @@ void tegra_init_fuse(void) | |||
108 | reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); | 109 | reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); |
109 | tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; | 110 | tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; |
110 | 111 | ||
111 | tegra_revision = tegra_get_revision(); | 112 | id = readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804); |
113 | tegra_chip_id = (id >> 8) & 0xff; | ||
114 | |||
115 | tegra_revision = tegra_get_revision(id); | ||
112 | 116 | ||
113 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", | 117 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", |
114 | tegra_revision_name[tegra_get_revision()], | 118 | tegra_revision_name[tegra_revision], |
115 | tegra_sku_id, tegra_cpu_process_id, | 119 | tegra_sku_id, tegra_cpu_process_id, |
116 | tegra_core_process_id); | 120 | tegra_core_process_id); |
117 | } | 121 | } |
diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h index d65d2abf803b..d2107b2cb85a 100644 --- a/arch/arm/mach-tegra/fuse.h +++ b/arch/arm/mach-tegra/fuse.h | |||
@@ -35,9 +35,13 @@ enum tegra_revision { | |||
35 | #define SKU_ID_AP25E 27 | 35 | #define SKU_ID_AP25E 27 |
36 | #define SKU_ID_T25E 28 | 36 | #define SKU_ID_T25E 28 |
37 | 37 | ||
38 | #define TEGRA20 0x20 | ||
39 | #define TEGRA30 0x30 | ||
40 | |||
38 | extern int tegra_sku_id; | 41 | extern int tegra_sku_id; |
39 | extern int tegra_cpu_process_id; | 42 | extern int tegra_cpu_process_id; |
40 | extern int tegra_core_process_id; | 43 | extern int tegra_core_process_id; |
44 | extern int tegra_chip_id; | ||
41 | extern enum tegra_revision tegra_revision; | 45 | extern enum tegra_revision tegra_revision; |
42 | 46 | ||
43 | extern int tegra_bct_strapping; | 47 | extern int tegra_bct_strapping; |
diff --git a/arch/arm/mach-tegra/headsmp.S b/arch/arm/mach-tegra/headsmp.S index b5349b2f13d2..fef9c2c51370 100644 --- a/arch/arm/mach-tegra/headsmp.S +++ b/arch/arm/mach-tegra/headsmp.S | |||
@@ -1,6 +1,23 @@ | |||
1 | #include <linux/linkage.h> | 1 | #include <linux/linkage.h> |
2 | #include <linux/init.h> | 2 | #include <linux/init.h> |
3 | 3 | ||
4 | #include <asm/cache.h> | ||
5 | |||
6 | #include <mach/iomap.h> | ||
7 | |||
8 | #include "flowctrl.h" | ||
9 | #include "reset.h" | ||
10 | |||
11 | #define APB_MISC_GP_HIDREV 0x804 | ||
12 | #define PMC_SCRATCH41 0x140 | ||
13 | |||
14 | #define RESET_DATA(x) ((TEGRA_RESET_##x)*4) | ||
15 | |||
16 | .macro mov32, reg, val | ||
17 | movw \reg, #:lower16:\val | ||
18 | movt \reg, #:upper16:\val | ||
19 | .endm | ||
20 | |||
4 | .section ".text.head", "ax" | 21 | .section ".text.head", "ax" |
5 | __CPUINIT | 22 | __CPUINIT |
6 | 23 | ||
@@ -47,15 +64,149 @@ ENTRY(v7_invalidate_l1) | |||
47 | mov pc, lr | 64 | mov pc, lr |
48 | ENDPROC(v7_invalidate_l1) | 65 | ENDPROC(v7_invalidate_l1) |
49 | 66 | ||
67 | |||
50 | ENTRY(tegra_secondary_startup) | 68 | ENTRY(tegra_secondary_startup) |
51 | msr cpsr_fsxc, #0xd3 | ||
52 | bl v7_invalidate_l1 | 69 | bl v7_invalidate_l1 |
53 | mrc p15, 0, r0, c0, c0, 5 | 70 | /* Enable coresight */ |
54 | and r0, r0, #15 | 71 | mov32 r0, 0xC5ACCE55 |
55 | ldr r1, =0x6000f100 | 72 | mcr p14, 0, r0, c7, c12, 6 |
56 | str r0, [r1] | ||
57 | 1: ldr r2, [r1] | ||
58 | cmp r0, r2 | ||
59 | beq 1b | ||
60 | b secondary_startup | 73 | b secondary_startup |
61 | ENDPROC(tegra_secondary_startup) | 74 | ENDPROC(tegra_secondary_startup) |
75 | |||
76 | .align L1_CACHE_SHIFT | ||
77 | ENTRY(__tegra_cpu_reset_handler_start) | ||
78 | |||
79 | /* | ||
80 | * __tegra_cpu_reset_handler: | ||
81 | * | ||
82 | * Common handler for all CPU reset events. | ||
83 | * | ||
84 | * Register usage within the reset handler: | ||
85 | * | ||
86 | * R7 = CPU present (to the OS) mask | ||
87 | * R8 = CPU in LP1 state mask | ||
88 | * R9 = CPU in LP2 state mask | ||
89 | * R10 = CPU number | ||
90 | * R11 = CPU mask | ||
91 | * R12 = pointer to reset handler data | ||
92 | * | ||
93 | * NOTE: This code is copied to IRAM. All code and data accesses | ||
94 | * must be position-independent. | ||
95 | */ | ||
96 | |||
97 | .align L1_CACHE_SHIFT | ||
98 | ENTRY(__tegra_cpu_reset_handler) | ||
99 | |||
100 | cpsid aif, 0x13 @ SVC mode, interrupts disabled | ||
101 | mrc p15, 0, r10, c0, c0, 5 @ MPIDR | ||
102 | and r10, r10, #0x3 @ R10 = CPU number | ||
103 | mov r11, #1 | ||
104 | mov r11, r11, lsl r10 @ R11 = CPU mask | ||
105 | adr r12, __tegra_cpu_reset_handler_data | ||
106 | |||
107 | #ifdef CONFIG_SMP | ||
108 | /* Does the OS know about this CPU? */ | ||
109 | ldr r7, [r12, #RESET_DATA(MASK_PRESENT)] | ||
110 | tst r7, r11 @ if !present | ||
111 | bleq __die @ CPU not present (to OS) | ||
112 | #endif | ||
113 | |||
114 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
115 | /* Are we on Tegra20? */ | ||
116 | mov32 r6, TEGRA_APB_MISC_BASE | ||
117 | ldr r0, [r6, #APB_MISC_GP_HIDREV] | ||
118 | and r0, r0, #0xff00 | ||
119 | cmp r0, #(0x20 << 8) | ||
120 | bne 1f | ||
121 | /* If not CPU0, don't let CPU0 reset CPU1 now that CPU1 is coming up. */ | ||
122 | mov32 r6, TEGRA_PMC_BASE | ||
123 | mov r0, #0 | ||
124 | cmp r10, #0 | ||
125 | strne r0, [r6, #PMC_SCRATCH41] | ||
126 | 1: | ||
127 | #endif | ||
128 | |||
129 | #ifdef CONFIG_SMP | ||
130 | /* | ||
131 | * Can only be secondary boot (initial or hotplug) but CPU 0 | ||
132 | * cannot be here. | ||
133 | */ | ||
134 | cmp r10, #0 | ||
135 | bleq __die @ CPU0 cannot be here | ||
136 | ldr lr, [r12, #RESET_DATA(STARTUP_SECONDARY)] | ||
137 | cmp lr, #0 | ||
138 | bleq __die @ no secondary startup handler | ||
139 | bx lr | ||
140 | #endif | ||
141 | |||
142 | /* | ||
143 | * We don't know why the CPU reset. Just kill it. | ||
144 | * The LR register will contain the address we died at + 4. | ||
145 | */ | ||
146 | |||
147 | __die: | ||
148 | sub lr, lr, #4 | ||
149 | mov32 r7, TEGRA_PMC_BASE | ||
150 | str lr, [r7, #PMC_SCRATCH41] | ||
151 | |||
152 | mov32 r7, TEGRA_CLK_RESET_BASE | ||
153 | |||
154 | /* Are we on Tegra20? */ | ||
155 | mov32 r6, TEGRA_APB_MISC_BASE | ||
156 | ldr r0, [r6, #APB_MISC_GP_HIDREV] | ||
157 | and r0, r0, #0xff00 | ||
158 | cmp r0, #(0x20 << 8) | ||
159 | bne 1f | ||
160 | |||
161 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
162 | mov32 r0, 0x1111 | ||
163 | mov r1, r0, lsl r10 | ||
164 | str r1, [r7, #0x340] @ CLK_RST_CPU_CMPLX_SET | ||
165 | #endif | ||
166 | 1: | ||
167 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
168 | mov32 r6, TEGRA_FLOW_CTRL_BASE | ||
169 | |||
170 | cmp r10, #0 | ||
171 | moveq r1, #FLOW_CTRL_HALT_CPU0_EVENTS | ||
172 | moveq r2, #FLOW_CTRL_CPU0_CSR | ||
173 | movne r1, r10, lsl #3 | ||
174 | addne r2, r1, #(FLOW_CTRL_CPU1_CSR-8) | ||
175 | addne r1, r1, #(FLOW_CTRL_HALT_CPU1_EVENTS-8) | ||
176 | |||
177 | /* Clear CPU "event" and "interrupt" flags and power gate | ||
178 | it when halting but not before it is in the "WFI" state. */ | ||
179 | ldr r0, [r6, +r2] | ||
180 | orr r0, r0, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | ||
181 | orr r0, r0, #FLOW_CTRL_CSR_ENABLE | ||
182 | str r0, [r6, +r2] | ||
183 | |||
184 | /* Unconditionally halt this CPU */ | ||
185 | mov r0, #FLOW_CTRL_WAITEVENT | ||
186 | str r0, [r6, +r1] | ||
187 | ldr r0, [r6, +r1] @ memory barrier | ||
188 | |||
189 | dsb | ||
190 | isb | ||
191 | wfi @ CPU should be power gated here | ||
192 | |||
193 | /* If the CPU didn't power gate above just kill it's clock. */ | ||
194 | |||
195 | mov r0, r11, lsl #8 | ||
196 | str r0, [r7, #348] @ CLK_CPU_CMPLX_SET | ||
197 | #endif | ||
198 | |||
199 | /* If the CPU still isn't dead, just spin here. */ | ||
200 | b . | ||
201 | ENDPROC(__tegra_cpu_reset_handler) | ||
202 | |||
203 | .align L1_CACHE_SHIFT | ||
204 | .type __tegra_cpu_reset_handler_data, %object | ||
205 | .globl __tegra_cpu_reset_handler_data | ||
206 | __tegra_cpu_reset_handler_data: | ||
207 | .rept TEGRA_RESET_DATA_SIZE | ||
208 | .long 0 | ||
209 | .endr | ||
210 | .align L1_CACHE_SHIFT | ||
211 | |||
212 | ENTRY(__tegra_cpu_reset_handler_end) | ||
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index f3294040d357..d8dc9ddd6d18 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/cp15.h> | ||
16 | 17 | ||
17 | static inline void cpu_enter_lowpower(void) | 18 | static inline void cpu_enter_lowpower(void) |
18 | { | 19 | { |
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h index 67644c905d8e..cff672a344f4 100644 --- a/arch/arm/mach-tegra/include/mach/iomap.h +++ b/arch/arm/mach-tegra/include/mach/iomap.h | |||
@@ -113,6 +113,9 @@ | |||
113 | #define TEGRA_AHB_GIZMO_BASE 0x6000C004 | 113 | #define TEGRA_AHB_GIZMO_BASE 0x6000C004 |
114 | #define TEGRA_AHB_GIZMO_SIZE 0x10C | 114 | #define TEGRA_AHB_GIZMO_SIZE 0x10C |
115 | 115 | ||
116 | #define TEGRA_SB_BASE 0x6000C200 | ||
117 | #define TEGRA_SB_SIZE 256 | ||
118 | |||
116 | #define TEGRA_STATMON_BASE 0x6000C400 | 119 | #define TEGRA_STATMON_BASE 0x6000C400 |
117 | #define TEGRA_STATMON_SIZE SZ_1K | 120 | #define TEGRA_STATMON_SIZE SZ_1K |
118 | 121 | ||
diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h index 39c396d2ddb0..4752b1a68f35 100644 --- a/arch/arm/mach-tegra/include/mach/powergate.h +++ b/arch/arm/mach-tegra/include/mach/powergate.h | |||
@@ -27,8 +27,21 @@ | |||
27 | #define TEGRA_POWERGATE_VDEC 4 | 27 | #define TEGRA_POWERGATE_VDEC 4 |
28 | #define TEGRA_POWERGATE_L2 5 | 28 | #define TEGRA_POWERGATE_L2 5 |
29 | #define TEGRA_POWERGATE_MPE 6 | 29 | #define TEGRA_POWERGATE_MPE 6 |
30 | #define TEGRA_NUM_POWERGATE 7 | 30 | #define TEGRA_POWERGATE_HEG 7 |
31 | #define TEGRA_POWERGATE_SATA 8 | ||
32 | #define TEGRA_POWERGATE_CPU1 9 | ||
33 | #define TEGRA_POWERGATE_CPU2 10 | ||
34 | #define TEGRA_POWERGATE_CPU3 11 | ||
35 | #define TEGRA_POWERGATE_CELP 12 | ||
36 | #define TEGRA_POWERGATE_3D1 13 | ||
31 | 37 | ||
38 | #define TEGRA_POWERGATE_CPU0 TEGRA_POWERGATE_CPU | ||
39 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D | ||
40 | |||
41 | int __init tegra_powergate_init(void); | ||
42 | |||
43 | int tegra_cpu_powergate_id(int cpuid); | ||
44 | int tegra_powergate_is_powered(int id); | ||
32 | int tegra_powergate_power_on(int id); | 45 | int tegra_powergate_power_on(int id); |
33 | int tegra_powergate_power_off(int id); | 46 | int tegra_powergate_power_off(int id); |
34 | int tegra_powergate_remove_clamping(int id); | 47 | int tegra_powergate_remove_clamping(int id); |
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 7d2b5d03c1df..1a208dbf682f 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c | |||
@@ -24,19 +24,31 @@ | |||
24 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/smp_scu.h> | 25 | #include <asm/smp_scu.h> |
26 | 26 | ||
27 | #include <mach/clk.h> | ||
27 | #include <mach/iomap.h> | 28 | #include <mach/iomap.h> |
29 | #include <mach/powergate.h> | ||
30 | |||
31 | #include "fuse.h" | ||
32 | #include "flowctrl.h" | ||
33 | #include "reset.h" | ||
28 | 34 | ||
29 | extern void tegra_secondary_startup(void); | 35 | extern void tegra_secondary_startup(void); |
30 | 36 | ||
31 | static DEFINE_SPINLOCK(boot_lock); | ||
32 | static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); | 37 | static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); |
33 | 38 | ||
34 | #define EVP_CPU_RESET_VECTOR \ | 39 | #define EVP_CPU_RESET_VECTOR \ |
35 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) | 40 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) |
36 | #define CLK_RST_CONTROLLER_CLK_CPU_CMPLX \ | 41 | #define CLK_RST_CONTROLLER_CLK_CPU_CMPLX \ |
37 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x4c) | 42 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x4c) |
43 | #define CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET \ | ||
44 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x340) | ||
38 | #define CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR \ | 45 | #define CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR \ |
39 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344) | 46 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344) |
47 | #define CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR \ | ||
48 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x34c) | ||
49 | |||
50 | #define CPU_CLOCK(cpu) (0x1<<(8+cpu)) | ||
51 | #define CPU_RESET(cpu) (0x1111ul<<(cpu)) | ||
40 | 52 | ||
41 | void __cpuinit platform_secondary_init(unsigned int cpu) | 53 | void __cpuinit platform_secondary_init(unsigned int cpu) |
42 | { | 54 | { |
@@ -47,63 +59,106 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
47 | */ | 59 | */ |
48 | gic_secondary_init(0); | 60 | gic_secondary_init(0); |
49 | 61 | ||
50 | /* | ||
51 | * Synchronise with the boot thread. | ||
52 | */ | ||
53 | spin_lock(&boot_lock); | ||
54 | spin_unlock(&boot_lock); | ||
55 | } | 62 | } |
56 | 63 | ||
57 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 64 | static int tegra20_power_up_cpu(unsigned int cpu) |
58 | { | 65 | { |
59 | unsigned long old_boot_vector; | ||
60 | unsigned long boot_vector; | ||
61 | unsigned long timeout; | ||
62 | u32 reg; | 66 | u32 reg; |
63 | 67 | ||
64 | /* | 68 | /* Enable the CPU clock. */ |
65 | * set synchronisation state between this boot processor | 69 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX); |
66 | * and the secondary one | 70 | writel(reg & ~CPU_CLOCK(cpu), CLK_RST_CONTROLLER_CLK_CPU_CMPLX); |
67 | */ | 71 | barrier(); |
68 | spin_lock(&boot_lock); | 72 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX); |
69 | 73 | ||
74 | /* Clear flow controller CSR. */ | ||
75 | flowctrl_write_cpu_csr(cpu, 0); | ||
70 | 76 | ||
71 | /* set the reset vector to point to the secondary_startup routine */ | 77 | return 0; |
78 | } | ||
72 | 79 | ||
73 | boot_vector = virt_to_phys(tegra_secondary_startup); | 80 | static int tegra30_power_up_cpu(unsigned int cpu) |
74 | old_boot_vector = readl(EVP_CPU_RESET_VECTOR); | 81 | { |
75 | writel(boot_vector, EVP_CPU_RESET_VECTOR); | 82 | u32 reg; |
83 | int ret, pwrgateid; | ||
84 | unsigned long timeout; | ||
76 | 85 | ||
77 | /* enable cpu clock on cpu1 */ | 86 | pwrgateid = tegra_cpu_powergate_id(cpu); |
78 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | 87 | if (pwrgateid < 0) |
79 | writel(reg & ~(1<<9), CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | 88 | return pwrgateid; |
89 | |||
90 | /* If this is the first boot, toggle powergates directly. */ | ||
91 | if (!tegra_powergate_is_powered(pwrgateid)) { | ||
92 | ret = tegra_powergate_power_on(pwrgateid); | ||
93 | if (ret) | ||
94 | return ret; | ||
95 | |||
96 | /* Wait for the power to come up. */ | ||
97 | timeout = jiffies + 10*HZ; | ||
98 | while (tegra_powergate_is_powered(pwrgateid)) { | ||
99 | if (time_after(jiffies, timeout)) | ||
100 | return -ETIMEDOUT; | ||
101 | udelay(10); | ||
102 | } | ||
103 | } | ||
80 | 104 | ||
81 | reg = (1<<13) | (1<<9) | (1<<5) | (1<<1); | 105 | /* CPU partition is powered. Enable the CPU clock. */ |
82 | writel(reg, CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR); | 106 | writel(CPU_CLOCK(cpu), CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR); |
107 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR); | ||
108 | udelay(10); | ||
83 | 109 | ||
84 | smp_wmb(); | 110 | /* Remove I/O clamps. */ |
85 | flush_cache_all(); | 111 | ret = tegra_powergate_remove_clamping(pwrgateid); |
112 | udelay(10); | ||
86 | 113 | ||
87 | /* unhalt the cpu */ | 114 | /* Clear flow controller CSR. */ |
88 | writel(0, IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + 0x14); | 115 | flowctrl_write_cpu_csr(cpu, 0); |
89 | 116 | ||
90 | timeout = jiffies + (1 * HZ); | 117 | return 0; |
91 | while (time_before(jiffies, timeout)) { | 118 | } |
92 | if (readl(EVP_CPU_RESET_VECTOR) != boot_vector) | 119 | |
93 | break; | 120 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) |
94 | udelay(10); | 121 | { |
95 | } | 122 | int status; |
96 | 123 | ||
97 | /* put the old boot vector back */ | 124 | /* |
98 | writel(old_boot_vector, EVP_CPU_RESET_VECTOR); | 125 | * Force the CPU into reset. The CPU must remain in reset when the |
126 | * flow controller state is cleared (which will cause the flow | ||
127 | * controller to stop driving reset if the CPU has been power-gated | ||
128 | * via the flow controller). This will have no effect on first boot | ||
129 | * of the CPU since it should already be in reset. | ||
130 | */ | ||
131 | writel(CPU_RESET(cpu), CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET); | ||
132 | dmb(); | ||
99 | 133 | ||
100 | /* | 134 | /* |
101 | * now the secondary core is starting up let it run its | 135 | * Unhalt the CPU. If the flow controller was used to power-gate the |
102 | * calibrations, then wait for it to finish | 136 | * CPU this will cause the flow controller to stop driving reset. |
137 | * The CPU will remain in reset because the clock and reset block | ||
138 | * is now driving reset. | ||
103 | */ | 139 | */ |
104 | spin_unlock(&boot_lock); | 140 | flowctrl_write_cpu_halt(cpu, 0); |
141 | |||
142 | switch (tegra_chip_id) { | ||
143 | case TEGRA20: | ||
144 | status = tegra20_power_up_cpu(cpu); | ||
145 | break; | ||
146 | case TEGRA30: | ||
147 | status = tegra30_power_up_cpu(cpu); | ||
148 | break; | ||
149 | default: | ||
150 | status = -EINVAL; | ||
151 | break; | ||
152 | } | ||
105 | 153 | ||
106 | return 0; | 154 | if (status) |
155 | goto done; | ||
156 | |||
157 | /* Take the CPU out of reset. */ | ||
158 | writel(CPU_RESET(cpu), CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR); | ||
159 | wmb(); | ||
160 | done: | ||
161 | return status; | ||
107 | } | 162 | } |
108 | 163 | ||
109 | /* | 164 | /* |
@@ -128,6 +183,6 @@ void __init smp_init_cpus(void) | |||
128 | 183 | ||
129 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 184 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
130 | { | 185 | { |
131 | 186 | tegra_cpu_reset_handler_init(); | |
132 | scu_enable(scu_base); | 187 | scu_enable(scu_base); |
133 | } | 188 | } |
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c index 948306491a59..c238699ae86f 100644 --- a/arch/arm/mach-tegra/powergate.c +++ b/arch/arm/mach-tegra/powergate.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <mach/iomap.h> | 31 | #include <mach/iomap.h> |
32 | #include <mach/powergate.h> | 32 | #include <mach/powergate.h> |
33 | 33 | ||
34 | #include "fuse.h" | ||
35 | |||
34 | #define PWRGATE_TOGGLE 0x30 | 36 | #define PWRGATE_TOGGLE 0x30 |
35 | #define PWRGATE_TOGGLE_START (1 << 8) | 37 | #define PWRGATE_TOGGLE_START (1 << 8) |
36 | 38 | ||
@@ -38,6 +40,16 @@ | |||
38 | 40 | ||
39 | #define PWRGATE_STATUS 0x38 | 41 | #define PWRGATE_STATUS 0x38 |
40 | 42 | ||
43 | static int tegra_num_powerdomains; | ||
44 | static int tegra_num_cpu_domains; | ||
45 | static u8 *tegra_cpu_domains; | ||
46 | static u8 tegra30_cpu_domains[] = { | ||
47 | TEGRA_POWERGATE_CPU0, | ||
48 | TEGRA_POWERGATE_CPU1, | ||
49 | TEGRA_POWERGATE_CPU2, | ||
50 | TEGRA_POWERGATE_CPU3, | ||
51 | }; | ||
52 | |||
41 | static DEFINE_SPINLOCK(tegra_powergate_lock); | 53 | static DEFINE_SPINLOCK(tegra_powergate_lock); |
42 | 54 | ||
43 | static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); | 55 | static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); |
@@ -75,7 +87,7 @@ static int tegra_powergate_set(int id, bool new_state) | |||
75 | 87 | ||
76 | int tegra_powergate_power_on(int id) | 88 | int tegra_powergate_power_on(int id) |
77 | { | 89 | { |
78 | if (id < 0 || id >= TEGRA_NUM_POWERGATE) | 90 | if (id < 0 || id >= tegra_num_powerdomains) |
79 | return -EINVAL; | 91 | return -EINVAL; |
80 | 92 | ||
81 | return tegra_powergate_set(id, true); | 93 | return tegra_powergate_set(id, true); |
@@ -83,17 +95,18 @@ int tegra_powergate_power_on(int id) | |||
83 | 95 | ||
84 | int tegra_powergate_power_off(int id) | 96 | int tegra_powergate_power_off(int id) |
85 | { | 97 | { |
86 | if (id < 0 || id >= TEGRA_NUM_POWERGATE) | 98 | if (id < 0 || id >= tegra_num_powerdomains) |
87 | return -EINVAL; | 99 | return -EINVAL; |
88 | 100 | ||
89 | return tegra_powergate_set(id, false); | 101 | return tegra_powergate_set(id, false); |
90 | } | 102 | } |
91 | 103 | ||
92 | static bool tegra_powergate_is_powered(int id) | 104 | int tegra_powergate_is_powered(int id) |
93 | { | 105 | { |
94 | u32 status; | 106 | u32 status; |
95 | 107 | ||
96 | WARN_ON(id < 0 || id >= TEGRA_NUM_POWERGATE); | 108 | if (id < 0 || id >= tegra_num_powerdomains) |
109 | return -EINVAL; | ||
97 | 110 | ||
98 | status = pmc_read(PWRGATE_STATUS) & (1 << id); | 111 | status = pmc_read(PWRGATE_STATUS) & (1 << id); |
99 | return !!status; | 112 | return !!status; |
@@ -103,7 +116,7 @@ int tegra_powergate_remove_clamping(int id) | |||
103 | { | 116 | { |
104 | u32 mask; | 117 | u32 mask; |
105 | 118 | ||
106 | if (id < 0 || id >= TEGRA_NUM_POWERGATE) | 119 | if (id < 0 || id >= tegra_num_powerdomains) |
107 | return -EINVAL; | 120 | return -EINVAL; |
108 | 121 | ||
109 | /* | 122 | /* |
@@ -156,6 +169,34 @@ err_power: | |||
156 | return ret; | 169 | return ret; |
157 | } | 170 | } |
158 | 171 | ||
172 | int tegra_cpu_powergate_id(int cpuid) | ||
173 | { | ||
174 | if (cpuid > 0 && cpuid < tegra_num_cpu_domains) | ||
175 | return tegra_cpu_domains[cpuid]; | ||
176 | |||
177 | return -EINVAL; | ||
178 | } | ||
179 | |||
180 | int __init tegra_powergate_init(void) | ||
181 | { | ||
182 | switch (tegra_chip_id) { | ||
183 | case TEGRA20: | ||
184 | tegra_num_powerdomains = 7; | ||
185 | break; | ||
186 | case TEGRA30: | ||
187 | tegra_num_powerdomains = 14; | ||
188 | tegra_num_cpu_domains = 4; | ||
189 | tegra_cpu_domains = tegra30_cpu_domains; | ||
190 | break; | ||
191 | default: | ||
192 | /* Unknown Tegra variant. Disable powergating */ | ||
193 | tegra_num_powerdomains = 0; | ||
194 | break; | ||
195 | } | ||
196 | |||
197 | return 0; | ||
198 | } | ||
199 | |||
159 | #ifdef CONFIG_DEBUG_FS | 200 | #ifdef CONFIG_DEBUG_FS |
160 | 201 | ||
161 | static const char * const powergate_name[] = { | 202 | static const char * const powergate_name[] = { |
@@ -175,7 +216,7 @@ static int powergate_show(struct seq_file *s, void *data) | |||
175 | seq_printf(s, " powergate powered\n"); | 216 | seq_printf(s, " powergate powered\n"); |
176 | seq_printf(s, "------------------\n"); | 217 | seq_printf(s, "------------------\n"); |
177 | 218 | ||
178 | for (i = 0; i < TEGRA_NUM_POWERGATE; i++) | 219 | for (i = 0; i < tegra_num_powerdomains; i++) |
179 | seq_printf(s, " %9s %7s\n", powergate_name[i], | 220 | seq_printf(s, " %9s %7s\n", powergate_name[i], |
180 | tegra_powergate_is_powered(i) ? "yes" : "no"); | 221 | tegra_powergate_is_powered(i) ? "yes" : "no"); |
181 | return 0; | 222 | return 0; |
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c new file mode 100644 index 000000000000..4d6a2ee99c3b --- /dev/null +++ b/arch/arm/mach-tegra/reset.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/reset.c | ||
3 | * | ||
4 | * Copyright (C) 2011,2012 NVIDIA Corporation. | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/cpumask.h> | ||
20 | #include <linux/bitops.h> | ||
21 | |||
22 | #include <asm/cacheflush.h> | ||
23 | #include <asm/hardware/cache-l2x0.h> | ||
24 | |||
25 | #include <mach/iomap.h> | ||
26 | #include <mach/irammap.h> | ||
27 | |||
28 | #include "reset.h" | ||
29 | #include "fuse.h" | ||
30 | |||
31 | #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \ | ||
32 | TEGRA_IRAM_RESET_HANDLER_OFFSET) | ||
33 | |||
34 | static bool is_enabled; | ||
35 | |||
36 | static void tegra_cpu_reset_handler_enable(void) | ||
37 | { | ||
38 | void __iomem *iram_base = IO_ADDRESS(TEGRA_IRAM_RESET_BASE); | ||
39 | void __iomem *evp_cpu_reset = | ||
40 | IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE + 0x100); | ||
41 | void __iomem *sb_ctrl = IO_ADDRESS(TEGRA_SB_BASE); | ||
42 | u32 reg; | ||
43 | |||
44 | BUG_ON(is_enabled); | ||
45 | BUG_ON(tegra_cpu_reset_handler_size > TEGRA_IRAM_RESET_HANDLER_SIZE); | ||
46 | |||
47 | memcpy(iram_base, (void *)__tegra_cpu_reset_handler_start, | ||
48 | tegra_cpu_reset_handler_size); | ||
49 | |||
50 | /* | ||
51 | * NOTE: This must be the one and only write to the EVP CPU reset | ||
52 | * vector in the entire system. | ||
53 | */ | ||
54 | writel(TEGRA_IRAM_RESET_BASE + tegra_cpu_reset_handler_offset, | ||
55 | evp_cpu_reset); | ||
56 | wmb(); | ||
57 | reg = readl(evp_cpu_reset); | ||
58 | |||
59 | /* | ||
60 | * Prevent further modifications to the physical reset vector. | ||
61 | * NOTE: Has no effect on chips prior to Tegra30. | ||
62 | */ | ||
63 | if (tegra_chip_id != TEGRA20) { | ||
64 | reg = readl(sb_ctrl); | ||
65 | reg |= 2; | ||
66 | writel(reg, sb_ctrl); | ||
67 | wmb(); | ||
68 | } | ||
69 | |||
70 | is_enabled = true; | ||
71 | } | ||
72 | |||
73 | void __init tegra_cpu_reset_handler_init(void) | ||
74 | { | ||
75 | |||
76 | #ifdef CONFIG_SMP | ||
77 | __tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_PRESENT] = | ||
78 | *((u32 *)cpu_present_mask); | ||
79 | __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_SECONDARY] = | ||
80 | virt_to_phys((void *)tegra_secondary_startup); | ||
81 | #endif | ||
82 | |||
83 | tegra_cpu_reset_handler_enable(); | ||
84 | } | ||
diff --git a/arch/arm/mach-tegra/reset.h b/arch/arm/mach-tegra/reset.h new file mode 100644 index 000000000000..de88bf851dd3 --- /dev/null +++ b/arch/arm/mach-tegra/reset.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/reset.h | ||
3 | * | ||
4 | * CPU reset dispatcher. | ||
5 | * | ||
6 | * Copyright (c) 2011, NVIDIA Corporation. | ||
7 | * | ||
8 | * This software is licensed under the terms of the GNU General Public | ||
9 | * License version 2, as published by the Free Software Foundation, and | ||
10 | * may be copied, distributed, and modified under those terms. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #ifndef __MACH_TEGRA_RESET_H | ||
20 | #define __MACH_TEGRA_RESET_H | ||
21 | |||
22 | #define TEGRA_RESET_MASK_PRESENT 0 | ||
23 | #define TEGRA_RESET_MASK_LP1 1 | ||
24 | #define TEGRA_RESET_MASK_LP2 2 | ||
25 | #define TEGRA_RESET_STARTUP_SECONDARY 3 | ||
26 | #define TEGRA_RESET_STARTUP_LP2 4 | ||
27 | #define TEGRA_RESET_STARTUP_LP1 5 | ||
28 | #define TEGRA_RESET_DATA_SIZE 6 | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | ||
31 | |||
32 | extern unsigned long __tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]; | ||
33 | |||
34 | void __tegra_cpu_reset_handler_start(void); | ||
35 | void __tegra_cpu_reset_handler(void); | ||
36 | void __tegra_cpu_reset_handler_end(void); | ||
37 | void tegra_secondary_startup(void); | ||
38 | |||
39 | #define tegra_cpu_reset_handler_offset \ | ||
40 | ((u32)__tegra_cpu_reset_handler - \ | ||
41 | (u32)__tegra_cpu_reset_handler_start) | ||
42 | |||
43 | #define tegra_cpu_reset_handler_size \ | ||
44 | (__tegra_cpu_reset_handler_end - \ | ||
45 | __tegra_cpu_reset_handler_start) | ||
46 | |||
47 | void __init tegra_cpu_reset_handler_init(void); | ||
48 | |||
49 | #endif | ||
50 | #endif | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 9ec635812349..880d02ec89d4 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -27,6 +27,7 @@ config MACH_MOP500 | |||
27 | select UX500_SOC_DB8500 | 27 | select UX500_SOC_DB8500 |
28 | select I2C | 28 | select I2C |
29 | select I2C_NOMADIK | 29 | select I2C_NOMADIK |
30 | select SOC_BUS | ||
30 | help | 31 | help |
31 | Include support for the MOP500 development platform. | 32 | Include support for the MOP500 development platform. |
32 | 33 | ||
@@ -57,6 +58,12 @@ config UX500_AUTO_PLATFORM | |||
57 | At least one platform needs to be selected in order to build | 58 | At least one platform needs to be selected in order to build |
58 | a working kernel. If everything else is disabled, this | 59 | a working kernel. If everything else is disabled, this |
59 | automatically enables MACH_MOP500. | 60 | automatically enables MACH_MOP500. |
61 | |||
62 | config MACH_UX500_DT | ||
63 | bool "Generic U8500 support using device tree" | ||
64 | depends on MACH_MOP500 | ||
65 | select USE_OF | ||
66 | |||
60 | endmenu | 67 | endmenu |
61 | 68 | ||
62 | config UX500_DEBUG_UART | 69 | config UX500_DEBUG_UART |
diff --git a/arch/arm/mach-ux500/Makefile.boot b/arch/arm/mach-ux500/Makefile.boot index ff0a4b5b0a82..dd5cd00e2554 100644 --- a/arch/arm/mach-ux500/Makefile.boot +++ b/arch/arm/mach-ux500/Makefile.boot | |||
@@ -2,3 +2,4 @@ | |||
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | 4 | ||
5 | dtb-$(CONFIG_MACH_SNOWBALL) += snowball.dtb | ||
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 1daead3e583e..920251cf834c 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -99,7 +99,7 @@ static struct mmci_platform_data mop500_sdi0_data = { | |||
99 | #endif | 99 | #endif |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static void sdi0_configure(void) | 102 | static void sdi0_configure(struct device *parent) |
103 | { | 103 | { |
104 | int ret; | 104 | int ret; |
105 | 105 | ||
@@ -118,15 +118,15 @@ static void sdi0_configure(void) | |||
118 | gpio_direction_output(sdi0_en, 1); | 118 | gpio_direction_output(sdi0_en, 1); |
119 | 119 | ||
120 | /* Add the device, force v2 to subrevision 1 */ | 120 | /* Add the device, force v2 to subrevision 1 */ |
121 | db8500_add_sdi0(&mop500_sdi0_data, U8500_SDI_V2_PERIPHID); | 121 | db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID); |
122 | } | 122 | } |
123 | 123 | ||
124 | void mop500_sdi_tc35892_init(void) | 124 | void mop500_sdi_tc35892_init(struct device *parent) |
125 | { | 125 | { |
126 | mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD; | 126 | mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD; |
127 | sdi0_en = GPIO_SDMMC_EN; | 127 | sdi0_en = GPIO_SDMMC_EN; |
128 | sdi0_vsel = GPIO_SDMMC_1V8_3V_SEL; | 128 | sdi0_vsel = GPIO_SDMMC_1V8_3V_SEL; |
129 | sdi0_configure(); | 129 | sdi0_configure(parent); |
130 | } | 130 | } |
131 | 131 | ||
132 | /* | 132 | /* |
@@ -241,12 +241,13 @@ static struct mmci_platform_data mop500_sdi4_data = { | |||
241 | #endif | 241 | #endif |
242 | }; | 242 | }; |
243 | 243 | ||
244 | void __init mop500_sdi_init(void) | 244 | void __init mop500_sdi_init(struct device *parent) |
245 | { | 245 | { |
246 | /* PoP:ed eMMC */ | 246 | /* PoP:ed eMMC */ |
247 | db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID); | 247 | db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID); |
248 | /* On-board eMMC */ | 248 | /* On-board eMMC */ |
249 | db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID); | 249 | db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
250 | |||
250 | /* | 251 | /* |
251 | * On boards with the TC35892 GPIO expander, sdi0 will finally | 252 | * On boards with the TC35892 GPIO expander, sdi0 will finally |
252 | * be added when the TC35892 initializes and calls | 253 | * be added when the TC35892 initializes and calls |
@@ -254,31 +255,31 @@ void __init mop500_sdi_init(void) | |||
254 | */ | 255 | */ |
255 | } | 256 | } |
256 | 257 | ||
257 | void __init snowball_sdi_init(void) | 258 | void __init snowball_sdi_init(struct device *parent) |
258 | { | 259 | { |
259 | /* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported (Hardware issue?) */ | 260 | /* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported (Hardware issue?) */ |
260 | mop500_sdi0_data.capabilities &= ~MMC_CAP_SD_HIGHSPEED; | 261 | mop500_sdi0_data.capabilities &= ~MMC_CAP_SD_HIGHSPEED; |
261 | /* On-board eMMC */ | 262 | /* On-board eMMC */ |
262 | db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID); | 263 | db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
263 | /* External Micro SD slot */ | 264 | /* External Micro SD slot */ |
264 | mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; | 265 | mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; |
265 | mop500_sdi0_data.cd_invert = true; | 266 | mop500_sdi0_data.cd_invert = true; |
266 | sdi0_en = SNOWBALL_SDMMC_EN_GPIO; | 267 | sdi0_en = SNOWBALL_SDMMC_EN_GPIO; |
267 | sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO; | 268 | sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO; |
268 | sdi0_configure(); | 269 | sdi0_configure(parent); |
269 | } | 270 | } |
270 | 271 | ||
271 | void __init hrefv60_sdi_init(void) | 272 | void __init hrefv60_sdi_init(struct device *parent) |
272 | { | 273 | { |
273 | /* PoP:ed eMMC */ | 274 | /* PoP:ed eMMC */ |
274 | db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID); | 275 | db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID); |
275 | /* On-board eMMC */ | 276 | /* On-board eMMC */ |
276 | db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID); | 277 | db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
277 | /* External Micro SD slot */ | 278 | /* External Micro SD slot */ |
278 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; | 279 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; |
279 | sdi0_en = HREFV60_SDMMC_EN_GPIO; | 280 | sdi0_en = HREFV60_SDMMC_EN_GPIO; |
280 | sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; | 281 | sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; |
281 | sdi0_configure(); | 282 | sdi0_configure(parent); |
282 | /* WLAN SDIO channel */ | 283 | /* WLAN SDIO channel */ |
283 | db8500_add_sdi1(&mop500_sdi1_data, U8500_SDI_V2_PERIPHID); | 284 | db8500_add_sdi1(parent, &mop500_sdi1_data, U8500_SDI_V2_PERIPHID); |
284 | } | 285 | } |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 6d672a556df8..77d03c1fbd04 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -30,6 +30,9 @@ | |||
30 | #include <linux/gpio_keys.h> | 30 | #include <linux/gpio_keys.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | 32 | ||
33 | #include <linux/of.h> | ||
34 | #include <linux/of_platform.h> | ||
35 | |||
33 | #include <linux/leds.h> | 36 | #include <linux/leds.h> |
34 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
@@ -226,7 +229,12 @@ static struct tps6105x_platform_data mop500_tps61052_data = { | |||
226 | 229 | ||
227 | static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base) | 230 | static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base) |
228 | { | 231 | { |
229 | mop500_sdi_tc35892_init(); | 232 | struct device *parent = NULL; |
233 | #if 0 | ||
234 | /* FIXME: Is the sdi actually part of tc3589x? */ | ||
235 | parent = tc3589x->dev; | ||
236 | #endif | ||
237 | mop500_sdi_tc35892_init(parent); | ||
230 | } | 238 | } |
231 | 239 | ||
232 | static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = { | 240 | static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = { |
@@ -353,12 +361,12 @@ U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); | |||
353 | U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); | 361 | U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); |
354 | U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); | 362 | U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); |
355 | 363 | ||
356 | static void __init mop500_i2c_init(void) | 364 | static void __init mop500_i2c_init(struct device *parent) |
357 | { | 365 | { |
358 | db8500_add_i2c0(&u8500_i2c0_data); | 366 | db8500_add_i2c0(parent, &u8500_i2c0_data); |
359 | db8500_add_i2c1(&u8500_i2c1_data); | 367 | db8500_add_i2c1(parent, &u8500_i2c1_data); |
360 | db8500_add_i2c2(&u8500_i2c2_data); | 368 | db8500_add_i2c2(parent, &u8500_i2c2_data); |
361 | db8500_add_i2c3(&u8500_i2c3_data); | 369 | db8500_add_i2c3(parent, &u8500_i2c3_data); |
362 | } | 370 | } |
363 | 371 | ||
364 | static struct gpio_keys_button mop500_gpio_keys[] = { | 372 | static struct gpio_keys_button mop500_gpio_keys[] = { |
@@ -435,7 +443,7 @@ static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { | |||
435 | }; | 443 | }; |
436 | #endif | 444 | #endif |
437 | 445 | ||
438 | static struct pl022_ssp_controller ssp0_platform_data = { | 446 | static struct pl022_ssp_controller ssp0_plat = { |
439 | .bus_id = 0, | 447 | .bus_id = 0, |
440 | #ifdef CONFIG_STE_DMA40 | 448 | #ifdef CONFIG_STE_DMA40 |
441 | .enable_dma = 1, | 449 | .enable_dma = 1, |
@@ -451,9 +459,9 @@ static struct pl022_ssp_controller ssp0_platform_data = { | |||
451 | .num_chipselect = 5, | 459 | .num_chipselect = 5, |
452 | }; | 460 | }; |
453 | 461 | ||
454 | static void __init mop500_spi_init(void) | 462 | static void __init mop500_spi_init(struct device *parent) |
455 | { | 463 | { |
456 | db8500_add_ssp0(&ssp0_platform_data); | 464 | db8500_add_ssp0(parent, &ssp0_plat); |
457 | } | 465 | } |
458 | 466 | ||
459 | #ifdef CONFIG_STE_DMA40 | 467 | #ifdef CONFIG_STE_DMA40 |
@@ -587,11 +595,11 @@ static struct amba_pl011_data uart2_plat = { | |||
587 | #endif | 595 | #endif |
588 | }; | 596 | }; |
589 | 597 | ||
590 | static void __init mop500_uart_init(void) | 598 | static void __init mop500_uart_init(struct device *parent) |
591 | { | 599 | { |
592 | db8500_add_uart0(&uart0_plat); | 600 | db8500_add_uart0(parent, &uart0_plat); |
593 | db8500_add_uart1(&uart1_plat); | 601 | db8500_add_uart1(parent, &uart1_plat); |
594 | db8500_add_uart2(&uart2_plat); | 602 | db8500_add_uart2(parent, &uart2_plat); |
595 | } | 603 | } |
596 | 604 | ||
597 | static struct platform_device *snowball_platform_devs[] __initdata = { | 605 | static struct platform_device *snowball_platform_devs[] __initdata = { |
@@ -603,21 +611,27 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
603 | 611 | ||
604 | static void __init mop500_init_machine(void) | 612 | static void __init mop500_init_machine(void) |
605 | { | 613 | { |
614 | struct device *parent = NULL; | ||
606 | int i2c0_devs; | 615 | int i2c0_devs; |
616 | int i; | ||
607 | 617 | ||
608 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | 618 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; |
609 | 619 | ||
610 | u8500_init_devices(); | 620 | parent = u8500_init_devices(); |
611 | 621 | ||
612 | mop500_pins_init(); | 622 | mop500_pins_init(); |
613 | 623 | ||
624 | /* FIXME: parent of ab8500 should be prcmu */ | ||
625 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) | ||
626 | mop500_platform_devs[i]->dev.parent = parent; | ||
627 | |||
614 | platform_add_devices(mop500_platform_devs, | 628 | platform_add_devices(mop500_platform_devs, |
615 | ARRAY_SIZE(mop500_platform_devs)); | 629 | ARRAY_SIZE(mop500_platform_devs)); |
616 | 630 | ||
617 | mop500_i2c_init(); | 631 | mop500_i2c_init(parent); |
618 | mop500_sdi_init(); | 632 | mop500_sdi_init(parent); |
619 | mop500_spi_init(); | 633 | mop500_spi_init(parent); |
620 | mop500_uart_init(); | 634 | mop500_uart_init(parent); |
621 | 635 | ||
622 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 636 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
623 | 637 | ||
@@ -631,19 +645,24 @@ static void __init mop500_init_machine(void) | |||
631 | 645 | ||
632 | static void __init snowball_init_machine(void) | 646 | static void __init snowball_init_machine(void) |
633 | { | 647 | { |
648 | struct device *parent = NULL; | ||
634 | int i2c0_devs; | 649 | int i2c0_devs; |
650 | int i; | ||
635 | 651 | ||
636 | u8500_init_devices(); | 652 | parent = u8500_init_devices(); |
637 | 653 | ||
638 | snowball_pins_init(); | 654 | snowball_pins_init(); |
639 | 655 | ||
656 | for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) | ||
657 | snowball_platform_devs[i]->dev.parent = parent; | ||
658 | |||
640 | platform_add_devices(snowball_platform_devs, | 659 | platform_add_devices(snowball_platform_devs, |
641 | ARRAY_SIZE(snowball_platform_devs)); | 660 | ARRAY_SIZE(snowball_platform_devs)); |
642 | 661 | ||
643 | mop500_i2c_init(); | 662 | mop500_i2c_init(parent); |
644 | snowball_sdi_init(); | 663 | snowball_sdi_init(parent); |
645 | mop500_spi_init(); | 664 | mop500_spi_init(parent); |
646 | mop500_uart_init(); | 665 | mop500_uart_init(parent); |
647 | 666 | ||
648 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 667 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
649 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | 668 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
@@ -656,7 +675,9 @@ static void __init snowball_init_machine(void) | |||
656 | 675 | ||
657 | static void __init hrefv60_init_machine(void) | 676 | static void __init hrefv60_init_machine(void) |
658 | { | 677 | { |
678 | struct device *parent = NULL; | ||
659 | int i2c0_devs; | 679 | int i2c0_devs; |
680 | int i; | ||
660 | 681 | ||
661 | /* | 682 | /* |
662 | * The HREFv60 board removed a GPIO expander and routed | 683 | * The HREFv60 board removed a GPIO expander and routed |
@@ -665,17 +686,20 @@ static void __init hrefv60_init_machine(void) | |||
665 | */ | 686 | */ |
666 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; | 687 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; |
667 | 688 | ||
668 | u8500_init_devices(); | 689 | parent = u8500_init_devices(); |
669 | 690 | ||
670 | hrefv60_pins_init(); | 691 | hrefv60_pins_init(); |
671 | 692 | ||
693 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) | ||
694 | mop500_platform_devs[i]->dev.parent = parent; | ||
695 | |||
672 | platform_add_devices(mop500_platform_devs, | 696 | platform_add_devices(mop500_platform_devs, |
673 | ARRAY_SIZE(mop500_platform_devs)); | 697 | ARRAY_SIZE(mop500_platform_devs)); |
674 | 698 | ||
675 | mop500_i2c_init(); | 699 | mop500_i2c_init(parent); |
676 | hrefv60_sdi_init(); | 700 | hrefv60_sdi_init(parent); |
677 | mop500_spi_init(); | 701 | mop500_spi_init(parent); |
678 | mop500_uart_init(); | 702 | mop500_uart_init(parent); |
679 | 703 | ||
680 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 704 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
681 | 705 | ||
@@ -718,3 +742,94 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
718 | .handle_irq = gic_handle_irq, | 742 | .handle_irq = gic_handle_irq, |
719 | .init_machine = snowball_init_machine, | 743 | .init_machine = snowball_init_machine, |
720 | MACHINE_END | 744 | MACHINE_END |
745 | |||
746 | #ifdef CONFIG_MACH_UX500_DT | ||
747 | |||
748 | struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | ||
749 | OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), | ||
750 | OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), | ||
751 | OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), | ||
752 | OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), | ||
753 | {}, | ||
754 | }; | ||
755 | |||
756 | static const struct of_device_id u8500_soc_node[] = { | ||
757 | /* only create devices below soc node */ | ||
758 | { .compatible = "stericsson,db8500", }, | ||
759 | { }, | ||
760 | }; | ||
761 | |||
762 | static void __init u8500_init_machine(void) | ||
763 | { | ||
764 | struct device *parent = NULL; | ||
765 | int i2c0_devs; | ||
766 | int i; | ||
767 | |||
768 | parent = u8500_init_devices(); | ||
769 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
770 | |||
771 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) | ||
772 | mop500_platform_devs[i]->dev.parent = parent; | ||
773 | for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) | ||
774 | snowball_platform_devs[i]->dev.parent = parent; | ||
775 | |||
776 | /* automatically probe child nodes of db8500 device */ | ||
777 | of_platform_populate(NULL, u8500_soc_node, u8500_auxdata_lookup, parent); | ||
778 | |||
779 | if (of_machine_is_compatible("st-ericsson,mop500")) { | ||
780 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | ||
781 | mop500_pins_init(); | ||
782 | |||
783 | platform_add_devices(mop500_platform_devs, | ||
784 | ARRAY_SIZE(mop500_platform_devs)); | ||
785 | |||
786 | mop500_sdi_init(parent); | ||
787 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { | ||
788 | snowball_pins_init(); | ||
789 | platform_add_devices(snowball_platform_devs, | ||
790 | ARRAY_SIZE(snowball_platform_devs)); | ||
791 | |||
792 | snowball_sdi_init(parent); | ||
793 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { | ||
794 | /* | ||
795 | * The HREFv60 board removed a GPIO expander and routed | ||
796 | * all these GPIO pins to the internal GPIO controller | ||
797 | * instead. | ||
798 | */ | ||
799 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; | ||
800 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | ||
801 | hrefv60_pins_init(); | ||
802 | platform_add_devices(mop500_platform_devs, | ||
803 | ARRAY_SIZE(mop500_platform_devs)); | ||
804 | |||
805 | hrefv60_sdi_init(parent); | ||
806 | } | ||
807 | mop500_i2c_init(parent); | ||
808 | |||
809 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
810 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
811 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
812 | |||
813 | /* This board has full regulator constraints */ | ||
814 | regulator_has_full_constraints(); | ||
815 | } | ||
816 | |||
817 | static const char * u8500_dt_board_compat[] = { | ||
818 | "calaosystems,snowball-a9500", | ||
819 | "st-ericsson,hrefv60+", | ||
820 | "st-ericsson,u8500", | ||
821 | "st-ericsson,mop500", | ||
822 | NULL, | ||
823 | }; | ||
824 | |||
825 | |||
826 | DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") | ||
827 | .map_io = u8500_map_io, | ||
828 | .init_irq = ux500_init_irq, | ||
829 | /* we re-use nomadik timer here */ | ||
830 | .timer = &ux500_timer, | ||
831 | .handle_irq = gic_handle_irq, | ||
832 | .init_machine = u8500_init_machine, | ||
833 | .dt_compat = u8500_dt_board_compat, | ||
834 | MACHINE_END | ||
835 | #endif | ||
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 7ff6cbffc104..fdcfa8721bb4 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h | |||
@@ -75,10 +75,10 @@ | |||
75 | 75 | ||
76 | struct i2c_board_info; | 76 | struct i2c_board_info; |
77 | 77 | ||
78 | extern void mop500_sdi_init(void); | 78 | extern void mop500_sdi_init(struct device *parent); |
79 | extern void snowball_sdi_init(void); | 79 | extern void snowball_sdi_init(struct device *parent); |
80 | extern void hrefv60_sdi_init(void); | 80 | extern void hrefv60_sdi_init(struct device *parent); |
81 | extern void mop500_sdi_tc35892_init(void); | 81 | extern void mop500_sdi_tc35892_init(struct device *parent); |
82 | void __init mop500_u8500uib_init(void); | 82 | void __init mop500_u8500uib_init(void); |
83 | void __init mop500_stuib_init(void); | 83 | void __init mop500_stuib_init(void); |
84 | void __init mop500_pins_init(void); | 84 | void __init mop500_pins_init(void); |
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c index 63c3f8058ffc..836112eedde7 100644 --- a/arch/arm/mach-ux500/board-u5500-sdi.c +++ b/arch/arm/mach-ux500/board-u5500-sdi.c | |||
@@ -66,9 +66,9 @@ static struct mmci_platform_data u5500_sdi0_data = { | |||
66 | #endif | 66 | #endif |
67 | }; | 67 | }; |
68 | 68 | ||
69 | void __init u5500_sdi_init(void) | 69 | void __init u5500_sdi_init(struct device *parent) |
70 | { | 70 | { |
71 | nmk_config_pins(u5500_sdi_pins, ARRAY_SIZE(u5500_sdi_pins)); | 71 | nmk_config_pins(u5500_sdi_pins, ARRAY_SIZE(u5500_sdi_pins)); |
72 | 72 | ||
73 | db5500_add_sdi0(&u5500_sdi0_data); | 73 | db5500_add_sdi0(parent, &u5500_sdi0_data); |
74 | } | 74 | } |
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 9de9e9c4dbbb..0ff4be72a809 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c | |||
@@ -97,9 +97,9 @@ static struct i2c_board_info __initdata u5500_i2c2_devices[] = { | |||
97 | }, | 97 | }, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static void __init u5500_i2c_init(void) | 100 | static void __init u5500_i2c_init(struct device *parent) |
101 | { | 101 | { |
102 | db5500_add_i2c2(&u5500_i2c2_data); | 102 | db5500_add_i2c2(parent, &u5500_i2c2_data); |
103 | i2c_register_board_info(2, ARRAY_AND_SIZE(u5500_i2c2_devices)); | 103 | i2c_register_board_info(2, ARRAY_AND_SIZE(u5500_i2c2_devices)); |
104 | } | 104 | } |
105 | 105 | ||
@@ -126,20 +126,27 @@ static struct platform_device *u5500_platform_devices[] __initdata = { | |||
126 | &ab5500_device, | 126 | &ab5500_device, |
127 | }; | 127 | }; |
128 | 128 | ||
129 | static void __init u5500_uart_init(void) | 129 | static void __init u5500_uart_init(struct device *parent) |
130 | { | 130 | { |
131 | db5500_add_uart0(NULL); | 131 | db5500_add_uart0(parent, NULL); |
132 | db5500_add_uart1(NULL); | 132 | db5500_add_uart1(parent, NULL); |
133 | db5500_add_uart2(NULL); | 133 | db5500_add_uart2(parent, NULL); |
134 | } | 134 | } |
135 | 135 | ||
136 | static void __init u5500_init_machine(void) | 136 | static void __init u5500_init_machine(void) |
137 | { | 137 | { |
138 | u5500_init_devices(); | 138 | struct device *parent = NULL; |
139 | int i; | ||
140 | |||
141 | parent = u5500_init_devices(); | ||
139 | nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins)); | 142 | nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins)); |
140 | u5500_i2c_init(); | 143 | |
141 | u5500_sdi_init(); | 144 | u5500_i2c_init(parent); |
142 | u5500_uart_init(); | 145 | u5500_sdi_init(parent); |
146 | u5500_uart_init(parent); | ||
147 | |||
148 | for (i = 0; i < ARRAY_SIZE(u5500_platform_devices); i++) | ||
149 | u5500_platform_devices[i]->dev.parent = parent; | ||
143 | 150 | ||
144 | platform_add_devices(u5500_platform_devices, | 151 | platform_add_devices(u5500_platform_devices, |
145 | ARRAY_SIZE(u5500_platform_devices)); | 152 | ARRAY_SIZE(u5500_platform_devices)); |
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index da5569d83d58..77a75ed0df67 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
@@ -5,6 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | #include <linux/of.h> | ||
9 | |||
8 | #include <asm/cacheflush.h> | 10 | #include <asm/cacheflush.h> |
9 | #include <asm/hardware/cache-l2x0.h> | 11 | #include <asm/hardware/cache-l2x0.h> |
10 | #include <mach/hardware.h> | 12 | #include <mach/hardware.h> |
@@ -45,7 +47,10 @@ static int __init ux500_l2x0_init(void) | |||
45 | ux500_l2x0_unlock(); | 47 | ux500_l2x0_unlock(); |
46 | 48 | ||
47 | /* 64KB way size, 8 way associativity, force WA */ | 49 | /* 64KB way size, 8 way associativity, force WA */ |
48 | l2x0_init(l2x0_base, 0x3e060000, 0xc0000fff); | 50 | if (of_have_populated_dt()) |
51 | l2x0_of_init(0x3e060000, 0xc0000fff); | ||
52 | else | ||
53 | l2x0_init(l2x0_base, 0x3e060000, 0xc0000fff); | ||
49 | 54 | ||
50 | /* | 55 | /* |
51 | * We can't disable l2 as we are in non secure mode, currently | 56 | * We can't disable l2 as we are in non secure mode, currently |
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 18aa5c05c69e..bca47f32082f 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -147,13 +147,13 @@ static resource_size_t __initdata db5500_gpio_base[] = { | |||
147 | U5500_GPIOBANK7_BASE, | 147 | U5500_GPIOBANK7_BASE, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static void __init db5500_add_gpios(void) | 150 | static void __init db5500_add_gpios(struct device *parent) |
151 | { | 151 | { |
152 | struct nmk_gpio_platform_data pdata = { | 152 | struct nmk_gpio_platform_data pdata = { |
153 | /* No custom data yet */ | 153 | /* No custom data yet */ |
154 | }; | 154 | }; |
155 | 155 | ||
156 | dbx500_add_gpios(ARRAY_AND_SIZE(db5500_gpio_base), | 156 | dbx500_add_gpios(parent, ARRAY_AND_SIZE(db5500_gpio_base), |
157 | IRQ_DB5500_GPIO0, &pdata); | 157 | IRQ_DB5500_GPIO0, &pdata); |
158 | } | 158 | } |
159 | 159 | ||
@@ -212,14 +212,36 @@ static int usb_db5500_tx_dma_cfg[] = { | |||
212 | DB5500_DMA_DEV38_USB_OTG_OEP_8 | 212 | DB5500_DMA_DEV38_USB_OTG_OEP_8 |
213 | }; | 213 | }; |
214 | 214 | ||
215 | void __init u5500_init_devices(void) | 215 | static const char *db5500_read_soc_id(void) |
216 | { | 216 | { |
217 | db5500_add_gpios(); | 217 | return kasprintf(GFP_KERNEL, "u5500 currently unsupported\n"); |
218 | } | ||
219 | |||
220 | static struct device * __init db5500_soc_device_init(void) | ||
221 | { | ||
222 | const char *soc_id = db5500_read_soc_id(); | ||
223 | |||
224 | return ux500_soc_device_init(soc_id); | ||
225 | } | ||
226 | |||
227 | struct device * __init u5500_init_devices(void) | ||
228 | { | ||
229 | struct device *parent; | ||
230 | int i; | ||
231 | |||
232 | parent = db5500_soc_device_init(); | ||
233 | |||
234 | db5500_add_gpios(parent); | ||
218 | db5500_pmu_init(); | 235 | db5500_pmu_init(); |
219 | db5500_dma_init(); | 236 | db5500_dma_init(parent); |
220 | db5500_add_rtc(); | 237 | db5500_add_rtc(parent); |
221 | db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); | 238 | db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); |
239 | |||
240 | for (i = 0; i < ARRAY_SIZE(db5500_platform_devs); i++) | ||
241 | db5500_platform_devs[i]->dev.parent = parent; | ||
222 | 242 | ||
223 | platform_add_devices(db5500_platform_devs, | 243 | platform_add_devices(db5500_platform_devs, |
224 | ARRAY_SIZE(db5500_platform_devs)); | 244 | ARRAY_SIZE(db5500_platform_devs)); |
245 | |||
246 | return parent; | ||
225 | } | 247 | } |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 7176ee7491ab..9bd8163896cf 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <mach/setup.h> | 24 | #include <mach/setup.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
26 | #include <mach/usb.h> | 26 | #include <mach/usb.h> |
27 | #include <mach/db8500-regs.h> | ||
27 | 28 | ||
28 | #include "devices-db8500.h" | 29 | #include "devices-db8500.h" |
29 | #include "ste-dma40-db8500.h" | 30 | #include "ste-dma40-db8500.h" |
@@ -132,13 +133,13 @@ static resource_size_t __initdata db8500_gpio_base[] = { | |||
132 | U8500_GPIOBANK8_BASE, | 133 | U8500_GPIOBANK8_BASE, |
133 | }; | 134 | }; |
134 | 135 | ||
135 | static void __init db8500_add_gpios(void) | 136 | static void __init db8500_add_gpios(struct device *parent) |
136 | { | 137 | { |
137 | struct nmk_gpio_platform_data pdata = { | 138 | struct nmk_gpio_platform_data pdata = { |
138 | .supports_sleepmode = true, | 139 | .supports_sleepmode = true, |
139 | }; | 140 | }; |
140 | 141 | ||
141 | dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), | 142 | dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), |
142 | IRQ_DB8500_GPIO0, &pdata); | 143 | IRQ_DB8500_GPIO0, &pdata); |
143 | } | 144 | } |
144 | 145 | ||
@@ -164,17 +165,44 @@ static int usb_db8500_tx_dma_cfg[] = { | |||
164 | DB8500_DMA_DEV39_USB_OTG_OEP_8 | 165 | DB8500_DMA_DEV39_USB_OTG_OEP_8 |
165 | }; | 166 | }; |
166 | 167 | ||
168 | static const char *db8500_read_soc_id(void) | ||
169 | { | ||
170 | void __iomem *uid = __io_address(U8500_BB_UID_BASE); | ||
171 | |||
172 | return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", | ||
173 | readl((u32 *)uid+1), | ||
174 | readl((u32 *)uid+1), readl((u32 *)uid+2), | ||
175 | readl((u32 *)uid+3), readl((u32 *)uid+4)); | ||
176 | } | ||
177 | |||
178 | static struct device * __init db8500_soc_device_init(void) | ||
179 | { | ||
180 | const char *soc_id = db8500_read_soc_id(); | ||
181 | |||
182 | return ux500_soc_device_init(soc_id); | ||
183 | } | ||
184 | |||
167 | /* | 185 | /* |
168 | * This function is called from the board init | 186 | * This function is called from the board init |
169 | */ | 187 | */ |
170 | void __init u8500_init_devices(void) | 188 | struct device * __init u8500_init_devices(void) |
171 | { | 189 | { |
172 | db8500_add_rtc(); | 190 | struct device *parent; |
173 | db8500_add_gpios(); | 191 | int i; |
174 | db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); | 192 | |
193 | parent = db8500_soc_device_init(); | ||
194 | |||
195 | db8500_add_rtc(parent); | ||
196 | db8500_add_gpios(parent); | ||
197 | db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); | ||
198 | |||
199 | platform_device_register_data(parent, | ||
200 | "cpufreq-u8500", -1, NULL, 0); | ||
201 | |||
202 | for (i = 0; i < ARRAY_SIZE(platform_devs); i++) | ||
203 | platform_devs[i]->dev.parent = parent; | ||
175 | 204 | ||
176 | platform_device_register_simple("cpufreq-u8500", -1, NULL, 0); | ||
177 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | 205 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); |
178 | 206 | ||
179 | return ; | 207 | return parent; |
180 | } | 208 | } |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 851308bf6424..d11f3892a27d 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright (C) ST-Ericsson SA 2010 | 2 | * Copyright (C) ST-Ericsson SA 2010 |
3 | * | 3 | * |
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | 4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson |
5 | * Author: Lee Jones <lee.jones@linaro.org> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | 6 | * License terms: GNU General Public License (GPL) version 2 |
6 | */ | 7 | */ |
7 | 8 | ||
@@ -11,6 +12,12 @@ | |||
11 | #include <linux/mfd/db8500-prcmu.h> | 12 | #include <linux/mfd/db8500-prcmu.h> |
12 | #include <linux/mfd/db5500-prcmu.h> | 13 | #include <linux/mfd/db5500-prcmu.h> |
13 | #include <linux/clksrc-dbx500-prcmu.h> | 14 | #include <linux/clksrc-dbx500-prcmu.h> |
15 | #include <linux/sys_soc.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <linux/slab.h> | ||
18 | #include <linux/stat.h> | ||
19 | #include <linux/of.h> | ||
20 | #include <linux/of_irq.h> | ||
14 | 21 | ||
15 | #include <asm/hardware/gic.h> | 22 | #include <asm/hardware/gic.h> |
16 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
@@ -23,6 +30,11 @@ | |||
23 | 30 | ||
24 | void __iomem *_PRCMU_BASE; | 31 | void __iomem *_PRCMU_BASE; |
25 | 32 | ||
33 | static const struct of_device_id ux500_dt_irq_match[] = { | ||
34 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
35 | {}, | ||
36 | }; | ||
37 | |||
26 | void __init ux500_init_irq(void) | 38 | void __init ux500_init_irq(void) |
27 | { | 39 | { |
28 | void __iomem *dist_base; | 40 | void __iomem *dist_base; |
@@ -37,7 +49,12 @@ void __init ux500_init_irq(void) | |||
37 | } else | 49 | } else |
38 | ux500_unknown_soc(); | 50 | ux500_unknown_soc(); |
39 | 51 | ||
40 | gic_init(0, 29, dist_base, cpu_base); | 52 | #ifdef CONFIG_OF |
53 | if (of_have_populated_dt()) | ||
54 | of_irq_init(ux500_dt_irq_match); | ||
55 | else | ||
56 | #endif | ||
57 | gic_init(0, 29, dist_base, cpu_base); | ||
41 | 58 | ||
42 | /* | 59 | /* |
43 | * Init clocks here so that they are available for system timer | 60 | * Init clocks here so that they are available for system timer |
@@ -49,3 +66,73 @@ void __init ux500_init_irq(void) | |||
49 | db8500_prcmu_early_init(); | 66 | db8500_prcmu_early_init(); |
50 | clk_init(); | 67 | clk_init(); |
51 | } | 68 | } |
69 | |||
70 | static const char * __init ux500_get_machine(void) | ||
71 | { | ||
72 | return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber()); | ||
73 | } | ||
74 | |||
75 | static const char * __init ux500_get_family(void) | ||
76 | { | ||
77 | return kasprintf(GFP_KERNEL, "ux500"); | ||
78 | } | ||
79 | |||
80 | static const char * __init ux500_get_revision(void) | ||
81 | { | ||
82 | unsigned int rev = dbx500_revision(); | ||
83 | |||
84 | if (rev == 0x01) | ||
85 | return kasprintf(GFP_KERNEL, "%s", "ED"); | ||
86 | else if (rev >= 0xA0) | ||
87 | return kasprintf(GFP_KERNEL, "%d.%d", | ||
88 | (rev >> 4) - 0xA + 1, rev & 0xf); | ||
89 | |||
90 | return kasprintf(GFP_KERNEL, "%s", "Unknown"); | ||
91 | } | ||
92 | |||
93 | static ssize_t ux500_get_process(struct device *dev, | ||
94 | struct device_attribute *attr, | ||
95 | char *buf) | ||
96 | { | ||
97 | if (dbx500_id.process == 0x00) | ||
98 | return sprintf(buf, "Standard\n"); | ||
99 | |||
100 | return sprintf(buf, "%02xnm\n", dbx500_id.process); | ||
101 | } | ||
102 | |||
103 | static void __init soc_info_populate(struct soc_device_attribute *soc_dev_attr, | ||
104 | const char *soc_id) | ||
105 | { | ||
106 | soc_dev_attr->soc_id = soc_id; | ||
107 | soc_dev_attr->machine = ux500_get_machine(); | ||
108 | soc_dev_attr->family = ux500_get_family(); | ||
109 | soc_dev_attr->revision = ux500_get_revision(); | ||
110 | } | ||
111 | |||
112 | struct device_attribute ux500_soc_attr = | ||
113 | __ATTR(process, S_IRUGO, ux500_get_process, NULL); | ||
114 | |||
115 | struct device * __init ux500_soc_device_init(const char *soc_id) | ||
116 | { | ||
117 | struct device *parent; | ||
118 | struct soc_device *soc_dev; | ||
119 | struct soc_device_attribute *soc_dev_attr; | ||
120 | |||
121 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | ||
122 | if (!soc_dev_attr) | ||
123 | return ERR_PTR(-ENOMEM); | ||
124 | |||
125 | soc_info_populate(soc_dev_attr, soc_id); | ||
126 | |||
127 | soc_dev = soc_device_register(soc_dev_attr); | ||
128 | if (IS_ERR_OR_NULL(soc_dev)) { | ||
129 | kfree(soc_dev_attr); | ||
130 | return NULL; | ||
131 | } | ||
132 | |||
133 | parent = soc_device_to_device(soc_dev); | ||
134 | if (!IS_ERR_OR_NULL(parent)) | ||
135 | device_create_file(parent, &ux500_soc_attr); | ||
136 | |||
137 | return parent; | ||
138 | } | ||
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index 898a64517b09..c5312a4b49f5 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
@@ -20,8 +20,9 @@ | |||
20 | #include "devices-common.h" | 20 | #include "devices-common.h" |
21 | 21 | ||
22 | struct amba_device * | 22 | struct amba_device * |
23 | dbx500_add_amba_device(const char *name, resource_size_t base, | 23 | dbx500_add_amba_device(struct device *parent, const char *name, |
24 | int irq, void *pdata, unsigned int periphid) | 24 | resource_size_t base, int irq, void *pdata, |
25 | unsigned int periphid) | ||
25 | { | 26 | { |
26 | struct amba_device *dev; | 27 | struct amba_device *dev; |
27 | int ret; | 28 | int ret; |
@@ -39,6 +40,8 @@ dbx500_add_amba_device(const char *name, resource_size_t base, | |||
39 | 40 | ||
40 | dev->dev.platform_data = pdata; | 41 | dev->dev.platform_data = pdata; |
41 | 42 | ||
43 | dev->dev.parent = parent; | ||
44 | |||
42 | ret = amba_device_add(dev, &iomem_resource); | 45 | ret = amba_device_add(dev, &iomem_resource); |
43 | if (ret) { | 46 | if (ret) { |
44 | amba_device_put(dev); | 47 | amba_device_put(dev); |
@@ -49,60 +52,7 @@ dbx500_add_amba_device(const char *name, resource_size_t base, | |||
49 | } | 52 | } |
50 | 53 | ||
51 | static struct platform_device * | 54 | static struct platform_device * |
52 | dbx500_add_platform_device(const char *name, int id, void *pdata, | 55 | dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, |
53 | struct resource *res, int resnum) | ||
54 | { | ||
55 | struct platform_device *dev; | ||
56 | int ret; | ||
57 | |||
58 | dev = platform_device_alloc(name, id); | ||
59 | if (!dev) | ||
60 | return ERR_PTR(-ENOMEM); | ||
61 | |||
62 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
63 | dev->dev.dma_mask = &dev->dev.coherent_dma_mask; | ||
64 | |||
65 | ret = platform_device_add_resources(dev, res, resnum); | ||
66 | if (ret) | ||
67 | goto out_free; | ||
68 | |||
69 | dev->dev.platform_data = pdata; | ||
70 | |||
71 | ret = platform_device_add(dev); | ||
72 | if (ret) | ||
73 | goto out_free; | ||
74 | |||
75 | return dev; | ||
76 | |||
77 | out_free: | ||
78 | platform_device_put(dev); | ||
79 | return ERR_PTR(ret); | ||
80 | } | ||
81 | |||
82 | struct platform_device * | ||
83 | dbx500_add_platform_device_4k1irq(const char *name, int id, | ||
84 | resource_size_t base, | ||
85 | int irq, void *pdata) | ||
86 | { | ||
87 | struct resource resources[] = { | ||
88 | [0] = { | ||
89 | .start = base, | ||
90 | .end = base + SZ_4K - 1, | ||
91 | .flags = IORESOURCE_MEM, | ||
92 | }, | ||
93 | [1] = { | ||
94 | .start = irq, | ||
95 | .end = irq, | ||
96 | .flags = IORESOURCE_IRQ, | ||
97 | } | ||
98 | }; | ||
99 | |||
100 | return dbx500_add_platform_device(name, id, pdata, resources, | ||
101 | ARRAY_SIZE(resources)); | ||
102 | } | ||
103 | |||
104 | static struct platform_device * | ||
105 | dbx500_add_gpio(int id, resource_size_t addr, int irq, | ||
106 | struct nmk_gpio_platform_data *pdata) | 56 | struct nmk_gpio_platform_data *pdata) |
107 | { | 57 | { |
108 | struct resource resources[] = { | 58 | struct resource resources[] = { |
@@ -118,13 +68,18 @@ dbx500_add_gpio(int id, resource_size_t addr, int irq, | |||
118 | } | 68 | } |
119 | }; | 69 | }; |
120 | 70 | ||
121 | return platform_device_register_resndata(NULL, "gpio", id, | 71 | return platform_device_register_resndata( |
122 | resources, ARRAY_SIZE(resources), | 72 | parent, |
123 | pdata, sizeof(*pdata)); | 73 | "gpio", |
74 | id, | ||
75 | resources, | ||
76 | ARRAY_SIZE(resources), | ||
77 | pdata, | ||
78 | sizeof(*pdata)); | ||
124 | } | 79 | } |
125 | 80 | ||
126 | void dbx500_add_gpios(resource_size_t *base, int num, int irq, | 81 | void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num, |
127 | struct nmk_gpio_platform_data *pdata) | 82 | int irq, struct nmk_gpio_platform_data *pdata) |
128 | { | 83 | { |
129 | int first = 0; | 84 | int first = 0; |
130 | int i; | 85 | int i; |
@@ -134,6 +89,6 @@ void dbx500_add_gpios(resource_size_t *base, int num, int irq, | |||
134 | pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first); | 89 | pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first); |
135 | pdata->num_gpio = 32; | 90 | pdata->num_gpio = 32; |
136 | 91 | ||
137 | dbx500_add_gpio(i, base[i], irq, pdata); | 92 | dbx500_add_gpio(parent, i, base[i], irq, pdata); |
138 | } | 93 | } |
139 | } | 94 | } |
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 7825705033bf..39c74ec82add 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -8,80 +8,89 @@ | |||
8 | #ifndef __DEVICES_COMMON_H | 8 | #ifndef __DEVICES_COMMON_H |
9 | #define __DEVICES_COMMON_H | 9 | #define __DEVICES_COMMON_H |
10 | 10 | ||
11 | extern struct amba_device * | 11 | #include <linux/platform_device.h> |
12 | dbx500_add_amba_device(const char *name, resource_size_t base, | 12 | #include <linux/dma-mapping.h> |
13 | int irq, void *pdata, unsigned int periphid); | 13 | #include <linux/sys_soc.h> |
14 | #include <plat/i2c.h> | ||
14 | 15 | ||
15 | extern struct platform_device * | 16 | extern struct amba_device * |
16 | dbx500_add_platform_device_4k1irq(const char *name, int id, | 17 | dbx500_add_amba_device(struct device *parent, const char *name, |
17 | resource_size_t base, | 18 | resource_size_t base, int irq, void *pdata, |
18 | int irq, void *pdata); | 19 | unsigned int periphid); |
19 | 20 | ||
20 | struct spi_master_cntlr; | 21 | struct spi_master_cntlr; |
21 | 22 | ||
22 | static inline struct amba_device * | 23 | static inline struct amba_device * |
23 | dbx500_add_msp_spi(const char *name, resource_size_t base, int irq, | 24 | dbx500_add_msp_spi(struct device *parent, const char *name, |
25 | resource_size_t base, int irq, | ||
24 | struct spi_master_cntlr *pdata) | 26 | struct spi_master_cntlr *pdata) |
25 | { | 27 | { |
26 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 28 | return dbx500_add_amba_device(parent, name, base, irq, |
29 | pdata, 0); | ||
27 | } | 30 | } |
28 | 31 | ||
29 | static inline struct amba_device * | 32 | static inline struct amba_device * |
30 | dbx500_add_spi(const char *name, resource_size_t base, int irq, | 33 | dbx500_add_spi(struct device *parent, const char *name, resource_size_t base, |
31 | struct spi_master_cntlr *pdata, | 34 | int irq, struct spi_master_cntlr *pdata, |
32 | u32 periphid) | 35 | u32 periphid) |
33 | { | 36 | { |
34 | return dbx500_add_amba_device(name, base, irq, pdata, periphid); | 37 | return dbx500_add_amba_device(parent, name, base, irq, |
38 | pdata, periphid); | ||
35 | } | 39 | } |
36 | 40 | ||
37 | struct mmci_platform_data; | 41 | struct mmci_platform_data; |
38 | 42 | ||
39 | static inline struct amba_device * | 43 | static inline struct amba_device * |
40 | dbx500_add_sdi(const char *name, resource_size_t base, int irq, | 44 | dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base, |
41 | struct mmci_platform_data *pdata, | 45 | int irq, struct mmci_platform_data *pdata, u32 periphid) |
42 | u32 periphid) | ||
43 | { | 46 | { |
44 | return dbx500_add_amba_device(name, base, irq, pdata, periphid); | 47 | return dbx500_add_amba_device(parent, name, base, irq, |
48 | pdata, periphid); | ||
45 | } | 49 | } |
46 | 50 | ||
47 | struct amba_pl011_data; | 51 | struct amba_pl011_data; |
48 | 52 | ||
49 | static inline struct amba_device * | 53 | static inline struct amba_device * |
50 | dbx500_add_uart(const char *name, resource_size_t base, int irq, | 54 | dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, |
51 | struct amba_pl011_data *pdata) | 55 | int irq, struct amba_pl011_data *pdata) |
52 | { | 56 | { |
53 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 57 | return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); |
54 | } | 58 | } |
55 | 59 | ||
56 | struct nmk_i2c_controller; | 60 | struct nmk_i2c_controller; |
57 | 61 | ||
58 | static inline struct platform_device * | 62 | static inline struct platform_device * |
59 | dbx500_add_i2c(int id, resource_size_t base, int irq, | 63 | dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, |
60 | struct nmk_i2c_controller *pdata) | 64 | struct nmk_i2c_controller *data) |
61 | { | ||
62 | return dbx500_add_platform_device_4k1irq("nmk-i2c", id, base, irq, | ||
63 | pdata); | ||
64 | } | ||
65 | |||
66 | struct msp_i2s_platform_data; | ||
67 | |||
68 | static inline struct platform_device * | ||
69 | dbx500_add_msp_i2s(int id, resource_size_t base, int irq, | ||
70 | struct msp_i2s_platform_data *pdata) | ||
71 | { | 65 | { |
72 | return dbx500_add_platform_device_4k1irq("MSP_I2S", id, base, irq, | 66 | struct resource res[] = { |
73 | pdata); | 67 | DEFINE_RES_MEM(base, SZ_4K), |
68 | DEFINE_RES_IRQ(irq), | ||
69 | }; | ||
70 | |||
71 | struct platform_device_info pdevinfo = { | ||
72 | .parent = parent, | ||
73 | .name = "nmk-i2c", | ||
74 | .id = id, | ||
75 | .res = res, | ||
76 | .num_res = ARRAY_SIZE(res), | ||
77 | .data = data, | ||
78 | .size_data = sizeof(*data), | ||
79 | .dma_mask = DMA_BIT_MASK(32), | ||
80 | }; | ||
81 | |||
82 | return platform_device_register_full(&pdevinfo); | ||
74 | } | 83 | } |
75 | 84 | ||
76 | static inline struct amba_device * | 85 | static inline struct amba_device * |
77 | dbx500_add_rtc(resource_size_t base, int irq) | 86 | dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) |
78 | { | 87 | { |
79 | return dbx500_add_amba_device("rtc-pl031", base, irq, NULL, 0); | 88 | return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0); |
80 | } | 89 | } |
81 | 90 | ||
82 | struct nmk_gpio_platform_data; | 91 | struct nmk_gpio_platform_data; |
83 | 92 | ||
84 | void dbx500_add_gpios(resource_size_t *base, int num, int irq, | 93 | void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num, |
85 | struct nmk_gpio_platform_data *pdata); | 94 | int irq, struct nmk_gpio_platform_data *pdata); |
86 | 95 | ||
87 | #endif | 96 | #endif |
diff --git a/arch/arm/mach-ux500/devices-db5500.h b/arch/arm/mach-ux500/devices-db5500.h index 0c4bccd02b90..e70955502c35 100644 --- a/arch/arm/mach-ux500/devices-db5500.h +++ b/arch/arm/mach-ux500/devices-db5500.h | |||
@@ -10,70 +10,90 @@ | |||
10 | 10 | ||
11 | #include "devices-common.h" | 11 | #include "devices-common.h" |
12 | 12 | ||
13 | #define db5500_add_i2c1(pdata) \ | 13 | #define db5500_add_i2c1(parent, pdata) \ |
14 | dbx500_add_i2c(1, U5500_I2C1_BASE, IRQ_DB5500_I2C1, pdata) | 14 | dbx500_add_i2c(parent, 1, U5500_I2C1_BASE, IRQ_DB5500_I2C1, pdata) |
15 | #define db5500_add_i2c2(pdata) \ | 15 | #define db5500_add_i2c2(parent, pdata) \ |
16 | dbx500_add_i2c(2, U5500_I2C2_BASE, IRQ_DB5500_I2C2, pdata) | 16 | dbx500_add_i2c(parent, 2, U5500_I2C2_BASE, IRQ_DB5500_I2C2, pdata) |
17 | #define db5500_add_i2c3(pdata) \ | 17 | #define db5500_add_i2c3(parent, pdata) \ |
18 | dbx500_add_i2c(3, U5500_I2C3_BASE, IRQ_DB5500_I2C3, pdata) | 18 | dbx500_add_i2c(parent, 3, U5500_I2C3_BASE, IRQ_DB5500_I2C3, pdata) |
19 | 19 | ||
20 | #define db5500_add_msp0_i2s(pdata) \ | 20 | #define db5500_add_msp0_spi(parent, pdata) \ |
21 | dbx500_add_msp_i2s(0, U5500_MSP0_BASE, IRQ_DB5500_MSP0, pdata) | 21 | dbx500_add_msp_spi(parent, "msp0", U5500_MSP0_BASE, \ |
22 | #define db5500_add_msp1_i2s(pdata) \ | 22 | IRQ_DB5500_MSP0, pdata) |
23 | dbx500_add_msp_i2s(1, U5500_MSP1_BASE, IRQ_DB5500_MSP1, pdata) | 23 | #define db5500_add_msp1_spi(parent, pdata) \ |
24 | #define db5500_add_msp2_i2s(pdata) \ | 24 | dbx500_add_msp_spi(parent, "msp1", U5500_MSP1_BASE, \ |
25 | dbx500_add_msp_i2s(2, U5500_MSP2_BASE, IRQ_DB5500_MSP2, pdata) | 25 | IRQ_DB5500_MSP1, pdata) |
26 | #define db5500_add_msp2_spi(parent, pdata) \ | ||
27 | dbx500_add_msp_spi(parent, "msp2", U5500_MSP2_BASE, \ | ||
28 | IRQ_DB5500_MSP2, pdata) | ||
26 | 29 | ||
27 | #define db5500_add_msp0_spi(pdata) \ | 30 | #define db5500_add_msp0_spi(parent, pdata) \ |
28 | dbx500_add_msp_spi("msp0", U5500_MSP0_BASE, IRQ_DB5500_MSP0, pdata) | 31 | dbx500_add_msp_spi(parent, "msp0", U5500_MSP0_BASE, \ |
29 | #define db5500_add_msp1_spi(pdata) \ | 32 | IRQ_DB5500_MSP0, pdata) |
30 | dbx500_add_msp_spi("msp1", U5500_MSP1_BASE, IRQ_DB5500_MSP1, pdata) | 33 | #define db5500_add_msp1_spi(parent, pdata) \ |
31 | #define db5500_add_msp2_spi(pdata) \ | 34 | dbx500_add_msp_spi(parent, "msp1", U5500_MSP1_BASE, \ |
32 | dbx500_add_msp_spi("msp2", U5500_MSP2_BASE, IRQ_DB5500_MSP2, pdata) | 35 | IRQ_DB5500_MSP1, pdata) |
36 | #define db5500_add_msp2_spi(parent, pdata) \ | ||
37 | dbx500_add_msp_spi(parent, "msp2", U5500_MSP2_BASE, \ | ||
38 | IRQ_DB5500_MSP2, pdata) | ||
33 | 39 | ||
34 | #define db5500_add_rtc() \ | 40 | #define db5500_add_rtc(parent) \ |
35 | dbx500_add_rtc(U5500_RTC_BASE, IRQ_DB5500_RTC); | 41 | dbx500_add_rtc(parent, U5500_RTC_BASE, IRQ_DB5500_RTC); |
36 | 42 | ||
37 | #define db5500_add_usb(rx_cfg, tx_cfg) \ | 43 | #define db5500_add_usb(parent, rx_cfg, tx_cfg) \ |
38 | ux500_add_usb(U5500_USBOTG_BASE, IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) | 44 | ux500_add_usb(parent, U5500_USBOTG_BASE, \ |
45 | IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) | ||
39 | 46 | ||
40 | #define db5500_add_sdi0(pdata) \ | 47 | #define db5500_add_sdi0(parent, pdata) \ |
41 | dbx500_add_sdi("sdi0", U5500_SDI0_BASE, IRQ_DB5500_SDMMC0, pdata, \ | 48 | dbx500_add_sdi(parent, "sdi0", U5500_SDI0_BASE, \ |
49 | IRQ_DB5500_SDMMC0, pdata, \ | ||
42 | 0x10480180) | 50 | 0x10480180) |
43 | #define db5500_add_sdi1(pdata) \ | 51 | #define db5500_add_sdi1(parent, pdata) \ |
44 | dbx500_add_sdi("sdi1", U5500_SDI1_BASE, IRQ_DB5500_SDMMC1, pdata, \ | 52 | dbx500_add_sdi(parent, "sdi1", U5500_SDI1_BASE, \ |
53 | IRQ_DB5500_SDMMC1, pdata, \ | ||
45 | 0x10480180) | 54 | 0x10480180) |
46 | #define db5500_add_sdi2(pdata) \ | 55 | #define db5500_add_sdi2(parent, pdata) \ |
47 | dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata \ | 56 | dbx500_add_sdi(parent, "sdi2", U5500_SDI2_BASE, \ |
57 | IRQ_DB5500_SDMMC2, pdata \ | ||
48 | 0x10480180) | 58 | 0x10480180) |
49 | #define db5500_add_sdi3(pdata) \ | 59 | #define db5500_add_sdi3(parent, pdata) \ |
50 | dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata \ | 60 | dbx500_add_sdi(parent, "sdi3", U5500_SDI3_BASE, \ |
61 | IRQ_DB5500_SDMMC3, pdata \ | ||
51 | 0x10480180) | 62 | 0x10480180) |
52 | #define db5500_add_sdi4(pdata) \ | 63 | #define db5500_add_sdi4(parent, pdata) \ |
53 | dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata \ | 64 | dbx500_add_sdi(parent, "sdi4", U5500_SDI4_BASE, \ |
65 | IRQ_DB5500_SDMMC4, pdata \ | ||
54 | 0x10480180) | 66 | 0x10480180) |
55 | 67 | ||
56 | /* This one has a bad peripheral ID in the U5500 silicon */ | 68 | /* This one has a bad peripheral ID in the U5500 silicon */ |
57 | #define db5500_add_spi0(pdata) \ | 69 | #define db5500_add_spi0(parent, pdata) \ |
58 | dbx500_add_spi("spi0", U5500_SPI0_BASE, IRQ_DB5500_SPI0, pdata, \ | 70 | dbx500_add_spi(parent, "spi0", U5500_SPI0_BASE, \ |
71 | IRQ_DB5500_SPI0, pdata, \ | ||
59 | 0x10080023) | 72 | 0x10080023) |
60 | #define db5500_add_spi1(pdata) \ | 73 | #define db5500_add_spi1(parent, pdata) \ |
61 | dbx500_add_spi("spi1", U5500_SPI1_BASE, IRQ_DB5500_SPI1, pdata, \ | 74 | dbx500_add_spi(parent, "spi1", U5500_SPI1_BASE, \ |
75 | IRQ_DB5500_SPI1, pdata, \ | ||
62 | 0x10080023) | 76 | 0x10080023) |
63 | #define db5500_add_spi2(pdata) \ | 77 | #define db5500_add_spi2(parent, pdata) \ |
64 | dbx500_add_spi("spi2", U5500_SPI2_BASE, IRQ_DB5500_SPI2, pdata \ | 78 | dbx500_add_spi(parent, "spi2", U5500_SPI2_BASE, \ |
79 | IRQ_DB5500_SPI2, pdata \ | ||
65 | 0x10080023) | 80 | 0x10080023) |
66 | #define db5500_add_spi3(pdata) \ | 81 | #define db5500_add_spi3(parent, pdata) \ |
67 | dbx500_add_spi("spi3", U5500_SPI3_BASE, IRQ_DB5500_SPI3, pdata \ | 82 | dbx500_add_spi(parent, "spi3", U5500_SPI3_BASE, \ |
83 | IRQ_DB5500_SPI3, pdata \ | ||
68 | 0x10080023) | 84 | 0x10080023) |
69 | 85 | ||
70 | #define db5500_add_uart0(plat) \ | 86 | #define db5500_add_uart0(parent, plat) \ |
71 | dbx500_add_uart("uart0", U5500_UART0_BASE, IRQ_DB5500_UART0, plat) | 87 | dbx500_add_uart(parent, "uart0", U5500_UART0_BASE, \ |
72 | #define db5500_add_uart1(plat) \ | 88 | IRQ_DB5500_UART0, plat) |
73 | dbx500_add_uart("uart1", U5500_UART1_BASE, IRQ_DB5500_UART1, plat) | 89 | #define db5500_add_uart1(parent, plat) \ |
74 | #define db5500_add_uart2(plat) \ | 90 | dbx500_add_uart(parent, "uart1", U5500_UART1_BASE, \ |
75 | dbx500_add_uart("uart2", U5500_UART2_BASE, IRQ_DB5500_UART2, plat) | 91 | IRQ_DB5500_UART1, plat) |
76 | #define db5500_add_uart3(plat) \ | 92 | #define db5500_add_uart2(parent, plat) \ |
77 | dbx500_add_uart("uart3", U5500_UART3_BASE, IRQ_DB5500_UART3, plat) | 93 | dbx500_add_uart(parent, "uart2", U5500_UART2_BASE, \ |
94 | IRQ_DB5500_UART2, plat) | ||
95 | #define db5500_add_uart3(parent, plat) \ | ||
96 | dbx500_add_uart(parent, "uart3", U5500_UART3_BASE, \ | ||
97 | IRQ_DB5500_UART3, plat) | ||
78 | 98 | ||
79 | #endif | 99 | #endif |
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h index cbd4a9ae8109..9fd93e9da529 100644 --- a/arch/arm/mach-ux500/devices-db8500.h +++ b/arch/arm/mach-ux500/devices-db8500.h | |||
@@ -14,88 +14,114 @@ struct ske_keypad_platform_data; | |||
14 | struct pl022_ssp_controller; | 14 | struct pl022_ssp_controller; |
15 | 15 | ||
16 | static inline struct platform_device * | 16 | static inline struct platform_device * |
17 | db8500_add_ske_keypad(struct ske_keypad_platform_data *pdata) | 17 | db8500_add_ske_keypad(struct device *parent, |
18 | struct ske_keypad_platform_data *pdata, | ||
19 | size_t size) | ||
18 | { | 20 | { |
19 | return dbx500_add_platform_device_4k1irq("nmk-ske-keypad", -1, | 21 | struct resource resources[] = { |
20 | U8500_SKE_BASE, | 22 | DEFINE_RES_MEM(U8500_SKE_BASE, SZ_4K), |
21 | IRQ_DB8500_KB, pdata); | 23 | DEFINE_RES_IRQ(IRQ_DB8500_KB), |
24 | }; | ||
25 | |||
26 | return platform_device_register_resndata(parent, "nmk-ske-keypad", -1, | ||
27 | resources, 2, pdata, size); | ||
22 | } | 28 | } |
23 | 29 | ||
24 | static inline struct amba_device * | 30 | static inline struct amba_device * |
25 | db8500_add_ssp(const char *name, resource_size_t base, int irq, | 31 | db8500_add_ssp(struct device *parent, const char *name, resource_size_t base, |
26 | struct pl022_ssp_controller *pdata) | 32 | int irq, struct pl022_ssp_controller *pdata) |
27 | { | 33 | { |
28 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 34 | return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); |
29 | } | 35 | } |
30 | 36 | ||
31 | 37 | ||
32 | #define db8500_add_i2c0(pdata) \ | 38 | #define db8500_add_i2c0(parent, pdata) \ |
33 | dbx500_add_i2c(0, U8500_I2C0_BASE, IRQ_DB8500_I2C0, pdata) | 39 | dbx500_add_i2c(parent, 0, U8500_I2C0_BASE, IRQ_DB8500_I2C0, pdata) |
34 | #define db8500_add_i2c1(pdata) \ | 40 | #define db8500_add_i2c1(parent, pdata) \ |
35 | dbx500_add_i2c(1, U8500_I2C1_BASE, IRQ_DB8500_I2C1, pdata) | 41 | dbx500_add_i2c(parent, 1, U8500_I2C1_BASE, IRQ_DB8500_I2C1, pdata) |
36 | #define db8500_add_i2c2(pdata) \ | 42 | #define db8500_add_i2c2(parent, pdata) \ |
37 | dbx500_add_i2c(2, U8500_I2C2_BASE, IRQ_DB8500_I2C2, pdata) | 43 | dbx500_add_i2c(parent, 2, U8500_I2C2_BASE, IRQ_DB8500_I2C2, pdata) |
38 | #define db8500_add_i2c3(pdata) \ | 44 | #define db8500_add_i2c3(parent, pdata) \ |
39 | dbx500_add_i2c(3, U8500_I2C3_BASE, IRQ_DB8500_I2C3, pdata) | 45 | dbx500_add_i2c(parent, 3, U8500_I2C3_BASE, IRQ_DB8500_I2C3, pdata) |
40 | #define db8500_add_i2c4(pdata) \ | 46 | #define db8500_add_i2c4(parent, pdata) \ |
41 | dbx500_add_i2c(4, U8500_I2C4_BASE, IRQ_DB8500_I2C4, pdata) | 47 | dbx500_add_i2c(parent, 4, U8500_I2C4_BASE, IRQ_DB8500_I2C4, pdata) |
42 | 48 | ||
43 | #define db8500_add_msp0_i2s(pdata) \ | 49 | #define db8500_add_msp0_i2s(parent, pdata) \ |
44 | dbx500_add_msp_i2s(0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, pdata) | 50 | dbx500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, pdata) |
45 | #define db8500_add_msp1_i2s(pdata) \ | 51 | #define db8500_add_msp1_i2s(parent, pdata) \ |
46 | dbx500_add_msp_i2s(1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, pdata) | 52 | dbx500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, pdata) |
47 | #define db8500_add_msp2_i2s(pdata) \ | 53 | #define db8500_add_msp2_i2s(parent, pdata) \ |
48 | dbx500_add_msp_i2s(2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, pdata) | 54 | dbx500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, pdata) |
49 | #define db8500_add_msp3_i2s(pdata) \ | 55 | #define db8500_add_msp3_i2s(parent, pdata) \ |
50 | dbx500_add_msp_i2s(3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, pdata) | 56 | dbx500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, pdata) |
51 | 57 | ||
52 | #define db8500_add_msp0_spi(pdata) \ | 58 | #define db8500_add_msp0_spi(parent, pdata) \ |
53 | dbx500_add_msp_spi("msp0", U8500_MSP0_BASE, IRQ_DB8500_MSP0, pdata) | 59 | dbx500_add_msp_spi(parent, "msp0", U8500_MSP0_BASE, \ |
54 | #define db8500_add_msp1_spi(pdata) \ | 60 | IRQ_DB8500_MSP0, pdata) |
55 | dbx500_add_msp_spi("msp1", U8500_MSP1_BASE, IRQ_DB8500_MSP1, pdata) | 61 | #define db8500_add_msp1_spi(parent, pdata) \ |
56 | #define db8500_add_msp2_spi(pdata) \ | 62 | dbx500_add_msp_spi(parent, "msp1", U8500_MSP1_BASE, \ |
57 | dbx500_add_msp_spi("msp2", U8500_MSP2_BASE, IRQ_DB8500_MSP2, pdata) | 63 | IRQ_DB8500_MSP1, pdata) |
58 | #define db8500_add_msp3_spi(pdata) \ | 64 | #define db8500_add_msp2_spi(parent, pdata) \ |
59 | dbx500_add_msp_spi("msp3", U8500_MSP3_BASE, IRQ_DB8500_MSP1, pdata) | 65 | dbx500_add_msp_spi(parent, "msp2", U8500_MSP2_BASE, \ |
60 | 66 | IRQ_DB8500_MSP2, pdata) | |
61 | #define db8500_add_rtc() \ | 67 | #define db8500_add_msp3_spi(parent, pdata) \ |
62 | dbx500_add_rtc(U8500_RTC_BASE, IRQ_DB8500_RTC); | 68 | dbx500_add_msp_spi(parent, "msp3", U8500_MSP3_BASE, \ |
63 | 69 | IRQ_DB8500_MSP1, pdata) | |
64 | #define db8500_add_usb(rx_cfg, tx_cfg) \ | 70 | |
65 | ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) | 71 | #define db8500_add_rtc(parent) \ |
66 | 72 | dbx500_add_rtc(parent, U8500_RTC_BASE, IRQ_DB8500_RTC); | |
67 | #define db8500_add_sdi0(pdata, pid) \ | 73 | |
68 | dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata, pid) | 74 | #define db8500_add_usb(parent, rx_cfg, tx_cfg) \ |
69 | #define db8500_add_sdi1(pdata, pid) \ | 75 | ux500_add_usb(parent, U8500_USBOTG_BASE, \ |
70 | dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata, pid) | 76 | IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) |
71 | #define db8500_add_sdi2(pdata, pid) \ | 77 | |
72 | dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata, pid) | 78 | #define db8500_add_sdi0(parent, pdata, pid) \ |
73 | #define db8500_add_sdi3(pdata, pid) \ | 79 | dbx500_add_sdi(parent, "sdi0", U8500_SDI0_BASE, \ |
74 | dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata, pid) | 80 | IRQ_DB8500_SDMMC0, pdata, pid) |
75 | #define db8500_add_sdi4(pdata, pid) \ | 81 | #define db8500_add_sdi1(parent, pdata, pid) \ |
76 | dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata, pid) | 82 | dbx500_add_sdi(parent, "sdi1", U8500_SDI1_BASE, \ |
77 | #define db8500_add_sdi5(pdata, pid) \ | 83 | IRQ_DB8500_SDMMC1, pdata, pid) |
78 | dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata, pid) | 84 | #define db8500_add_sdi2(parent, pdata, pid) \ |
79 | 85 | dbx500_add_sdi(parent, "sdi2", U8500_SDI2_BASE, \ | |
80 | #define db8500_add_ssp0(pdata) \ | 86 | IRQ_DB8500_SDMMC2, pdata, pid) |
81 | db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata) | 87 | #define db8500_add_sdi3(parent, pdata, pid) \ |
82 | #define db8500_add_ssp1(pdata) \ | 88 | dbx500_add_sdi(parent, "sdi3", U8500_SDI3_BASE, \ |
83 | db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata) | 89 | IRQ_DB8500_SDMMC3, pdata, pid) |
84 | 90 | #define db8500_add_sdi4(parent, pdata, pid) \ | |
85 | #define db8500_add_spi0(pdata) \ | 91 | dbx500_add_sdi(parent, "sdi4", U8500_SDI4_BASE, \ |
86 | dbx500_add_spi("spi0", U8500_SPI0_BASE, IRQ_DB8500_SPI0, pdata, 0) | 92 | IRQ_DB8500_SDMMC4, pdata, pid) |
87 | #define db8500_add_spi1(pdata) \ | 93 | #define db8500_add_sdi5(parent, pdata, pid) \ |
88 | dbx500_add_spi("spi1", U8500_SPI1_BASE, IRQ_DB8500_SPI1, pdata, 0) | 94 | dbx500_add_sdi(parent, "sdi5", U8500_SDI5_BASE, \ |
89 | #define db8500_add_spi2(pdata) \ | 95 | IRQ_DB8500_SDMMC5, pdata, pid) |
90 | dbx500_add_spi("spi2", U8500_SPI2_BASE, IRQ_DB8500_SPI2, pdata, 0) | 96 | |
91 | #define db8500_add_spi3(pdata) \ | 97 | #define db8500_add_ssp0(parent, pdata) \ |
92 | dbx500_add_spi("spi3", U8500_SPI3_BASE, IRQ_DB8500_SPI3, pdata, 0) | 98 | db8500_add_ssp(parent, "ssp0", U8500_SSP0_BASE, \ |
93 | 99 | IRQ_DB8500_SSP0, pdata) | |
94 | #define db8500_add_uart0(pdata) \ | 100 | #define db8500_add_ssp1(parent, pdata) \ |
95 | dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata) | 101 | db8500_add_ssp(parent, "ssp1", U8500_SSP1_BASE, \ |
96 | #define db8500_add_uart1(pdata) \ | 102 | IRQ_DB8500_SSP1, pdata) |
97 | dbx500_add_uart("uart1", U8500_UART1_BASE, IRQ_DB8500_UART1, pdata) | 103 | |
98 | #define db8500_add_uart2(pdata) \ | 104 | #define db8500_add_spi0(parent, pdata) \ |
99 | dbx500_add_uart("uart2", U8500_UART2_BASE, IRQ_DB8500_UART2, pdata) | 105 | dbx500_add_spi(parent, "spi0", U8500_SPI0_BASE, \ |
106 | IRQ_DB8500_SPI0, pdata, 0) | ||
107 | #define db8500_add_spi1(parent, pdata) \ | ||
108 | dbx500_add_spi(parent, "spi1", U8500_SPI1_BASE, \ | ||
109 | IRQ_DB8500_SPI1, pdata, 0) | ||
110 | #define db8500_add_spi2(parent, pdata) \ | ||
111 | dbx500_add_spi(parent, "spi2", U8500_SPI2_BASE, \ | ||
112 | IRQ_DB8500_SPI2, pdata, 0) | ||
113 | #define db8500_add_spi3(parent, pdata) \ | ||
114 | dbx500_add_spi(parent, "spi3", U8500_SPI3_BASE, \ | ||
115 | IRQ_DB8500_SPI3, pdata, 0) | ||
116 | |||
117 | #define db8500_add_uart0(parent, pdata) \ | ||
118 | dbx500_add_uart(parent, "uart0", U8500_UART0_BASE, \ | ||
119 | IRQ_DB8500_UART0, pdata) | ||
120 | #define db8500_add_uart1(parent, pdata) \ | ||
121 | dbx500_add_uart(parent, "uart1", U8500_UART1_BASE, \ | ||
122 | IRQ_DB8500_UART1, pdata) | ||
123 | #define db8500_add_uart2(parent, pdata) \ | ||
124 | dbx500_add_uart(parent, "uart2", U8500_UART2_BASE, \ | ||
125 | IRQ_DB8500_UART2, pdata) | ||
100 | 126 | ||
101 | #endif | 127 | #endif |
diff --git a/arch/arm/mach-ux500/dma-db5500.c b/arch/arm/mach-ux500/dma-db5500.c index 1cfab68ae417..41e9470fa0e6 100644 --- a/arch/arm/mach-ux500/dma-db5500.c +++ b/arch/arm/mach-ux500/dma-db5500.c | |||
@@ -125,10 +125,11 @@ static struct platform_device dma40_device = { | |||
125 | .resource = dma40_resources | 125 | .resource = dma40_resources |
126 | }; | 126 | }; |
127 | 127 | ||
128 | void __init db5500_dma_init(void) | 128 | void __init db5500_dma_init(struct device *parent) |
129 | { | 129 | { |
130 | int ret; | 130 | int ret; |
131 | 131 | ||
132 | dma40_device.dev.parent = parent; | ||
132 | ret = platform_device_register(&dma40_device); | 133 | ret = platform_device_register(&dma40_device); |
133 | if (ret) | 134 | if (ret) |
134 | dev_err(&dma40_device.dev, "unable to register device: %d\n", ret); | 135 | dev_err(&dma40_device.dev, "unable to register device: %d\n", ret); |
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h index 80e10f50282e..9ec20b96d8f2 100644 --- a/arch/arm/mach-ux500/include/mach/db8500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h | |||
@@ -161,4 +161,7 @@ | |||
161 | #define U8500_MODEM_BASE 0xe000000 | 161 | #define U8500_MODEM_BASE 0xe000000 |
162 | #define U8500_APE_BASE 0x6000000 | 162 | #define U8500_APE_BASE 0x6000000 |
163 | 163 | ||
164 | /* SoC identification number information */ | ||
165 | #define U8500_BB_UID_BASE (U8500_BACKUPRAM1_BASE + 0xFC0) | ||
166 | |||
164 | #endif | 167 | #endif |
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h index d2d4131435a6..7d34c52798b5 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START | 14 | #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START |
15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ | 15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ |
16 | + AB8500_NR_IRQS) | 16 | + AB8500_MAX_NR_IRQS) |
17 | 17 | ||
18 | /* TC35892 */ | 18 | /* TC35892 */ |
19 | #define TC35892_NR_INTERNAL_IRQS 8 | 19 | #define TC35892_NR_INTERNAL_IRQS 8 |
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index 93d403955eaa..3dc00ffa7bfa 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h | |||
@@ -18,14 +18,16 @@ void __init ux500_map_io(void); | |||
18 | extern void __init u5500_map_io(void); | 18 | extern void __init u5500_map_io(void); |
19 | extern void __init u8500_map_io(void); | 19 | extern void __init u8500_map_io(void); |
20 | 20 | ||
21 | extern void __init u5500_init_devices(void); | 21 | extern struct device * __init u5500_init_devices(void); |
22 | extern void __init u8500_init_devices(void); | 22 | extern struct device * __init u8500_init_devices(void); |
23 | 23 | ||
24 | extern void __init ux500_init_irq(void); | 24 | extern void __init ux500_init_irq(void); |
25 | 25 | ||
26 | extern void __init u5500_sdi_init(void); | 26 | extern void __init u5500_sdi_init(struct device *parent); |
27 | 27 | ||
28 | extern void __init db5500_dma_init(void); | 28 | extern void __init db5500_dma_init(struct device *parent); |
29 | |||
30 | extern struct device *ux500_soc_device_init(const char *soc_id); | ||
29 | 31 | ||
30 | struct amba_device; | 32 | struct amba_device; |
31 | extern void __init amba_add_devices(struct amba_device *devs[], int num); | 33 | extern void __init amba_add_devices(struct amba_device *devs[], int num); |
diff --git a/arch/arm/mach-ux500/include/mach/usb.h b/arch/arm/mach-ux500/include/mach/usb.h index d3739d418813..4c1cc50a595a 100644 --- a/arch/arm/mach-ux500/include/mach/usb.h +++ b/arch/arm/mach-ux500/include/mach/usb.h | |||
@@ -20,6 +20,6 @@ struct ux500_musb_board_data { | |||
20 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | 20 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | void ux500_add_usb(resource_size_t base, int irq, int *dma_rx_cfg, | 23 | void ux500_add_usb(struct device *parent, resource_size_t base, |
24 | int *dma_tx_cfg); | 24 | int irq, int *dma_rx_cfg, int *dma_tx_cfg); |
25 | #endif | 25 | #endif |
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index e9d580702fbb..d37df98b5c32 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/clksrc-dbx500-prcmu.h> | 9 | #include <linux/clksrc-dbx500-prcmu.h> |
10 | #include <linux/of.h> | ||
10 | 11 | ||
11 | #include <asm/smp_twd.h> | 12 | #include <asm/smp_twd.h> |
12 | 13 | ||
@@ -30,9 +31,13 @@ static void __init ux500_twd_init(void) | |||
30 | twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : | 31 | twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : |
31 | &u8500_twd_local_timer; | 32 | &u8500_twd_local_timer; |
32 | 33 | ||
33 | err = twd_local_timer_register(twd_local_timer); | 34 | if (of_have_populated_dt()) |
34 | if (err) | 35 | twd_local_timer_of_register(); |
35 | pr_err("twd_local_timer_register failed %d\n", err); | 36 | else { |
37 | err = twd_local_timer_register(twd_local_timer); | ||
38 | if (err) | ||
39 | pr_err("twd_local_timer_register failed %d\n", err); | ||
40 | } | ||
36 | } | 41 | } |
37 | #else | 42 | #else |
38 | #define ux500_twd_init() do { } while(0) | 43 | #define ux500_twd_init() do { } while(0) |
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c index 9f9e1c203061..a74af389bc63 100644 --- a/arch/arm/mach-ux500/usb.c +++ b/arch/arm/mach-ux500/usb.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
8 | #include <linux/usb/musb.h> | 8 | #include <linux/usb/musb.h> |
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | |||
10 | #include <plat/ste_dma40.h> | 11 | #include <plat/ste_dma40.h> |
11 | #include <mach/hardware.h> | 12 | #include <mach/hardware.h> |
12 | #include <mach/usb.h> | 13 | #include <mach/usb.h> |
@@ -140,8 +141,8 @@ static inline void ux500_usb_dma_update_tx_ch_config(int *dst_dev_type) | |||
140 | musb_dma_tx_ch[idx].dst_dev_type = dst_dev_type[idx]; | 141 | musb_dma_tx_ch[idx].dst_dev_type = dst_dev_type[idx]; |
141 | } | 142 | } |
142 | 143 | ||
143 | void ux500_add_usb(resource_size_t base, int irq, int *dma_rx_cfg, | 144 | void ux500_add_usb(struct device *parent, resource_size_t base, int irq, |
144 | int *dma_tx_cfg) | 145 | int *dma_rx_cfg, int *dma_tx_cfg) |
145 | { | 146 | { |
146 | ux500_musb_device.resource[0].start = base; | 147 | ux500_musb_device.resource[0].start = base; |
147 | ux500_musb_device.resource[0].end = base + SZ_64K - 1; | 148 | ux500_musb_device.resource[0].end = base + SZ_64K - 1; |
@@ -151,5 +152,7 @@ void ux500_add_usb(resource_size_t base, int irq, int *dma_rx_cfg, | |||
151 | ux500_usb_dma_update_rx_ch_config(dma_rx_cfg); | 152 | ux500_usb_dma_update_rx_ch_config(dma_rx_cfg); |
152 | ux500_usb_dma_update_tx_ch_config(dma_tx_cfg); | 153 | ux500_usb_dma_update_tx_ch_config(dma_tx_cfg); |
153 | 154 | ||
155 | ux500_musb_device.dev.parent = parent; | ||
156 | |||
154 | platform_device_register(&ux500_musb_device); | 157 | platform_device_register(&ux500_musb_device); |
155 | } | 158 | } |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 0968772aedbe..6bbd74e950ab 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/clkdev.h> | 36 | #include <linux/clkdev.h> |
37 | #include <linux/mtd/physmap.h> | 37 | #include <linux/mtd/physmap.h> |
38 | 38 | ||
39 | #include <asm/system.h> | ||
40 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
41 | #include <asm/leds.h> | 40 | #include <asm/leds.h> |
42 | #include <asm/hardware/arm_timer.h> | 41 | #include <asm/hardware/arm_timer.h> |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 51733b022d04..a6e23f464528 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
27 | #include <asm/system.h> | ||
28 | #include <asm/mach/pci.h> | 27 | #include <asm/mach/pci.h> |
29 | 28 | ||
30 | /* | 29 | /* |
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c index 3034a4dab4a1..c504a72b94d6 100644 --- a/arch/arm/mach-vexpress/hotplug.c +++ b/arch/arm/mach-vexpress/hotplug.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | 16 | #include <asm/smp_plat.h> |
17 | #include <asm/system.h> | 17 | #include <asm/cp15.h> |
18 | 18 | ||
19 | extern volatile int pen_release; | 19 | extern volatile int pen_release; |
20 | 20 | ||
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 9a0661992909..9e4dd8b63c4a 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | #include <asm/system_misc.h> | ||
31 | 32 | ||
32 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
33 | #include <mach/regs-serial.h> | 34 | #include <mach/regs-serial.h> |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index caf14dc059e5..9107231aacc5 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
24 | 24 | ||
25 | #include <asm/system.h> | 25 | #include <asm/cp15.h> |
26 | #include <asm/system_info.h> | ||
26 | #include <asm/unaligned.h> | 27 | #include <asm/unaligned.h> |
27 | 28 | ||
28 | #include "fault.h" | 29 | #include "fault.h" |
diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c index e0b0e7a4ec68..dd3d59122cc3 100644 --- a/arch/arm/mm/cache-feroceon-l2.c +++ b/arch/arm/mm/cache-feroceon-l2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
17 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
18 | #include <asm/cp15.h> | ||
18 | #include <plat/cache-feroceon-l2.h> | 19 | #include <plat/cache-feroceon-l2.h> |
19 | 20 | ||
20 | /* | 21 | /* |
diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c index 50868651890f..1fbca05fe906 100644 --- a/arch/arm/mm/cache-tauros2.c +++ b/arch/arm/mm/cache-tauros2.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/cp15.h> | ||
19 | #include <asm/hardware/cache-tauros2.h> | 20 | #include <asm/hardware/cache-tauros2.h> |
20 | 21 | ||
21 | 22 | ||
diff --git a/arch/arm/mm/cache-xsc3l2.c b/arch/arm/mm/cache-xsc3l2.c index 5a32020471e3..6c3edeb66e74 100644 --- a/arch/arm/mm/cache-xsc3l2.c +++ b/arch/arm/mm/cache-xsc3l2.c | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
21 | #include <asm/system.h> | 21 | #include <asm/cp15.h> |
22 | #include <asm/cputype.h> | 22 | #include <asm/cputype.h> |
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | 24 | ||
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index bb7eac381a8e..5bdff5c3e6cb 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -21,8 +21,9 @@ | |||
21 | #include <linux/perf_event.h> | 21 | #include <linux/perf_event.h> |
22 | 22 | ||
23 | #include <asm/exception.h> | 23 | #include <asm/exception.h> |
24 | #include <asm/system.h> | ||
25 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
25 | #include <asm/system_misc.h> | ||
26 | #include <asm/system_info.h> | ||
26 | #include <asm/tlbflush.h> | 27 | #include <asm/tlbflush.h> |
27 | 28 | ||
28 | #include "fault.h" | 29 | #include "fault.h" |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 1a8d4aa821be..062d61a1f87d 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <asm/cachetype.h> | 16 | #include <asm/cachetype.h> |
17 | #include <asm/highmem.h> | 17 | #include <asm/highmem.h> |
18 | #include <asm/smp_plat.h> | 18 | #include <asm/smp_plat.h> |
19 | #include <asm/system.h> | ||
20 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
21 | 20 | ||
22 | #include "mm.h" | 21 | #include "mm.h" |
diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index feacf4c76712..ab88ed4f8e08 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <asm/pgalloc.h> | 5 | #include <asm/pgalloc.h> |
6 | #include <asm/pgtable.h> | 6 | #include <asm/pgtable.h> |
7 | #include <asm/sections.h> | 7 | #include <asm/sections.h> |
8 | #include <asm/system_info.h> | ||
8 | 9 | ||
9 | pgd_t *idmap_pgd; | 10 | pgd_t *idmap_pgd; |
10 | 11 | ||
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 80632e8d7538..6780b49f2c69 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -26,12 +26,14 @@ | |||
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | 28 | ||
29 | #include <asm/cp15.h> | ||
29 | #include <asm/cputype.h> | 30 | #include <asm/cputype.h> |
30 | #include <asm/cacheflush.h> | 31 | #include <asm/cacheflush.h> |
31 | #include <asm/mmu_context.h> | 32 | #include <asm/mmu_context.h> |
32 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
33 | #include <asm/tlbflush.h> | 34 | #include <asm/tlbflush.h> |
34 | #include <asm/sizes.h> | 35 | #include <asm/sizes.h> |
36 | #include <asm/system_info.h> | ||
35 | 37 | ||
36 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
37 | #include "mm.h" | 39 | #include "mm.h" |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 94c5a0c94f5e..cd439c1dd506 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
19 | 19 | ||
20 | #include <asm/cp15.h> | ||
20 | #include <asm/cputype.h> | 21 | #include <asm/cputype.h> |
21 | #include <asm/sections.h> | 22 | #include <asm/sections.h> |
22 | #include <asm/cachetype.h> | 23 | #include <asm/cachetype.h> |
@@ -25,6 +26,7 @@ | |||
25 | #include <asm/smp_plat.h> | 26 | #include <asm/smp_plat.h> |
26 | #include <asm/tlb.h> | 27 | #include <asm/tlb.h> |
27 | #include <asm/highmem.h> | 28 | #include <asm/highmem.h> |
29 | #include <asm/system_info.h> | ||
28 | #include <asm/traps.h> | 30 | #include <asm/traps.h> |
29 | 31 | ||
30 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index a3e78ccabd65..0acb089d0f70 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | 14 | ||
15 | #include <asm/cp15.h> | ||
15 | #include <asm/pgalloc.h> | 16 | #include <asm/pgalloc.h> |
16 | #include <asm/page.h> | 17 | #include <asm/page.h> |
17 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
diff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S index 272558a133a3..d217e9795d74 100644 --- a/arch/arm/mm/proc-fa526.S +++ b/arch/arm/mm/proc-fa526.S | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
25 | #include <asm/system.h> | ||
26 | 25 | ||
27 | #include "proc-macros.S" | 26 | #include "proc-macros.S" |
28 | 27 | ||
diff --git a/arch/arm/nwfpe/fpa11.c b/arch/arm/nwfpe/fpa11.c index cc60acde84d9..2782ebcc2ed3 100644 --- a/arch/arm/nwfpe/fpa11.c +++ b/arch/arm/nwfpe/fpa11.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <linux/compiler.h> | 29 | #include <linux/compiler.h> |
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <asm/system.h> | ||
32 | 31 | ||
33 | /* Reset the FPA11 chip. Called to initialize and reset the emulator. */ | 32 | /* Reset the FPA11 chip. Called to initialize and reset the emulator. */ |
34 | static void resetFPA11(void) | 33 | static void resetFPA11(void) |
diff --git a/arch/arm/plat-iop/i2c.c b/arch/arm/plat-iop/i2c.c index 4efe392859ee..88215ad031a2 100644 --- a/arch/arm/plat-iop/i2c.c +++ b/arch/arm/plat-iop/i2c.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
25 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
26 | #include <asm/system.h> | ||
27 | #include <asm/memory.h> | 26 | #include <asm/memory.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
29 | #include <asm/hardware/iop3xx.h> | 28 | #include <asm/hardware/iop3xx.h> |
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 72768356447a..0da42058a20f 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/signal.h> | 22 | #include <asm/signal.h> |
23 | #include <asm/system.h> | ||
24 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
25 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
26 | #include <asm/hardware/iop3xx.h> | 25 | #include <asm/hardware/iop3xx.h> |
diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/plat-iop/restart.c index 6a85a0c502e6..33fa699a4d28 100644 --- a/arch/arm/plat-iop/restart.c +++ b/arch/arm/plat-iop/restart.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <asm/hardware/iop3xx.h> | 10 | #include <asm/hardware/iop3xx.h> |
11 | #include <asm/system_misc.h> | ||
11 | #include <mach/hardware.h> | 12 | #include <mach/hardware.h> |
12 | 13 | ||
13 | void iop3xx_restart(char mode, const char *cmd) | 14 | void iop3xx_restart(char mode, const char *cmd) |
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c index f30dcacbbd0a..1996c3e3b8fe 100644 --- a/arch/arm/plat-mxc/system.c +++ b/arch/arm/plat-mxc/system.c | |||
@@ -25,8 +25,8 @@ | |||
25 | 25 | ||
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/common.h> | 27 | #include <mach/common.h> |
28 | #include <asm/system_misc.h> | ||
28 | #include <asm/proc-fns.h> | 29 | #include <asm/proc-fns.h> |
29 | #include <asm/system.h> | ||
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | 31 | ||
32 | void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int) = NULL; | 32 | void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int) = NULL; |
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index 61a1ec2a6af4..39407cbe34c6 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <asm/leds.h> | 17 | #include <asm/leds.h> |
18 | #include <asm/system.h> | ||
19 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
20 | 19 | ||
21 | #include <plat/fpga.h> | 20 | #include <plat/fpga.h> |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 74300ae29b71..ecdb3da0dea9 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | 38 | ||
39 | #include <asm/system.h> | ||
40 | #include <mach/hardware.h> | 39 | #include <mach/hardware.h> |
41 | #include <plat/dma.h> | 40 | #include <plat/dma.h> |
42 | 41 | ||
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index cb75b657b04b..b8a96c6a1a30 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
@@ -218,30 +218,14 @@ extern void omap_set_gpio_debounce(int gpio, int enable); | |||
218 | extern void omap_set_gpio_debounce_time(int gpio, int enable); | 218 | extern void omap_set_gpio_debounce_time(int gpio, int enable); |
219 | /*-------------------------------------------------------------------------*/ | 219 | /*-------------------------------------------------------------------------*/ |
220 | 220 | ||
221 | /* Wrappers for "new style" GPIO calls, using the new infrastructure | 221 | /* |
222 | * Wrappers for "new style" GPIO calls, using the new infrastructure | ||
222 | * which lets us plug in FPGA, I2C, and other implementations. | 223 | * which lets us plug in FPGA, I2C, and other implementations. |
223 | * * | 224 | * |
224 | * The original OMAP-specific calls should eventually be removed. | 225 | * The original OMAP-specific calls should eventually be removed. |
225 | */ | 226 | */ |
226 | 227 | ||
227 | #include <linux/errno.h> | 228 | #include <linux/errno.h> |
228 | #include <asm-generic/gpio.h> | 229 | #include <asm-generic/gpio.h> |
229 | 230 | ||
230 | static inline int irq_to_gpio(unsigned irq) | ||
231 | { | ||
232 | int tmp; | ||
233 | |||
234 | /* omap1 SOC mpuio */ | ||
235 | if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16))) | ||
236 | return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES; | ||
237 | |||
238 | /* SOC gpio */ | ||
239 | tmp = irq - IH_GPIO_BASE; | ||
240 | if (tmp < OMAP_MAX_GPIO_LINES) | ||
241 | return tmp; | ||
242 | |||
243 | /* we don't supply reverse mappings for non-SOC gpios */ | ||
244 | return -EIO; | ||
245 | } | ||
246 | |||
247 | #endif | 231 | #endif |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 089899a7db72..74daf5ed1432 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <plat/orion_wdt.h> | 21 | #include <plat/orion_wdt.h> |
22 | #include <plat/mv_xor.h> | 22 | #include <plat/mv_xor.h> |
23 | #include <plat/ehci-orion.h> | 23 | #include <plat/ehci-orion.h> |
24 | #include <mach/bridge-regs.h> | ||
24 | 25 | ||
25 | /* Fill in the resources structure and link it into the platform | 26 | /* Fill in the resources structure and link it into the platform |
26 | device structure. There is always a memory region, and nearly | 27 | device structure. There is always a memory region, and nearly |
@@ -568,13 +569,17 @@ void __init orion_spi_1_init(unsigned long mapbase, | |||
568 | ****************************************************************************/ | 569 | ****************************************************************************/ |
569 | static struct orion_wdt_platform_data orion_wdt_data; | 570 | static struct orion_wdt_platform_data orion_wdt_data; |
570 | 571 | ||
572 | static struct resource orion_wdt_resource = | ||
573 | DEFINE_RES_MEM(TIMER_VIRT_BASE, 0x28); | ||
574 | |||
571 | static struct platform_device orion_wdt_device = { | 575 | static struct platform_device orion_wdt_device = { |
572 | .name = "orion_wdt", | 576 | .name = "orion_wdt", |
573 | .id = -1, | 577 | .id = -1, |
574 | .dev = { | 578 | .dev = { |
575 | .platform_data = &orion_wdt_data, | 579 | .platform_data = &orion_wdt_data, |
576 | }, | 580 | }, |
577 | .num_resources = 0, | 581 | .resource = &orion_wdt_resource, |
582 | .num_resources = 1, | ||
578 | }; | 583 | }; |
579 | 584 | ||
580 | void __init orion_wdt_init(unsigned long tclk) | 585 | void __init orion_wdt_init(unsigned long tclk) |
diff --git a/arch/arm/plat-orion/include/plat/audio.h b/arch/arm/plat-orion/include/plat/audio.h index 885f8abd927b..d6a55bd2e578 100644 --- a/arch/arm/plat-orion/include/plat/audio.h +++ b/arch/arm/plat-orion/include/plat/audio.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __PLAT_AUDIO_H | 2 | #define __PLAT_AUDIO_H |
3 | 3 | ||
4 | struct kirkwood_asoc_platform_data { | 4 | struct kirkwood_asoc_platform_data { |
5 | u32 tclk; | ||
6 | int burst; | 5 | int burst; |
7 | }; | 6 | }; |
8 | #endif | 7 | #endif |
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c index 2d3c19d7c7b1..79ef102e3b2b 100644 --- a/arch/arm/plat-pxa/dma.c +++ b/arch/arm/plat-pxa/dma.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | 22 | ||
23 | #include <asm/system.h> | ||
24 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
25 | #include <asm/memory.h> | 24 | #include <asm/memory.h> |
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c index 32a09931350c..0db73ae646bc 100644 --- a/arch/arm/plat-s3c24xx/cpu.c +++ b/arch/arm/plat-s3c24xx/cpu.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <mach/regs-clock.h> | 35 | #include <mach/regs-clock.h> |
36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
37 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
38 | #include <asm/system_info.h> | ||
38 | 39 | ||
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 2bab4c99a234..28f898f75380 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
32 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
33 | #include <mach/dma.h> | 32 | #include <mach/dma.h> |
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 7a308699f816..96bea3202304 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -9,8 +9,8 @@ config PLAT_S5P | |||
9 | bool | 9 | bool |
10 | depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) | 10 | depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) |
11 | default y | 11 | default y |
12 | select ARM_VIC if !ARCH_EXYNOS4 | 12 | select ARM_VIC if !ARCH_EXYNOS |
13 | select ARM_GIC if ARCH_EXYNOS4 | 13 | select ARM_GIC if ARCH_EXYNOS |
14 | select GIC_NON_BANKED if ARCH_EXYNOS4 | 14 | select GIC_NON_BANKED if ARCH_EXYNOS4 |
15 | select NO_IOPORT | 15 | select NO_IOPORT |
16 | select ARCH_REQUIRE_GPIOLIB | 16 | select ARCH_REQUIRE_GPIOLIB |
@@ -40,6 +40,10 @@ config S5P_HRT | |||
40 | help | 40 | help |
41 | Use the High Resolution timer support | 41 | Use the High Resolution timer support |
42 | 42 | ||
43 | config S5P_DEV_UART | ||
44 | def_bool y | ||
45 | depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210) | ||
46 | |||
43 | config S5P_PM | 47 | config S5P_PM |
44 | bool | 48 | bool |
45 | help | 49 | help |
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index 30d8c3016e6b..4bd824136659 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
@@ -12,7 +12,6 @@ obj- := | |||
12 | 12 | ||
13 | # Core files | 13 | # Core files |
14 | 14 | ||
15 | obj-y += dev-uart.o | ||
16 | obj-y += clock.o | 15 | obj-y += clock.o |
17 | obj-y += irq.o | 16 | obj-y += irq.o |
18 | obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o | 17 | obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o |
@@ -23,5 +22,7 @@ obj-$(CONFIG_S5P_SLEEP) += sleep.o | |||
23 | obj-$(CONFIG_S5P_HRT) += s5p-time.o | 22 | obj-$(CONFIG_S5P_HRT) += s5p-time.o |
24 | 23 | ||
25 | # devices | 24 | # devices |
25 | |||
26 | obj-$(CONFIG_S5P_DEV_UART) += dev-uart.o | ||
26 | obj-$(CONFIG_S5P_DEV_MFC) += dev-mfc.o | 27 | obj-$(CONFIG_S5P_DEV_MFC) += dev-mfc.o |
27 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o | 28 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o |
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 963edea7f7e7..f68a9bb11948 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -61,6 +61,20 @@ struct clk clk_fout_apll = { | |||
61 | .id = -1, | 61 | .id = -1, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /* BPLL clock output */ | ||
65 | |||
66 | struct clk clk_fout_bpll = { | ||
67 | .name = "fout_bpll", | ||
68 | .id = -1, | ||
69 | }; | ||
70 | |||
71 | /* CPLL clock output */ | ||
72 | |||
73 | struct clk clk_fout_cpll = { | ||
74 | .name = "fout_cpll", | ||
75 | .id = -1, | ||
76 | }; | ||
77 | |||
64 | /* MPLL clock output | 78 | /* MPLL clock output |
65 | * No need .ctrlbit, this is always on | 79 | * No need .ctrlbit, this is always on |
66 | */ | 80 | */ |
@@ -101,6 +115,28 @@ struct clksrc_sources clk_src_apll = { | |||
101 | .nr_sources = ARRAY_SIZE(clk_src_apll_list), | 115 | .nr_sources = ARRAY_SIZE(clk_src_apll_list), |
102 | }; | 116 | }; |
103 | 117 | ||
118 | /* Possible clock sources for BPLL Mux */ | ||
119 | static struct clk *clk_src_bpll_list[] = { | ||
120 | [0] = &clk_fin_bpll, | ||
121 | [1] = &clk_fout_bpll, | ||
122 | }; | ||
123 | |||
124 | struct clksrc_sources clk_src_bpll = { | ||
125 | .sources = clk_src_bpll_list, | ||
126 | .nr_sources = ARRAY_SIZE(clk_src_bpll_list), | ||
127 | }; | ||
128 | |||
129 | /* Possible clock sources for CPLL Mux */ | ||
130 | static struct clk *clk_src_cpll_list[] = { | ||
131 | [0] = &clk_fin_cpll, | ||
132 | [1] = &clk_fout_cpll, | ||
133 | }; | ||
134 | |||
135 | struct clksrc_sources clk_src_cpll = { | ||
136 | .sources = clk_src_cpll_list, | ||
137 | .nr_sources = ARRAY_SIZE(clk_src_cpll_list), | ||
138 | }; | ||
139 | |||
104 | /* Possible clock sources for MPLL Mux */ | 140 | /* Possible clock sources for MPLL Mux */ |
105 | static struct clk *clk_src_mpll_list[] = { | 141 | static struct clk *clk_src_mpll_list[] = { |
106 | [0] = &clk_fin_mpll, | 142 | [0] = &clk_fin_mpll, |
diff --git a/arch/arm/plat-s5p/irq-pm.c b/arch/arm/plat-s5p/irq-pm.c index 327acb3a4464..d1bfecae6c9f 100644 --- a/arch/arm/plat-s5p/irq-pm.c +++ b/arch/arm/plat-s5p/irq-pm.c | |||
@@ -39,19 +39,32 @@ unsigned long s3c_irqwake_eintallow = 0xffffffffL; | |||
39 | int s3c_irq_wake(struct irq_data *data, unsigned int state) | 39 | int s3c_irq_wake(struct irq_data *data, unsigned int state) |
40 | { | 40 | { |
41 | unsigned long irqbit; | 41 | unsigned long irqbit; |
42 | unsigned int irq_rtc_tic, irq_rtc_alarm; | ||
43 | |||
44 | #ifdef CONFIG_ARCH_EXYNOS | ||
45 | if (soc_is_exynos5250()) { | ||
46 | irq_rtc_tic = EXYNOS5_IRQ_RTC_TIC; | ||
47 | irq_rtc_alarm = EXYNOS5_IRQ_RTC_ALARM; | ||
48 | } else { | ||
49 | irq_rtc_tic = EXYNOS4_IRQ_RTC_TIC; | ||
50 | irq_rtc_alarm = EXYNOS4_IRQ_RTC_ALARM; | ||
51 | } | ||
52 | #else | ||
53 | irq_rtc_tic = IRQ_RTC_TIC; | ||
54 | irq_rtc_alarm = IRQ_RTC_ALARM; | ||
55 | #endif | ||
56 | |||
57 | if (data->irq == irq_rtc_tic || data->irq == irq_rtc_alarm) { | ||
58 | irqbit = 1 << (data->irq + 1 - irq_rtc_alarm); | ||
42 | 59 | ||
43 | switch (data->irq) { | ||
44 | case IRQ_RTC_TIC: | ||
45 | case IRQ_RTC_ALARM: | ||
46 | irqbit = 1 << (data->irq + 1 - IRQ_RTC_ALARM); | ||
47 | if (!state) | 60 | if (!state) |
48 | s3c_irqwake_intmask |= irqbit; | 61 | s3c_irqwake_intmask |= irqbit; |
49 | else | 62 | else |
50 | s3c_irqwake_intmask &= ~irqbit; | 63 | s3c_irqwake_intmask &= ~irqbit; |
51 | break; | 64 | } else { |
52 | default: | ||
53 | return -ENOENT; | 65 | return -ENOENT; |
54 | } | 66 | } |
67 | |||
55 | return 0; | 68 | return 0; |
56 | } | 69 | } |
57 | 70 | ||
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c index 81c06d44c11e..46b426e8aff5 100644 --- a/arch/arm/plat-samsung/cpu.c +++ b/arch/arm/plat-samsung/cpu.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include <asm/system.h> | ||
19 | 18 | ||
20 | #include <mach/map.h> | 19 | #include <mach/map.h> |
21 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 73cb3cfd0685..787ceaca0be8 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -42,6 +42,9 @@ extern unsigned long samsung_cpu_id; | |||
42 | #define EXYNOS4412_CPU_ID 0xE4412200 | 42 | #define EXYNOS4412_CPU_ID 0xE4412200 |
43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 | 43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 |
44 | 44 | ||
45 | #define EXYNOS5250_SOC_ID 0x43520000 | ||
46 | #define EXYNOS5_SOC_MASK 0xFFFFF000 | ||
47 | |||
45 | #define IS_SAMSUNG_CPU(name, id, mask) \ | 48 | #define IS_SAMSUNG_CPU(name, id, mask) \ |
46 | static inline int is_samsung_##name(void) \ | 49 | static inline int is_samsung_##name(void) \ |
47 | { \ | 50 | { \ |
@@ -58,6 +61,7 @@ IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK) | |||
58 | IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) | 61 | IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) |
59 | IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) | 62 | IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) |
60 | IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) | 63 | IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) |
64 | IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) | ||
61 | 65 | ||
62 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ | 66 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ |
63 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ | 67 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ |
@@ -120,6 +124,12 @@ IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) | |||
120 | #define EXYNOS4210_REV_1_0 (0x10) | 124 | #define EXYNOS4210_REV_1_0 (0x10) |
121 | #define EXYNOS4210_REV_1_1 (0x11) | 125 | #define EXYNOS4210_REV_1_1 (0x11) |
122 | 126 | ||
127 | #if defined(CONFIG_SOC_EXYNOS5250) | ||
128 | # define soc_is_exynos5250() is_samsung_exynos5250() | ||
129 | #else | ||
130 | # define soc_is_exynos5250() 0 | ||
131 | #endif | ||
132 | |||
123 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | 133 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
124 | 134 | ||
125 | #ifndef MHZ | 135 | #ifndef MHZ |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 5e7972de3ed5..2155d4af62a3 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -26,6 +26,8 @@ struct s3c24xx_uart_resources { | |||
26 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; | 26 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; |
27 | extern struct s3c24xx_uart_resources s3c64xx_uart_resources[]; | 27 | extern struct s3c24xx_uart_resources s3c64xx_uart_resources[]; |
28 | extern struct s3c24xx_uart_resources s5p_uart_resources[]; | 28 | extern struct s3c24xx_uart_resources s5p_uart_resources[]; |
29 | extern struct s3c24xx_uart_resources exynos4_uart_resources[]; | ||
30 | extern struct s3c24xx_uart_resources exynos5_uart_resources[]; | ||
29 | 31 | ||
30 | extern struct platform_device *s3c24xx_uart_devs[]; | 32 | extern struct platform_device *s3c24xx_uart_devs[]; |
31 | extern struct platform_device *s3c24xx_uart_src[]; | 33 | extern struct platform_device *s3c24xx_uart_src[]; |
diff --git a/arch/arm/plat-samsung/include/plat/s5p-clock.h b/arch/arm/plat-samsung/include/plat/s5p-clock.h index 984bf9e7bc89..1de4b32f98e9 100644 --- a/arch/arm/plat-samsung/include/plat/s5p-clock.h +++ b/arch/arm/plat-samsung/include/plat/s5p-clock.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) | 18 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) |
19 | 19 | ||
20 | #define clk_fin_apll clk_ext_xtal_mux | 20 | #define clk_fin_apll clk_ext_xtal_mux |
21 | #define clk_fin_bpll clk_ext_xtal_mux | ||
22 | #define clk_fin_cpll clk_ext_xtal_mux | ||
21 | #define clk_fin_mpll clk_ext_xtal_mux | 23 | #define clk_fin_mpll clk_ext_xtal_mux |
22 | #define clk_fin_epll clk_ext_xtal_mux | 24 | #define clk_fin_epll clk_ext_xtal_mux |
23 | #define clk_fin_dpll clk_ext_xtal_mux | 25 | #define clk_fin_dpll clk_ext_xtal_mux |
@@ -29,6 +31,8 @@ extern struct clk clk_xusbxti; | |||
29 | extern struct clk clk_48m; | 31 | extern struct clk clk_48m; |
30 | extern struct clk s5p_clk_27m; | 32 | extern struct clk s5p_clk_27m; |
31 | extern struct clk clk_fout_apll; | 33 | extern struct clk clk_fout_apll; |
34 | extern struct clk clk_fout_bpll; | ||
35 | extern struct clk clk_fout_cpll; | ||
32 | extern struct clk clk_fout_mpll; | 36 | extern struct clk clk_fout_mpll; |
33 | extern struct clk clk_fout_epll; | 37 | extern struct clk clk_fout_epll; |
34 | extern struct clk clk_fout_dpll; | 38 | extern struct clk clk_fout_dpll; |
@@ -37,6 +41,8 @@ extern struct clk clk_arm; | |||
37 | extern struct clk clk_vpll; | 41 | extern struct clk clk_vpll; |
38 | 42 | ||
39 | extern struct clksrc_sources clk_src_apll; | 43 | extern struct clksrc_sources clk_src_apll; |
44 | extern struct clksrc_sources clk_src_bpll; | ||
45 | extern struct clksrc_sources clk_src_cpll; | ||
40 | extern struct clksrc_sources clk_src_mpll; | 46 | extern struct clksrc_sources clk_src_mpll; |
41 | extern struct clksrc_sources clk_src_epll; | 47 | extern struct clksrc_sources clk_src_epll; |
42 | extern struct clksrc_sources clk_src_dpll; | 48 | extern struct clksrc_sources clk_src_dpll; |
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h index ee48e12a1e72..7e068d182c3d 100644 --- a/arch/arm/plat-samsung/include/plat/uncompress.h +++ b/arch/arm/plat-samsung/include/plat/uncompress.h | |||
@@ -37,7 +37,9 @@ static void arch_detect_cpu(void); | |||
37 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | 37 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ |
38 | #define FIFO_MAX (14) | 38 | #define FIFO_MAX (14) |
39 | 39 | ||
40 | #ifdef S3C_PA_UART | ||
40 | #define uart_base S3C_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT) | 41 | #define uart_base S3C_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT) |
42 | #endif | ||
41 | 43 | ||
42 | static __inline__ void | 44 | static __inline__ void |
43 | uart_wr(unsigned int reg, unsigned int val) | 45 | uart_wr(unsigned int reg, unsigned int val) |
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index 51583cd30164..f980cf3d2baa 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | #include <mach/map.h> | 21 | #include <mach/map.h> |
22 | #include <plat/cpu.h> | ||
22 | #include <plat/irq-vic-timer.h> | 23 | #include <plat/irq-vic-timer.h> |
23 | #include <plat/regs-timer.h> | 24 | #include <plat/regs-timer.h> |
24 | 25 | ||
@@ -57,6 +58,21 @@ void __init s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq) | |||
57 | struct irq_chip_type *ct; | 58 | struct irq_chip_type *ct; |
58 | unsigned int i; | 59 | unsigned int i; |
59 | 60 | ||
61 | #ifdef CONFIG_ARCH_EXYNOS | ||
62 | if (soc_is_exynos5250()) { | ||
63 | pirq[0] = EXYNOS5_IRQ_TIMER0_VIC; | ||
64 | pirq[1] = EXYNOS5_IRQ_TIMER1_VIC; | ||
65 | pirq[2] = EXYNOS5_IRQ_TIMER2_VIC; | ||
66 | pirq[3] = EXYNOS5_IRQ_TIMER3_VIC; | ||
67 | pirq[4] = EXYNOS5_IRQ_TIMER4_VIC; | ||
68 | } else { | ||
69 | pirq[0] = EXYNOS4_IRQ_TIMER0_VIC; | ||
70 | pirq[1] = EXYNOS4_IRQ_TIMER1_VIC; | ||
71 | pirq[2] = EXYNOS4_IRQ_TIMER2_VIC; | ||
72 | pirq[3] = EXYNOS4_IRQ_TIMER3_VIC; | ||
73 | pirq[4] = EXYNOS4_IRQ_TIMER4_VIC; | ||
74 | } | ||
75 | #endif | ||
60 | s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq, | 76 | s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq, |
61 | S3C64XX_TINT_CSTAT, handle_level_irq); | 77 | S3C64XX_TINT_CSTAT, handle_level_irq); |
62 | 78 | ||
diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c index e3bb806bbafe..4dcb11c3d894 100644 --- a/arch/arm/plat-samsung/time.c +++ b/arch/arm/plat-samsung/time.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | 30 | ||
31 | #include <asm/system.h> | ||
32 | #include <asm/leds.h> | 31 | #include <asm/leds.h> |
33 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
34 | 33 | ||
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c index 2b4e3d82957c..16f203e78d89 100644 --- a/arch/arm/plat-spear/restart.c +++ b/arch/arm/plat-spear/restart.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
12 | */ | 12 | */ |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <asm/system_misc.h> | ||
14 | #include <asm/hardware/sp810.h> | 15 | #include <asm/hardware/sp810.h> |
15 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
16 | #include <mach/generic.h> | 17 | #include <mach/generic.h> |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 8f3ccddbdafd..858748eaa144 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -18,7 +18,9 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | 20 | ||
21 | #include <asm/cp15.h> | ||
21 | #include <asm/cputype.h> | 22 | #include <asm/cputype.h> |
23 | #include <asm/system_info.h> | ||
22 | #include <asm/thread_notify.h> | 24 | #include <asm/thread_notify.h> |
23 | #include <asm/vfp.h> | 25 | #include <asm/vfp.h> |
24 | 26 | ||