diff options
Diffstat (limited to 'arch')
128 files changed, 3008 insertions, 1617 deletions
diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S index e2d636336b7c..e7f80928949c 100644 --- a/arch/arm/boot/compressed/head-shmobile.S +++ b/arch/arm/boot/compressed/head-shmobile.S | |||
@@ -55,12 +55,47 @@ __tmp_stack: | |||
55 | __continue: | 55 | __continue: |
56 | #endif /* CONFIG_ZBOOT_ROM_MMC || CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI */ | 56 | #endif /* CONFIG_ZBOOT_ROM_MMC || CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI */ |
57 | 57 | ||
58 | /* Set board ID necessary for boot */ | 58 | adr r0, dtb_info |
59 | ldr r7, 1f @ Set machine type register | 59 | ldmia r0, {r1, r3, r4, r5, r7} |
60 | mov r8, #0 @ pass null pointer as atag | 60 | |
61 | sub r0, r0, r1 @ calculate the delta offset | ||
62 | add r5, r5, r0 @ _edata | ||
63 | |||
64 | ldr lr, [r5, #0] @ check if valid DTB is present | ||
65 | cmp lr, r3 | ||
66 | bne 0f | ||
67 | |||
68 | add r9, r7, #31 @ rounded up to a multiple | ||
69 | bic r9, r9, #31 @ ... of 32 bytes | ||
70 | |||
71 | add r6, r9, r5 @ copy from _edata | ||
72 | add r9, r9, r4 @ to MEMORY_START | ||
73 | |||
74 | 1: ldmdb r6!, {r0 - r3, r10 - r12, lr} | ||
75 | cmp r6, r5 | ||
76 | stmdb r9!, {r0 - r3, r10 - r12, lr} | ||
77 | bhi 1b | ||
78 | |||
79 | /* Success: Zero board ID, pointer to start of memory for atag/dtb */ | ||
80 | mov r7, #0 | ||
81 | mov r8, r4 | ||
61 | b 2f | 82 | b 2f |
62 | 83 | ||
63 | 1 : .long MACH_TYPE | 84 | .align 2 |
85 | dtb_info: | ||
86 | .word dtb_info | ||
87 | #ifndef __ARMEB__ | ||
88 | .word 0xedfe0dd0 @ sig is 0xd00dfeed big endian | ||
89 | #else | ||
90 | .word 0xd00dfeed | ||
91 | #endif | ||
92 | .word MEMORY_START | ||
93 | .word _edata | ||
94 | .word 0x4000 @ maximum DTB size | ||
95 | 0: | ||
96 | /* Failure: Zero board ID, NULL atag/dtb */ | ||
97 | mov r7, #0 | ||
98 | mov r8, #0 @ pass null pointer as atag | ||
64 | 2 : | 99 | 2 : |
65 | 100 | ||
66 | #endif /* CONFIG_ZBOOT_ROM */ | 101 | #endif /* CONFIG_ZBOOT_ROM */ |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 641b3c9a7028..1d94303d4416 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -101,6 +101,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ | |||
101 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ | 101 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ |
102 | armada-370-mirabox.dtb \ | 102 | armada-370-mirabox.dtb \ |
103 | armada-370-rd.dtb \ | 103 | armada-370-rd.dtb \ |
104 | armada-xp-axpwifiap.dtb \ | ||
104 | armada-xp-db.dtb \ | 105 | armada-xp-db.dtb \ |
105 | armada-xp-gp.dtb \ | 106 | armada-xp-gp.dtb \ |
106 | armada-xp-openblocks-ax3-4.dtb | 107 | armada-xp-openblocks-ax3-4.dtb |
@@ -183,6 +184,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ | |||
183 | ccu9540.dtb | 184 | ccu9540.dtb |
184 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb | 185 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb |
185 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | 186 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ |
187 | emev2-kzm9d-reference.dtb \ | ||
186 | r8a7740-armadillo800eva.dtb \ | 188 | r8a7740-armadillo800eva.dtb \ |
187 | r8a7778-bockw.dtb \ | 189 | r8a7778-bockw.dtb \ |
188 | r8a7740-armadillo800eva-reference.dtb \ | 190 | r8a7740-armadillo800eva-reference.dtb \ |
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index beee1699d49e..90ce29dbe119 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | /dts-v1/; | 16 | /dts-v1/; |
17 | /include/ "armada-370.dtsi" | 17 | #include "armada-370.dtsi" |
18 | 18 | ||
19 | / { | 19 | / { |
20 | model = "Marvell Armada 370 Evaluation Board"; | 20 | model = "Marvell Armada 370 Evaluation Board"; |
@@ -30,6 +30,9 @@ | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | soc { | 32 | soc { |
33 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 | ||
34 | MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; | ||
35 | |||
33 | internal-regs { | 36 | internal-regs { |
34 | serial@12000 { | 37 | serial@12000 { |
35 | clock-frequency = <200000000>; | 38 | clock-frequency = <200000000>; |
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index 45b107763e3b..2471d9da767b 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "armada-370.dtsi" | 12 | #include "armada-370.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "Globalscale Mirabox"; | 15 | model = "Globalscale Mirabox"; |
@@ -25,6 +25,25 @@ | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | soc { | 27 | soc { |
28 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 | ||
29 | MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; | ||
30 | |||
31 | pcie-controller { | ||
32 | status = "okay"; | ||
33 | |||
34 | /* Internal mini-PCIe connector */ | ||
35 | pcie@1,0 { | ||
36 | /* Port 0, Lane 0 */ | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | /* Connected on the PCB to a USB 3.0 XHCI controller */ | ||
41 | pcie@2,0 { | ||
42 | /* Port 1, Lane 0 */ | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | }; | ||
46 | |||
28 | internal-regs { | 47 | internal-regs { |
29 | serial@12000 { | 48 | serial@12000 { |
30 | clock-frequency = <200000000>; | 49 | clock-frequency = <200000000>; |
@@ -120,22 +139,6 @@ | |||
120 | reg = <0x25>; | 139 | reg = <0x25>; |
121 | }; | 140 | }; |
122 | }; | 141 | }; |
123 | |||
124 | pcie-controller { | ||
125 | status = "okay"; | ||
126 | |||
127 | /* Internal mini-PCIe connector */ | ||
128 | pcie@1,0 { | ||
129 | /* Port 0, Lane 0 */ | ||
130 | status = "okay"; | ||
131 | }; | ||
132 | |||
133 | /* Connected on the PCB to a USB 3.0 XHCI controller */ | ||
134 | pcie@2,0 { | ||
135 | /* Port 1, Lane 0 */ | ||
136 | status = "okay"; | ||
137 | }; | ||
138 | }; | ||
139 | }; | 142 | }; |
140 | }; | 143 | }; |
141 | }; | 144 | }; |
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts index a3a2fedb8726..f81810a59629 100644 --- a/arch/arm/boot/dts/armada-370-rd.dts +++ b/arch/arm/boot/dts/armada-370-rd.dts | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | /dts-v1/; | 14 | /dts-v1/; |
15 | /include/ "armada-370.dtsi" | 15 | #include "armada-370.dtsi" |
16 | 16 | ||
17 | / { | 17 | / { |
18 | model = "Marvell Armada 370 Reference Design"; | 18 | model = "Marvell Armada 370 Reference Design"; |
@@ -28,6 +28,25 @@ | |||
28 | }; | 28 | }; |
29 | 29 | ||
30 | soc { | 30 | soc { |
31 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 | ||
32 | MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; | ||
33 | |||
34 | pcie-controller { | ||
35 | status = "okay"; | ||
36 | |||
37 | /* Internal mini-PCIe connector */ | ||
38 | pcie@1,0 { | ||
39 | /* Port 0, Lane 0 */ | ||
40 | status = "okay"; | ||
41 | }; | ||
42 | |||
43 | /* Internal mini-PCIe connector */ | ||
44 | pcie@2,0 { | ||
45 | /* Port 1, Lane 0 */ | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | }; | ||
49 | |||
31 | internal-regs { | 50 | internal-regs { |
32 | serial@12000 { | 51 | serial@12000 { |
33 | clock-frequency = <200000000>; | 52 | clock-frequency = <200000000>; |
@@ -85,22 +104,6 @@ | |||
85 | gpios = <&gpio0 6 1>; | 104 | gpios = <&gpio0 6 1>; |
86 | }; | 105 | }; |
87 | }; | 106 | }; |
88 | |||
89 | pcie-controller { | ||
90 | status = "okay"; | ||
91 | |||
92 | /* Internal mini-PCIe connector */ | ||
93 | pcie@1,0 { | ||
94 | /* Port 0, Lane 0 */ | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | |||
98 | /* Internal mini-PCIe connector */ | ||
99 | pcie@2,0 { | ||
100 | /* Port 1, Lane 0 */ | ||
101 | status = "okay"; | ||
102 | }; | ||
103 | }; | ||
104 | }; | 107 | }; |
105 | }; | 108 | }; |
106 | }; | 109 | }; |
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 90b117624abb..e984ce6bb33f 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
@@ -18,6 +18,8 @@ | |||
18 | 18 | ||
19 | /include/ "skeleton64.dtsi" | 19 | /include/ "skeleton64.dtsi" |
20 | 20 | ||
21 | #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) | ||
22 | |||
21 | / { | 23 | / { |
22 | model = "Marvell Armada 370 and XP SoC"; | 24 | model = "Marvell Armada 370 and XP SoC"; |
23 | compatible = "marvell,armada-370-xp"; | 25 | compatible = "marvell,armada-370-xp"; |
@@ -38,18 +40,73 @@ | |||
38 | }; | 40 | }; |
39 | 41 | ||
40 | soc { | 42 | soc { |
41 | #address-cells = <1>; | 43 | #address-cells = <2>; |
42 | #size-cells = <1>; | 44 | #size-cells = <1>; |
43 | compatible = "simple-bus"; | 45 | controller = <&mbusc>; |
44 | interrupt-parent = <&mpic>; | 46 | interrupt-parent = <&mpic>; |
45 | ranges = <0 0 0xd0000000 0x0100000 /* internal registers */ | 47 | pcie-mem-aperture = <0xe0000000 0x8000000>; |
46 | 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */>; | 48 | pcie-io-aperture = <0xe8000000 0x100000>; |
49 | |||
50 | devbus-bootcs { | ||
51 | compatible = "marvell,mvebu-devbus"; | ||
52 | reg = <MBUS_ID(0xf0, 0x01) 0x10400 0x8>; | ||
53 | ranges = <0 MBUS_ID(0x01, 0x2f) 0 0xffffffff>; | ||
54 | #address-cells = <1>; | ||
55 | #size-cells = <1>; | ||
56 | clocks = <&coreclk 0>; | ||
57 | status = "disabled"; | ||
58 | }; | ||
59 | |||
60 | devbus-cs0 { | ||
61 | compatible = "marvell,mvebu-devbus"; | ||
62 | reg = <MBUS_ID(0xf0, 0x01) 0x10408 0x8>; | ||
63 | ranges = <0 MBUS_ID(0x01, 0x3e) 0 0xffffffff>; | ||
64 | #address-cells = <1>; | ||
65 | #size-cells = <1>; | ||
66 | clocks = <&coreclk 0>; | ||
67 | status = "disabled"; | ||
68 | }; | ||
69 | |||
70 | devbus-cs1 { | ||
71 | compatible = "marvell,mvebu-devbus"; | ||
72 | reg = <MBUS_ID(0xf0, 0x01) 0x10410 0x8>; | ||
73 | ranges = <0 MBUS_ID(0x01, 0x3d) 0 0xffffffff>; | ||
74 | #address-cells = <1>; | ||
75 | #size-cells = <1>; | ||
76 | clocks = <&coreclk 0>; | ||
77 | status = "disabled"; | ||
78 | }; | ||
79 | |||
80 | devbus-cs2 { | ||
81 | compatible = "marvell,mvebu-devbus"; | ||
82 | reg = <MBUS_ID(0xf0, 0x01) 0x10418 0x8>; | ||
83 | ranges = <0 MBUS_ID(0x01, 0x3b) 0 0xffffffff>; | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <1>; | ||
86 | clocks = <&coreclk 0>; | ||
87 | status = "disabled"; | ||
88 | }; | ||
89 | |||
90 | devbus-cs3 { | ||
91 | compatible = "marvell,mvebu-devbus"; | ||
92 | reg = <MBUS_ID(0xf0, 0x01) 0x10420 0x8>; | ||
93 | ranges = <0 MBUS_ID(0x01, 0x37) 0 0xffffffff>; | ||
94 | #address-cells = <1>; | ||
95 | #size-cells = <1>; | ||
96 | clocks = <&coreclk 0>; | ||
97 | status = "disabled"; | ||
98 | }; | ||
47 | 99 | ||
48 | internal-regs { | 100 | internal-regs { |
49 | compatible = "simple-bus"; | 101 | compatible = "simple-bus"; |
50 | #address-cells = <1>; | 102 | #address-cells = <1>; |
51 | #size-cells = <1>; | 103 | #size-cells = <1>; |
52 | ranges; | 104 | ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; |
105 | |||
106 | mbusc: mbus-controller@20000 { | ||
107 | compatible = "marvell,mbus-controller"; | ||
108 | reg = <0x20000 0x100>, <0x20180 0x20>; | ||
109 | }; | ||
53 | 110 | ||
54 | mpic: interrupt-controller@20000 { | 111 | mpic: interrupt-controller@20000 { |
55 | compatible = "marvell,mpic"; | 112 | compatible = "marvell,mpic"; |
@@ -195,50 +252,6 @@ | |||
195 | status = "disabled"; | 252 | status = "disabled"; |
196 | }; | 253 | }; |
197 | 254 | ||
198 | devbus-bootcs@10400 { | ||
199 | compatible = "marvell,mvebu-devbus"; | ||
200 | reg = <0x10400 0x8>; | ||
201 | #address-cells = <1>; | ||
202 | #size-cells = <1>; | ||
203 | clocks = <&coreclk 0>; | ||
204 | status = "disabled"; | ||
205 | }; | ||
206 | |||
207 | devbus-cs0@10408 { | ||
208 | compatible = "marvell,mvebu-devbus"; | ||
209 | reg = <0x10408 0x8>; | ||
210 | #address-cells = <1>; | ||
211 | #size-cells = <1>; | ||
212 | clocks = <&coreclk 0>; | ||
213 | status = "disabled"; | ||
214 | }; | ||
215 | |||
216 | devbus-cs1@10410 { | ||
217 | compatible = "marvell,mvebu-devbus"; | ||
218 | reg = <0x10410 0x8>; | ||
219 | #address-cells = <1>; | ||
220 | #size-cells = <1>; | ||
221 | clocks = <&coreclk 0>; | ||
222 | status = "disabled"; | ||
223 | }; | ||
224 | |||
225 | devbus-cs2@10418 { | ||
226 | compatible = "marvell,mvebu-devbus"; | ||
227 | reg = <0x10418 0x8>; | ||
228 | #address-cells = <1>; | ||
229 | #size-cells = <1>; | ||
230 | clocks = <&coreclk 0>; | ||
231 | status = "disabled"; | ||
232 | }; | ||
233 | |||
234 | devbus-cs3@10420 { | ||
235 | compatible = "marvell,mvebu-devbus"; | ||
236 | reg = <0x10420 0x8>; | ||
237 | #address-cells = <1>; | ||
238 | #size-cells = <1>; | ||
239 | clocks = <&coreclk 0>; | ||
240 | status = "disabled"; | ||
241 | }; | ||
242 | }; | 255 | }; |
243 | }; | 256 | }; |
244 | }; | 257 | }; |
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index fa3dfc6b4c6a..648e5303446e 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi | |||
@@ -15,7 +15,7 @@ | |||
15 | * common to all Armada SoCs. | 15 | * common to all Armada SoCs. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | /include/ "armada-370-xp.dtsi" | 18 | #include "armada-370-xp.dtsi" |
19 | /include/ "skeleton.dtsi" | 19 | /include/ "skeleton.dtsi" |
20 | 20 | ||
21 | / { | 21 | / { |
@@ -29,8 +29,66 @@ | |||
29 | }; | 29 | }; |
30 | 30 | ||
31 | soc { | 31 | soc { |
32 | ranges = <0 0xd0000000 0x0100000 /* internal registers */ | 32 | compatible = "marvell,armada370-mbus", "simple-bus"; |
33 | 0xe0000000 0xe0000000 0x8100000 /* PCIe */>; | 33 | |
34 | bootrom { | ||
35 | compatible = "marvell,bootrom"; | ||
36 | reg = <MBUS_ID(0x01, 0xe0) 0 0x100000>; | ||
37 | }; | ||
38 | |||
39 | pcie-controller { | ||
40 | compatible = "marvell,armada-370-pcie"; | ||
41 | status = "disabled"; | ||
42 | device_type = "pci"; | ||
43 | |||
44 | #address-cells = <3>; | ||
45 | #size-cells = <2>; | ||
46 | |||
47 | bus-range = <0x00 0xff>; | ||
48 | |||
49 | ranges = | ||
50 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 | ||
51 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 | ||
52 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | ||
53 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | ||
54 | 0x82000000 0x2 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ | ||
55 | 0x81000000 0x2 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */>; | ||
56 | |||
57 | pcie@1,0 { | ||
58 | device_type = "pci"; | ||
59 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
60 | reg = <0x0800 0 0 0 0>; | ||
61 | #address-cells = <3>; | ||
62 | #size-cells = <2>; | ||
63 | #interrupt-cells = <1>; | ||
64 | ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 | ||
65 | 0x81000000 0 0 0x81000000 0x1 0 1 0>; | ||
66 | interrupt-map-mask = <0 0 0 0>; | ||
67 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
68 | marvell,pcie-port = <0>; | ||
69 | marvell,pcie-lane = <0>; | ||
70 | clocks = <&gateclk 5>; | ||
71 | status = "disabled"; | ||
72 | }; | ||
73 | |||
74 | pcie@2,0 { | ||
75 | device_type = "pci"; | ||
76 | assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; | ||
77 | reg = <0x1000 0 0 0 0>; | ||
78 | #address-cells = <3>; | ||
79 | #size-cells = <2>; | ||
80 | #interrupt-cells = <1>; | ||
81 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | ||
82 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | ||
83 | interrupt-map-mask = <0 0 0 0>; | ||
84 | interrupt-map = <0 0 0 0 &mpic 62>; | ||
85 | marvell,pcie-port = <1>; | ||
86 | marvell,pcie-lane = <0>; | ||
87 | clocks = <&gateclk 9>; | ||
88 | status = "disabled"; | ||
89 | }; | ||
90 | }; | ||
91 | |||
34 | internal-regs { | 92 | internal-regs { |
35 | system-controller@18200 { | 93 | system-controller@18200 { |
36 | compatible = "marvell,armada-370-xp-system-controller"; | 94 | compatible = "marvell,armada-370-xp-system-controller"; |
@@ -169,54 +227,6 @@ | |||
169 | 0x18304 0x4>; | 227 | 0x18304 0x4>; |
170 | status = "okay"; | 228 | status = "okay"; |
171 | }; | 229 | }; |
172 | |||
173 | pcie-controller { | ||
174 | compatible = "marvell,armada-370-pcie"; | ||
175 | status = "disabled"; | ||
176 | device_type = "pci"; | ||
177 | |||
178 | #address-cells = <3>; | ||
179 | #size-cells = <2>; | ||
180 | |||
181 | bus-range = <0x00 0xff>; | ||
182 | |||
183 | ranges = <0x82000000 0 0x40000 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
184 | 0x82000000 0 0x80000 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
185 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
186 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
187 | |||
188 | pcie@1,0 { | ||
189 | device_type = "pci"; | ||
190 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
191 | reg = <0x0800 0 0 0 0>; | ||
192 | #address-cells = <3>; | ||
193 | #size-cells = <2>; | ||
194 | #interrupt-cells = <1>; | ||
195 | ranges; | ||
196 | interrupt-map-mask = <0 0 0 0>; | ||
197 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
198 | marvell,pcie-port = <0>; | ||
199 | marvell,pcie-lane = <0>; | ||
200 | clocks = <&gateclk 5>; | ||
201 | status = "disabled"; | ||
202 | }; | ||
203 | |||
204 | pcie@2,0 { | ||
205 | device_type = "pci"; | ||
206 | assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; | ||
207 | reg = <0x1000 0 0 0 0>; | ||
208 | #address-cells = <3>; | ||
209 | #size-cells = <2>; | ||
210 | #interrupt-cells = <1>; | ||
211 | ranges; | ||
212 | interrupt-map-mask = <0 0 0 0>; | ||
213 | interrupt-map = <0 0 0 0 &mpic 62>; | ||
214 | marvell,pcie-port = <1>; | ||
215 | marvell,pcie-lane = <0>; | ||
216 | clocks = <&gateclk 9>; | ||
217 | status = "disabled"; | ||
218 | }; | ||
219 | }; | ||
220 | }; | 230 | }; |
221 | }; | 231 | }; |
222 | }; | 232 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-axpwifiap.dts b/arch/arm/boot/dts/armada-xp-axpwifiap.dts new file mode 100644 index 000000000000..c5fe57269f5a --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-axpwifiap.dts | |||
@@ -0,0 +1,164 @@ | |||
1 | /* | ||
2 | * Device Tree file for Marvell RD-AXPWiFiAP. | ||
3 | * | ||
4 | * Note: this board is shipped with a new generation boot loader that | ||
5 | * remaps internal registers at 0xf1000000. Therefore, if earlyprintk | ||
6 | * is used, the CONFIG_DEBUG_MVEBU_UART_ALTERNATE option should be | ||
7 | * used. | ||
8 | * | ||
9 | * Copyright (C) 2013 Marvell | ||
10 | * | ||
11 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
12 | * | ||
13 | * This file is licensed under the terms of the GNU General Public | ||
14 | * License version 2. This program is licensed "as is" without any | ||
15 | * warranty of any kind, whether express or implied. | ||
16 | */ | ||
17 | |||
18 | /dts-v1/; | ||
19 | #include "armada-xp-mv78230.dtsi" | ||
20 | |||
21 | / { | ||
22 | model = "Marvell RD-AXPWiFiAP"; | ||
23 | compatible = "marvell,rd-axpwifiap", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; | ||
24 | |||
25 | chosen { | ||
26 | bootargs = "console=ttyS0,115200 earlyprintk"; | ||
27 | }; | ||
28 | |||
29 | memory { | ||
30 | device_type = "memory"; | ||
31 | reg = <0x00000000 0x00000000 0x00000000 0x40000000>; /* 1GB */ | ||
32 | }; | ||
33 | |||
34 | soc { | ||
35 | ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 | ||
36 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; | ||
37 | |||
38 | pcie-controller { | ||
39 | status = "okay"; | ||
40 | |||
41 | /* First mini-PCIe port */ | ||
42 | pcie@1,0 { | ||
43 | /* Port 0, Lane 0 */ | ||
44 | status = "okay"; | ||
45 | }; | ||
46 | |||
47 | /* Second mini-PCIe port */ | ||
48 | pcie@2,0 { | ||
49 | /* Port 0, Lane 1 */ | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | /* Renesas uPD720202 USB 3.0 controller */ | ||
54 | pcie@3,0 { | ||
55 | /* Port 0, Lane 3 */ | ||
56 | status = "okay"; | ||
57 | }; | ||
58 | }; | ||
59 | |||
60 | internal-regs { | ||
61 | pinctrl { | ||
62 | pinctrl-0 = <&pmx_phy_int>; | ||
63 | pinctrl-names = "default"; | ||
64 | |||
65 | pmx_ge0: pmx-ge0 { | ||
66 | marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3", | ||
67 | "mpp4", "mpp5", "mpp6", "mpp7", | ||
68 | "mpp8", "mpp9", "mpp10", "mpp11"; | ||
69 | marvell,function = "ge0"; | ||
70 | }; | ||
71 | |||
72 | pmx_ge1: pmx-ge1 { | ||
73 | marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", | ||
74 | "mpp16", "mpp17", "mpp18", "mpp19", | ||
75 | "mpp20", "mpp21", "mpp22", "mpp23"; | ||
76 | marvell,function = "ge1"; | ||
77 | }; | ||
78 | |||
79 | pmx_keys: pmx-keys { | ||
80 | marvell,pins = "mpp33"; | ||
81 | marvell,function = "gpio"; | ||
82 | }; | ||
83 | |||
84 | pmx_spi: pmx-spi { | ||
85 | marvell,pins = "mpp36", "mpp37", "mpp38", "mpp39"; | ||
86 | marvell,function = "spi"; | ||
87 | }; | ||
88 | |||
89 | pmx_phy_int: pmx-phy-int { | ||
90 | marvell,pins = "mpp32"; | ||
91 | marvell,function = "gpio"; | ||
92 | }; | ||
93 | }; | ||
94 | |||
95 | serial@12000 { | ||
96 | clock-frequency = <250000000>; | ||
97 | status = "okay"; | ||
98 | }; | ||
99 | |||
100 | serial@12100 { | ||
101 | clock-frequency = <250000000>; | ||
102 | status = "okay"; | ||
103 | }; | ||
104 | |||
105 | sata@a0000 { | ||
106 | nr-ports = <1>; | ||
107 | status = "okay"; | ||
108 | }; | ||
109 | |||
110 | mdio { | ||
111 | phy0: ethernet-phy@0 { | ||
112 | reg = <0>; | ||
113 | }; | ||
114 | |||
115 | phy1: ethernet-phy@1 { | ||
116 | reg = <1>; | ||
117 | }; | ||
118 | }; | ||
119 | |||
120 | ethernet@70000 { | ||
121 | pinctrl-0 = <&pmx_ge0>; | ||
122 | pinctrl-names = "default"; | ||
123 | status = "okay"; | ||
124 | phy = <&phy0>; | ||
125 | phy-mode = "rgmii-id"; | ||
126 | }; | ||
127 | ethernet@74000 { | ||
128 | pinctrl-0 = <&pmx_ge1>; | ||
129 | pinctrl-names = "default"; | ||
130 | status = "okay"; | ||
131 | phy = <&phy1>; | ||
132 | phy-mode = "rgmii-id"; | ||
133 | }; | ||
134 | |||
135 | spi0: spi@10600 { | ||
136 | status = "okay"; | ||
137 | pinctrl-0 = <&pmx_spi>; | ||
138 | pinctrl-names = "default"; | ||
139 | |||
140 | spi-flash@0 { | ||
141 | #address-cells = <1>; | ||
142 | #size-cells = <1>; | ||
143 | compatible = "n25q128a13"; | ||
144 | reg = <0>; /* Chip select 0 */ | ||
145 | spi-max-frequency = <108000000>; | ||
146 | }; | ||
147 | }; | ||
148 | }; | ||
149 | }; | ||
150 | |||
151 | gpio_keys { | ||
152 | compatible = "gpio-keys"; | ||
153 | #address-cells = <1>; | ||
154 | #size-cells = <0>; | ||
155 | pinctrl-0 = <&pmx_keys>; | ||
156 | pinctrl-names = "default"; | ||
157 | |||
158 | button@1 { | ||
159 | label = "Factory Reset Button"; | ||
160 | linux,code = <141>; /* KEY_SETUP */ | ||
161 | gpios = <&gpio1 1 1>; | ||
162 | }; | ||
163 | }; | ||
164 | }; | ||
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts index e28e68ff864d..bcf6d79a57ec 100644 --- a/arch/arm/boot/dts/armada-xp-db.dts +++ b/arch/arm/boot/dts/armada-xp-db.dts | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | /dts-v1/; | 16 | /dts-v1/; |
17 | /include/ "armada-xp-mv78460.dtsi" | 17 | #include "armada-xp-mv78460.dtsi" |
18 | 18 | ||
19 | / { | 19 | / { |
20 | model = "Marvell Armada XP Evaluation Board"; | 20 | model = "Marvell Armada XP Evaluation Board"; |
@@ -30,9 +30,70 @@ | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | soc { | 32 | soc { |
33 | ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */ | 33 | ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 |
34 | 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */ | 34 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 |
35 | 0xf0000000 0 0xf0000000 0x1000000>; /* Device Bus, NOR 16MiB */ | 35 | MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000>; |
36 | |||
37 | devbus-bootcs { | ||
38 | status = "okay"; | ||
39 | |||
40 | /* Device Bus parameters are required */ | ||
41 | |||
42 | /* Read parameters */ | ||
43 | devbus,bus-width = <8>; | ||
44 | devbus,turn-off-ps = <60000>; | ||
45 | devbus,badr-skew-ps = <0>; | ||
46 | devbus,acc-first-ps = <124000>; | ||
47 | devbus,acc-next-ps = <248000>; | ||
48 | devbus,rd-setup-ps = <0>; | ||
49 | devbus,rd-hold-ps = <0>; | ||
50 | |||
51 | /* Write parameters */ | ||
52 | devbus,sync-enable = <0>; | ||
53 | devbus,wr-high-ps = <60000>; | ||
54 | devbus,wr-low-ps = <60000>; | ||
55 | devbus,ale-wr-ps = <60000>; | ||
56 | |||
57 | /* NOR 16 MiB */ | ||
58 | nor@0 { | ||
59 | compatible = "cfi-flash"; | ||
60 | reg = <0 0x1000000>; | ||
61 | bank-width = <2>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
65 | pcie-controller { | ||
66 | status = "okay"; | ||
67 | |||
68 | /* | ||
69 | * All 6 slots are physically present as | ||
70 | * standard PCIe slots on the board. | ||
71 | */ | ||
72 | pcie@1,0 { | ||
73 | /* Port 0, Lane 0 */ | ||
74 | status = "okay"; | ||
75 | }; | ||
76 | pcie@2,0 { | ||
77 | /* Port 0, Lane 1 */ | ||
78 | status = "okay"; | ||
79 | }; | ||
80 | pcie@3,0 { | ||
81 | /* Port 0, Lane 2 */ | ||
82 | status = "okay"; | ||
83 | }; | ||
84 | pcie@4,0 { | ||
85 | /* Port 0, Lane 3 */ | ||
86 | status = "okay"; | ||
87 | }; | ||
88 | pcie@9,0 { | ||
89 | /* Port 2, Lane 0 */ | ||
90 | status = "okay"; | ||
91 | }; | ||
92 | pcie@10,0 { | ||
93 | /* Port 3, Lane 0 */ | ||
94 | status = "okay"; | ||
95 | }; | ||
96 | }; | ||
36 | 97 | ||
37 | internal-regs { | 98 | internal-regs { |
38 | serial@12000 { | 99 | serial@12000 { |
@@ -127,68 +188,6 @@ | |||
127 | spi-max-frequency = <20000000>; | 188 | spi-max-frequency = <20000000>; |
128 | }; | 189 | }; |
129 | }; | 190 | }; |
130 | |||
131 | pcie-controller { | ||
132 | status = "okay"; | ||
133 | |||
134 | /* | ||
135 | * All 6 slots are physically present as | ||
136 | * standard PCIe slots on the board. | ||
137 | */ | ||
138 | pcie@1,0 { | ||
139 | /* Port 0, Lane 0 */ | ||
140 | status = "okay"; | ||
141 | }; | ||
142 | pcie@2,0 { | ||
143 | /* Port 0, Lane 1 */ | ||
144 | status = "okay"; | ||
145 | }; | ||
146 | pcie@3,0 { | ||
147 | /* Port 0, Lane 2 */ | ||
148 | status = "okay"; | ||
149 | }; | ||
150 | pcie@4,0 { | ||
151 | /* Port 0, Lane 3 */ | ||
152 | status = "okay"; | ||
153 | }; | ||
154 | pcie@9,0 { | ||
155 | /* Port 2, Lane 0 */ | ||
156 | status = "okay"; | ||
157 | }; | ||
158 | pcie@10,0 { | ||
159 | /* Port 3, Lane 0 */ | ||
160 | status = "okay"; | ||
161 | }; | ||
162 | }; | ||
163 | |||
164 | devbus-bootcs@10400 { | ||
165 | status = "okay"; | ||
166 | ranges = <0 0xf0000000 0x1000000>; | ||
167 | |||
168 | /* Device Bus parameters are required */ | ||
169 | |||
170 | /* Read parameters */ | ||
171 | devbus,bus-width = <8>; | ||
172 | devbus,turn-off-ps = <60000>; | ||
173 | devbus,badr-skew-ps = <0>; | ||
174 | devbus,acc-first-ps = <124000>; | ||
175 | devbus,acc-next-ps = <248000>; | ||
176 | devbus,rd-setup-ps = <0>; | ||
177 | devbus,rd-hold-ps = <0>; | ||
178 | |||
179 | /* Write parameters */ | ||
180 | devbus,sync-enable = <0>; | ||
181 | devbus,wr-high-ps = <60000>; | ||
182 | devbus,wr-low-ps = <60000>; | ||
183 | devbus,ale-wr-ps = <60000>; | ||
184 | |||
185 | /* NOR 16 MiB */ | ||
186 | nor@0 { | ||
187 | compatible = "cfi-flash"; | ||
188 | reg = <0 0x1000000>; | ||
189 | bank-width = <2>; | ||
190 | }; | ||
191 | }; | ||
192 | }; | 191 | }; |
193 | }; | 192 | }; |
194 | }; | 193 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts index c87b2de29c30..2298e4a910e2 100644 --- a/arch/arm/boot/dts/armada-xp-gp.dts +++ b/arch/arm/boot/dts/armada-xp-gp.dts | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | /dts-v1/; | 16 | /dts-v1/; |
17 | /include/ "armada-xp-mv78460.dtsi" | 17 | #include "armada-xp-mv78460.dtsi" |
18 | 18 | ||
19 | / { | 19 | / { |
20 | model = "Marvell Armada XP Development Board DB-MV784MP-GP"; | 20 | model = "Marvell Armada XP Development Board DB-MV784MP-GP"; |
@@ -39,9 +39,58 @@ | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | soc { | 41 | soc { |
42 | ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */ | 42 | ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 |
43 | 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */ | 43 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 |
44 | 0xf0000000 0 0xf0000000 0x1000000 /* Device Bus, NOR 16MiB */>; | 44 | MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000>; |
45 | |||
46 | devbus-bootcs { | ||
47 | status = "okay"; | ||
48 | |||
49 | /* Device Bus parameters are required */ | ||
50 | |||
51 | /* Read parameters */ | ||
52 | devbus,bus-width = <8>; | ||
53 | devbus,turn-off-ps = <60000>; | ||
54 | devbus,badr-skew-ps = <0>; | ||
55 | devbus,acc-first-ps = <124000>; | ||
56 | devbus,acc-next-ps = <248000>; | ||
57 | devbus,rd-setup-ps = <0>; | ||
58 | devbus,rd-hold-ps = <0>; | ||
59 | |||
60 | /* Write parameters */ | ||
61 | devbus,sync-enable = <0>; | ||
62 | devbus,wr-high-ps = <60000>; | ||
63 | devbus,wr-low-ps = <60000>; | ||
64 | devbus,ale-wr-ps = <60000>; | ||
65 | |||
66 | /* NOR 16 MiB */ | ||
67 | nor@0 { | ||
68 | compatible = "cfi-flash"; | ||
69 | reg = <0 0x1000000>; | ||
70 | bank-width = <2>; | ||
71 | }; | ||
72 | }; | ||
73 | |||
74 | pcie-controller { | ||
75 | status = "okay"; | ||
76 | |||
77 | /* | ||
78 | * The 3 slots are physically present as | ||
79 | * standard PCIe slots on the board. | ||
80 | */ | ||
81 | pcie@1,0 { | ||
82 | /* Port 0, Lane 0 */ | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | pcie@9,0 { | ||
86 | /* Port 2, Lane 0 */ | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | pcie@10,0 { | ||
90 | /* Port 3, Lane 0 */ | ||
91 | status = "okay"; | ||
92 | }; | ||
93 | }; | ||
45 | 94 | ||
46 | internal-regs { | 95 | internal-regs { |
47 | serial@12000 { | 96 | serial@12000 { |
@@ -126,56 +175,6 @@ | |||
126 | spi-max-frequency = <108000000>; | 175 | spi-max-frequency = <108000000>; |
127 | }; | 176 | }; |
128 | }; | 177 | }; |
129 | |||
130 | devbus-bootcs@10400 { | ||
131 | status = "okay"; | ||
132 | ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf000000, size 0x1000000 */ | ||
133 | |||
134 | /* Device Bus parameters are required */ | ||
135 | |||
136 | /* Read parameters */ | ||
137 | devbus,bus-width = <8>; | ||
138 | devbus,turn-off-ps = <60000>; | ||
139 | devbus,badr-skew-ps = <0>; | ||
140 | devbus,acc-first-ps = <124000>; | ||
141 | devbus,acc-next-ps = <248000>; | ||
142 | devbus,rd-setup-ps = <0>; | ||
143 | devbus,rd-hold-ps = <0>; | ||
144 | |||
145 | /* Write parameters */ | ||
146 | devbus,sync-enable = <0>; | ||
147 | devbus,wr-high-ps = <60000>; | ||
148 | devbus,wr-low-ps = <60000>; | ||
149 | devbus,ale-wr-ps = <60000>; | ||
150 | |||
151 | /* NOR 16 MiB */ | ||
152 | nor@0 { | ||
153 | compatible = "cfi-flash"; | ||
154 | reg = <0 0x1000000>; | ||
155 | bank-width = <2>; | ||
156 | }; | ||
157 | }; | ||
158 | |||
159 | pcie-controller { | ||
160 | status = "okay"; | ||
161 | |||
162 | /* | ||
163 | * The 3 slots are physically present as | ||
164 | * standard PCIe slots on the board. | ||
165 | */ | ||
166 | pcie@1,0 { | ||
167 | /* Port 0, Lane 0 */ | ||
168 | status = "okay"; | ||
169 | }; | ||
170 | pcie@9,0 { | ||
171 | /* Port 2, Lane 0 */ | ||
172 | status = "okay"; | ||
173 | }; | ||
174 | pcie@10,0 { | ||
175 | /* Port 3, Lane 0 */ | ||
176 | status = "okay"; | ||
177 | }; | ||
178 | }; | ||
179 | }; | 178 | }; |
180 | }; | 179 | }; |
181 | }; | 180 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index f8eaa383e07f..e45e363cc9b9 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | * common to all Armada XP SoCs. | 13 | * common to all Armada XP SoCs. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /include/ "armada-xp.dtsi" | 16 | #include "armada-xp.dtsi" |
17 | 17 | ||
18 | / { | 18 | / { |
19 | model = "Marvell Armada XP MV78230 SoC"; | 19 | model = "Marvell Armada XP MV78230 SoC"; |
@@ -44,6 +44,124 @@ | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | soc { | 46 | soc { |
47 | /* | ||
48 | * MV78230 has 2 PCIe units Gen2.0: One unit can be | ||
49 | * configured as x4 or quad x1 lanes. One unit is | ||
50 | * x4/x1. | ||
51 | */ | ||
52 | pcie-controller { | ||
53 | compatible = "marvell,armada-xp-pcie"; | ||
54 | status = "disabled"; | ||
55 | device_type = "pci"; | ||
56 | |||
57 | #address-cells = <3>; | ||
58 | #size-cells = <2>; | ||
59 | |||
60 | bus-range = <0x00 0xff>; | ||
61 | |||
62 | ranges = | ||
63 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
64 | 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
65 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ | ||
66 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | ||
67 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | ||
68 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | ||
69 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | ||
70 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | ||
71 | 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 0.1 IO */ | ||
72 | 0x82000000 0x3 0 MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 0.2 MEM */ | ||
73 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | ||
74 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | ||
75 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | ||
76 | 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ | ||
77 | 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>; | ||
78 | |||
79 | pcie@1,0 { | ||
80 | device_type = "pci"; | ||
81 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
82 | reg = <0x0800 0 0 0 0>; | ||
83 | #address-cells = <3>; | ||
84 | #size-cells = <2>; | ||
85 | #interrupt-cells = <1>; | ||
86 | ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 | ||
87 | 0x81000000 0 0 0x81000000 0x1 0 1 0>; | ||
88 | interrupt-map-mask = <0 0 0 0>; | ||
89 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
90 | marvell,pcie-port = <0>; | ||
91 | marvell,pcie-lane = <0>; | ||
92 | clocks = <&gateclk 5>; | ||
93 | status = "disabled"; | ||
94 | }; | ||
95 | |||
96 | pcie@2,0 { | ||
97 | device_type = "pci"; | ||
98 | assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; | ||
99 | reg = <0x1000 0 0 0 0>; | ||
100 | #address-cells = <3>; | ||
101 | #size-cells = <2>; | ||
102 | #interrupt-cells = <1>; | ||
103 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | ||
104 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | ||
105 | interrupt-map-mask = <0 0 0 0>; | ||
106 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
107 | marvell,pcie-port = <0>; | ||
108 | marvell,pcie-lane = <1>; | ||
109 | clocks = <&gateclk 6>; | ||
110 | status = "disabled"; | ||
111 | }; | ||
112 | |||
113 | pcie@3,0 { | ||
114 | device_type = "pci"; | ||
115 | assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; | ||
116 | reg = <0x1800 0 0 0 0>; | ||
117 | #address-cells = <3>; | ||
118 | #size-cells = <2>; | ||
119 | #interrupt-cells = <1>; | ||
120 | ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 | ||
121 | 0x81000000 0 0 0x81000000 0x3 0 1 0>; | ||
122 | interrupt-map-mask = <0 0 0 0>; | ||
123 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
124 | marvell,pcie-port = <0>; | ||
125 | marvell,pcie-lane = <2>; | ||
126 | clocks = <&gateclk 7>; | ||
127 | status = "disabled"; | ||
128 | }; | ||
129 | |||
130 | pcie@4,0 { | ||
131 | device_type = "pci"; | ||
132 | assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; | ||
133 | reg = <0x2000 0 0 0 0>; | ||
134 | #address-cells = <3>; | ||
135 | #size-cells = <2>; | ||
136 | #interrupt-cells = <1>; | ||
137 | ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0 | ||
138 | 0x81000000 0 0 0x81000000 0x4 0 1 0>; | ||
139 | interrupt-map-mask = <0 0 0 0>; | ||
140 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
141 | marvell,pcie-port = <0>; | ||
142 | marvell,pcie-lane = <3>; | ||
143 | clocks = <&gateclk 8>; | ||
144 | status = "disabled"; | ||
145 | }; | ||
146 | |||
147 | pcie@9,0 { | ||
148 | device_type = "pci"; | ||
149 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | ||
150 | reg = <0x4800 0 0 0 0>; | ||
151 | #address-cells = <3>; | ||
152 | #size-cells = <2>; | ||
153 | #interrupt-cells = <1>; | ||
154 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | ||
155 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | ||
156 | interrupt-map-mask = <0 0 0 0>; | ||
157 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
158 | marvell,pcie-port = <2>; | ||
159 | marvell,pcie-lane = <0>; | ||
160 | clocks = <&gateclk 26>; | ||
161 | status = "disabled"; | ||
162 | }; | ||
163 | }; | ||
164 | |||
47 | internal-regs { | 165 | internal-regs { |
48 | pinctrl { | 166 | pinctrl { |
49 | compatible = "marvell,mv78230-pinctrl"; | 167 | compatible = "marvell,mv78230-pinctrl"; |
@@ -77,110 +195,6 @@ | |||
77 | #interrupts-cells = <2>; | 195 | #interrupts-cells = <2>; |
78 | interrupts = <87>, <88>, <89>; | 196 | interrupts = <87>, <88>, <89>; |
79 | }; | 197 | }; |
80 | |||
81 | /* | ||
82 | * MV78230 has 2 PCIe units Gen2.0: One unit can be | ||
83 | * configured as x4 or quad x1 lanes. One unit is | ||
84 | * x4/x1. | ||
85 | */ | ||
86 | pcie-controller { | ||
87 | compatible = "marvell,armada-xp-pcie"; | ||
88 | status = "disabled"; | ||
89 | device_type = "pci"; | ||
90 | |||
91 | #address-cells = <3>; | ||
92 | #size-cells = <2>; | ||
93 | |||
94 | bus-range = <0x00 0xff>; | ||
95 | |||
96 | ranges = <0x82000000 0 0x40000 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
97 | 0x82000000 0 0x42000 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
98 | 0x82000000 0 0x44000 0x44000 0 0x00002000 /* Port 0.1 registers */ | ||
99 | 0x82000000 0 0x48000 0x48000 0 0x00002000 /* Port 0.2 registers */ | ||
100 | 0x82000000 0 0x4c000 0x4c000 0 0x00002000 /* Port 0.3 registers */ | ||
101 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
102 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
103 | |||
104 | pcie@1,0 { | ||
105 | device_type = "pci"; | ||
106 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
107 | reg = <0x0800 0 0 0 0>; | ||
108 | #address-cells = <3>; | ||
109 | #size-cells = <2>; | ||
110 | #interrupt-cells = <1>; | ||
111 | ranges; | ||
112 | interrupt-map-mask = <0 0 0 0>; | ||
113 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
114 | marvell,pcie-port = <0>; | ||
115 | marvell,pcie-lane = <0>; | ||
116 | clocks = <&gateclk 5>; | ||
117 | status = "disabled"; | ||
118 | }; | ||
119 | |||
120 | pcie@2,0 { | ||
121 | device_type = "pci"; | ||
122 | assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; | ||
123 | reg = <0x1000 0 0 0 0>; | ||
124 | #address-cells = <3>; | ||
125 | #size-cells = <2>; | ||
126 | #interrupt-cells = <1>; | ||
127 | ranges; | ||
128 | interrupt-map-mask = <0 0 0 0>; | ||
129 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
130 | marvell,pcie-port = <0>; | ||
131 | marvell,pcie-lane = <1>; | ||
132 | clocks = <&gateclk 6>; | ||
133 | status = "disabled"; | ||
134 | }; | ||
135 | |||
136 | pcie@3,0 { | ||
137 | device_type = "pci"; | ||
138 | assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; | ||
139 | reg = <0x1800 0 0 0 0>; | ||
140 | #address-cells = <3>; | ||
141 | #size-cells = <2>; | ||
142 | #interrupt-cells = <1>; | ||
143 | ranges; | ||
144 | interrupt-map-mask = <0 0 0 0>; | ||
145 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
146 | marvell,pcie-port = <0>; | ||
147 | marvell,pcie-lane = <2>; | ||
148 | clocks = <&gateclk 7>; | ||
149 | status = "disabled"; | ||
150 | }; | ||
151 | |||
152 | pcie@4,0 { | ||
153 | device_type = "pci"; | ||
154 | assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; | ||
155 | reg = <0x2000 0 0 0 0>; | ||
156 | #address-cells = <3>; | ||
157 | #size-cells = <2>; | ||
158 | #interrupt-cells = <1>; | ||
159 | ranges; | ||
160 | interrupt-map-mask = <0 0 0 0>; | ||
161 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
162 | marvell,pcie-port = <0>; | ||
163 | marvell,pcie-lane = <3>; | ||
164 | clocks = <&gateclk 8>; | ||
165 | status = "disabled"; | ||
166 | }; | ||
167 | |||
168 | pcie@9,0 { | ||
169 | device_type = "pci"; | ||
170 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | ||
171 | reg = <0x4800 0 0 0 0>; | ||
172 | #address-cells = <3>; | ||
173 | #size-cells = <2>; | ||
174 | #interrupt-cells = <1>; | ||
175 | ranges; | ||
176 | interrupt-map-mask = <0 0 0 0>; | ||
177 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
178 | marvell,pcie-port = <2>; | ||
179 | marvell,pcie-lane = <0>; | ||
180 | clocks = <&gateclk 26>; | ||
181 | status = "disabled"; | ||
182 | }; | ||
183 | }; | ||
184 | }; | 198 | }; |
185 | }; | 199 | }; |
186 | }; | 200 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 2d9335da210c..6dc3921df9b3 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | * common to all Armada XP SoCs. | 13 | * common to all Armada XP SoCs. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /include/ "armada-xp.dtsi" | 16 | #include "armada-xp.dtsi" |
17 | 17 | ||
18 | / { | 18 | / { |
19 | model = "Marvell Armada XP MV78260 SoC"; | 19 | model = "Marvell Armada XP MV78260 SoC"; |
@@ -45,6 +45,145 @@ | |||
45 | }; | 45 | }; |
46 | 46 | ||
47 | soc { | 47 | soc { |
48 | /* | ||
49 | * MV78260 has 3 PCIe units Gen2.0: Two units can be | ||
50 | * configured as x4 or quad x1 lanes. One unit is | ||
51 | * x4/x1. | ||
52 | */ | ||
53 | pcie-controller { | ||
54 | compatible = "marvell,armada-xp-pcie"; | ||
55 | status = "disabled"; | ||
56 | device_type = "pci"; | ||
57 | |||
58 | #address-cells = <3>; | ||
59 | #size-cells = <2>; | ||
60 | |||
61 | bus-range = <0x00 0xff>; | ||
62 | |||
63 | ranges = | ||
64 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
65 | 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
66 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ | ||
67 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | ||
68 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | ||
69 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
70 | 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */ | ||
71 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | ||
72 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | ||
73 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | ||
74 | 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 0.1 IO */ | ||
75 | 0x82000000 0x3 0 MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 0.2 MEM */ | ||
76 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | ||
77 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | ||
78 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | ||
79 | 0x82000000 0x9 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ | ||
80 | 0x81000000 0x9 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ | ||
81 | 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ | ||
82 | 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; | ||
83 | |||
84 | pcie@1,0 { | ||
85 | device_type = "pci"; | ||
86 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
87 | reg = <0x0800 0 0 0 0>; | ||
88 | #address-cells = <3>; | ||
89 | #size-cells = <2>; | ||
90 | #interrupt-cells = <1>; | ||
91 | ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 | ||
92 | 0x81000000 0 0 0x81000000 0x1 0 1 0>; | ||
93 | interrupt-map-mask = <0 0 0 0>; | ||
94 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
95 | marvell,pcie-port = <0>; | ||
96 | marvell,pcie-lane = <0>; | ||
97 | clocks = <&gateclk 5>; | ||
98 | status = "disabled"; | ||
99 | }; | ||
100 | |||
101 | pcie@2,0 { | ||
102 | device_type = "pci"; | ||
103 | assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; | ||
104 | reg = <0x1000 0 0 0 0>; | ||
105 | #address-cells = <3>; | ||
106 | #size-cells = <2>; | ||
107 | #interrupt-cells = <1>; | ||
108 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | ||
109 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | ||
110 | interrupt-map-mask = <0 0 0 0>; | ||
111 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
112 | marvell,pcie-port = <0>; | ||
113 | marvell,pcie-lane = <1>; | ||
114 | clocks = <&gateclk 6>; | ||
115 | status = "disabled"; | ||
116 | }; | ||
117 | |||
118 | pcie@3,0 { | ||
119 | device_type = "pci"; | ||
120 | assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; | ||
121 | reg = <0x1800 0 0 0 0>; | ||
122 | #address-cells = <3>; | ||
123 | #size-cells = <2>; | ||
124 | #interrupt-cells = <1>; | ||
125 | ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 | ||
126 | 0x81000000 0 0 0x81000000 0x3 0 1 0>; | ||
127 | interrupt-map-mask = <0 0 0 0>; | ||
128 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
129 | marvell,pcie-port = <0>; | ||
130 | marvell,pcie-lane = <2>; | ||
131 | clocks = <&gateclk 7>; | ||
132 | status = "disabled"; | ||
133 | }; | ||
134 | |||
135 | pcie@4,0 { | ||
136 | device_type = "pci"; | ||
137 | assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; | ||
138 | reg = <0x2000 0 0 0 0>; | ||
139 | #address-cells = <3>; | ||
140 | #size-cells = <2>; | ||
141 | #interrupt-cells = <1>; | ||
142 | ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0 | ||
143 | 0x81000000 0 0 0x81000000 0x4 0 1 0>; | ||
144 | interrupt-map-mask = <0 0 0 0>; | ||
145 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
146 | marvell,pcie-port = <0>; | ||
147 | marvell,pcie-lane = <3>; | ||
148 | clocks = <&gateclk 8>; | ||
149 | status = "disabled"; | ||
150 | }; | ||
151 | |||
152 | pcie@9,0 { | ||
153 | device_type = "pci"; | ||
154 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | ||
155 | reg = <0x4800 0 0 0 0>; | ||
156 | #address-cells = <3>; | ||
157 | #size-cells = <2>; | ||
158 | #interrupt-cells = <1>; | ||
159 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | ||
160 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | ||
161 | interrupt-map-mask = <0 0 0 0>; | ||
162 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
163 | marvell,pcie-port = <2>; | ||
164 | marvell,pcie-lane = <0>; | ||
165 | clocks = <&gateclk 26>; | ||
166 | status = "disabled"; | ||
167 | }; | ||
168 | |||
169 | pcie@10,0 { | ||
170 | device_type = "pci"; | ||
171 | assigned-addresses = <0x82000800 0 0x82000 0 0x2000>; | ||
172 | reg = <0x5000 0 0 0 0>; | ||
173 | #address-cells = <3>; | ||
174 | #size-cells = <2>; | ||
175 | #interrupt-cells = <1>; | ||
176 | ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0 | ||
177 | 0x81000000 0 0 0x81000000 0xa 0 1 0>; | ||
178 | interrupt-map-mask = <0 0 0 0>; | ||
179 | interrupt-map = <0 0 0 0 &mpic 103>; | ||
180 | marvell,pcie-port = <3>; | ||
181 | marvell,pcie-lane = <0>; | ||
182 | clocks = <&gateclk 27>; | ||
183 | status = "disabled"; | ||
184 | }; | ||
185 | }; | ||
186 | |||
48 | internal-regs { | 187 | internal-regs { |
49 | pinctrl { | 188 | pinctrl { |
50 | compatible = "marvell,mv78260-pinctrl"; | 189 | compatible = "marvell,mv78260-pinctrl"; |
@@ -97,128 +236,6 @@ | |||
97 | clocks = <&gateclk 1>; | 236 | clocks = <&gateclk 1>; |
98 | status = "disabled"; | 237 | status = "disabled"; |
99 | }; | 238 | }; |
100 | |||
101 | /* | ||
102 | * MV78260 has 3 PCIe units Gen2.0: Two units can be | ||
103 | * configured as x4 or quad x1 lanes. One unit is | ||
104 | * x4/x1. | ||
105 | */ | ||
106 | pcie-controller { | ||
107 | compatible = "marvell,armada-xp-pcie"; | ||
108 | status = "disabled"; | ||
109 | device_type = "pci"; | ||
110 | |||
111 | #address-cells = <3>; | ||
112 | #size-cells = <2>; | ||
113 | |||
114 | bus-range = <0x00 0xff>; | ||
115 | |||
116 | ranges = <0x82000000 0 0x40000 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
117 | 0x82000000 0 0x42000 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
118 | 0x82000000 0 0x44000 0x44000 0 0x00002000 /* Port 0.1 registers */ | ||
119 | 0x82000000 0 0x48000 0x48000 0 0x00002000 /* Port 0.2 registers */ | ||
120 | 0x82000000 0 0x4c000 0x4c000 0 0x00002000 /* Port 0.3 registers */ | ||
121 | 0x82000000 0 0x80000 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
122 | 0x82000000 0 0x82000 0x82000 0 0x00002000 /* Port 3.0 registers */ | ||
123 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
124 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
125 | |||
126 | pcie@1,0 { | ||
127 | device_type = "pci"; | ||
128 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
129 | reg = <0x0800 0 0 0 0>; | ||
130 | #address-cells = <3>; | ||
131 | #size-cells = <2>; | ||
132 | #interrupt-cells = <1>; | ||
133 | ranges; | ||
134 | interrupt-map-mask = <0 0 0 0>; | ||
135 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
136 | marvell,pcie-port = <0>; | ||
137 | marvell,pcie-lane = <0>; | ||
138 | clocks = <&gateclk 5>; | ||
139 | status = "disabled"; | ||
140 | }; | ||
141 | |||
142 | pcie@2,0 { | ||
143 | device_type = "pci"; | ||
144 | assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; | ||
145 | reg = <0x1000 0 0 0 0>; | ||
146 | #address-cells = <3>; | ||
147 | #size-cells = <2>; | ||
148 | #interrupt-cells = <1>; | ||
149 | ranges; | ||
150 | interrupt-map-mask = <0 0 0 0>; | ||
151 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
152 | marvell,pcie-port = <0>; | ||
153 | marvell,pcie-lane = <1>; | ||
154 | clocks = <&gateclk 6>; | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | |||
158 | pcie@3,0 { | ||
159 | device_type = "pci"; | ||
160 | assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; | ||
161 | reg = <0x1800 0 0 0 0>; | ||
162 | #address-cells = <3>; | ||
163 | #size-cells = <2>; | ||
164 | #interrupt-cells = <1>; | ||
165 | ranges; | ||
166 | interrupt-map-mask = <0 0 0 0>; | ||
167 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
168 | marvell,pcie-port = <0>; | ||
169 | marvell,pcie-lane = <2>; | ||
170 | clocks = <&gateclk 7>; | ||
171 | status = "disabled"; | ||
172 | }; | ||
173 | |||
174 | pcie@4,0 { | ||
175 | device_type = "pci"; | ||
176 | assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; | ||
177 | reg = <0x2000 0 0 0 0>; | ||
178 | #address-cells = <3>; | ||
179 | #size-cells = <2>; | ||
180 | #interrupt-cells = <1>; | ||
181 | ranges; | ||
182 | interrupt-map-mask = <0 0 0 0>; | ||
183 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
184 | marvell,pcie-port = <0>; | ||
185 | marvell,pcie-lane = <3>; | ||
186 | clocks = <&gateclk 8>; | ||
187 | status = "disabled"; | ||
188 | }; | ||
189 | |||
190 | pcie@9,0 { | ||
191 | device_type = "pci"; | ||
192 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | ||
193 | reg = <0x4800 0 0 0 0>; | ||
194 | #address-cells = <3>; | ||
195 | #size-cells = <2>; | ||
196 | #interrupt-cells = <1>; | ||
197 | ranges; | ||
198 | interrupt-map-mask = <0 0 0 0>; | ||
199 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
200 | marvell,pcie-port = <2>; | ||
201 | marvell,pcie-lane = <0>; | ||
202 | clocks = <&gateclk 26>; | ||
203 | status = "disabled"; | ||
204 | }; | ||
205 | |||
206 | pcie@10,0 { | ||
207 | device_type = "pci"; | ||
208 | assigned-addresses = <0x82000800 0 0x82000 0 0x2000>; | ||
209 | reg = <0x5000 0 0 0 0>; | ||
210 | #address-cells = <3>; | ||
211 | #size-cells = <2>; | ||
212 | #interrupt-cells = <1>; | ||
213 | ranges; | ||
214 | interrupt-map-mask = <0 0 0 0>; | ||
215 | interrupt-map = <0 0 0 0 &mpic 103>; | ||
216 | marvell,pcie-port = <3>; | ||
217 | marvell,pcie-lane = <0>; | ||
218 | clocks = <&gateclk 27>; | ||
219 | status = "disabled"; | ||
220 | }; | ||
221 | }; | ||
222 | }; | 239 | }; |
223 | }; | 240 | }; |
224 | }; | 241 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index c7b1f4d5c1c7..a6661e3aea23 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | * common to all Armada XP SoCs. | 13 | * common to all Armada XP SoCs. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /include/ "armada-xp.dtsi" | 16 | #include "armada-xp.dtsi" |
17 | 17 | ||
18 | / { | 18 | / { |
19 | model = "Marvell Armada XP MV78460 SoC"; | 19 | model = "Marvell Armada XP MV78460 SoC"; |
@@ -61,6 +61,227 @@ | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | soc { | 63 | soc { |
64 | /* | ||
65 | * MV78460 has 4 PCIe units Gen2.0: Two units can be | ||
66 | * configured as x4 or quad x1 lanes. Two units are | ||
67 | * x4/x1. | ||
68 | */ | ||
69 | pcie-controller { | ||
70 | compatible = "marvell,armada-xp-pcie"; | ||
71 | status = "disabled"; | ||
72 | device_type = "pci"; | ||
73 | |||
74 | #address-cells = <3>; | ||
75 | #size-cells = <2>; | ||
76 | |||
77 | bus-range = <0x00 0xff>; | ||
78 | |||
79 | ranges = | ||
80 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
81 | 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
82 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ | ||
83 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | ||
84 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | ||
85 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
86 | 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */ | ||
87 | 0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000 /* Port 1.1 registers */ | ||
88 | 0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000 /* Port 1.2 registers */ | ||
89 | 0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000 /* Port 1.3 registers */ | ||
90 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | ||
91 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | ||
92 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | ||
93 | 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 0.1 IO */ | ||
94 | 0x82000000 0x3 0 MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 0.2 MEM */ | ||
95 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | ||
96 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | ||
97 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | ||
98 | |||
99 | 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ | ||
100 | 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ | ||
101 | 0x82000000 0x6 0 MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */ | ||
102 | 0x81000000 0x6 0 MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO */ | ||
103 | 0x82000000 0x7 0 MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */ | ||
104 | 0x81000000 0x7 0 MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO */ | ||
105 | 0x82000000 0x8 0 MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */ | ||
106 | 0x81000000 0x8 0 MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO */ | ||
107 | |||
108 | 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ | ||
109 | 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */ | ||
110 | |||
111 | 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ | ||
112 | 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; | ||
113 | |||
114 | pcie@1,0 { | ||
115 | device_type = "pci"; | ||
116 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
117 | reg = <0x0800 0 0 0 0>; | ||
118 | #address-cells = <3>; | ||
119 | #size-cells = <2>; | ||
120 | #interrupt-cells = <1>; | ||
121 | ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 | ||
122 | 0x81000000 0 0 0x81000000 0x1 0 1 0>; | ||
123 | interrupt-map-mask = <0 0 0 0>; | ||
124 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
125 | marvell,pcie-port = <0>; | ||
126 | marvell,pcie-lane = <0>; | ||
127 | clocks = <&gateclk 5>; | ||
128 | status = "disabled"; | ||
129 | }; | ||
130 | |||
131 | pcie@2,0 { | ||
132 | device_type = "pci"; | ||
133 | assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; | ||
134 | reg = <0x1000 0 0 0 0>; | ||
135 | #address-cells = <3>; | ||
136 | #size-cells = <2>; | ||
137 | #interrupt-cells = <1>; | ||
138 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | ||
139 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | ||
140 | interrupt-map-mask = <0 0 0 0>; | ||
141 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
142 | marvell,pcie-port = <0>; | ||
143 | marvell,pcie-lane = <1>; | ||
144 | clocks = <&gateclk 6>; | ||
145 | status = "disabled"; | ||
146 | }; | ||
147 | |||
148 | pcie@3,0 { | ||
149 | device_type = "pci"; | ||
150 | assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; | ||
151 | reg = <0x1800 0 0 0 0>; | ||
152 | #address-cells = <3>; | ||
153 | #size-cells = <2>; | ||
154 | #interrupt-cells = <1>; | ||
155 | ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 | ||
156 | 0x81000000 0 0 0x81000000 0x3 0 1 0>; | ||
157 | interrupt-map-mask = <0 0 0 0>; | ||
158 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
159 | marvell,pcie-port = <0>; | ||
160 | marvell,pcie-lane = <2>; | ||
161 | clocks = <&gateclk 7>; | ||
162 | status = "disabled"; | ||
163 | }; | ||
164 | |||
165 | pcie@4,0 { | ||
166 | device_type = "pci"; | ||
167 | assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; | ||
168 | reg = <0x2000 0 0 0 0>; | ||
169 | #address-cells = <3>; | ||
170 | #size-cells = <2>; | ||
171 | #interrupt-cells = <1>; | ||
172 | ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0 | ||
173 | 0x81000000 0 0 0x81000000 0x4 0 1 0>; | ||
174 | interrupt-map-mask = <0 0 0 0>; | ||
175 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
176 | marvell,pcie-port = <0>; | ||
177 | marvell,pcie-lane = <3>; | ||
178 | clocks = <&gateclk 8>; | ||
179 | status = "disabled"; | ||
180 | }; | ||
181 | |||
182 | pcie@5,0 { | ||
183 | device_type = "pci"; | ||
184 | assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; | ||
185 | reg = <0x2800 0 0 0 0>; | ||
186 | #address-cells = <3>; | ||
187 | #size-cells = <2>; | ||
188 | #interrupt-cells = <1>; | ||
189 | ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0 | ||
190 | 0x81000000 0 0 0x81000000 0x5 0 1 0>; | ||
191 | interrupt-map-mask = <0 0 0 0>; | ||
192 | interrupt-map = <0 0 0 0 &mpic 62>; | ||
193 | marvell,pcie-port = <1>; | ||
194 | marvell,pcie-lane = <0>; | ||
195 | clocks = <&gateclk 9>; | ||
196 | status = "disabled"; | ||
197 | }; | ||
198 | |||
199 | pcie@6,0 { | ||
200 | device_type = "pci"; | ||
201 | assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; | ||
202 | reg = <0x3000 0 0 0 0>; | ||
203 | #address-cells = <3>; | ||
204 | #size-cells = <2>; | ||
205 | #interrupt-cells = <1>; | ||
206 | ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0 | ||
207 | 0x81000000 0 0 0x81000000 0x6 0 1 0>; | ||
208 | interrupt-map-mask = <0 0 0 0>; | ||
209 | interrupt-map = <0 0 0 0 &mpic 63>; | ||
210 | marvell,pcie-port = <1>; | ||
211 | marvell,pcie-lane = <1>; | ||
212 | clocks = <&gateclk 10>; | ||
213 | status = "disabled"; | ||
214 | }; | ||
215 | |||
216 | pcie@7,0 { | ||
217 | device_type = "pci"; | ||
218 | assigned-addresses = <0x82003800 0 0x88000 0 0x2000>; | ||
219 | reg = <0x3800 0 0 0 0>; | ||
220 | #address-cells = <3>; | ||
221 | #size-cells = <2>; | ||
222 | #interrupt-cells = <1>; | ||
223 | ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0 | ||
224 | 0x81000000 0 0 0x81000000 0x7 0 1 0>; | ||
225 | interrupt-map-mask = <0 0 0 0>; | ||
226 | interrupt-map = <0 0 0 0 &mpic 64>; | ||
227 | marvell,pcie-port = <1>; | ||
228 | marvell,pcie-lane = <2>; | ||
229 | clocks = <&gateclk 11>; | ||
230 | status = "disabled"; | ||
231 | }; | ||
232 | |||
233 | pcie@8,0 { | ||
234 | device_type = "pci"; | ||
235 | assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>; | ||
236 | reg = <0x4000 0 0 0 0>; | ||
237 | #address-cells = <3>; | ||
238 | #size-cells = <2>; | ||
239 | #interrupt-cells = <1>; | ||
240 | ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0 | ||
241 | 0x81000000 0 0 0x81000000 0x8 0 1 0>; | ||
242 | interrupt-map-mask = <0 0 0 0>; | ||
243 | interrupt-map = <0 0 0 0 &mpic 65>; | ||
244 | marvell,pcie-port = <1>; | ||
245 | marvell,pcie-lane = <3>; | ||
246 | clocks = <&gateclk 12>; | ||
247 | status = "disabled"; | ||
248 | }; | ||
249 | |||
250 | pcie@9,0 { | ||
251 | device_type = "pci"; | ||
252 | assigned-addresses = <0x82004800 0 0x42000 0 0x2000>; | ||
253 | reg = <0x4800 0 0 0 0>; | ||
254 | #address-cells = <3>; | ||
255 | #size-cells = <2>; | ||
256 | #interrupt-cells = <1>; | ||
257 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | ||
258 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | ||
259 | interrupt-map-mask = <0 0 0 0>; | ||
260 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
261 | marvell,pcie-port = <2>; | ||
262 | marvell,pcie-lane = <0>; | ||
263 | clocks = <&gateclk 26>; | ||
264 | status = "disabled"; | ||
265 | }; | ||
266 | |||
267 | pcie@10,0 { | ||
268 | device_type = "pci"; | ||
269 | assigned-addresses = <0x82005000 0 0x82000 0 0x2000>; | ||
270 | reg = <0x5000 0 0 0 0>; | ||
271 | #address-cells = <3>; | ||
272 | #size-cells = <2>; | ||
273 | #interrupt-cells = <1>; | ||
274 | ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0 | ||
275 | 0x81000000 0 0 0x81000000 0xa 0 1 0>; | ||
276 | interrupt-map-mask = <0 0 0 0>; | ||
277 | interrupt-map = <0 0 0 0 &mpic 103>; | ||
278 | marvell,pcie-port = <3>; | ||
279 | marvell,pcie-lane = <0>; | ||
280 | clocks = <&gateclk 27>; | ||
281 | status = "disabled"; | ||
282 | }; | ||
283 | }; | ||
284 | |||
64 | internal-regs { | 285 | internal-regs { |
65 | pinctrl { | 286 | pinctrl { |
66 | compatible = "marvell,mv78460-pinctrl"; | 287 | compatible = "marvell,mv78460-pinctrl"; |
@@ -113,194 +334,6 @@ | |||
113 | clocks = <&gateclk 1>; | 334 | clocks = <&gateclk 1>; |
114 | status = "disabled"; | 335 | status = "disabled"; |
115 | }; | 336 | }; |
116 | |||
117 | /* | ||
118 | * MV78460 has 4 PCIe units Gen2.0: Two units can be | ||
119 | * configured as x4 or quad x1 lanes. Two units are | ||
120 | * x4/x1. | ||
121 | */ | ||
122 | pcie-controller { | ||
123 | compatible = "marvell,armada-xp-pcie"; | ||
124 | status = "disabled"; | ||
125 | device_type = "pci"; | ||
126 | |||
127 | #address-cells = <3>; | ||
128 | #size-cells = <2>; | ||
129 | |||
130 | bus-range = <0x00 0xff>; | ||
131 | |||
132 | ranges = <0x82000000 0 0x40000 0x40000 0 0x00002000 /* Port 0.0 registers */ | ||
133 | 0x82000000 0 0x42000 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
134 | 0x82000000 0 0x44000 0x44000 0 0x00002000 /* Port 0.1 registers */ | ||
135 | 0x82000000 0 0x48000 0x48000 0 0x00002000 /* Port 0.2 registers */ | ||
136 | 0x82000000 0 0x4c000 0x4c000 0 0x00002000 /* Port 0.3 registers */ | ||
137 | 0x82000000 0 0x80000 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
138 | 0x82000000 0 0x82000 0x82000 0 0x00002000 /* Port 3.0 registers */ | ||
139 | 0x82000000 0 0x84000 0x84000 0 0x00002000 /* Port 1.1 registers */ | ||
140 | 0x82000000 0 0x88000 0x88000 0 0x00002000 /* Port 1.2 registers */ | ||
141 | 0x82000000 0 0x8c000 0x8c000 0 0x00002000 /* Port 1.3 registers */ | ||
142 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
143 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
144 | |||
145 | pcie@1,0 { | ||
146 | device_type = "pci"; | ||
147 | assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; | ||
148 | reg = <0x0800 0 0 0 0>; | ||
149 | #address-cells = <3>; | ||
150 | #size-cells = <2>; | ||
151 | #interrupt-cells = <1>; | ||
152 | ranges; | ||
153 | interrupt-map-mask = <0 0 0 0>; | ||
154 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
155 | marvell,pcie-port = <0>; | ||
156 | marvell,pcie-lane = <0>; | ||
157 | clocks = <&gateclk 5>; | ||
158 | status = "disabled"; | ||
159 | }; | ||
160 | |||
161 | pcie@2,0 { | ||
162 | device_type = "pci"; | ||
163 | assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; | ||
164 | reg = <0x1000 0 0 0 0>; | ||
165 | #address-cells = <3>; | ||
166 | #size-cells = <2>; | ||
167 | #interrupt-cells = <1>; | ||
168 | ranges; | ||
169 | interrupt-map-mask = <0 0 0 0>; | ||
170 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
171 | marvell,pcie-port = <0>; | ||
172 | marvell,pcie-lane = <1>; | ||
173 | clocks = <&gateclk 6>; | ||
174 | status = "disabled"; | ||
175 | }; | ||
176 | |||
177 | pcie@3,0 { | ||
178 | device_type = "pci"; | ||
179 | assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; | ||
180 | reg = <0x1800 0 0 0 0>; | ||
181 | #address-cells = <3>; | ||
182 | #size-cells = <2>; | ||
183 | #interrupt-cells = <1>; | ||
184 | ranges; | ||
185 | interrupt-map-mask = <0 0 0 0>; | ||
186 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
187 | marvell,pcie-port = <0>; | ||
188 | marvell,pcie-lane = <2>; | ||
189 | clocks = <&gateclk 7>; | ||
190 | status = "disabled"; | ||
191 | }; | ||
192 | |||
193 | pcie@4,0 { | ||
194 | device_type = "pci"; | ||
195 | assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; | ||
196 | reg = <0x2000 0 0 0 0>; | ||
197 | #address-cells = <3>; | ||
198 | #size-cells = <2>; | ||
199 | #interrupt-cells = <1>; | ||
200 | ranges; | ||
201 | interrupt-map-mask = <0 0 0 0>; | ||
202 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
203 | marvell,pcie-port = <0>; | ||
204 | marvell,pcie-lane = <3>; | ||
205 | clocks = <&gateclk 8>; | ||
206 | status = "disabled"; | ||
207 | }; | ||
208 | |||
209 | pcie@5,0 { | ||
210 | device_type = "pci"; | ||
211 | assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; | ||
212 | reg = <0x2800 0 0 0 0>; | ||
213 | #address-cells = <3>; | ||
214 | #size-cells = <2>; | ||
215 | #interrupt-cells = <1>; | ||
216 | ranges; | ||
217 | interrupt-map-mask = <0 0 0 0>; | ||
218 | interrupt-map = <0 0 0 0 &mpic 62>; | ||
219 | marvell,pcie-port = <1>; | ||
220 | marvell,pcie-lane = <0>; | ||
221 | clocks = <&gateclk 9>; | ||
222 | status = "disabled"; | ||
223 | }; | ||
224 | |||
225 | pcie@6,0 { | ||
226 | device_type = "pci"; | ||
227 | assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; | ||
228 | reg = <0x3000 0 0 0 0>; | ||
229 | #address-cells = <3>; | ||
230 | #size-cells = <2>; | ||
231 | #interrupt-cells = <1>; | ||
232 | ranges; | ||
233 | interrupt-map-mask = <0 0 0 0>; | ||
234 | interrupt-map = <0 0 0 0 &mpic 63>; | ||
235 | marvell,pcie-port = <1>; | ||
236 | marvell,pcie-lane = <1>; | ||
237 | clocks = <&gateclk 10>; | ||
238 | status = "disabled"; | ||
239 | }; | ||
240 | |||
241 | pcie@7,0 { | ||
242 | device_type = "pci"; | ||
243 | assigned-addresses = <0x82003800 0 0x88000 0 0x2000>; | ||
244 | reg = <0x3800 0 0 0 0>; | ||
245 | #address-cells = <3>; | ||
246 | #size-cells = <2>; | ||
247 | #interrupt-cells = <1>; | ||
248 | ranges; | ||
249 | interrupt-map-mask = <0 0 0 0>; | ||
250 | interrupt-map = <0 0 0 0 &mpic 64>; | ||
251 | marvell,pcie-port = <1>; | ||
252 | marvell,pcie-lane = <2>; | ||
253 | clocks = <&gateclk 11>; | ||
254 | status = "disabled"; | ||
255 | }; | ||
256 | |||
257 | pcie@8,0 { | ||
258 | device_type = "pci"; | ||
259 | assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>; | ||
260 | reg = <0x4000 0 0 0 0>; | ||
261 | #address-cells = <3>; | ||
262 | #size-cells = <2>; | ||
263 | #interrupt-cells = <1>; | ||
264 | ranges; | ||
265 | interrupt-map-mask = <0 0 0 0>; | ||
266 | interrupt-map = <0 0 0 0 &mpic 65>; | ||
267 | marvell,pcie-port = <1>; | ||
268 | marvell,pcie-lane = <3>; | ||
269 | clocks = <&gateclk 12>; | ||
270 | status = "disabled"; | ||
271 | }; | ||
272 | pcie@9,0 { | ||
273 | device_type = "pci"; | ||
274 | assigned-addresses = <0x82004800 0 0x42000 0 0x2000>; | ||
275 | reg = <0x4800 0 0 0 0>; | ||
276 | #address-cells = <3>; | ||
277 | #size-cells = <2>; | ||
278 | #interrupt-cells = <1>; | ||
279 | ranges; | ||
280 | interrupt-map-mask = <0 0 0 0>; | ||
281 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
282 | marvell,pcie-port = <2>; | ||
283 | marvell,pcie-lane = <0>; | ||
284 | clocks = <&gateclk 26>; | ||
285 | status = "disabled"; | ||
286 | }; | ||
287 | |||
288 | pcie@10,0 { | ||
289 | device_type = "pci"; | ||
290 | assigned-addresses = <0x82005000 0 0x82000 0 0x2000>; | ||
291 | reg = <0x5000 0 0 0 0>; | ||
292 | #address-cells = <3>; | ||
293 | #size-cells = <2>; | ||
294 | #interrupt-cells = <1>; | ||
295 | ranges; | ||
296 | interrupt-map-mask = <0 0 0 0>; | ||
297 | interrupt-map = <0 0 0 0 &mpic 103>; | ||
298 | marvell,pcie-port = <3>; | ||
299 | marvell,pcie-lane = <0>; | ||
300 | clocks = <&gateclk 27>; | ||
301 | status = "disabled"; | ||
302 | }; | ||
303 | }; | ||
304 | }; | 337 | }; |
305 | }; | 338 | }; |
306 | }; | 339 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts index 8f510458ea86..5695afcc04bf 100644 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /dts-v1/; | 13 | /dts-v1/; |
14 | /include/ "armada-xp-mv78260.dtsi" | 14 | #include "armada-xp-mv78260.dtsi" |
15 | 15 | ||
16 | / { | 16 | / { |
17 | model = "PlatHome OpenBlocks AX3-4 board"; | 17 | model = "PlatHome OpenBlocks AX3-4 board"; |
@@ -27,9 +27,46 @@ | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | soc { | 29 | soc { |
30 | ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */ | 30 | ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 |
31 | 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */ | 31 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 |
32 | 0xf0000000 0 0xf0000000 0x8000000 /* Device Bus, NOR 128MiB */>; | 32 | MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x8000000>; |
33 | |||
34 | devbus-bootcs { | ||
35 | status = "okay"; | ||
36 | |||
37 | /* Device Bus parameters are required */ | ||
38 | |||
39 | /* Read parameters */ | ||
40 | devbus,bus-width = <8>; | ||
41 | devbus,turn-off-ps = <60000>; | ||
42 | devbus,badr-skew-ps = <0>; | ||
43 | devbus,acc-first-ps = <124000>; | ||
44 | devbus,acc-next-ps = <248000>; | ||
45 | devbus,rd-setup-ps = <0>; | ||
46 | devbus,rd-hold-ps = <0>; | ||
47 | |||
48 | /* Write parameters */ | ||
49 | devbus,sync-enable = <0>; | ||
50 | devbus,wr-high-ps = <60000>; | ||
51 | devbus,wr-low-ps = <60000>; | ||
52 | devbus,ale-wr-ps = <60000>; | ||
53 | |||
54 | /* NOR 128 MiB */ | ||
55 | nor@0 { | ||
56 | compatible = "cfi-flash"; | ||
57 | reg = <0 0x8000000>; | ||
58 | bank-width = <2>; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | pcie-controller { | ||
63 | status = "okay"; | ||
64 | /* Internal mini-PCIe connector */ | ||
65 | pcie@1,0 { | ||
66 | /* Port 0, Lane 0 */ | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | }; | ||
33 | 70 | ||
34 | internal-regs { | 71 | internal-regs { |
35 | serial@12000 { | 72 | serial@12000 { |
@@ -148,49 +185,6 @@ | |||
148 | usb@51000 { | 185 | usb@51000 { |
149 | status = "okay"; | 186 | status = "okay"; |
150 | }; | 187 | }; |
151 | |||
152 | /* USB interface in the mini-PCIe connector */ | ||
153 | usb@52000 { | ||
154 | status = "okay"; | ||
155 | }; | ||
156 | |||
157 | devbus-bootcs@10400 { | ||
158 | status = "okay"; | ||
159 | ranges = <0 0xf0000000 0x8000000>; /* @addr 0xf000000, size 0x8000000 */ | ||
160 | |||
161 | /* Device Bus parameters are required */ | ||
162 | |||
163 | /* Read parameters */ | ||
164 | devbus,bus-width = <8>; | ||
165 | devbus,turn-off-ps = <60000>; | ||
166 | devbus,badr-skew-ps = <0>; | ||
167 | devbus,acc-first-ps = <124000>; | ||
168 | devbus,acc-next-ps = <248000>; | ||
169 | devbus,rd-setup-ps = <0>; | ||
170 | devbus,rd-hold-ps = <0>; | ||
171 | |||
172 | /* Write parameters */ | ||
173 | devbus,sync-enable = <0>; | ||
174 | devbus,wr-high-ps = <60000>; | ||
175 | devbus,wr-low-ps = <60000>; | ||
176 | devbus,ale-wr-ps = <60000>; | ||
177 | |||
178 | /* NOR 128 MiB */ | ||
179 | nor@0 { | ||
180 | compatible = "cfi-flash"; | ||
181 | reg = <0 0x8000000>; | ||
182 | bank-width = <2>; | ||
183 | }; | ||
184 | }; | ||
185 | |||
186 | pcie-controller { | ||
187 | status = "okay"; | ||
188 | /* Internal mini-PCIe connector */ | ||
189 | pcie@1,0 { | ||
190 | /* Port 0, Lane 0 */ | ||
191 | status = "okay"; | ||
192 | }; | ||
193 | }; | ||
194 | }; | 188 | }; |
195 | }; | 189 | }; |
196 | }; | 190 | }; |
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 416eb9481844..7ba99ce107bb 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi | |||
@@ -16,7 +16,7 @@ | |||
16 | * common to all Armada SoCs. | 16 | * common to all Armada SoCs. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | /include/ "armada-370-xp.dtsi" | 19 | #include "armada-370-xp.dtsi" |
20 | 20 | ||
21 | / { | 21 | / { |
22 | model = "Marvell Armada XP family SoC"; | 22 | model = "Marvell Armada XP family SoC"; |
@@ -27,6 +27,13 @@ | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | soc { | 29 | soc { |
30 | compatible = "marvell,armadaxp-mbus", "simple-bus"; | ||
31 | |||
32 | bootrom { | ||
33 | compatible = "marvell,bootrom"; | ||
34 | reg = <MBUS_ID(0x01, 0x1d) 0 0x100000>; | ||
35 | }; | ||
36 | |||
30 | internal-regs { | 37 | internal-regs { |
31 | L2: l2-cache { | 38 | L2: l2-cache { |
32 | compatible = "marvell,aurora-system-cache"; | 39 | compatible = "marvell,aurora-system-cache"; |
diff --git a/arch/arm/boot/dts/emev2-kzm9d-reference.dts b/arch/arm/boot/dts/emev2-kzm9d-reference.dts new file mode 100644 index 000000000000..bed676b95c27 --- /dev/null +++ b/arch/arm/boot/dts/emev2-kzm9d-reference.dts | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the KZM9D board | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | /dts-v1/; | ||
11 | |||
12 | /include/ "emev2.dtsi" | ||
13 | |||
14 | / { | ||
15 | model = "EMEV2 KZM9D Board"; | ||
16 | compatible = "renesas,kzm9d-reference", "renesas,emev2"; | ||
17 | |||
18 | memory { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x40000000 0x8000000>; | ||
21 | }; | ||
22 | |||
23 | chosen { | ||
24 | bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; | ||
25 | }; | ||
26 | |||
27 | reg_1p8v: regulator@0 { | ||
28 | compatible = "regulator-fixed"; | ||
29 | regulator-name = "fixed-1.8V"; | ||
30 | regulator-min-microvolt = <1800000>; | ||
31 | regulator-max-microvolt = <1800000>; | ||
32 | regulator-always-on; | ||
33 | regulator-boot-on; | ||
34 | }; | ||
35 | |||
36 | reg_3p3v: regulator@1 { | ||
37 | compatible = "regulator-fixed"; | ||
38 | regulator-name = "fixed-3.3V"; | ||
39 | regulator-min-microvolt = <3300000>; | ||
40 | regulator-max-microvolt = <3300000>; | ||
41 | regulator-always-on; | ||
42 | regulator-boot-on; | ||
43 | }; | ||
44 | |||
45 | lan9220@20000000 { | ||
46 | compatible = "smsc,lan9220", "smsc,lan9115"; | ||
47 | reg = <0x20000000 0x10000>; | ||
48 | phy-mode = "mii"; | ||
49 | interrupt-parent = <&gpio0>; | ||
50 | interrupts = <1 1>; /* active high */ | ||
51 | reg-io-width = <4>; | ||
52 | smsc,irq-active-high; | ||
53 | smsc,irq-push-pull; | ||
54 | vddvario-supply = <®_1p8v>; | ||
55 | vdd33a-supply = <®_3p3v>; | ||
56 | }; | ||
57 | }; | ||
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts index b9b3241f173b..dda13bc02f9f 100644 --- a/arch/arm/boot/dts/emev2-kzm9d.dts +++ b/arch/arm/boot/dts/emev2-kzm9d.dts | |||
@@ -21,6 +21,6 @@ | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | chosen { | 23 | chosen { |
24 | bootargs = "console=tty0 console=ttyS1,115200n81 earlyprintk=serial8250-em.1,115200n81 mem=128M@0x40000000 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; | 24 | bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; |
25 | }; | 25 | }; |
26 | }; | 26 | }; |
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi index c8a8c08b48dd..99ad2b2e8e14 100644 --- a/arch/arm/boot/dts/emev2.dtsi +++ b/arch/arm/boot/dts/emev2.dtsi | |||
@@ -14,6 +14,14 @@ | |||
14 | compatible = "renesas,emev2"; | 14 | compatible = "renesas,emev2"; |
15 | interrupt-parent = <&gic>; | 15 | interrupt-parent = <&gic>; |
16 | 16 | ||
17 | aliases { | ||
18 | gpio0 = &gpio0; | ||
19 | gpio1 = &gpio1; | ||
20 | gpio2 = &gpio2; | ||
21 | gpio3 = &gpio3; | ||
22 | gpio4 = &gpio4; | ||
23 | }; | ||
24 | |||
17 | cpus { | 25 | cpus { |
18 | #address-cells = <1>; | 26 | #address-cells = <1>; |
19 | #size-cells = <0>; | 27 | #size-cells = <0>; |
@@ -67,4 +75,55 @@ | |||
67 | reg = <0xe1050000 0x38>; | 75 | reg = <0xe1050000 0x38>; |
68 | interrupts = <0 11 0>; | 76 | interrupts = <0 11 0>; |
69 | }; | 77 | }; |
78 | |||
79 | gpio0: gpio@e0050000 { | ||
80 | compatible = "renesas,em-gio"; | ||
81 | reg = <0xe0050000 0x2c>, <0xe0050040 0x20>; | ||
82 | interrupts = <0 67 0>, <0 68 0>; | ||
83 | gpio-controller; | ||
84 | #gpio-cells = <2>; | ||
85 | ngpios = <32>; | ||
86 | interrupt-controller; | ||
87 | #interrupt-cells = <2>; | ||
88 | }; | ||
89 | gpio1: gpio@e0050080 { | ||
90 | compatible = "renesas,em-gio"; | ||
91 | reg = <0xe0050080 0x2c>, <0xe00500c0 0x20>; | ||
92 | interrupts = <0 69 0>, <0 70 0>; | ||
93 | gpio-controller; | ||
94 | #gpio-cells = <2>; | ||
95 | ngpios = <32>; | ||
96 | interrupt-controller; | ||
97 | #interrupt-cells = <2>; | ||
98 | }; | ||
99 | gpio2: gpio@e0050100 { | ||
100 | compatible = "renesas,em-gio"; | ||
101 | reg = <0xe0050100 0x2c>, <0xe0050140 0x20>; | ||
102 | interrupts = <0 71 0>, <0 72 0>; | ||
103 | gpio-controller; | ||
104 | #gpio-cells = <2>; | ||
105 | ngpios = <32>; | ||
106 | interrupt-controller; | ||
107 | #interrupt-cells = <2>; | ||
108 | }; | ||
109 | gpio3: gpio@e0050180 { | ||
110 | compatible = "renesas,em-gio"; | ||
111 | reg = <0xe0050180 0x2c>, <0xe00501c0 0x20>; | ||
112 | interrupts = <0 73 0>, <0 74 0>; | ||
113 | gpio-controller; | ||
114 | #gpio-cells = <2>; | ||
115 | ngpios = <32>; | ||
116 | interrupt-controller; | ||
117 | #interrupt-cells = <2>; | ||
118 | }; | ||
119 | gpio4: gpio@e0050200 { | ||
120 | compatible = "renesas,em-gio"; | ||
121 | reg = <0xe0050200 0x2c>, <0xe0050240 0x20>; | ||
122 | interrupts = <0 75 0>, <0 76 0>; | ||
123 | gpio-controller; | ||
124 | #gpio-cells = <2>; | ||
125 | ngpios = <31>; | ||
126 | interrupt-controller; | ||
127 | #interrupt-cells = <2>; | ||
128 | }; | ||
70 | }; | 129 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-6281.dtsi b/arch/arm/boot/dts/kirkwood-6281.dtsi index 1e5bef0bead7..650ef30e1856 100644 --- a/arch/arm/boot/dts/kirkwood-6281.dtsi +++ b/arch/arm/boot/dts/kirkwood-6281.dtsi | |||
@@ -1,4 +1,39 @@ | |||
1 | / { | 1 | / { |
2 | mbus { | ||
3 | pcie-controller { | ||
4 | compatible = "marvell,kirkwood-pcie"; | ||
5 | status = "disabled"; | ||
6 | device_type = "pci"; | ||
7 | |||
8 | #address-cells = <3>; | ||
9 | #size-cells = <2>; | ||
10 | |||
11 | bus-range = <0x00 0xff>; | ||
12 | |||
13 | ranges = | ||
14 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 | ||
15 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | ||
16 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */>; | ||
17 | |||
18 | pcie@1,0 { | ||
19 | device_type = "pci"; | ||
20 | assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; | ||
21 | reg = <0x0800 0 0 0 0>; | ||
22 | #address-cells = <3>; | ||
23 | #size-cells = <2>; | ||
24 | #interrupt-cells = <1>; | ||
25 | ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 | ||
26 | 0x81000000 0 0 0x81000000 0x1 0 1 0>; | ||
27 | interrupt-map-mask = <0 0 0 0>; | ||
28 | interrupt-map = <0 0 0 0 &intc 9>; | ||
29 | marvell,pcie-port = <0>; | ||
30 | marvell,pcie-lane = <0>; | ||
31 | clocks = <&gate_clk 2>; | ||
32 | status = "disabled"; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
36 | |||
2 | ocp@f1000000 { | 37 | ocp@f1000000 { |
3 | pinctrl: pinctrl@10000 { | 38 | pinctrl: pinctrl@10000 { |
4 | compatible = "marvell,88f6281-pinctrl"; | 39 | compatible = "marvell,88f6281-pinctrl"; |
@@ -41,37 +76,6 @@ | |||
41 | }; | 76 | }; |
42 | }; | 77 | }; |
43 | 78 | ||
44 | pcie-controller { | ||
45 | compatible = "marvell,kirkwood-pcie"; | ||
46 | status = "disabled"; | ||
47 | device_type = "pci"; | ||
48 | |||
49 | #address-cells = <3>; | ||
50 | #size-cells = <2>; | ||
51 | |||
52 | bus-range = <0x00 0xff>; | ||
53 | |||
54 | ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */ | ||
55 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
56 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
57 | |||
58 | pcie@1,0 { | ||
59 | device_type = "pci"; | ||
60 | assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; | ||
61 | reg = <0x0800 0 0 0 0>; | ||
62 | #address-cells = <3>; | ||
63 | #size-cells = <2>; | ||
64 | #interrupt-cells = <1>; | ||
65 | ranges; | ||
66 | interrupt-map-mask = <0 0 0 0>; | ||
67 | interrupt-map = <0 0 0 0 &intc 9>; | ||
68 | marvell,pcie-port = <0>; | ||
69 | marvell,pcie-lane = <0>; | ||
70 | clocks = <&gate_clk 2>; | ||
71 | status = "disabled"; | ||
72 | }; | ||
73 | }; | ||
74 | |||
75 | rtc@10300 { | 79 | rtc@10300 { |
76 | compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; | 80 | compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; |
77 | reg = <0x10300 0x20>; | 81 | reg = <0x10300 0x20>; |
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index a63a11137262..3933a331ddc2 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi | |||
@@ -1,4 +1,59 @@ | |||
1 | / { | 1 | / { |
2 | mbus { | ||
3 | pcie-controller { | ||
4 | compatible = "marvell,kirkwood-pcie"; | ||
5 | status = "disabled"; | ||
6 | device_type = "pci"; | ||
7 | |||
8 | #address-cells = <3>; | ||
9 | #size-cells = <2>; | ||
10 | |||
11 | bus-range = <0x00 0xff>; | ||
12 | |||
13 | ranges = | ||
14 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 | ||
15 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 | ||
16 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 | ||
17 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | ||
18 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | ||
19 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 1.0 MEM */ | ||
20 | 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 1.0 IO */>; | ||
21 | |||
22 | pcie@1,0 { | ||
23 | device_type = "pci"; | ||
24 | assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; | ||
25 | reg = <0x0800 0 0 0 0>; | ||
26 | #address-cells = <3>; | ||
27 | #size-cells = <2>; | ||
28 | #interrupt-cells = <1>; | ||
29 | ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 | ||
30 | 0x81000000 0 0 0x81000000 0x1 0 1 0>; | ||
31 | interrupt-map-mask = <0 0 0 0>; | ||
32 | interrupt-map = <0 0 0 0 &intc 9>; | ||
33 | marvell,pcie-port = <0>; | ||
34 | marvell,pcie-lane = <0>; | ||
35 | clocks = <&gate_clk 2>; | ||
36 | status = "disabled"; | ||
37 | }; | ||
38 | |||
39 | pcie@2,0 { | ||
40 | device_type = "pci"; | ||
41 | assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>; | ||
42 | reg = <0x1000 0 0 0 0>; | ||
43 | #address-cells = <3>; | ||
44 | #size-cells = <2>; | ||
45 | #interrupt-cells = <1>; | ||
46 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | ||
47 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | ||
48 | interrupt-map-mask = <0 0 0 0>; | ||
49 | interrupt-map = <0 0 0 0 &intc 10>; | ||
50 | marvell,pcie-port = <1>; | ||
51 | marvell,pcie-lane = <0>; | ||
52 | clocks = <&gate_clk 18>; | ||
53 | status = "disabled"; | ||
54 | }; | ||
55 | }; | ||
56 | }; | ||
2 | ocp@f1000000 { | 57 | ocp@f1000000 { |
3 | 58 | ||
4 | pinctrl: pinctrl@10000 { | 59 | pinctrl: pinctrl@10000 { |
@@ -94,52 +149,5 @@ | |||
94 | status = "disabled"; | 149 | status = "disabled"; |
95 | }; | 150 | }; |
96 | 151 | ||
97 | pcie-controller { | ||
98 | compatible = "marvell,kirkwood-pcie"; | ||
99 | status = "disabled"; | ||
100 | device_type = "pci"; | ||
101 | |||
102 | #address-cells = <3>; | ||
103 | #size-cells = <2>; | ||
104 | |||
105 | bus-range = <0x00 0xff>; | ||
106 | |||
107 | ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */ | ||
108 | 0x82000000 0 0x00044000 0x00044000 0 0x00002000 /* Port 1.0 registers */ | ||
109 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
110 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
111 | |||
112 | pcie@1,0 { | ||
113 | device_type = "pci"; | ||
114 | assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>; | ||
115 | reg = <0x0800 0 0 0 0>; | ||
116 | #address-cells = <3>; | ||
117 | #size-cells = <2>; | ||
118 | #interrupt-cells = <1>; | ||
119 | ranges; | ||
120 | interrupt-map-mask = <0 0 0 0>; | ||
121 | interrupt-map = <0 0 0 0 &intc 9>; | ||
122 | marvell,pcie-port = <0>; | ||
123 | marvell,pcie-lane = <0>; | ||
124 | clocks = <&gate_clk 2>; | ||
125 | status = "disabled"; | ||
126 | }; | ||
127 | |||
128 | pcie@2,0 { | ||
129 | device_type = "pci"; | ||
130 | assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>; | ||
131 | reg = <0x1000 0 0 0 0>; | ||
132 | #address-cells = <3>; | ||
133 | #size-cells = <2>; | ||
134 | #interrupt-cells = <1>; | ||
135 | ranges; | ||
136 | interrupt-map-mask = <0 0 0 0>; | ||
137 | interrupt-map = <0 0 0 0 &intc 10>; | ||
138 | marvell,pcie-port = <1>; | ||
139 | marvell,pcie-lane = <0>; | ||
140 | clocks = <&gate_clk 18>; | ||
141 | status = "disabled"; | ||
142 | }; | ||
143 | }; | ||
144 | }; | 152 | }; |
145 | }; | 153 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts index 00c48d26de68..9bf139c5a34d 100644 --- a/arch/arm/boot/dts/kirkwood-cloudbox.dts +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "LaCie CloudBox"; | 7 | model = "LaCie CloudBox"; |
diff --git a/arch/arm/boot/dts/kirkwood-db-88f6281.dts b/arch/arm/boot/dts/kirkwood-db-88f6281.dts index 9d777edd1f36..72c4b0a0366f 100644 --- a/arch/arm/boot/dts/kirkwood-db-88f6281.dts +++ b/arch/arm/boot/dts/kirkwood-db-88f6281.dts | |||
@@ -11,14 +11,15 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | 13 | ||
14 | /include/ "kirkwood-db.dtsi" | 14 | #include "kirkwood-db.dtsi" |
15 | /include/ "kirkwood-6281.dtsi" | 15 | #include "kirkwood-6281.dtsi" |
16 | 16 | ||
17 | / { | 17 | / { |
18 | model = "Marvell DB-88F6281-BP Development Board"; | 18 | model = "Marvell DB-88F6281-BP Development Board"; |
19 | compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | 19 | compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood"; |
20 | 20 | ||
21 | ocp@f1000000 { | 21 | mbus { |
22 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
22 | pcie-controller { | 23 | pcie-controller { |
23 | status = "okay"; | 24 | status = "okay"; |
24 | 25 | ||
diff --git a/arch/arm/boot/dts/kirkwood-db-88f6282.dts b/arch/arm/boot/dts/kirkwood-db-88f6282.dts index f4c852886d23..36c411d34926 100644 --- a/arch/arm/boot/dts/kirkwood-db-88f6282.dts +++ b/arch/arm/boot/dts/kirkwood-db-88f6282.dts | |||
@@ -11,14 +11,15 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | 13 | ||
14 | /include/ "kirkwood-db.dtsi" | 14 | #include "kirkwood-db.dtsi" |
15 | /include/ "kirkwood-6282.dtsi" | 15 | #include "kirkwood-6282.dtsi" |
16 | 16 | ||
17 | / { | 17 | / { |
18 | model = "Marvell DB-88F6282-BP Development Board"; | 18 | model = "Marvell DB-88F6282-BP Development Board"; |
19 | compatible = "marvell,db-88f6282-bp", "marvell,kirkwood-88f6282", "marvell,kirkwood"; | 19 | compatible = "marvell,db-88f6282-bp", "marvell,kirkwood-88f6282", "marvell,kirkwood"; |
20 | 20 | ||
21 | ocp@f1000000 { | 21 | mbus { |
22 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
22 | pcie-controller { | 23 | pcie-controller { |
23 | status = "okay"; | 24 | status = "okay"; |
24 | 25 | ||
diff --git a/arch/arm/boot/dts/kirkwood-db.dtsi b/arch/arm/boot/dts/kirkwood-db.dtsi index c87cfb816120..45c1bf74ac00 100644 --- a/arch/arm/boot/dts/kirkwood-db.dtsi +++ b/arch/arm/boot/dts/kirkwood-db.dtsi | |||
@@ -12,7 +12,7 @@ | |||
12 | * and 6282 variants of the Marvell Kirkwood Development Board. | 12 | * and 6282 variants of the Marvell Kirkwood Development Board. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | /include/ "kirkwood.dtsi" | 15 | #include "kirkwood.dtsi" |
16 | 16 | ||
17 | / { | 17 | / { |
18 | memory { | 18 | memory { |
@@ -77,13 +77,5 @@ | |||
77 | cd-gpios = <&gpio1 6 0>; | 77 | cd-gpios = <&gpio1 6 0>; |
78 | status = "okay"; | 78 | status = "okay"; |
79 | }; | 79 | }; |
80 | |||
81 | pcie-controller { | ||
82 | status = "okay"; | ||
83 | |||
84 | pcie@1,0 { | ||
85 | status = "okay"; | ||
86 | }; | ||
87 | }; | ||
88 | }; | 80 | }; |
89 | }; | 81 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts index 14d4ceea3057..e112ca62d978 100644 --- a/arch/arm/boot/dts/kirkwood-dns320.dts +++ b/arch/arm/boot/dts/kirkwood-dns320.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-dnskw.dtsi" | 3 | #include "kirkwood-dnskw.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "D-Link DNS-320 NAS (Rev A1)"; | 6 | model = "D-Link DNS-320 NAS (Rev A1)"; |
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts index 63872570e6ce..5119fb8a8eb6 100644 --- a/arch/arm/boot/dts/kirkwood-dns325.dts +++ b/arch/arm/boot/dts/kirkwood-dns325.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-dnskw.dtsi" | 3 | #include "kirkwood-dnskw.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "D-Link DNS-325 NAS (Rev A1)"; | 6 | model = "D-Link DNS-325 NAS (Rev A1)"; |
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi index 0afe1d07c803..2e04284846a0 100644 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi | |||
@@ -1,5 +1,5 @@ | |||
1 | /include/ "kirkwood.dtsi" | 1 | #include "kirkwood.dtsi" |
2 | /include/ "kirkwood-6281.dtsi" | 2 | #include "kirkwood-6281.dtsi" |
3 | 3 | ||
4 | / { | 4 | / { |
5 | model = "D-Link DNS NASes (kirkwood-based)"; | 5 | model = "D-Link DNS NASes (kirkwood-based)"; |
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts index 7714742bb8d8..4387ae8e93fe 100644 --- a/arch/arm/boot/dts/kirkwood-dockstar.dts +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Seagate FreeAgent Dockstar"; | 7 | model = "Seagate FreeAgent Dockstar"; |
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index 36c7ba38d500..c62837837246 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Globalscale Technologies Dreamplug"; | 7 | model = "Globalscale Technologies Dreamplug"; |
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index 31caa6405065..e57118039277 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Seagate GoFlex Net"; | 7 | model = "Seagate GoFlex Net"; |
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts index 1e642f39b154..2c5673adb4bd 100644 --- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts +++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Globalscale Technologies Guruplug Server Plus"; | 7 | model = "Globalscale Technologies Guruplug Server Plus"; |
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 20c4b081f420..158161ff6826 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; | 7 | model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; |
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index 441204e8abc6..8314118b6b8a 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Iomega Iconnect"; | 7 | model = "Iomega Iconnect"; |
@@ -18,6 +18,17 @@ | |||
18 | linux,initrd-end = <0x4800000>; | 18 | linux,initrd-end = <0x4800000>; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | mbus { | ||
22 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
23 | pcie-controller { | ||
24 | status = "okay"; | ||
25 | |||
26 | pcie@1,0 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
31 | |||
21 | ocp@f1000000 { | 32 | ocp@f1000000 { |
22 | pinctrl: pinctrl@10000 { | 33 | pinctrl: pinctrl@10000 { |
23 | pmx_button_reset: pmx-button-reset { | 34 | pmx_button_reset: pmx-button-reset { |
@@ -101,14 +112,6 @@ | |||
101 | reg = <0x980000 0x1f400000>; | 112 | reg = <0x980000 0x1f400000>; |
102 | }; | 113 | }; |
103 | }; | 114 | }; |
104 | |||
105 | pcie-controller { | ||
106 | status = "okay"; | ||
107 | |||
108 | pcie@1,0 { | ||
109 | status = "okay"; | ||
110 | }; | ||
111 | }; | ||
112 | }; | 115 | }; |
113 | 116 | ||
114 | gpio-leds { | 117 | gpio-leds { |
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts index 00a7bfe5e83b..fd7f053e9c96 100644 --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Iomega StorCenter ix2-200"; | 7 | model = "Iomega StorCenter ix2-200"; |
diff --git a/arch/arm/boot/dts/kirkwood-is2.dts b/arch/arm/boot/dts/kirkwood-is2.dts index c3f036b86cca..bd88a236f729 100644 --- a/arch/arm/boot/dts/kirkwood-is2.dts +++ b/arch/arm/boot/dts/kirkwood-is2.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ns2-common.dtsi" | 3 | #include "kirkwood-ns2-common.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "LaCie Internet Space v2"; | 6 | model = "LaCie Internet Space v2"; |
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts index 5d9f5ea78700..b071d37cc291 100644 --- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-98dx4122.dtsi" | 4 | #include "kirkwood-98dx4122.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Keymile Kirkwood Reference Design"; | 7 | model = "Keymile Kirkwood Reference Design"; |
diff --git a/arch/arm/boot/dts/kirkwood-lschlv2.dts b/arch/arm/boot/dts/kirkwood-lschlv2.dts index 9f55d95f35f5..e2fa368aef25 100644 --- a/arch/arm/boot/dts/kirkwood-lschlv2.dts +++ b/arch/arm/boot/dts/kirkwood-lschlv2.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-lsxl.dtsi" | 3 | #include "kirkwood-lsxl.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "Buffalo Linkstation LS-CHLv2"; | 6 | model = "Buffalo Linkstation LS-CHLv2"; |
diff --git a/arch/arm/boot/dts/kirkwood-lsxhl.dts b/arch/arm/boot/dts/kirkwood-lsxhl.dts index 5c84c118ed8d..8d89cdf8d6bf 100644 --- a/arch/arm/boot/dts/kirkwood-lsxhl.dts +++ b/arch/arm/boot/dts/kirkwood-lsxhl.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-lsxl.dtsi" | 3 | #include "kirkwood-lsxl.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "Buffalo Linkstation LS-XHL"; | 6 | model = "Buffalo Linkstation LS-XHL"; |
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 31b17f5b9d28..f7e247cc925a 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi | |||
@@ -1,5 +1,5 @@ | |||
1 | /include/ "kirkwood.dtsi" | 1 | #include "kirkwood.dtsi" |
2 | /include/ "kirkwood-6281.dtsi" | 2 | #include "kirkwood-6281.dtsi" |
3 | 3 | ||
4 | / { | 4 | / { |
5 | chosen { | 5 | chosen { |
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts index 6179333fd71f..21f1954c9e54 100644 --- a/arch/arm/boot/dts/kirkwood-mplcec4.dts +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "MPL CEC4"; | 7 | model = "MPL CEC4"; |
@@ -16,6 +16,17 @@ | |||
16 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | 16 | bootargs = "console=ttyS0,115200n8 earlyprintk"; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | mbus { | ||
20 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
21 | pcie-controller { | ||
22 | status = "okay"; | ||
23 | |||
24 | pcie@1,0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
29 | |||
19 | ocp@f1000000 { | 30 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | 31 | pinctrl: pinctrl@10000 { |
21 | pmx_led_health: pmx-led-health { | 32 | pmx_led_health: pmx-led-health { |
@@ -134,14 +145,6 @@ | |||
134 | cd-gpios = <&gpio1 15 1>; | 145 | cd-gpios = <&gpio1 15 1>; |
135 | /* No WP GPIO */ | 146 | /* No WP GPIO */ |
136 | }; | 147 | }; |
137 | |||
138 | pcie-controller { | ||
139 | status = "okay"; | ||
140 | |||
141 | pcie@1,0 { | ||
142 | status = "okay"; | ||
143 | }; | ||
144 | }; | ||
145 | }; | 148 | }; |
146 | 149 | ||
147 | gpio-leds { | 150 | gpio-leds { |
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts index ad6ade7d9191..84ff31cfbcdc 100644 --- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6282.dtsi" | 4 | #include "kirkwood-6282.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "NETGEAR ReadyNAS Duo v2"; | 7 | model = "NETGEAR ReadyNAS Duo v2"; |
@@ -16,6 +16,17 @@ | |||
16 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | 16 | bootargs = "console=ttyS0,115200n8 earlyprintk"; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | mbus { | ||
20 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
21 | pcie-controller { | ||
22 | status = "okay"; | ||
23 | |||
24 | pcie@1,0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
29 | |||
19 | ocp@f1000000 { | 30 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | 31 | pinctrl: pinctrl@10000 { |
21 | pmx_button_power: pmx-button-power { | 32 | pmx_button_power: pmx-button-power { |
@@ -101,14 +112,6 @@ | |||
101 | status = "okay"; | 112 | status = "okay"; |
102 | nr-ports = <2>; | 113 | nr-ports = <2>; |
103 | }; | 114 | }; |
104 | |||
105 | pcie-controller { | ||
106 | status = "okay"; | ||
107 | |||
108 | pcie@1,0 { | ||
109 | status = "okay"; | ||
110 | }; | ||
111 | }; | ||
112 | }; | 115 | }; |
113 | 116 | ||
114 | gpio-leds { | 117 | gpio-leds { |
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 2afac0405816..d0fb34dc1667 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi | |||
@@ -1,5 +1,5 @@ | |||
1 | /include/ "kirkwood.dtsi" | 1 | #include "kirkwood.dtsi" |
2 | /include/ "kirkwood-6281.dtsi" | 2 | #include "kirkwood-6281.dtsi" |
3 | 3 | ||
4 | / { | 4 | / { |
5 | chosen { | 5 | chosen { |
diff --git a/arch/arm/boot/dts/kirkwood-ns2.dts b/arch/arm/boot/dts/kirkwood-ns2.dts index b50e93d7796c..0599f3cb844e 100644 --- a/arch/arm/boot/dts/kirkwood-ns2.dts +++ b/arch/arm/boot/dts/kirkwood-ns2.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ns2-common.dtsi" | 3 | #include "kirkwood-ns2-common.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "LaCie Network Space v2"; | 6 | model = "LaCie Network Space v2"; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts index af8259fe8955..b0e17984aea0 100644 --- a/arch/arm/boot/dts/kirkwood-ns2lite.dts +++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ns2-common.dtsi" | 3 | #include "kirkwood-ns2-common.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "LaCie Network Space Lite v2"; | 6 | model = "LaCie Network Space Lite v2"; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts index 85f24d227e17..d4f6a586d553 100644 --- a/arch/arm/boot/dts/kirkwood-ns2max.dts +++ b/arch/arm/boot/dts/kirkwood-ns2max.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ns2-common.dtsi" | 3 | #include "kirkwood-ns2-common.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | model = "LaCie Network Space Max v2"; | 6 | model = "LaCie Network Space Max v2"; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts index 329e530bffe7..f30e05af6473 100644 --- a/arch/arm/boot/dts/kirkwood-ns2mini.dts +++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts | |||
@@ -1,6 +1,6 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood-ns2-common.dtsi" | 3 | #include "kirkwood-ns2-common.dtsi" |
4 | 4 | ||
5 | / { | 5 | / { |
6 | /* This machine is embedded in the first LaCie CloudBox product. */ | 6 | /* This machine is embedded in the first LaCie CloudBox product. */ |
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index 69003598f5fa..bd7f05f6aa96 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "ZyXEL NSA310"; | 7 | model = "ZyXEL NSA310"; |
@@ -16,6 +16,17 @@ | |||
16 | bootargs = "console=ttyS0,115200"; | 16 | bootargs = "console=ttyS0,115200"; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | mbus { | ||
20 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
21 | pcie-controller { | ||
22 | status = "okay"; | ||
23 | |||
24 | pcie@1,0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
29 | |||
19 | ocp@f1000000 { | 30 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | 31 | pinctrl: pinctrl@10000 { |
21 | pinctrl-0 = <&pmx_unknown>; | 32 | pinctrl-0 = <&pmx_unknown>; |
@@ -162,14 +173,6 @@ | |||
162 | reg = <0x5040000 0x2fc0000>; | 173 | reg = <0x5040000 0x2fc0000>; |
163 | }; | 174 | }; |
164 | }; | 175 | }; |
165 | |||
166 | pcie-controller { | ||
167 | status = "okay"; | ||
168 | |||
169 | pcie@1,0 { | ||
170 | status = "okay"; | ||
171 | }; | ||
172 | }; | ||
173 | }; | 176 | }; |
174 | 177 | ||
175 | gpio_keys { | 178 | gpio_keys { |
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts index 38dc8517d777..365b792b23a7 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6282.dtsi" | 4 | #include "kirkwood-6282.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Plat'Home OpenBlocksA6"; | 7 | model = "Plat'Home OpenBlocksA6"; |
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi index f7143f128504..0cc5f26bbbb6 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi | |||
@@ -6,8 +6,8 @@ | |||
6 | * Licensed under GPLv2 | 6 | * Licensed under GPLv2 |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /include/ "kirkwood.dtsi" | 9 | #include "kirkwood.dtsi" |
10 | /include/ "kirkwood-6281.dtsi" | 10 | #include "kirkwood-6281.dtsi" |
11 | 11 | ||
12 | / { | 12 | / { |
13 | memory { | 13 | memory { |
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts b/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts index f620ce48de97..eac6a21f3b1f 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts +++ b/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | /dts-v1/; | 9 | /dts-v1/; |
10 | 10 | ||
11 | /include/ "kirkwood-sheevaplug-common.dtsi" | 11 | #include "kirkwood-sheevaplug-common.dtsi" |
12 | 12 | ||
13 | / { | 13 | / { |
14 | model = "Globalscale Technologies eSATA SheevaPlug"; | 14 | model = "Globalscale Technologies eSATA SheevaPlug"; |
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug.dts b/arch/arm/boot/dts/kirkwood-sheevaplug.dts index bf1dff251432..bb61918313db 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug.dts +++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | /dts-v1/; | 9 | /dts-v1/; |
10 | 10 | ||
11 | /include/ "kirkwood-sheevaplug-common.dtsi" | 11 | #include "kirkwood-sheevaplug-common.dtsi" |
12 | 12 | ||
13 | / { | 13 | / { |
14 | model = "Globalscale Technologies SheevaPlug"; | 14 | model = "Globalscale Technologies SheevaPlug"; |
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index f2052d7bc10f..974f1e0f09b2 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6282.dtsi" | 4 | #include "kirkwood-6282.dtsi" |
5 | 5 | ||
6 | / { | 6 | / { |
7 | model = "Univeral Scientific Industrial Co. Topkick-1281P2"; | 7 | model = "Univeral Scientific Industrial Co. Topkick-1281P2"; |
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts index 6dd1038e4de4..3867ae3030be 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts | |||
@@ -1,8 +1,8 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | 4 | #include "kirkwood-6281.dtsi" |
5 | /include/ "kirkwood-ts219.dtsi" | 5 | #include "kirkwood-ts219.dtsi" |
6 | 6 | ||
7 | / { | 7 | / { |
8 | ocp@f1000000 { | 8 | ocp@f1000000 { |
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts index 6fdc5ffcaae5..04f6fe106bb5 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts | |||
@@ -1,10 +1,21 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | #include "kirkwood.dtsi" |
4 | /include/ "kirkwood-6282.dtsi" | 4 | #include "kirkwood-6282.dtsi" |
5 | /include/ "kirkwood-ts219.dtsi" | 5 | #include "kirkwood-ts219.dtsi" |
6 | 6 | ||
7 | / { | 7 | / { |
8 | mbus { | ||
9 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>; | ||
10 | pcie-controller { | ||
11 | status = "okay"; | ||
12 | |||
13 | pcie@2,0 { | ||
14 | status = "okay"; | ||
15 | }; | ||
16 | }; | ||
17 | }; | ||
18 | |||
8 | ocp@f1000000 { | 19 | ocp@f1000000 { |
9 | pinctrl: pinctrl@10000 { | 20 | pinctrl: pinctrl@10000 { |
10 | 21 | ||
@@ -30,14 +41,6 @@ | |||
30 | marvell,function = "gpio"; | 41 | marvell,function = "gpio"; |
31 | }; | 42 | }; |
32 | }; | 43 | }; |
33 | pcie-controller { | ||
34 | status = "okay"; | ||
35 | |||
36 | pcie@2,0 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | }; | ||
40 | |||
41 | }; | 44 | }; |
42 | 45 | ||
43 | gpio_keys { | 46 | gpio_keys { |
diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi index 0c9a94cd666c..7019cf675df2 100644 --- a/arch/arm/boot/dts/kirkwood-ts219.dtsi +++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi | |||
@@ -11,6 +11,16 @@ | |||
11 | bootargs = "console=ttyS0,115200n8"; | 11 | bootargs = "console=ttyS0,115200n8"; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | mbus { | ||
15 | pcie-controller { | ||
16 | status = "okay"; | ||
17 | |||
18 | pcie@1,0 { | ||
19 | status = "okay"; | ||
20 | }; | ||
21 | }; | ||
22 | }; | ||
23 | |||
14 | ocp@f1000000 { | 24 | ocp@f1000000 { |
15 | i2c@11000 { | 25 | i2c@11000 { |
16 | status = "okay"; | 26 | status = "okay"; |
@@ -87,12 +97,5 @@ | |||
87 | status = "okay"; | 97 | status = "okay"; |
88 | nr-ports = <2>; | 98 | nr-ports = <2>; |
89 | }; | 99 | }; |
90 | pcie-controller { | ||
91 | status = "okay"; | ||
92 | |||
93 | pcie@1,0 { | ||
94 | status = "okay"; | ||
95 | }; | ||
96 | }; | ||
97 | }; | 100 | }; |
98 | }; | 101 | }; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 9809fc1f105c..70f414d9bd9a 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -1,5 +1,7 @@ | |||
1 | /include/ "skeleton.dtsi" | 1 | /include/ "skeleton.dtsi" |
2 | 2 | ||
3 | #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) | ||
4 | |||
3 | / { | 5 | / { |
4 | compatible = "marvell,kirkwood"; | 6 | compatible = "marvell,kirkwood"; |
5 | interrupt-parent = <&intc>; | 7 | interrupt-parent = <&intc>; |
@@ -28,15 +30,28 @@ | |||
28 | <0xf1020214 0x04>; | 30 | <0xf1020214 0x04>; |
29 | }; | 31 | }; |
30 | 32 | ||
33 | mbus { | ||
34 | compatible = "marvell,kirkwood-mbus", "simple-bus"; | ||
35 | #address-cells = <2>; | ||
36 | #size-cells = <1>; | ||
37 | controller = <&mbusc>; | ||
38 | pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */ | ||
39 | pcie-io-aperture = <0xf2000000 0x100000>; /* 1 MiB I/O space */ | ||
40 | }; | ||
41 | |||
31 | ocp@f1000000 { | 42 | ocp@f1000000 { |
32 | compatible = "simple-bus"; | 43 | compatible = "simple-bus"; |
33 | ranges = <0x00000000 0xf1000000 0x0100000 | 44 | ranges = <0x00000000 0xf1000000 0x0100000 |
34 | 0xe0000000 0xe0000000 0x8100000 /* PCIE */ | ||
35 | 0xf4000000 0xf4000000 0x0000400 | 45 | 0xf4000000 0xf4000000 0x0000400 |
36 | 0xf5000000 0xf5000000 0x0000400>; | 46 | 0xf5000000 0xf5000000 0x0000400>; |
37 | #address-cells = <1>; | 47 | #address-cells = <1>; |
38 | #size-cells = <1>; | 48 | #size-cells = <1>; |
39 | 49 | ||
50 | mbusc: mbus-controller@20000 { | ||
51 | compatible = "marvell,mbus-controller"; | ||
52 | reg = <0x20000 0x80>, <0x1500 0x20>; | ||
53 | }; | ||
54 | |||
40 | core_clk: core-clocks@10030 { | 55 | core_clk: core-clocks@10030 { |
41 | compatible = "marvell,kirkwood-core-clock"; | 56 | compatible = "marvell,kirkwood-core-clock"; |
42 | reg = <0x10030 0x4>; | 57 | reg = <0x10030 0x4>; |
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm.dts b/arch/arm/boot/dts/r8a73a4-ape6evm.dts index f603c6946c29..e657a9db1666 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm.dts | |||
@@ -50,3 +50,25 @@ | |||
50 | }; | 50 | }; |
51 | }; | 51 | }; |
52 | }; | 52 | }; |
53 | |||
54 | &i2c5 { | ||
55 | vdd_dvfs: max8973@1b { | ||
56 | compatible = "maxim,max8973"; | ||
57 | reg = <0x1b>; | ||
58 | |||
59 | regulator-min-microvolt = <935000>; | ||
60 | regulator-max-microvolt = <1200000>; | ||
61 | regulator-boot-on; | ||
62 | regulator-always-on; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | &cpu0 { | ||
67 | cpu0-supply = <&vdd_dvfs>; | ||
68 | operating-points = < | ||
69 | /* kHz uV */ | ||
70 | 1950000 1115000 | ||
71 | 1462500 995000 | ||
72 | >; | ||
73 | voltage-tolerance = <1>; /* 1% */ | ||
74 | }; | ||
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 4ff2019c0e30..6ce699be6095 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi | |||
@@ -85,4 +85,130 @@ | |||
85 | interrupt-parent = <&gic>; | 85 | interrupt-parent = <&gic>; |
86 | interrupts = <0 69 4>; | 86 | interrupts = <0 69 4>; |
87 | }; | 87 | }; |
88 | |||
89 | i2c0: i2c@e6500000 { | ||
90 | #address-cells = <1>; | ||
91 | #size-cells = <0>; | ||
92 | compatible = "renesas,rmobile-iic"; | ||
93 | reg = <0 0xe6500000 0 0x428>; | ||
94 | interrupt-parent = <&gic>; | ||
95 | interrupts = <0 174 0x4>; | ||
96 | }; | ||
97 | |||
98 | i2c1: i2c@e6510000 { | ||
99 | #address-cells = <1>; | ||
100 | #size-cells = <0>; | ||
101 | compatible = "renesas,rmobile-iic"; | ||
102 | reg = <0 0xe6510000 0 0x428>; | ||
103 | interrupt-parent = <&gic>; | ||
104 | interrupts = <0 175 0x4>; | ||
105 | }; | ||
106 | |||
107 | i2c2: i2c@e6520000 { | ||
108 | #address-cells = <1>; | ||
109 | #size-cells = <0>; | ||
110 | compatible = "renesas,rmobile-iic"; | ||
111 | reg = <0 0xe6520000 0 0x428>; | ||
112 | interrupt-parent = <&gic>; | ||
113 | interrupts = <0 176 0x4>; | ||
114 | }; | ||
115 | |||
116 | i2c3: i2c@e6530000 { | ||
117 | #address-cells = <1>; | ||
118 | #size-cells = <0>; | ||
119 | compatible = "renesas,rmobile-iic"; | ||
120 | reg = <0 0xe6530000 0 0x428>; | ||
121 | interrupt-parent = <&gic>; | ||
122 | interrupts = <0 177 0x4>; | ||
123 | }; | ||
124 | |||
125 | i2c4: i2c@e6540000 { | ||
126 | #address-cells = <1>; | ||
127 | #size-cells = <0>; | ||
128 | compatible = "renesas,rmobile-iic"; | ||
129 | reg = <0 0xe6540000 0 0x428>; | ||
130 | interrupt-parent = <&gic>; | ||
131 | interrupts = <0 178 0x4>; | ||
132 | }; | ||
133 | |||
134 | i2c5: i2c@e60b0000 { | ||
135 | #address-cells = <1>; | ||
136 | #size-cells = <0>; | ||
137 | compatible = "renesas,rmobile-iic"; | ||
138 | reg = <0 0xe60b0000 0 0x428>; | ||
139 | interrupt-parent = <&gic>; | ||
140 | interrupts = <0 179 0x4>; | ||
141 | }; | ||
142 | |||
143 | i2c6: i2c@e6550000 { | ||
144 | #address-cells = <1>; | ||
145 | #size-cells = <0>; | ||
146 | compatible = "renesas,rmobile-iic"; | ||
147 | reg = <0 0xe6550000 0 0x428>; | ||
148 | interrupt-parent = <&gic>; | ||
149 | interrupts = <0 184 0x4>; | ||
150 | }; | ||
151 | |||
152 | i2c7: i2c@e6560000 { | ||
153 | #address-cells = <1>; | ||
154 | #size-cells = <0>; | ||
155 | compatible = "renesas,rmobile-iic"; | ||
156 | reg = <0 0xe6560000 0 0x428>; | ||
157 | interrupt-parent = <&gic>; | ||
158 | interrupts = <0 185 0x4>; | ||
159 | }; | ||
160 | |||
161 | i2c8: i2c@e6570000 { | ||
162 | #address-cells = <1>; | ||
163 | #size-cells = <0>; | ||
164 | compatible = "renesas,rmobile-iic"; | ||
165 | reg = <0 0xe6570000 0 0x428>; | ||
166 | interrupt-parent = <&gic>; | ||
167 | interrupts = <0 173 0x4>; | ||
168 | }; | ||
169 | |||
170 | mmcif0: mmcif@ee200000 { | ||
171 | compatible = "renesas,sh-mmcif"; | ||
172 | reg = <0 0xee200000 0 0x80>; | ||
173 | interrupt-parent = <&gic>; | ||
174 | interrupts = <0 169 0x4>; | ||
175 | reg-io-width = <4>; | ||
176 | status = "disabled"; | ||
177 | }; | ||
178 | |||
179 | mmcif1: mmcif@ee220000 { | ||
180 | compatible = "renesas,sh-mmcif"; | ||
181 | reg = <0 0xee220000 0 0x80>; | ||
182 | interrupt-parent = <&gic>; | ||
183 | interrupts = <0 170 0x4>; | ||
184 | reg-io-width = <4>; | ||
185 | status = "disabled"; | ||
186 | }; | ||
187 | |||
188 | sdhi0: sdhi@ee100000 { | ||
189 | compatible = "renesas,r8a73a4-sdhi"; | ||
190 | reg = <0 0xee100000 0 0x100>; | ||
191 | interrupt-parent = <&gic>; | ||
192 | interrupts = <0 165 4>; | ||
193 | cap-sd-highspeed; | ||
194 | status = "disabled"; | ||
195 | }; | ||
196 | |||
197 | sdhi1: sdhi@ee120000 { | ||
198 | compatible = "renesas,r8a73a4-sdhi"; | ||
199 | reg = <0 0xee120000 0 0x100>; | ||
200 | interrupt-parent = <&gic>; | ||
201 | interrupts = <0 166 4>; | ||
202 | cap-sd-highspeed; | ||
203 | status = "disabled"; | ||
204 | }; | ||
205 | |||
206 | sdhi2: sdhi@ee140000 { | ||
207 | compatible = "renesas,r8a73a4-sdhi"; | ||
208 | reg = <0 0xee140000 0 0x100>; | ||
209 | interrupt-parent = <&gic>; | ||
210 | interrupts = <0 167 4>; | ||
211 | cap-sd-highspeed; | ||
212 | status = "disabled"; | ||
213 | }; | ||
88 | }; | 214 | }; |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 339d9b11721c..9cd882028095 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
@@ -54,4 +54,58 @@ | |||
54 | interrupt-parent = <&gic>; | 54 | interrupt-parent = <&gic>; |
55 | interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>; | 55 | interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>; |
56 | }; | 56 | }; |
57 | |||
58 | mmcif0: mmcif@ee200000 { | ||
59 | compatible = "renesas,sh-mmcif"; | ||
60 | reg = <0 0xee200000 0 0x80>; | ||
61 | interrupt-parent = <&gic>; | ||
62 | interrupts = <0 169 0x4>; | ||
63 | reg-io-width = <4>; | ||
64 | status = "disabled"; | ||
65 | }; | ||
66 | |||
67 | mmcif1: mmcif@ee220000 { | ||
68 | compatible = "renesas,sh-mmcif"; | ||
69 | reg = <0 0xee220000 0 0x80>; | ||
70 | interrupt-parent = <&gic>; | ||
71 | interrupts = <0 170 0x4>; | ||
72 | reg-io-width = <4>; | ||
73 | status = "disabled"; | ||
74 | }; | ||
75 | |||
76 | sdhi0: sdhi@ee100000 { | ||
77 | compatible = "renesas,r8a7790-sdhi"; | ||
78 | reg = <0 0xee100000 0 0x100>; | ||
79 | interrupt-parent = <&gic>; | ||
80 | interrupts = <0 165 4>; | ||
81 | cap-sd-highspeed; | ||
82 | status = "disabled"; | ||
83 | }; | ||
84 | |||
85 | sdhi1: sdhi@ee120000 { | ||
86 | compatible = "renesas,r8a7790-sdhi"; | ||
87 | reg = <0 0xee120000 0 0x100>; | ||
88 | interrupt-parent = <&gic>; | ||
89 | interrupts = <0 166 4>; | ||
90 | cap-sd-highspeed; | ||
91 | status = "disabled"; | ||
92 | }; | ||
93 | |||
94 | sdhi2: sdhi@ee140000 { | ||
95 | compatible = "renesas,r8a7790-sdhi"; | ||
96 | reg = <0 0xee140000 0 0x100>; | ||
97 | interrupt-parent = <&gic>; | ||
98 | interrupts = <0 167 4>; | ||
99 | cap-sd-highspeed; | ||
100 | status = "disabled"; | ||
101 | }; | ||
102 | |||
103 | sdhi3: sdhi@ee160000 { | ||
104 | compatible = "renesas,r8a7790-sdhi"; | ||
105 | reg = <0 0xee160000 0 0x100>; | ||
106 | interrupt-parent = <&gic>; | ||
107 | interrupts = <0 168 4>; | ||
108 | cap-sd-highspeed; | ||
109 | status = "disabled"; | ||
110 | }; | ||
57 | }; | 111 | }; |
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts index d2803be4e1a8..759b0cd20013 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | |||
@@ -125,6 +125,12 @@ | |||
125 | clock-names = "apb_pclk"; | 125 | clock-names = "apb_pclk"; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | scc@7fff0000 { | ||
129 | compatible = "arm,vexpress-scc,v2p-ca15_a7", "arm,vexpress-scc"; | ||
130 | reg = <0 0x7fff0000 0 0x1000>; | ||
131 | interrupts = <0 95 4>; | ||
132 | }; | ||
133 | |||
128 | timer { | 134 | timer { |
129 | compatible = "arm,armv7-timer"; | 135 | compatible = "arm,armv7-timer"; |
130 | interrupts = <1 13 0xf08>, | 136 | interrupts = <1 13 0xf08>, |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 00247c771313..bc22056200ae 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -27,6 +27,22 @@ | |||
27 | #include <plat/time.h> | 27 | #include <plat/time.h> |
28 | #include "common.h" | 28 | #include "common.h" |
29 | 29 | ||
30 | /* These can go away once Dove uses the mvebu-mbus DT binding */ | ||
31 | #define DOVE_MBUS_PCIE0_MEM_TARGET 0x4 | ||
32 | #define DOVE_MBUS_PCIE0_MEM_ATTR 0xe8 | ||
33 | #define DOVE_MBUS_PCIE0_IO_TARGET 0x4 | ||
34 | #define DOVE_MBUS_PCIE0_IO_ATTR 0xe0 | ||
35 | #define DOVE_MBUS_PCIE1_MEM_TARGET 0x8 | ||
36 | #define DOVE_MBUS_PCIE1_MEM_ATTR 0xe8 | ||
37 | #define DOVE_MBUS_PCIE1_IO_TARGET 0x8 | ||
38 | #define DOVE_MBUS_PCIE1_IO_ATTR 0xe0 | ||
39 | #define DOVE_MBUS_CESA_TARGET 0x3 | ||
40 | #define DOVE_MBUS_CESA_ATTR 0x1 | ||
41 | #define DOVE_MBUS_BOOTROM_TARGET 0x1 | ||
42 | #define DOVE_MBUS_BOOTROM_ATTR 0xfd | ||
43 | #define DOVE_MBUS_SCRATCHPAD_TARGET 0xd | ||
44 | #define DOVE_MBUS_SCRATCHPAD_ATTR 0x0 | ||
45 | |||
30 | /***************************************************************************** | 46 | /***************************************************************************** |
31 | * I/O Address Mapping | 47 | * I/O Address Mapping |
32 | ****************************************************************************/ | 48 | ****************************************************************************/ |
@@ -332,34 +348,40 @@ void __init dove_setup_cpu_wins(void) | |||
332 | { | 348 | { |
333 | /* | 349 | /* |
334 | * The PCIe windows will no longer be statically allocated | 350 | * The PCIe windows will no longer be statically allocated |
335 | * here once Dove is migrated to the pci-mvebu driver. | 351 | * here once Dove is migrated to the pci-mvebu driver. The |
352 | * non-PCIe windows will no longer be created here once Dove | ||
353 | * fully moves to DT. | ||
336 | */ | 354 | */ |
337 | mvebu_mbus_add_window_remap_flags("pcie0.0", | 355 | mvebu_mbus_add_window_remap_by_id(DOVE_MBUS_PCIE0_IO_TARGET, |
356 | DOVE_MBUS_PCIE0_IO_ATTR, | ||
338 | DOVE_PCIE0_IO_PHYS_BASE, | 357 | DOVE_PCIE0_IO_PHYS_BASE, |
339 | DOVE_PCIE0_IO_SIZE, | 358 | DOVE_PCIE0_IO_SIZE, |
340 | DOVE_PCIE0_IO_BUS_BASE, | 359 | DOVE_PCIE0_IO_BUS_BASE); |
341 | MVEBU_MBUS_PCI_IO); | 360 | mvebu_mbus_add_window_remap_by_id(DOVE_MBUS_PCIE1_IO_TARGET, |
342 | mvebu_mbus_add_window_remap_flags("pcie1.0", | 361 | DOVE_MBUS_PCIE1_IO_ATTR, |
343 | DOVE_PCIE1_IO_PHYS_BASE, | 362 | DOVE_PCIE1_IO_PHYS_BASE, |
344 | DOVE_PCIE1_IO_SIZE, | 363 | DOVE_PCIE1_IO_SIZE, |
345 | DOVE_PCIE1_IO_BUS_BASE, | 364 | DOVE_PCIE1_IO_BUS_BASE); |
346 | MVEBU_MBUS_PCI_IO); | 365 | mvebu_mbus_add_window_by_id(DOVE_MBUS_PCIE0_MEM_TARGET, |
347 | mvebu_mbus_add_window_remap_flags("pcie0.0", | 366 | DOVE_MBUS_PCIE0_MEM_ATTR, |
348 | DOVE_PCIE0_MEM_PHYS_BASE, | 367 | DOVE_PCIE0_MEM_PHYS_BASE, |
349 | DOVE_PCIE0_MEM_SIZE, | 368 | DOVE_PCIE0_MEM_SIZE); |
350 | MVEBU_MBUS_NO_REMAP, | 369 | mvebu_mbus_add_window_by_id(DOVE_MBUS_PCIE1_MEM_TARGET, |
351 | MVEBU_MBUS_PCI_MEM); | 370 | DOVE_MBUS_PCIE1_MEM_ATTR, |
352 | mvebu_mbus_add_window_remap_flags("pcie1.0", | 371 | DOVE_PCIE1_MEM_PHYS_BASE, |
353 | DOVE_PCIE1_MEM_PHYS_BASE, | 372 | DOVE_PCIE1_MEM_SIZE); |
354 | DOVE_PCIE1_MEM_SIZE, | 373 | mvebu_mbus_add_window_by_id(DOVE_MBUS_CESA_TARGET, |
355 | MVEBU_MBUS_NO_REMAP, | 374 | DOVE_MBUS_CESA_ATTR, |
356 | MVEBU_MBUS_PCI_MEM); | 375 | DOVE_CESA_PHYS_BASE, |
357 | mvebu_mbus_add_window("cesa", DOVE_CESA_PHYS_BASE, | 376 | DOVE_CESA_SIZE); |
358 | DOVE_CESA_SIZE); | 377 | mvebu_mbus_add_window_by_id(DOVE_MBUS_BOOTROM_TARGET, |
359 | mvebu_mbus_add_window("bootrom", DOVE_BOOTROM_PHYS_BASE, | 378 | DOVE_MBUS_BOOTROM_ATTR, |
360 | DOVE_BOOTROM_SIZE); | 379 | DOVE_BOOTROM_PHYS_BASE, |
361 | mvebu_mbus_add_window("scratchpad", DOVE_SCRATCHPAD_PHYS_BASE, | 380 | DOVE_BOOTROM_SIZE); |
362 | DOVE_SCRATCHPAD_SIZE); | 381 | mvebu_mbus_add_window_by_id(DOVE_MBUS_SCRATCHPAD_TARGET, |
382 | DOVE_MBUS_SCRATCHPAD_ATTR, | ||
383 | DOVE_SCRATCHPAD_PHYS_BASE, | ||
384 | DOVE_SCRATCHPAD_SIZE); | ||
363 | } | 385 | } |
364 | 386 | ||
365 | void __init dove_init(void) | 387 | void __init dove_init(void) |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 6e122ed3282f..682b7ac8deb8 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -87,6 +87,7 @@ static void __init kirkwood_dt_init(void) | |||
87 | */ | 87 | */ |
88 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); | 88 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); |
89 | 89 | ||
90 | BUG_ON(mvebu_mbus_dt_init()); | ||
90 | kirkwood_setup_wins(); | 91 | kirkwood_setup_wins(); |
91 | 92 | ||
92 | kirkwood_l2_init(); | 93 | kirkwood_l2_init(); |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index e9238b5567ee..15b7e72e890b 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -37,6 +37,12 @@ | |||
37 | #include <linux/platform_data/dma-mv_xor.h> | 37 | #include <linux/platform_data/dma-mv_xor.h> |
38 | #include "common.h" | 38 | #include "common.h" |
39 | 39 | ||
40 | /* These can go away once Kirkwood uses the mvebu-mbus DT binding */ | ||
41 | #define KIRKWOOD_MBUS_NAND_TARGET 0x01 | ||
42 | #define KIRKWOOD_MBUS_NAND_ATTR 0x2f | ||
43 | #define KIRKWOOD_MBUS_SRAM_TARGET 0x03 | ||
44 | #define KIRKWOOD_MBUS_SRAM_ATTR 0x01 | ||
45 | |||
40 | /***************************************************************************** | 46 | /***************************************************************************** |
41 | * I/O Address Mapping | 47 | * I/O Address Mapping |
42 | ****************************************************************************/ | 48 | ****************************************************************************/ |
@@ -528,10 +534,6 @@ void __init kirkwood_cpuidle_init(void) | |||
528 | void __init kirkwood_init_early(void) | 534 | void __init kirkwood_init_early(void) |
529 | { | 535 | { |
530 | orion_time_set_base(TIMER_VIRT_BASE); | 536 | orion_time_set_base(TIMER_VIRT_BASE); |
531 | |||
532 | mvebu_mbus_init("marvell,kirkwood-mbus", | ||
533 | BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, | ||
534 | DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); | ||
535 | } | 537 | } |
536 | 538 | ||
537 | int kirkwood_tclk; | 539 | int kirkwood_tclk; |
@@ -672,10 +674,14 @@ char * __init kirkwood_id(void) | |||
672 | 674 | ||
673 | void __init kirkwood_setup_wins(void) | 675 | void __init kirkwood_setup_wins(void) |
674 | { | 676 | { |
675 | mvebu_mbus_add_window("nand", KIRKWOOD_NAND_MEM_PHYS_BASE, | 677 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_NAND_TARGET, |
676 | KIRKWOOD_NAND_MEM_SIZE); | 678 | KIRKWOOD_MBUS_NAND_ATTR, |
677 | mvebu_mbus_add_window("sram", KIRKWOOD_SRAM_PHYS_BASE, | 679 | KIRKWOOD_NAND_MEM_PHYS_BASE, |
678 | KIRKWOOD_SRAM_SIZE); | 680 | KIRKWOOD_NAND_MEM_SIZE); |
681 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_SRAM_TARGET, | ||
682 | KIRKWOOD_MBUS_SRAM_ATTR, | ||
683 | KIRKWOOD_SRAM_PHYS_BASE, | ||
684 | KIRKWOOD_SRAM_SIZE); | ||
679 | } | 685 | } |
680 | 686 | ||
681 | void __init kirkwood_l2_init(void) | 687 | void __init kirkwood_l2_init(void) |
@@ -703,6 +709,10 @@ void __init kirkwood_init(void) | |||
703 | */ | 709 | */ |
704 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); | 710 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); |
705 | 711 | ||
712 | BUG_ON(mvebu_mbus_init("marvell,kirkwood-mbus", | ||
713 | BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, | ||
714 | DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ)); | ||
715 | |||
706 | kirkwood_setup_wins(); | 716 | kirkwood_setup_wins(); |
707 | 717 | ||
708 | kirkwood_l2_init(); | 718 | kirkwood_l2_init(); |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index ddcb09f5bdd3..12d86f39f380 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -20,6 +20,16 @@ | |||
20 | #include <mach/bridge-regs.h> | 20 | #include <mach/bridge-regs.h> |
21 | #include "common.h" | 21 | #include "common.h" |
22 | 22 | ||
23 | /* These can go away once Kirkwood uses the mvebu-mbus DT binding */ | ||
24 | #define KIRKWOOD_MBUS_PCIE0_MEM_TARGET 0x4 | ||
25 | #define KIRKWOOD_MBUS_PCIE0_MEM_ATTR 0xe8 | ||
26 | #define KIRKWOOD_MBUS_PCIE0_IO_TARGET 0x4 | ||
27 | #define KIRKWOOD_MBUS_PCIE0_IO_ATTR 0xe0 | ||
28 | #define KIRKWOOD_MBUS_PCIE1_MEM_TARGET 0x4 | ||
29 | #define KIRKWOOD_MBUS_PCIE1_MEM_ATTR 0xd8 | ||
30 | #define KIRKWOOD_MBUS_PCIE1_IO_TARGET 0x4 | ||
31 | #define KIRKWOOD_MBUS_PCIE1_IO_ATTR 0xd0 | ||
32 | |||
23 | static void kirkwood_enable_pcie_clk(const char *port) | 33 | static void kirkwood_enable_pcie_clk(const char *port) |
24 | { | 34 | { |
25 | struct clk *clk; | 35 | struct clk *clk; |
@@ -254,26 +264,24 @@ static void __init add_pcie_port(int index, void __iomem *base) | |||
254 | 264 | ||
255 | void __init kirkwood_pcie_init(unsigned int portmask) | 265 | void __init kirkwood_pcie_init(unsigned int portmask) |
256 | { | 266 | { |
257 | mvebu_mbus_add_window_remap_flags("pcie0.0", | 267 | mvebu_mbus_add_window_remap_by_id(KIRKWOOD_MBUS_PCIE0_IO_TARGET, |
268 | KIRKWOOD_MBUS_PCIE0_IO_ATTR, | ||
258 | KIRKWOOD_PCIE_IO_PHYS_BASE, | 269 | KIRKWOOD_PCIE_IO_PHYS_BASE, |
259 | KIRKWOOD_PCIE_IO_SIZE, | 270 | KIRKWOOD_PCIE_IO_SIZE, |
260 | KIRKWOOD_PCIE_IO_BUS_BASE, | 271 | KIRKWOOD_PCIE_IO_BUS_BASE); |
261 | MVEBU_MBUS_PCI_IO); | 272 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_PCIE0_MEM_TARGET, |
262 | mvebu_mbus_add_window_remap_flags("pcie0.0", | 273 | KIRKWOOD_MBUS_PCIE0_MEM_ATTR, |
263 | KIRKWOOD_PCIE_MEM_PHYS_BASE, | 274 | KIRKWOOD_PCIE_MEM_PHYS_BASE, |
264 | KIRKWOOD_PCIE_MEM_SIZE, | 275 | KIRKWOOD_PCIE_MEM_SIZE); |
265 | MVEBU_MBUS_NO_REMAP, | 276 | mvebu_mbus_add_window_remap_by_id(KIRKWOOD_MBUS_PCIE1_IO_TARGET, |
266 | MVEBU_MBUS_PCI_MEM); | 277 | KIRKWOOD_MBUS_PCIE1_IO_ATTR, |
267 | mvebu_mbus_add_window_remap_flags("pcie1.0", | ||
268 | KIRKWOOD_PCIE1_IO_PHYS_BASE, | 278 | KIRKWOOD_PCIE1_IO_PHYS_BASE, |
269 | KIRKWOOD_PCIE1_IO_SIZE, | 279 | KIRKWOOD_PCIE1_IO_SIZE, |
270 | KIRKWOOD_PCIE1_IO_BUS_BASE, | 280 | KIRKWOOD_PCIE1_IO_BUS_BASE); |
271 | MVEBU_MBUS_PCI_IO); | 281 | mvebu_mbus_add_window_by_id(KIRKWOOD_MBUS_PCIE1_MEM_TARGET, |
272 | mvebu_mbus_add_window_remap_flags("pcie1.0", | 282 | KIRKWOOD_MBUS_PCIE1_MEM_ATTR, |
273 | KIRKWOOD_PCIE1_MEM_PHYS_BASE, | 283 | KIRKWOOD_PCIE1_MEM_PHYS_BASE, |
274 | KIRKWOOD_PCIE1_MEM_SIZE, | 284 | KIRKWOOD_PCIE1_MEM_SIZE); |
275 | MVEBU_MBUS_NO_REMAP, | ||
276 | MVEBU_MBUS_PCI_MEM); | ||
277 | 285 | ||
278 | vga_base = KIRKWOOD_PCIE_MEM_PHYS_BASE; | 286 | vga_base = KIRKWOOD_PCIE_MEM_PHYS_BASE; |
279 | 287 | ||
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index dc26a654c496..445e553f4a28 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
@@ -18,6 +18,11 @@ | |||
18 | #include <mach/mv78xx0.h> | 18 | #include <mach/mv78xx0.h> |
19 | #include "common.h" | 19 | #include "common.h" |
20 | 20 | ||
21 | #define MV78XX0_MBUS_PCIE_MEM_TARGET(port, lane) ((port) ? 8 : 4) | ||
22 | #define MV78XX0_MBUS_PCIE_MEM_ATTR(port, lane) (0xf8 & ~(0x10 << (lane))) | ||
23 | #define MV78XX0_MBUS_PCIE_IO_TARGET(port, lane) ((port) ? 8 : 4) | ||
24 | #define MV78XX0_MBUS_PCIE_IO_ATTR(port, lane) (0xf0 & ~(0x10 << (lane))) | ||
25 | |||
21 | struct pcie_port { | 26 | struct pcie_port { |
22 | u8 maj; | 27 | u8 maj; |
23 | u8 min; | 28 | u8 min; |
@@ -71,7 +76,6 @@ static void __init mv78xx0_pcie_preinit(void) | |||
71 | start = MV78XX0_PCIE_MEM_PHYS_BASE; | 76 | start = MV78XX0_PCIE_MEM_PHYS_BASE; |
72 | for (i = 0; i < num_pcie_ports; i++) { | 77 | for (i = 0; i < num_pcie_ports; i++) { |
73 | struct pcie_port *pp = pcie_port + i; | 78 | struct pcie_port *pp = pcie_port + i; |
74 | char winname[MVEBU_MBUS_MAX_WINNAME_SZ]; | ||
75 | 79 | ||
76 | snprintf(pp->mem_space_name, sizeof(pp->mem_space_name), | 80 | snprintf(pp->mem_space_name, sizeof(pp->mem_space_name), |
77 | "PCIe %d.%d MEM", pp->maj, pp->min); | 81 | "PCIe %d.%d MEM", pp->maj, pp->min); |
@@ -85,17 +89,12 @@ static void __init mv78xx0_pcie_preinit(void) | |||
85 | if (request_resource(&iomem_resource, &pp->res)) | 89 | if (request_resource(&iomem_resource, &pp->res)) |
86 | panic("can't allocate PCIe MEM sub-space"); | 90 | panic("can't allocate PCIe MEM sub-space"); |
87 | 91 | ||
88 | snprintf(winname, sizeof(winname), "pcie%d.%d", | 92 | mvebu_mbus_add_window_by_id(MV78XX0_MBUS_PCIE_MEM_TARGET(pp->maj, pp->min), |
89 | pp->maj, pp->min); | 93 | MV78XX0_MBUS_PCIE_MEM_ATTR(pp->maj, pp->min), |
90 | 94 | pp->res.start, resource_size(&pp->res)); | |
91 | mvebu_mbus_add_window_remap_flags(winname, | 95 | mvebu_mbus_add_window_remap_by_id(MV78XX0_MBUS_PCIE_IO_TARGET(pp->maj, pp->min), |
92 | pp->res.start, | 96 | MV78XX0_MBUS_PCIE_IO_ATTR(pp->maj, pp->min), |
93 | resource_size(&pp->res), | 97 | i * SZ_64K, SZ_64K, 0); |
94 | MVEBU_MBUS_NO_REMAP, | ||
95 | MVEBU_MBUS_PCI_MEM); | ||
96 | mvebu_mbus_add_window_remap_flags(winname, | ||
97 | i * SZ_64K, SZ_64K, | ||
98 | 0, MVEBU_MBUS_PCI_IO); | ||
99 | } | 98 | } |
100 | } | 99 | } |
101 | 100 | ||
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index 97cbb8021919..829b57306328 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c | |||
@@ -34,44 +34,12 @@ static void __init armada_370_xp_map_io(void) | |||
34 | debug_ll_io_init(); | 34 | debug_ll_io_init(); |
35 | } | 35 | } |
36 | 36 | ||
37 | /* | ||
38 | * This initialization will be replaced by a DT-based | ||
39 | * initialization once the mvebu-mbus driver gains DT support. | ||
40 | */ | ||
41 | |||
42 | #define ARMADA_370_XP_MBUS_WINS_OFFS 0x20000 | ||
43 | #define ARMADA_370_XP_MBUS_WINS_SIZE 0x100 | ||
44 | #define ARMADA_370_XP_SDRAM_WINS_OFFS 0x20180 | ||
45 | #define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20 | ||
46 | |||
47 | static void __init armada_370_xp_mbus_init(void) | ||
48 | { | ||
49 | char *mbus_soc_name; | ||
50 | struct device_node *dn; | ||
51 | const __be32 mbus_wins_offs = cpu_to_be32(ARMADA_370_XP_MBUS_WINS_OFFS); | ||
52 | const __be32 sdram_wins_offs = cpu_to_be32(ARMADA_370_XP_SDRAM_WINS_OFFS); | ||
53 | |||
54 | if (of_machine_is_compatible("marvell,armada370")) | ||
55 | mbus_soc_name = "marvell,armada370-mbus"; | ||
56 | else | ||
57 | mbus_soc_name = "marvell,armadaxp-mbus"; | ||
58 | |||
59 | dn = of_find_node_by_name(NULL, "internal-regs"); | ||
60 | BUG_ON(!dn); | ||
61 | |||
62 | mvebu_mbus_init(mbus_soc_name, | ||
63 | of_translate_address(dn, &mbus_wins_offs), | ||
64 | ARMADA_370_XP_MBUS_WINS_SIZE, | ||
65 | of_translate_address(dn, &sdram_wins_offs), | ||
66 | ARMADA_370_XP_SDRAM_WINS_SIZE); | ||
67 | } | ||
68 | |||
69 | static void __init armada_370_xp_timer_and_clk_init(void) | 37 | static void __init armada_370_xp_timer_and_clk_init(void) |
70 | { | 38 | { |
71 | of_clk_init(NULL); | 39 | of_clk_init(NULL); |
72 | armada_370_xp_timer_init(); | 40 | armada_370_xp_timer_init(); |
73 | coherency_init(); | 41 | coherency_init(); |
74 | armada_370_xp_mbus_init(); | 42 | BUG_ON(mvebu_mbus_dt_init()); |
75 | #ifdef CONFIG_CACHE_L2X0 | 43 | #ifdef CONFIG_CACHE_L2X0 |
76 | l2x0_of_init(0, ~0UL); | 44 | l2x0_of_init(0, ~0UL); |
77 | #endif | 45 | #endif |
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index ce81d3031405..c6b00fce6d8d 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/of_address.h> | ||
24 | #include <linux/mbus.h> | 25 | #include <linux/mbus.h> |
25 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
26 | #include <asm/smp_plat.h> | 27 | #include <asm/smp_plat.h> |
@@ -29,6 +30,9 @@ | |||
29 | #include "pmsu.h" | 30 | #include "pmsu.h" |
30 | #include "coherency.h" | 31 | #include "coherency.h" |
31 | 32 | ||
33 | #define AXP_BOOTROM_BASE 0xfff00000 | ||
34 | #define AXP_BOOTROM_SIZE 0x100000 | ||
35 | |||
32 | void __init set_secondary_cpus_clock(void) | 36 | void __init set_secondary_cpus_clock(void) |
33 | { | 37 | { |
34 | int thiscpu; | 38 | int thiscpu; |
@@ -114,10 +118,29 @@ static void __init armada_xp_smp_init_cpus(void) | |||
114 | 118 | ||
115 | void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) | 119 | void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) |
116 | { | 120 | { |
121 | struct device_node *node; | ||
122 | struct resource res; | ||
123 | int err; | ||
124 | |||
117 | set_secondary_cpus_clock(); | 125 | set_secondary_cpus_clock(); |
118 | flush_cache_all(); | 126 | flush_cache_all(); |
119 | set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); | 127 | set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); |
120 | mvebu_mbus_add_window("bootrom", 0xfff00000, SZ_1M); | 128 | |
129 | /* | ||
130 | * In order to boot the secondary CPUs we need to ensure | ||
131 | * the bootROM is mapped at the correct address. | ||
132 | */ | ||
133 | node = of_find_compatible_node(NULL, NULL, "marvell,bootrom"); | ||
134 | if (!node) | ||
135 | panic("Cannot find 'marvell,bootrom' compatible node"); | ||
136 | |||
137 | err = of_address_to_resource(node, 0, &res); | ||
138 | if (err < 0) | ||
139 | panic("Cannot get 'bootrom' node address"); | ||
140 | |||
141 | if (res.start != AXP_BOOTROM_BASE || | ||
142 | resource_size(&res) != AXP_BOOTROM_SIZE) | ||
143 | panic("The address for the BootROM is incorrect"); | ||
121 | } | 144 | } |
122 | 145 | ||
123 | struct smp_operations armada_xp_smp_ops __initdata = { | 146 | struct smp_operations armada_xp_smp_ops __initdata = { |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index b41599f98a8e..91a5852b44f3 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -174,8 +174,10 @@ void __init orion5x_xor_init(void) | |||
174 | ****************************************************************************/ | 174 | ****************************************************************************/ |
175 | static void __init orion5x_crypto_init(void) | 175 | static void __init orion5x_crypto_init(void) |
176 | { | 176 | { |
177 | mvebu_mbus_add_window("sram", ORION5X_SRAM_PHYS_BASE, | 177 | mvebu_mbus_add_window_by_id(ORION_MBUS_SRAM_TARGET, |
178 | ORION5X_SRAM_SIZE); | 178 | ORION_MBUS_SRAM_ATTR, |
179 | ORION5X_SRAM_PHYS_BASE, | ||
180 | ORION5X_SRAM_SIZE); | ||
179 | orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, | 181 | orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, |
180 | SZ_8K, IRQ_ORION5X_CESA); | 182 | SZ_8K, IRQ_ORION5X_CESA); |
181 | } | 183 | } |
@@ -222,22 +224,24 @@ void orion5x_setup_wins(void) | |||
222 | * The PCIe windows will no longer be statically allocated | 224 | * The PCIe windows will no longer be statically allocated |
223 | * here once Orion5x is migrated to the pci-mvebu driver. | 225 | * here once Orion5x is migrated to the pci-mvebu driver. |
224 | */ | 226 | */ |
225 | mvebu_mbus_add_window_remap_flags("pcie0.0", ORION5X_PCIE_IO_PHYS_BASE, | 227 | mvebu_mbus_add_window_remap_by_id(ORION_MBUS_PCIE_IO_TARGET, |
228 | ORION_MBUS_PCIE_IO_ATTR, | ||
229 | ORION5X_PCIE_IO_PHYS_BASE, | ||
226 | ORION5X_PCIE_IO_SIZE, | 230 | ORION5X_PCIE_IO_SIZE, |
227 | ORION5X_PCIE_IO_BUS_BASE, | 231 | ORION5X_PCIE_IO_BUS_BASE); |
228 | MVEBU_MBUS_PCI_IO); | 232 | mvebu_mbus_add_window_by_id(ORION_MBUS_PCIE_MEM_TARGET, |
229 | mvebu_mbus_add_window_remap_flags("pcie0.0", ORION5X_PCIE_MEM_PHYS_BASE, | 233 | ORION_MBUS_PCIE_MEM_ATTR, |
230 | ORION5X_PCIE_MEM_SIZE, | 234 | ORION5X_PCIE_MEM_PHYS_BASE, |
231 | MVEBU_MBUS_NO_REMAP, | 235 | ORION5X_PCIE_MEM_SIZE); |
232 | MVEBU_MBUS_PCI_MEM); | 236 | mvebu_mbus_add_window_remap_by_id(ORION_MBUS_PCI_IO_TARGET, |
233 | mvebu_mbus_add_window_remap_flags("pci0.0", ORION5X_PCI_IO_PHYS_BASE, | 237 | ORION_MBUS_PCI_IO_ATTR, |
238 | ORION5X_PCI_IO_PHYS_BASE, | ||
234 | ORION5X_PCI_IO_SIZE, | 239 | ORION5X_PCI_IO_SIZE, |
235 | ORION5X_PCI_IO_BUS_BASE, | 240 | ORION5X_PCI_IO_BUS_BASE); |
236 | MVEBU_MBUS_PCI_IO); | 241 | mvebu_mbus_add_window_by_id(ORION_MBUS_PCI_MEM_TARGET, |
237 | mvebu_mbus_add_window_remap_flags("pci0.0", ORION5X_PCI_MEM_PHYS_BASE, | 242 | ORION_MBUS_PCI_MEM_ATTR, |
238 | ORION5X_PCI_MEM_SIZE, | 243 | ORION5X_PCI_MEM_PHYS_BASE, |
239 | MVEBU_MBUS_NO_REMAP, | 244 | ORION5X_PCI_MEM_SIZE); |
240 | MVEBU_MBUS_PCI_MEM); | ||
241 | } | 245 | } |
242 | 246 | ||
243 | int orion5x_tclk; | 247 | int orion5x_tclk; |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index a909afb384fb..f565f9944af2 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -7,6 +7,23 @@ struct dsa_platform_data; | |||
7 | struct mv643xx_eth_platform_data; | 7 | struct mv643xx_eth_platform_data; |
8 | struct mv_sata_platform_data; | 8 | struct mv_sata_platform_data; |
9 | 9 | ||
10 | #define ORION_MBUS_PCIE_MEM_TARGET 0x04 | ||
11 | #define ORION_MBUS_PCIE_MEM_ATTR 0x59 | ||
12 | #define ORION_MBUS_PCIE_IO_TARGET 0x04 | ||
13 | #define ORION_MBUS_PCIE_IO_ATTR 0x51 | ||
14 | #define ORION_MBUS_PCIE_WA_TARGET 0x04 | ||
15 | #define ORION_MBUS_PCIE_WA_ATTR 0x79 | ||
16 | #define ORION_MBUS_PCI_MEM_TARGET 0x03 | ||
17 | #define ORION_MBUS_PCI_MEM_ATTR 0x59 | ||
18 | #define ORION_MBUS_PCI_IO_TARGET 0x03 | ||
19 | #define ORION_MBUS_PCI_IO_ATTR 0x51 | ||
20 | #define ORION_MBUS_DEVBUS_BOOT_TARGET 0x01 | ||
21 | #define ORION_MBUS_DEVBUS_BOOT_ATTR 0x0f | ||
22 | #define ORION_MBUS_DEVBUS_TARGET(cs) 0x01 | ||
23 | #define ORION_MBUS_DEVBUS_ATTR(cs) (~(1 << cs)) | ||
24 | #define ORION_MBUS_SRAM_TARGET 0x00 | ||
25 | #define ORION_MBUS_SRAM_ATTR 0x00 | ||
26 | |||
10 | /* | 27 | /* |
11 | * Basic Orion init functions used early by machine-setup. | 28 | * Basic Orion init functions used early by machine-setup. |
12 | */ | 29 | */ |
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c index 16c88bbabc98..8f68b745c1d5 100644 --- a/arch/arm/mach-orion5x/d2net-setup.c +++ b/arch/arm/mach-orion5x/d2net-setup.c | |||
@@ -317,8 +317,10 @@ static void __init d2net_init(void) | |||
317 | d2net_sata_power_init(); | 317 | d2net_sata_power_init(); |
318 | orion5x_sata_init(&d2net_sata_data); | 318 | orion5x_sata_init(&d2net_sata_data); |
319 | 319 | ||
320 | mvebu_mbus_add_window("devbus-boot", D2NET_NOR_BOOT_BASE, | 320 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
321 | D2NET_NOR_BOOT_SIZE); | 321 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
322 | D2NET_NOR_BOOT_BASE, | ||
323 | D2NET_NOR_BOOT_SIZE); | ||
322 | platform_device_register(&d2net_nor_flash); | 324 | platform_device_register(&d2net_nor_flash); |
323 | 325 | ||
324 | platform_device_register(&d2net_gpio_buttons); | 326 | platform_device_register(&d2net_gpio_buttons); |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index 4e1263da38bb..4b2aefd1d961 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -340,19 +340,27 @@ static void __init db88f5281_init(void) | |||
340 | orion5x_uart0_init(); | 340 | orion5x_uart0_init(); |
341 | orion5x_uart1_init(); | 341 | orion5x_uart1_init(); |
342 | 342 | ||
343 | mvebu_mbus_add_window("devbus-boot", DB88F5281_NOR_BOOT_BASE, | 343 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
344 | DB88F5281_NOR_BOOT_SIZE); | 344 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
345 | DB88F5281_NOR_BOOT_BASE, | ||
346 | DB88F5281_NOR_BOOT_SIZE); | ||
345 | platform_device_register(&db88f5281_boot_flash); | 347 | platform_device_register(&db88f5281_boot_flash); |
346 | 348 | ||
347 | mvebu_mbus_add_window("devbus-cs0", DB88F5281_7SEG_BASE, | 349 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(0), |
348 | DB88F5281_7SEG_SIZE); | 350 | ORION_MBUS_DEVBUS_ATTR(0), |
351 | DB88F5281_7SEG_BASE, | ||
352 | DB88F5281_7SEG_SIZE); | ||
349 | 353 | ||
350 | mvebu_mbus_add_window("devbus-cs1", DB88F5281_NOR_BASE, | 354 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(1), |
351 | DB88F5281_NOR_SIZE); | 355 | ORION_MBUS_DEVBUS_ATTR(1), |
356 | DB88F5281_NOR_BASE, | ||
357 | DB88F5281_NOR_SIZE); | ||
352 | platform_device_register(&db88f5281_nor_flash); | 358 | platform_device_register(&db88f5281_nor_flash); |
353 | 359 | ||
354 | mvebu_mbus_add_window("devbus-cs2", DB88F5281_NAND_BASE, | 360 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(2), |
355 | DB88F5281_NAND_SIZE); | 361 | ORION_MBUS_DEVBUS_ATTR(2), |
362 | DB88F5281_NAND_BASE, | ||
363 | DB88F5281_NAND_SIZE); | ||
356 | platform_device_register(&db88f5281_nand_flash); | 364 | platform_device_register(&db88f5281_nand_flash); |
357 | 365 | ||
358 | i2c_register_board_info(0, &db88f5281_i2c_rtc, 1); | 366 | i2c_register_board_info(0, &db88f5281_i2c_rtc, 1); |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 9e6baf581ed3..70974732cbf0 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -611,8 +611,10 @@ static void __init dns323_init(void) | |||
611 | /* setup flash mapping | 611 | /* setup flash mapping |
612 | * CS3 holds a 8 MB Spansion S29GL064M90TFIR4 | 612 | * CS3 holds a 8 MB Spansion S29GL064M90TFIR4 |
613 | */ | 613 | */ |
614 | mvebu_mbus_add_window("devbus-boot", DNS323_NOR_BOOT_BASE, | 614 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
615 | DNS323_NOR_BOOT_SIZE); | 615 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
616 | DNS323_NOR_BOOT_BASE, | ||
617 | DNS323_NOR_BOOT_SIZE); | ||
616 | platform_device_register(&dns323_nor_flash); | 618 | platform_device_register(&dns323_nor_flash); |
617 | 619 | ||
618 | /* Sort out LEDs, Buttons and i2c devices */ | 620 | /* Sort out LEDs, Buttons and i2c devices */ |
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c index 147615510dd0..0fc33c56cbb7 100644 --- a/arch/arm/mach-orion5x/edmini_v2-setup.c +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c | |||
@@ -154,8 +154,10 @@ void __init edmini_v2_init(void) | |||
154 | orion5x_ehci0_init(); | 154 | orion5x_ehci0_init(); |
155 | orion5x_eth_init(&edmini_v2_eth_data); | 155 | orion5x_eth_init(&edmini_v2_eth_data); |
156 | 156 | ||
157 | mvebu_mbus_add_window("devbus-boot", EDMINI_V2_NOR_BOOT_BASE, | 157 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
158 | EDMINI_V2_NOR_BOOT_SIZE); | 158 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
159 | EDMINI_V2_NOR_BOOT_BASE, | ||
160 | EDMINI_V2_NOR_BOOT_SIZE); | ||
159 | platform_device_register(&edmini_v2_nor_flash); | 161 | platform_device_register(&edmini_v2_nor_flash); |
160 | 162 | ||
161 | pr_notice("edmini_v2: USB device port, flash write and power-off " | 163 | pr_notice("edmini_v2: USB device port, flash write and power-off " |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index aae10e4a917c..fe6a48a325e8 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -359,13 +359,17 @@ static void __init kurobox_pro_init(void) | |||
359 | orion5x_uart1_init(); | 359 | orion5x_uart1_init(); |
360 | orion5x_xor_init(); | 360 | orion5x_xor_init(); |
361 | 361 | ||
362 | mvebu_mbus_add_window("devbus-boot", KUROBOX_PRO_NOR_BOOT_BASE, | 362 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
363 | KUROBOX_PRO_NOR_BOOT_SIZE); | 363 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
364 | KUROBOX_PRO_NOR_BOOT_BASE, | ||
365 | KUROBOX_PRO_NOR_BOOT_SIZE); | ||
364 | platform_device_register(&kurobox_pro_nor_flash); | 366 | platform_device_register(&kurobox_pro_nor_flash); |
365 | 367 | ||
366 | if (machine_is_kurobox_pro()) { | 368 | if (machine_is_kurobox_pro()) { |
367 | mvebu_mbus_add_window("devbus-cs0", KUROBOX_PRO_NAND_BASE, | 369 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(0), |
368 | KUROBOX_PRO_NAND_SIZE); | 370 | ORION_MBUS_DEVBUS_ATTR(0), |
371 | KUROBOX_PRO_NAND_BASE, | ||
372 | KUROBOX_PRO_NAND_SIZE); | ||
369 | platform_device_register(&kurobox_pro_nand_flash); | 373 | platform_device_register(&kurobox_pro_nand_flash); |
370 | } | 374 | } |
371 | 375 | ||
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c index 6234977b5aea..028ea038d404 100644 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ b/arch/arm/mach-orion5x/ls-chl-setup.c | |||
@@ -294,8 +294,10 @@ static void __init lschl_init(void) | |||
294 | orion5x_uart0_init(); | 294 | orion5x_uart0_init(); |
295 | orion5x_xor_init(); | 295 | orion5x_xor_init(); |
296 | 296 | ||
297 | mvebu_mbus_add_window("devbus-boot", LSCHL_NOR_BOOT_BASE, | 297 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
298 | LSCHL_NOR_BOOT_SIZE); | 298 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
299 | LSCHL_NOR_BOOT_BASE, | ||
300 | LSCHL_NOR_BOOT_SIZE); | ||
299 | platform_device_register(&lschl_nor_flash); | 301 | platform_device_register(&lschl_nor_flash); |
300 | 302 | ||
301 | platform_device_register(&lschl_leds); | 303 | platform_device_register(&lschl_leds); |
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index fe04c4b64569..32b7129b767d 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c | |||
@@ -243,8 +243,10 @@ static void __init ls_hgl_init(void) | |||
243 | orion5x_uart0_init(); | 243 | orion5x_uart0_init(); |
244 | orion5x_xor_init(); | 244 | orion5x_xor_init(); |
245 | 245 | ||
246 | mvebu_mbus_add_window("devbus-boot", LS_HGL_NOR_BOOT_BASE, | 246 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
247 | LS_HGL_NOR_BOOT_SIZE); | 247 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
248 | LS_HGL_NOR_BOOT_BASE, | ||
249 | LS_HGL_NOR_BOOT_SIZE); | ||
248 | platform_device_register(&ls_hgl_nor_flash); | 250 | platform_device_register(&ls_hgl_nor_flash); |
249 | 251 | ||
250 | platform_device_register(&ls_hgl_button_device); | 252 | platform_device_register(&ls_hgl_button_device); |
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c index ca4dbe973daf..a6493e76f96d 100644 --- a/arch/arm/mach-orion5x/lsmini-setup.c +++ b/arch/arm/mach-orion5x/lsmini-setup.c | |||
@@ -244,8 +244,10 @@ static void __init lsmini_init(void) | |||
244 | orion5x_uart0_init(); | 244 | orion5x_uart0_init(); |
245 | orion5x_xor_init(); | 245 | orion5x_xor_init(); |
246 | 246 | ||
247 | mvebu_mbus_add_window("devbus-boot", LSMINI_NOR_BOOT_BASE, | 247 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
248 | LSMINI_NOR_BOOT_SIZE); | 248 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
249 | LSMINI_NOR_BOOT_BASE, | ||
250 | LSMINI_NOR_BOOT_SIZE); | ||
249 | platform_device_register(&lsmini_nor_flash); | 251 | platform_device_register(&lsmini_nor_flash); |
250 | 252 | ||
251 | platform_device_register(&lsmini_button_device); | 253 | platform_device_register(&lsmini_button_device); |
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 827acbafc9dc..e105130ba51c 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -241,8 +241,10 @@ static void __init mss2_init(void) | |||
241 | orion5x_uart0_init(); | 241 | orion5x_uart0_init(); |
242 | orion5x_xor_init(); | 242 | orion5x_xor_init(); |
243 | 243 | ||
244 | mvebu_mbus_add_window("devbus-boot", MSS2_NOR_BOOT_BASE, | 244 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
245 | MSS2_NOR_BOOT_SIZE); | 245 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
246 | MSS2_NOR_BOOT_BASE, | ||
247 | MSS2_NOR_BOOT_SIZE); | ||
246 | platform_device_register(&mss2_nor_flash); | 248 | platform_device_register(&mss2_nor_flash); |
247 | 249 | ||
248 | platform_device_register(&mss2_button_device); | 250 | platform_device_register(&mss2_button_device); |
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index 92600ae2b4b6..e032f01da49e 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c | |||
@@ -204,8 +204,10 @@ static void __init mv2120_init(void) | |||
204 | orion5x_uart0_init(); | 204 | orion5x_uart0_init(); |
205 | orion5x_xor_init(); | 205 | orion5x_xor_init(); |
206 | 206 | ||
207 | mvebu_mbus_add_window("devbus-boot", MV2120_NOR_BOOT_BASE, | 207 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
208 | MV2120_NOR_BOOT_SIZE); | 208 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
209 | MV2120_NOR_BOOT_BASE, | ||
210 | MV2120_NOR_BOOT_SIZE); | ||
209 | platform_device_register(&mv2120_nor_flash); | 211 | platform_device_register(&mv2120_nor_flash); |
210 | 212 | ||
211 | platform_device_register(&mv2120_button_device); | 213 | platform_device_register(&mv2120_button_device); |
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index dd0641a0d074..ba73dc7ffb9e 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c | |||
@@ -397,8 +397,10 @@ static void __init net2big_init(void) | |||
397 | net2big_sata_power_init(); | 397 | net2big_sata_power_init(); |
398 | orion5x_sata_init(&net2big_sata_data); | 398 | orion5x_sata_init(&net2big_sata_data); |
399 | 399 | ||
400 | mvebu_mbus_add_window("devbus-boot", NET2BIG_NOR_BOOT_BASE, | 400 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
401 | NET2BIG_NOR_BOOT_SIZE); | 401 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
402 | NET2BIG_NOR_BOOT_BASE, | ||
403 | NET2BIG_NOR_BOOT_SIZE); | ||
402 | platform_device_register(&net2big_nor_flash); | 404 | platform_device_register(&net2big_nor_flash); |
403 | 405 | ||
404 | platform_device_register(&net2big_gpio_buttons); | 406 | platform_device_register(&net2big_gpio_buttons); |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 503368023bb1..7fab67053030 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -157,11 +157,10 @@ static int __init pcie_setup(struct pci_sys_data *sys) | |||
157 | if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) { | 157 | if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) { |
158 | printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config " | 158 | printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config " |
159 | "read transaction workaround\n"); | 159 | "read transaction workaround\n"); |
160 | mvebu_mbus_add_window_remap_flags("pcie0.0", | 160 | mvebu_mbus_add_window_by_id(ORION_MBUS_PCIE_WA_TARGET, |
161 | ORION5X_PCIE_WA_PHYS_BASE, | 161 | ORION_MBUS_PCIE_WA_ATTR, |
162 | ORION5X_PCIE_WA_SIZE, | 162 | ORION5X_PCIE_WA_PHYS_BASE, |
163 | MVEBU_MBUS_NO_REMAP, | 163 | ORION5X_PCIE_WA_SIZE); |
164 | MVEBU_MBUS_PCI_WA); | ||
165 | pcie_ops.read = pcie_rd_conf_wa; | 164 | pcie_ops.read = pcie_rd_conf_wa; |
166 | } | 165 | } |
167 | 166 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 1c4498bf650a..213b3e143c57 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -123,8 +123,10 @@ static void __init rd88f5181l_fxo_init(void) | |||
123 | orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); | 123 | orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); |
124 | orion5x_uart0_init(); | 124 | orion5x_uart0_init(); |
125 | 125 | ||
126 | mvebu_mbus_add_window("devbus-boot", RD88F5181L_FXO_NOR_BOOT_BASE, | 126 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
127 | RD88F5181L_FXO_NOR_BOOT_SIZE); | 127 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
128 | RD88F5181L_FXO_NOR_BOOT_BASE, | ||
129 | RD88F5181L_FXO_NOR_BOOT_SIZE); | ||
128 | platform_device_register(&rd88f5181l_fxo_nor_boot_flash); | 130 | platform_device_register(&rd88f5181l_fxo_nor_boot_flash); |
129 | } | 131 | } |
130 | 132 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index adabe34c4fc6..594800e1d691 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -130,8 +130,10 @@ static void __init rd88f5181l_ge_init(void) | |||
130 | orion5x_i2c_init(); | 130 | orion5x_i2c_init(); |
131 | orion5x_uart0_init(); | 131 | orion5x_uart0_init(); |
132 | 132 | ||
133 | mvebu_mbus_add_window("devbus-boot", RD88F5181L_GE_NOR_BOOT_BASE, | 133 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
134 | RD88F5181L_GE_NOR_BOOT_SIZE); | 134 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
135 | RD88F5181L_GE_NOR_BOOT_BASE, | ||
136 | RD88F5181L_GE_NOR_BOOT_SIZE); | ||
135 | platform_device_register(&rd88f5181l_ge_nor_boot_flash); | 137 | platform_device_register(&rd88f5181l_ge_nor_boot_flash); |
136 | 138 | ||
137 | i2c_register_board_info(0, &rd88f5181l_ge_i2c_rtc, 1); | 139 | i2c_register_board_info(0, &rd88f5181l_ge_i2c_rtc, 1); |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 66e77ec91532..b1cf68493ffc 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -264,11 +264,14 @@ static void __init rd88f5182_init(void) | |||
264 | orion5x_uart0_init(); | 264 | orion5x_uart0_init(); |
265 | orion5x_xor_init(); | 265 | orion5x_xor_init(); |
266 | 266 | ||
267 | mvebu_mbus_add_window("devbus-boot", RD88F5182_NOR_BOOT_BASE, | 267 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
268 | RD88F5182_NOR_BOOT_SIZE); | 268 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
269 | 269 | RD88F5182_NOR_BOOT_BASE, | |
270 | mvebu_mbus_add_window("devbus-cs1", RD88F5182_NOR_BASE, | 270 | RD88F5182_NOR_BOOT_SIZE); |
271 | RD88F5182_NOR_SIZE); | 271 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(1), |
272 | ORION_MBUS_DEVBUS_ATTR(1), | ||
273 | RD88F5182_NOR_BASE, | ||
274 | RD88F5182_NOR_SIZE); | ||
272 | platform_device_register(&rd88f5182_nor_flash); | 275 | platform_device_register(&rd88f5182_nor_flash); |
273 | platform_device_register(&rd88f5182_gpio_leds); | 276 | platform_device_register(&rd88f5182_gpio_leds); |
274 | 277 | ||
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index a0bfa53e7556..7e9064844698 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -329,8 +329,10 @@ static void __init tsp2_init(void) | |||
329 | /* | 329 | /* |
330 | * Configure peripherals. | 330 | * Configure peripherals. |
331 | */ | 331 | */ |
332 | mvebu_mbus_add_window("devbus-boot", TSP2_NOR_BOOT_BASE, | 332 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
333 | TSP2_NOR_BOOT_SIZE); | 333 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
334 | TSP2_NOR_BOOT_BASE, | ||
335 | TSP2_NOR_BOOT_SIZE); | ||
334 | platform_device_register(&tsp2_nor_flash); | 336 | platform_device_register(&tsp2_nor_flash); |
335 | 337 | ||
336 | orion5x_ehci0_init(); | 338 | orion5x_ehci0_init(); |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 80174f0f168e..e90c0618fdad 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -286,8 +286,10 @@ static void __init qnap_ts209_init(void) | |||
286 | /* | 286 | /* |
287 | * Configure peripherals. | 287 | * Configure peripherals. |
288 | */ | 288 | */ |
289 | mvebu_mbus_add_window("devbus-boot", QNAP_TS209_NOR_BOOT_BASE, | 289 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
290 | QNAP_TS209_NOR_BOOT_SIZE); | 290 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
291 | QNAP_TS209_NOR_BOOT_BASE, | ||
292 | QNAP_TS209_NOR_BOOT_SIZE); | ||
291 | platform_device_register(&qnap_ts209_nor_flash); | 293 | platform_device_register(&qnap_ts209_nor_flash); |
292 | 294 | ||
293 | orion5x_ehci0_init(); | 295 | orion5x_ehci0_init(); |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 92592790d6da..5c079d312015 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -277,8 +277,10 @@ static void __init qnap_ts409_init(void) | |||
277 | /* | 277 | /* |
278 | * Configure peripherals. | 278 | * Configure peripherals. |
279 | */ | 279 | */ |
280 | mvebu_mbus_add_window("devbus-boot", QNAP_TS409_NOR_BOOT_BASE, | 280 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
281 | QNAP_TS409_NOR_BOOT_SIZE); | 281 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
282 | QNAP_TS409_NOR_BOOT_BASE, | ||
283 | QNAP_TS409_NOR_BOOT_SIZE); | ||
282 | platform_device_register(&qnap_ts409_nor_flash); | 284 | platform_device_register(&qnap_ts409_nor_flash); |
283 | 285 | ||
284 | orion5x_ehci0_init(); | 286 | orion5x_ehci0_init(); |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 6b84863c018d..80a56ee245b3 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -127,8 +127,10 @@ static void __init wnr854t_init(void) | |||
127 | orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); | 127 | orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); |
128 | orion5x_uart0_init(); | 128 | orion5x_uart0_init(); |
129 | 129 | ||
130 | mvebu_mbus_add_window("devbus-boot", WNR854T_NOR_BOOT_BASE, | 130 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
131 | WNR854T_NOR_BOOT_SIZE); | 131 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
132 | WNR854T_NOR_BOOT_BASE, | ||
133 | WNR854T_NOR_BOOT_SIZE); | ||
132 | platform_device_register(&wnr854t_nor_flash); | 134 | platform_device_register(&wnr854t_nor_flash); |
133 | } | 135 | } |
134 | 136 | ||
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index fae684bc54f2..670e30dc0d1b 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -213,8 +213,10 @@ static void __init wrt350n_v2_init(void) | |||
213 | orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); | 213 | orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); |
214 | orion5x_uart0_init(); | 214 | orion5x_uart0_init(); |
215 | 215 | ||
216 | mvebu_mbus_add_window("devbus-boot", WRT350N_V2_NOR_BOOT_BASE, | 216 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, |
217 | WRT350N_V2_NOR_BOOT_SIZE); | 217 | ORION_MBUS_DEVBUS_BOOT_ATTR, |
218 | WRT350N_V2_NOR_BOOT_BASE, | ||
219 | WRT350N_V2_NOR_BOOT_SIZE); | ||
218 | platform_device_register(&wrt350n_v2_nor_flash); | 220 | platform_device_register(&wrt350n_v2_nor_flash); |
219 | platform_device_register(&wrt350n_v2_leds); | 221 | platform_device_register(&wrt350n_v2_leds); |
220 | platform_device_register(&wrt350n_v2_button_device); | 222 | platform_device_register(&wrt350n_v2_button_device); |
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c index 02cc34388b05..c4525a88e5da 100644 --- a/arch/arm/mach-prima2/pm.c +++ b/arch/arm/mach-prima2/pm.c | |||
@@ -34,7 +34,10 @@ static void sirfsoc_set_wakeup_source(void) | |||
34 | pwr_trigger_en_reg = sirfsoc_rtc_iobrg_readl(sirfsoc_pwrc_base + | 34 | pwr_trigger_en_reg = sirfsoc_rtc_iobrg_readl(sirfsoc_pwrc_base + |
35 | SIRFSOC_PWRC_TRIGGER_EN); | 35 | SIRFSOC_PWRC_TRIGGER_EN); |
36 | #define X_ON_KEY_B (1 << 0) | 36 | #define X_ON_KEY_B (1 << 0) |
37 | sirfsoc_rtc_iobrg_writel(pwr_trigger_en_reg | X_ON_KEY_B, | 37 | #define RTC_ALARM0_B (1 << 2) |
38 | #define RTC_ALARM1_B (1 << 3) | ||
39 | sirfsoc_rtc_iobrg_writel(pwr_trigger_en_reg | X_ON_KEY_B | | ||
40 | RTC_ALARM0_B | RTC_ALARM1_B, | ||
38 | sirfsoc_pwrc_base + SIRFSOC_PWRC_TRIGGER_EN); | 41 | sirfsoc_pwrc_base + SIRFSOC_PWRC_TRIGGER_EN); |
39 | } | 42 | } |
40 | 43 | ||
@@ -85,12 +88,6 @@ static const struct platform_suspend_ops sirfsoc_pm_ops = { | |||
85 | .valid = suspend_valid_only_mem, | 88 | .valid = suspend_valid_only_mem, |
86 | }; | 89 | }; |
87 | 90 | ||
88 | int __init sirfsoc_pm_init(void) | ||
89 | { | ||
90 | suspend_set_ops(&sirfsoc_pm_ops); | ||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static const struct of_device_id pwrc_ids[] = { | 91 | static const struct of_device_id pwrc_ids[] = { |
95 | { .compatible = "sirf,prima2-pwrc" }, | 92 | { .compatible = "sirf,prima2-pwrc" }, |
96 | {} | 93 | {} |
@@ -118,7 +115,6 @@ static int __init sirfsoc_of_pwrc_init(void) | |||
118 | 115 | ||
119 | return 0; | 116 | return 0; |
120 | } | 117 | } |
121 | postcore_initcall(sirfsoc_of_pwrc_init); | ||
122 | 118 | ||
123 | static const struct of_device_id memc_ids[] = { | 119 | static const struct of_device_id memc_ids[] = { |
124 | { .compatible = "sirf,prima2-memc" }, | 120 | { .compatible = "sirf,prima2-memc" }, |
@@ -149,4 +145,11 @@ static int __init sirfsoc_memc_init(void) | |||
149 | { | 145 | { |
150 | return platform_driver_register(&sirfsoc_memc_driver); | 146 | return platform_driver_register(&sirfsoc_memc_driver); |
151 | } | 147 | } |
152 | postcore_initcall(sirfsoc_memc_init); | 148 | |
149 | int __init sirfsoc_pm_init(void) | ||
150 | { | ||
151 | sirfsoc_of_pwrc_init(); | ||
152 | sirfsoc_memc_init(); | ||
153 | suspend_set_ops(&sirfsoc_pm_ops); | ||
154 | return 0; | ||
155 | } | ||
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 3912ce91fee4..dd80f215feeb 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -23,9 +23,10 @@ config ARCH_R8A73A4 | |||
23 | select ARCH_WANT_OPTIONAL_GPIOLIB | 23 | select ARCH_WANT_OPTIONAL_GPIOLIB |
24 | select ARM_GIC | 24 | select ARM_GIC |
25 | select CPU_V7 | 25 | select CPU_V7 |
26 | select HAVE_ARM_ARCH_TIMER | ||
27 | select SH_CLK_CPG | 26 | select SH_CLK_CPG |
28 | select RENESAS_IRQC | 27 | select RENESAS_IRQC |
28 | select ARCH_HAS_CPUFREQ | ||
29 | select ARCH_HAS_OPP | ||
29 | 30 | ||
30 | config ARCH_R8A7740 | 31 | config ARCH_R8A7740 |
31 | bool "R-Mobile A1 (R8A77400)" | 32 | bool "R-Mobile A1 (R8A77400)" |
@@ -59,7 +60,6 @@ config ARCH_R8A7790 | |||
59 | select ARCH_WANT_OPTIONAL_GPIOLIB | 60 | select ARCH_WANT_OPTIONAL_GPIOLIB |
60 | select ARM_GIC | 61 | select ARM_GIC |
61 | select CPU_V7 | 62 | select CPU_V7 |
62 | select HAVE_ARM_ARCH_TIMER | ||
63 | select SH_CLK_CPG | 63 | select SH_CLK_CPG |
64 | select RENESAS_IRQC | 64 | select RENESAS_IRQC |
65 | 65 | ||
@@ -156,6 +156,18 @@ config MACH_KZM9D | |||
156 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 156 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
157 | select USE_OF | 157 | select USE_OF |
158 | 158 | ||
159 | config MACH_KZM9D_REFERENCE | ||
160 | bool "KZM9D board - Reference Device Tree Implementation" | ||
161 | depends on ARCH_EMEV2 | ||
162 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
163 | select USE_OF | ||
164 | ---help--- | ||
165 | Use reference implementation of KZM9D board support | ||
166 | which makes a greater use of device tree at the expense | ||
167 | of not supporting a number of devices. | ||
168 | |||
169 | This is intended to aid developers | ||
170 | |||
159 | config MACH_KZM9G | 171 | config MACH_KZM9G |
160 | bool "KZM-A9-GT board" | 172 | bool "KZM-A9-GT board" |
161 | depends on ARCH_SH73A0 | 173 | depends on ARCH_SH73A0 |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 6165a517f580..e8d0a2c904a0 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -46,6 +46,7 @@ obj-$(CONFIG_MACH_LAGER) += board-lager.o | |||
46 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 46 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
47 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | 47 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o |
48 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o | 48 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o |
49 | obj-$(CONFIG_MACH_KZM9D_REFERENCE) += board-kzm9d-reference.o | ||
49 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o | 50 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o |
50 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o | 51 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o |
51 | 52 | ||
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 84c6868580f0..7785c52b5cfd 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -7,6 +7,7 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 | |||
7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 | 7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 |
8 | loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 | 8 | loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 |
9 | loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 | 9 | loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 |
10 | loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000 | ||
10 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 | 11 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 |
11 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | 12 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 |
12 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 | 13 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 |
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 5eb0caa6a7d0..af6dd39d3758 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irqchip.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/pinctrl/machine.h> | 24 | #include <linux/pinctrl/machine.h> |
26 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
@@ -102,7 +101,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { | |||
102 | }; | 101 | }; |
103 | 102 | ||
104 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") | 103 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") |
105 | .init_irq = irqchip_init, | 104 | .init_early = r8a73a4_init_delay, |
106 | .init_time = shmobile_timer_init, | 105 | .init_time = shmobile_timer_init, |
107 | .init_machine = ape6evm_add_standard_devices, | 106 | .init_machine = ape6evm_add_standard_devices, |
108 | .dt_compat = ape6evm_boards_compat_dt, | 107 | .dt_compat = ape6evm_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index c5be60d85e4b..f6952c266fe9 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -679,15 +679,6 @@ static struct platform_device vcc_sdhi1 = { | |||
679 | }; | 679 | }; |
680 | 680 | ||
681 | /* SDHI0 */ | 681 | /* SDHI0 */ |
682 | /* | ||
683 | * FIXME | ||
684 | * | ||
685 | * It use polling mode here, since | ||
686 | * CD (= Card Detect) pin is not connected to SDHI0_CD. | ||
687 | * We can use IRQ31 as card detect irq, | ||
688 | * but it needs chattering removal operation | ||
689 | */ | ||
690 | #define IRQ31 irq_pin(31) | ||
691 | static struct sh_mobile_sdhi_info sdhi0_info = { | 682 | static struct sh_mobile_sdhi_info sdhi0_info = { |
692 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 683 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
693 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 684 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c new file mode 100644 index 000000000000..a7b28b24ab38 --- /dev/null +++ b/arch/arm/mach-shmobile/board-kzm9d-reference.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * kzm9d board support - Reference DT implementation | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2013 Magnus Damm | ||
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 as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/of_platform.h> | ||
23 | #include <mach/emev2.h> | ||
24 | #include <mach/common.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static void __init kzm9d_add_standard_devices(void) | ||
28 | { | ||
29 | emev2_clock_init(); | ||
30 | |||
31 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
32 | } | ||
33 | |||
34 | static const char *kzm9d_boards_compat_dt[] __initdata = { | ||
35 | "renesas,kzm9d-reference", | ||
36 | NULL, | ||
37 | }; | ||
38 | |||
39 | DT_MACHINE_START(KZM9D_DT, "kzm9d") | ||
40 | .smp = smp_ops(emev2_smp_ops), | ||
41 | .map_io = emev2_map_io, | ||
42 | .init_early = emev2_init_delay, | ||
43 | .init_machine = kzm9d_add_standard_devices, | ||
44 | .init_late = shmobile_init_late, | ||
45 | .dt_compat = kzm9d_boards_compat_dt, | ||
46 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c index 4368000e1127..30c2cc695b12 100644 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ b/arch/arm/mach-shmobile/board-kzm9d.c | |||
@@ -85,9 +85,7 @@ static const char *kzm9d_boards_compat_dt[] __initdata = { | |||
85 | DT_MACHINE_START(KZM9D_DT, "kzm9d") | 85 | DT_MACHINE_START(KZM9D_DT, "kzm9d") |
86 | .smp = smp_ops(emev2_smp_ops), | 86 | .smp = smp_ops(emev2_smp_ops), |
87 | .map_io = emev2_map_io, | 87 | .map_io = emev2_map_io, |
88 | .init_early = emev2_add_early_devices, | 88 | .init_early = emev2_init_delay, |
89 | .nr_irqs = NR_IRQS_LEGACY, | ||
90 | .init_irq = emev2_init_irq, | ||
91 | .init_machine = kzm9d_add_standard_devices, | 89 | .init_machine = kzm9d_add_standard_devices, |
92 | .init_late = shmobile_init_late, | 90 | .init_late = shmobile_init_late, |
93 | .dt_compat = kzm9d_boards_compat_dt, | 91 | .dt_compat = kzm9d_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index 44055fe8a45c..41092bb01ee5 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/irqchip.h> | ||
28 | #include <linux/input.h> | 27 | #include <linux/input.h> |
29 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
30 | #include <linux/pinctrl/machine.h> | 29 | #include <linux/pinctrl/machine.h> |
@@ -99,7 +98,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") | |||
99 | .map_io = sh73a0_map_io, | 98 | .map_io = sh73a0_map_io, |
100 | .init_early = sh73a0_init_delay, | 99 | .init_early = sh73a0_init_delay, |
101 | .nr_irqs = NR_IRQS_LEGACY, | 100 | .nr_irqs = NR_IRQS_LEGACY, |
102 | .init_irq = irqchip_init, | ||
103 | .init_machine = kzm_init, | 101 | .init_machine = kzm_init, |
104 | .init_time = shmobile_timer_init, | 102 | .init_time = shmobile_timer_init, |
105 | .dt_compat = kzm9g_boards_compat_dt, | 103 | .dt_compat = kzm9g_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 8d6bd5c5efb9..f89f16650731 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/gpio_keys.h> | 22 | #include <linux/gpio_keys.h> |
23 | #include <linux/input.h> | 23 | #include <linux/input.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/irqchip.h> | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
28 | #include <linux/pinctrl/machine.h> | 27 | #include <linux/pinctrl/machine.h> |
@@ -103,7 +102,7 @@ static const char *lager_boards_compat_dt[] __initdata = { | |||
103 | }; | 102 | }; |
104 | 103 | ||
105 | DT_MACHINE_START(LAGER_DT, "lager") | 104 | DT_MACHINE_START(LAGER_DT, "lager") |
106 | .init_irq = irqchip_init, | 105 | .init_early = r8a7790_init_delay, |
107 | .init_time = r8a7790_timer_init, | 106 | .init_time = r8a7790_timer_init, |
108 | .init_machine = lager_add_standard_devices, | 107 | .init_machine = lager_add_standard_devices, |
109 | .dt_compat = lager_boards_compat_dt, | 108 | .dt_compat = lager_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/clock-emev2.c b/arch/arm/mach-shmobile/clock-emev2.c index 4710f1847bb7..5ac13ba71d54 100644 --- a/arch/arm/mach-shmobile/clock-emev2.c +++ b/arch/arm/mach-shmobile/clock-emev2.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #define USIB2SCLKDIV 0x65c | 40 | #define USIB2SCLKDIV 0x65c |
41 | #define USIB3SCLKDIV 0x660 | 41 | #define USIB3SCLKDIV 0x660 |
42 | #define STI_CLKSEL 0x688 | 42 | #define STI_CLKSEL 0x688 |
43 | #define SMU_GENERAL_REG0 0x7c0 | ||
44 | 43 | ||
45 | /* not pretty, but hey */ | 44 | /* not pretty, but hey */ |
46 | static void __iomem *smu_base; | 45 | static void __iomem *smu_base; |
@@ -51,11 +50,6 @@ static void emev2_smu_write(unsigned long value, int offs) | |||
51 | iowrite32(value, smu_base + offs); | 50 | iowrite32(value, smu_base + offs); |
52 | } | 51 | } |
53 | 52 | ||
54 | void emev2_set_boot_vector(unsigned long value) | ||
55 | { | ||
56 | emev2_smu_write(value, SMU_GENERAL_REG0); | ||
57 | } | ||
58 | |||
59 | static struct clk_mapping smu_mapping = { | 53 | static struct clk_mapping smu_mapping = { |
60 | .phys = EMEV2_SMU_BASE, | 54 | .phys = EMEV2_SMU_BASE, |
61 | .len = PAGE_SIZE, | 55 | .len = PAGE_SIZE, |
@@ -205,23 +199,11 @@ static struct clk_lookup lookups[] = { | |||
205 | void __init emev2_clock_init(void) | 199 | void __init emev2_clock_init(void) |
206 | { | 200 | { |
207 | int k, ret = 0; | 201 | int k, ret = 0; |
208 | static int is_setup; | ||
209 | |||
210 | /* yuck, this is ugly as hell, but the non-smp case of clocks | ||
211 | * code is now designed to rely on ioremap() instead of static | ||
212 | * entity maps. in the case of smp we need access to the SMU | ||
213 | * register earlier than ioremap() is actually working without | ||
214 | * any static maps. to enable SMP in ugly but with dynamic | ||
215 | * mappings we have to call emev2_clock_init() from different | ||
216 | * places depending on UP and SMP... | ||
217 | */ | ||
218 | if (is_setup++) | ||
219 | return; | ||
220 | 202 | ||
221 | smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); | 203 | smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); |
222 | BUG_ON(!smu_base); | 204 | BUG_ON(!smu_base); |
223 | 205 | ||
224 | /* setup STI timer to run on 37.768 kHz and deassert reset */ | 206 | /* setup STI timer to run on 32.768 kHz and deassert reset */ |
225 | emev2_smu_write(0, STI_CLKSEL); | 207 | emev2_smu_write(0, STI_CLKSEL); |
226 | emev2_smu_write(1, STI_RSTCTRL); | 208 | emev2_smu_write(1, STI_RSTCTRL); |
227 | 209 | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index 5f7fe628b8a1..8ea5ef6c79cc 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c | |||
@@ -30,10 +30,12 @@ | |||
30 | 30 | ||
31 | #define SMSTPCR2 0xe6150138 | 31 | #define SMSTPCR2 0xe6150138 |
32 | #define SMSTPCR3 0xe615013c | 32 | #define SMSTPCR3 0xe615013c |
33 | #define SMSTPCR4 0xe6150140 | ||
33 | #define SMSTPCR5 0xe6150144 | 34 | #define SMSTPCR5 0xe6150144 |
34 | 35 | ||
35 | #define FRQCRA 0xE6150000 | 36 | #define FRQCRA 0xE6150000 |
36 | #define FRQCRB 0xE6150004 | 37 | #define FRQCRB 0xE6150004 |
38 | #define FRQCRC 0xE61500E0 | ||
37 | #define VCLKCR1 0xE6150008 | 39 | #define VCLKCR1 0xE6150008 |
38 | #define VCLKCR2 0xE615000C | 40 | #define VCLKCR2 0xE615000C |
39 | #define VCLKCR3 0xE615001C | 41 | #define VCLKCR3 0xE615001C |
@@ -52,6 +54,7 @@ | |||
52 | #define HSICKCR 0xE615026C | 54 | #define HSICKCR 0xE615026C |
53 | #define M4CKCR 0xE6150098 | 55 | #define M4CKCR 0xE6150098 |
54 | #define PLLECR 0xE61500D0 | 56 | #define PLLECR 0xE61500D0 |
57 | #define PLL0CR 0xE61500D8 | ||
55 | #define PLL1CR 0xE6150028 | 58 | #define PLL1CR 0xE6150028 |
56 | #define PLL2CR 0xE615002C | 59 | #define PLL2CR 0xE615002C |
57 | #define PLL2SCR 0xE61501F4 | 60 | #define PLL2SCR 0xE61501F4 |
@@ -177,6 +180,7 @@ static struct sh_clk_ops pll_clk_ops = { | |||
177 | .mapping = &cpg_mapping, \ | 180 | .mapping = &cpg_mapping, \ |
178 | } | 181 | } |
179 | 182 | ||
183 | PLL_CLOCK(pll0_clk, &main_clk, pll_parent_main, 1, 20, PLL0CR, 0); | ||
180 | PLL_CLOCK(pll1_clk, &main_clk, pll_parent_main, 1, 7, PLL1CR, 1); | 184 | PLL_CLOCK(pll1_clk, &main_clk, pll_parent_main, 1, 7, PLL1CR, 1); |
181 | PLL_CLOCK(pll2_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2CR, 2); | 185 | PLL_CLOCK(pll2_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2CR, 2); |
182 | PLL_CLOCK(pll2s_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2SCR, 4); | 186 | PLL_CLOCK(pll2s_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2SCR, 4); |
@@ -184,6 +188,157 @@ PLL_CLOCK(pll2h_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2HCR, 5); | |||
184 | 188 | ||
185 | SH_FIXED_RATIO_CLK(pll1_div2_clk, pll1_clk, div2); | 189 | SH_FIXED_RATIO_CLK(pll1_div2_clk, pll1_clk, div2); |
186 | 190 | ||
191 | static atomic_t frqcr_lock; | ||
192 | |||
193 | /* Several clocks need to access FRQCRB, have to lock */ | ||
194 | static bool frqcr_kick_check(struct clk *clk) | ||
195 | { | ||
196 | return !(ioread32(CPG_MAP(FRQCRB)) & BIT(31)); | ||
197 | } | ||
198 | |||
199 | static int frqcr_kick_do(struct clk *clk) | ||
200 | { | ||
201 | int i; | ||
202 | |||
203 | /* set KICK bit in FRQCRB to update hardware setting, check success */ | ||
204 | iowrite32(ioread32(CPG_MAP(FRQCRB)) | BIT(31), CPG_MAP(FRQCRB)); | ||
205 | for (i = 1000; i; i--) | ||
206 | if (ioread32(CPG_MAP(FRQCRB)) & BIT(31)) | ||
207 | cpu_relax(); | ||
208 | else | ||
209 | return 0; | ||
210 | |||
211 | return -ETIMEDOUT; | ||
212 | } | ||
213 | |||
214 | static int zclk_set_rate(struct clk *clk, unsigned long rate) | ||
215 | { | ||
216 | void __iomem *frqcrc; | ||
217 | int ret; | ||
218 | unsigned long step, p_rate; | ||
219 | u32 val; | ||
220 | |||
221 | if (!clk->parent || !__clk_get(clk->parent)) | ||
222 | return -ENODEV; | ||
223 | |||
224 | if (!atomic_inc_and_test(&frqcr_lock) || !frqcr_kick_check(clk)) { | ||
225 | ret = -EBUSY; | ||
226 | goto done; | ||
227 | } | ||
228 | |||
229 | /* | ||
230 | * Users are supposed to first call clk_set_rate() only with | ||
231 | * clk_round_rate() results. So, we don't fix wrong rates here, but | ||
232 | * guard against them anyway | ||
233 | */ | ||
234 | |||
235 | p_rate = clk_get_rate(clk->parent); | ||
236 | if (rate == p_rate) { | ||
237 | val = 0; | ||
238 | } else { | ||
239 | step = DIV_ROUND_CLOSEST(p_rate, 32); | ||
240 | |||
241 | if (rate > p_rate || rate < step) { | ||
242 | ret = -EINVAL; | ||
243 | goto done; | ||
244 | } | ||
245 | |||
246 | val = 32 - rate / step; | ||
247 | } | ||
248 | |||
249 | frqcrc = clk->mapped_reg + (FRQCRC - (u32)clk->enable_reg); | ||
250 | |||
251 | iowrite32((ioread32(frqcrc) & ~(clk->div_mask << clk->enable_bit)) | | ||
252 | (val << clk->enable_bit), frqcrc); | ||
253 | |||
254 | ret = frqcr_kick_do(clk); | ||
255 | |||
256 | done: | ||
257 | atomic_dec(&frqcr_lock); | ||
258 | __clk_put(clk->parent); | ||
259 | return ret; | ||
260 | } | ||
261 | |||
262 | static long zclk_round_rate(struct clk *clk, unsigned long rate) | ||
263 | { | ||
264 | /* | ||
265 | * theoretical rate = parent rate * multiplier / 32, | ||
266 | * where 1 <= multiplier <= 32. Therefore we should do | ||
267 | * multiplier = rate * 32 / parent rate | ||
268 | * rounded rate = parent rate * multiplier / 32. | ||
269 | * However, multiplication before division won't fit in 32 bits, so | ||
270 | * we sacrifice some precision by first dividing and then multiplying. | ||
271 | * To find the nearest divisor we calculate both and pick up the best | ||
272 | * one. This avoids 64-bit arithmetics. | ||
273 | */ | ||
274 | unsigned long step, mul_min, mul_max, rate_min, rate_max; | ||
275 | |||
276 | rate_max = clk_get_rate(clk->parent); | ||
277 | |||
278 | /* output freq <= parent */ | ||
279 | if (rate >= rate_max) | ||
280 | return rate_max; | ||
281 | |||
282 | step = DIV_ROUND_CLOSEST(rate_max, 32); | ||
283 | /* output freq >= parent / 32 */ | ||
284 | if (step >= rate) | ||
285 | return step; | ||
286 | |||
287 | mul_min = rate / step; | ||
288 | mul_max = DIV_ROUND_UP(rate, step); | ||
289 | rate_min = step * mul_min; | ||
290 | if (mul_max == mul_min) | ||
291 | return rate_min; | ||
292 | |||
293 | rate_max = step * mul_max; | ||
294 | |||
295 | if (rate_max - rate < rate - rate_min) | ||
296 | return rate_max; | ||
297 | |||
298 | return rate_min; | ||
299 | } | ||
300 | |||
301 | static unsigned long zclk_recalc(struct clk *clk) | ||
302 | { | ||
303 | void __iomem *frqcrc = FRQCRC - (u32)clk->enable_reg + clk->mapped_reg; | ||
304 | unsigned int max = clk->div_mask + 1; | ||
305 | unsigned long val = ((ioread32(frqcrc) >> clk->enable_bit) & | ||
306 | clk->div_mask); | ||
307 | |||
308 | return DIV_ROUND_CLOSEST(clk_get_rate(clk->parent), max) * | ||
309 | (max - val); | ||
310 | } | ||
311 | |||
312 | static struct sh_clk_ops zclk_ops = { | ||
313 | .recalc = zclk_recalc, | ||
314 | .set_rate = zclk_set_rate, | ||
315 | .round_rate = zclk_round_rate, | ||
316 | }; | ||
317 | |||
318 | static struct clk z_clk = { | ||
319 | .parent = &pll0_clk, | ||
320 | .div_mask = 0x1f, | ||
321 | .enable_bit = 8, | ||
322 | /* We'll need to access FRQCRB and FRQCRC */ | ||
323 | .enable_reg = (void __iomem *)FRQCRB, | ||
324 | .ops = &zclk_ops, | ||
325 | }; | ||
326 | |||
327 | /* | ||
328 | * It seems only 1/2 divider is usable in manual mode. 1/2 / 2/3 | ||
329 | * switching is only available in auto-DVFS mode | ||
330 | */ | ||
331 | SH_FIXED_RATIO_CLK(pll0_div2_clk, pll0_clk, div2); | ||
332 | |||
333 | static struct clk z2_clk = { | ||
334 | .parent = &pll0_div2_clk, | ||
335 | .div_mask = 0x1f, | ||
336 | .enable_bit = 0, | ||
337 | /* We'll need to access FRQCRB and FRQCRC */ | ||
338 | .enable_reg = (void __iomem *)FRQCRB, | ||
339 | .ops = &zclk_ops, | ||
340 | }; | ||
341 | |||
187 | static struct clk *main_clks[] = { | 342 | static struct clk *main_clks[] = { |
188 | &extalr_clk, | 343 | &extalr_clk, |
189 | &extal1_clk, | 344 | &extal1_clk, |
@@ -195,22 +350,23 @@ static struct clk *main_clks[] = { | |||
195 | &main_div2_clk, | 350 | &main_div2_clk, |
196 | &fsiack_clk, | 351 | &fsiack_clk, |
197 | &fsibck_clk, | 352 | &fsibck_clk, |
353 | &pll0_clk, | ||
198 | &pll1_clk, | 354 | &pll1_clk, |
199 | &pll1_div2_clk, | 355 | &pll1_div2_clk, |
200 | &pll2_clk, | 356 | &pll2_clk, |
201 | &pll2s_clk, | 357 | &pll2s_clk, |
202 | &pll2h_clk, | 358 | &pll2h_clk, |
359 | &z_clk, | ||
360 | &pll0_div2_clk, | ||
361 | &z2_clk, | ||
203 | }; | 362 | }; |
204 | 363 | ||
205 | /* DIV4 */ | 364 | /* DIV4 */ |
206 | static void div4_kick(struct clk *clk) | 365 | static void div4_kick(struct clk *clk) |
207 | { | 366 | { |
208 | unsigned long value; | 367 | if (!WARN(!atomic_inc_and_test(&frqcr_lock), "FRQCR* lock broken!\n")) |
209 | 368 | frqcr_kick_do(clk); | |
210 | /* set KICK bit in FRQCRB to update hardware setting */ | 369 | atomic_dec(&frqcr_lock); |
211 | value = ioread32(CPG_MAP(FRQCRB)); | ||
212 | value |= (1 << 31); | ||
213 | iowrite32(value, CPG_MAP(FRQCRB)); | ||
214 | } | 370 | } |
215 | 371 | ||
216 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10}; | 372 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10}; |
@@ -349,8 +505,10 @@ static struct clk div6_clks[DIV6_NR] = { | |||
349 | /* MSTP */ | 505 | /* MSTP */ |
350 | enum { | 506 | enum { |
351 | MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, | 507 | MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, |
352 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP305, | 508 | MSTP329, MSTP323, MSTP318, MSTP317, MSTP316, |
353 | MSTP522, | 509 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP305, MSTP300, |
510 | MSTP411, MSTP410, MSTP409, | ||
511 | MSTP522, MSTP515, | ||
354 | MSTP_NR | 512 | MSTP_NR |
355 | }; | 513 | }; |
356 | 514 | ||
@@ -361,12 +519,22 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
361 | [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 7, 0), /* SCIFB1 */ | 519 | [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 7, 0), /* SCIFB1 */ |
362 | [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 16, 0), /* SCIFB2 */ | 520 | [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 16, 0), /* SCIFB2 */ |
363 | [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 17, 0), /* SCIFB3 */ | 521 | [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 17, 0), /* SCIFB3 */ |
522 | [MSTP300] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 0, 0), /* IIC2 */ | ||
364 | [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */ | 523 | [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */ |
365 | [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */ | 524 | [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */ |
366 | [MSTP313] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI1],SMSTPCR3, 13, 0), /* SDHI1 */ | 525 | [MSTP313] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI1],SMSTPCR3, 13, 0), /* SDHI1 */ |
367 | [MSTP314] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI0],SMSTPCR3, 14, 0), /* SDHI0 */ | 526 | [MSTP314] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI0],SMSTPCR3, 14, 0), /* SDHI0 */ |
368 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0],SMSTPCR3, 15, 0), /* MMCIF0 */ | 527 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0],SMSTPCR3, 15, 0), /* MMCIF0 */ |
528 | [MSTP316] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 16, 0), /* IIC6 */ | ||
529 | [MSTP317] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 17, 0), /* IIC7 */ | ||
530 | [MSTP318] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 18, 0), /* IIC0 */ | ||
531 | [MSTP323] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ | ||
532 | [MSTP329] = SH_CLK_MSTP32(&extalr_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||
533 | [MSTP409] = SH_CLK_MSTP32(&main_div2_clk, SMSTPCR4, 9, 0), /* IIC5 */ | ||
534 | [MSTP410] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 10, 0), /* IIC4 */ | ||
535 | [MSTP411] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ | ||
369 | [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */ | 536 | [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */ |
537 | [MSTP515] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR5, 15, 0), /* IIC8 */ | ||
370 | }; | 538 | }; |
371 | 539 | ||
372 | static struct clk_lookup lookups[] = { | 540 | static struct clk_lookup lookups[] = { |
@@ -386,6 +554,9 @@ static struct clk_lookup lookups[] = { | |||
386 | CLKDEV_CON_ID("pll2s", &pll2s_clk), | 554 | CLKDEV_CON_ID("pll2s", &pll2s_clk), |
387 | CLKDEV_CON_ID("pll2h", &pll2h_clk), | 555 | CLKDEV_CON_ID("pll2h", &pll2h_clk), |
388 | 556 | ||
557 | /* CPU clock */ | ||
558 | CLKDEV_DEV_ID("cpufreq-cpu0", &z_clk), | ||
559 | |||
389 | /* DIV6 */ | 560 | /* DIV6 */ |
390 | CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]), | 561 | CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]), |
391 | CLKDEV_CON_ID("vck1", &div6_clks[DIV6_VCK1]), | 562 | CLKDEV_CON_ID("vck1", &div6_clks[DIV6_VCK1]), |
@@ -408,6 +579,7 @@ static struct clk_lookup lookups[] = { | |||
408 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), | 579 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), |
409 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]), | 580 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]), |
410 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 581 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
582 | CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]), | ||
411 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), | 583 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), |
412 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), | 584 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), |
413 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), | 585 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), |
@@ -418,6 +590,15 @@ static struct clk_lookup lookups[] = { | |||
418 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), | 590 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), |
419 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), | 591 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), |
420 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), | 592 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), |
593 | CLKDEV_DEV_ID("e6550000.i2c", &mstp_clks[MSTP316]), | ||
594 | CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]), | ||
595 | CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]), | ||
596 | CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]), | ||
597 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), | ||
598 | CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]), | ||
599 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]), | ||
600 | CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]), | ||
601 | CLKDEV_DEV_ID("e6570000.i2c", &mstp_clks[MSTP515]), | ||
421 | 602 | ||
422 | /* for DT */ | 603 | /* for DT */ |
423 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | 604 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), |
@@ -429,6 +610,8 @@ void __init r8a73a4_clock_init(void) | |||
429 | int k, ret = 0; | 610 | int k, ret = 0; |
430 | u32 ckscr; | 611 | u32 ckscr; |
431 | 612 | ||
613 | atomic_set(&frqcr_lock, -1); | ||
614 | |||
432 | reg = ioremap_nocache(CKSCR, PAGE_SIZE); | 615 | reg = ioremap_nocache(CKSCR, PAGE_SIZE); |
433 | BUG_ON(!reg); | 616 | BUG_ON(!reg); |
434 | ckscr = ioread32(reg); | 617 | ckscr = ioread32(reg); |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index de10fd78bf2b..c826bca4024e 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -596,7 +596,8 @@ static struct clk_lookup lookups[] = { | |||
596 | CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), | 596 | CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), |
597 | CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), | 597 | CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), |
598 | CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]), | 598 | CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]), |
599 | CLKDEV_DEV_ID("renesas_tpu_pwm", &mstp_clks[MSTP304]), | 599 | CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]), |
600 | CLKDEV_DEV_ID("e6600000.pwm", &mstp_clks[MSTP304]), | ||
600 | 601 | ||
601 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), | 602 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), |
602 | CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), | 603 | CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index 5d71313df52d..fc36d3db0b4d 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | #include <mach/clock.h> | 25 | #include <mach/clock.h> |
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/r8a7790.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * MD EXTAL PLL0 PLL1 PLL3 | 30 | * MD EXTAL PLL0 PLL1 PLL3 |
@@ -42,16 +43,16 @@ | |||
42 | * see "p1 / 2" on R8A7790_CLOCK_ROOT() below | 43 | * see "p1 / 2" on R8A7790_CLOCK_ROOT() below |
43 | */ | 44 | */ |
44 | 45 | ||
45 | #define MD(nr) (1 << nr) | ||
46 | |||
47 | #define CPG_BASE 0xe6150000 | 46 | #define CPG_BASE 0xe6150000 |
48 | #define CPG_LEN 0x1000 | 47 | #define CPG_LEN 0x1000 |
49 | 48 | ||
49 | #define SMSTPCR1 0xe6150134 | ||
50 | #define SMSTPCR2 0xe6150138 | 50 | #define SMSTPCR2 0xe6150138 |
51 | #define SMSTPCR3 0xe615013c | 51 | #define SMSTPCR3 0xe615013c |
52 | #define SMSTPCR5 0xe6150144 | ||
52 | #define SMSTPCR7 0xe615014c | 53 | #define SMSTPCR7 0xe615014c |
54 | #define SMSTPCR8 0xe6150990 | ||
53 | 55 | ||
54 | #define MODEMR 0xE6160060 | ||
55 | #define SDCKCR 0xE6150074 | 56 | #define SDCKCR 0xE6150074 |
56 | #define SD2CKCR 0xE6150078 | 57 | #define SD2CKCR 0xE6150078 |
57 | #define SD3CKCR 0xE615007C | 58 | #define SD3CKCR 0xE615007C |
@@ -180,16 +181,23 @@ static struct clk div6_clks[DIV6_NR] = { | |||
180 | 181 | ||
181 | /* MSTP */ | 182 | /* MSTP */ |
182 | enum { | 183 | enum { |
184 | MSTP813, | ||
183 | MSTP721, MSTP720, | 185 | MSTP721, MSTP720, |
184 | MSTP717, MSTP716, | 186 | MSTP717, MSTP716, |
187 | MSTP522, | ||
185 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, | 188 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, |
186 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, | 189 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, |
190 | MSTP124, | ||
187 | MSTP_NR | 191 | MSTP_NR |
188 | }; | 192 | }; |
189 | 193 | ||
190 | static struct clk mstp_clks[MSTP_NR] = { | 194 | static struct clk mstp_clks[MSTP_NR] = { |
195 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ | ||
191 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ | 196 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ |
192 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 197 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ |
198 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ | ||
199 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ | ||
200 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | ||
193 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ | 201 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ |
194 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ | 202 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ |
195 | [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_SD1], SMSTPCR3, 13, 0), /* SDHI1 */ | 203 | [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_SD1], SMSTPCR3, 13, 0), /* SDHI1 */ |
@@ -203,8 +211,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
203 | [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ | 211 | [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ |
204 | [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ | 212 | [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ |
205 | [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ | 213 | [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ |
206 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ | 214 | [MSTP124] = SH_CLK_MSTP32(&rclk_clk, SMSTPCR1, 24, 0), /* CMT0 */ |
207 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ | ||
208 | }; | 215 | }; |
209 | 216 | ||
210 | static struct clk_lookup lookups[] = { | 217 | static struct clk_lookup lookups[] = { |
@@ -254,6 +261,8 @@ static struct clk_lookup lookups[] = { | |||
254 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), | 261 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), |
255 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]), | 262 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]), |
256 | CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]), | 263 | CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]), |
264 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), | ||
265 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | ||
257 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), | 266 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), |
258 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), | 267 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), |
259 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), | 268 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), |
@@ -266,6 +275,7 @@ static struct clk_lookup lookups[] = { | |||
266 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]), | 275 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]), |
267 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), | 276 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), |
268 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), | 277 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), |
278 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | ||
269 | }; | 279 | }; |
270 | 280 | ||
271 | #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ | 281 | #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ |
@@ -280,14 +290,9 @@ static struct clk_lookup lookups[] = { | |||
280 | 290 | ||
281 | void __init r8a7790_clock_init(void) | 291 | void __init r8a7790_clock_init(void) |
282 | { | 292 | { |
283 | void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE); | 293 | u32 mode = r8a7790_read_mode_pins(); |
284 | u32 mode; | ||
285 | int k, ret = 0; | 294 | int k, ret = 0; |
286 | 295 | ||
287 | BUG_ON(!modemr); | ||
288 | mode = ioread32(modemr); | ||
289 | iounmap(modemr); | ||
290 | |||
291 | switch (mode & (MD(14) | MD(13))) { | 296 | switch (mode & (MD(14) | MD(13))) { |
292 | case 0: | 297 | case 0: |
293 | R8A7790_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88); | 298 | R8A7790_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88); |
diff --git a/arch/arm/mach-shmobile/headsmp-scu.S b/arch/arm/mach-shmobile/headsmp-scu.S index bfd920083a3b..f45dde701d7b 100644 --- a/arch/arm/mach-shmobile/headsmp-scu.S +++ b/arch/arm/mach-shmobile/headsmp-scu.S | |||
@@ -37,13 +37,15 @@ ENTRY(shmobile_boot_scu) | |||
37 | lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits | 37 | lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits |
38 | ldr r2, [r0, #8] @ SCU Power Status Register | 38 | ldr r2, [r0, #8] @ SCU Power Status Register |
39 | mov r3, #3 | 39 | mov r3, #3 |
40 | bic r2, r2, r3, lsl r1 @ Clear bits of our CPU (Run Mode) | 40 | lsl r3, r3, r1 |
41 | bic r2, r2, r3 @ Clear bits of our CPU (Run Mode) | ||
41 | str r2, [r0, #8] @ write back | 42 | str r2, [r0, #8] @ write back |
42 | 43 | ||
43 | b shmobile_invalidate_start | 44 | b shmobile_invalidate_start |
44 | ENDPROC(shmobile_boot_scu) | 45 | ENDPROC(shmobile_boot_scu) |
45 | 46 | ||
46 | .text | 47 | .text |
48 | .align 2 | ||
47 | .globl shmobile_scu_base | 49 | .globl shmobile_scu_base |
48 | shmobile_scu_base: | 50 | shmobile_scu_base: |
49 | .space 4 | 51 | .space 4 |
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index a9d212498987..2667db806c39 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
@@ -24,12 +24,16 @@ ENDPROC(shmobile_invalidate_start) | |||
24 | * This will be mapped at address 0 by SBAR register. | 24 | * This will be mapped at address 0 by SBAR register. |
25 | * We need _long_ jump to the physical address. | 25 | * We need _long_ jump to the physical address. |
26 | */ | 26 | */ |
27 | .arm | ||
27 | .align 12 | 28 | .align 12 |
28 | ENTRY(shmobile_boot_vector) | 29 | ENTRY(shmobile_boot_vector) |
29 | ldr r0, 2f | 30 | ldr r0, 2f |
30 | ldr pc, 1f | 31 | ldr r1, 1f |
32 | bx r1 | ||
33 | |||
31 | ENDPROC(shmobile_boot_vector) | 34 | ENDPROC(shmobile_boot_vector) |
32 | 35 | ||
36 | .align 2 | ||
33 | .globl shmobile_boot_fn | 37 | .globl shmobile_boot_fn |
34 | shmobile_boot_fn: | 38 | shmobile_boot_fn: |
35 | 1: .space 4 | 39 | 1: .space 4 |
diff --git a/arch/arm/mach-shmobile/include/mach/dma.h b/arch/arm/mach-shmobile/include/mach/dma.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-shmobile/include/mach/dma.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h index ac3751705cab..c2eb7568d9be 100644 --- a/arch/arm/mach-shmobile/include/mach/emev2.h +++ b/arch/arm/mach-shmobile/include/mach/emev2.h | |||
@@ -2,11 +2,9 @@ | |||
2 | #define __ASM_EMEV2_H__ | 2 | #define __ASM_EMEV2_H__ |
3 | 3 | ||
4 | extern void emev2_map_io(void); | 4 | extern void emev2_map_io(void); |
5 | extern void emev2_init_irq(void); | 5 | extern void emev2_init_delay(void); |
6 | extern void emev2_add_early_devices(void); | ||
7 | extern void emev2_add_standard_devices(void); | 6 | extern void emev2_add_standard_devices(void); |
8 | extern void emev2_clock_init(void); | 7 | extern void emev2_clock_init(void); |
9 | extern void emev2_set_boot_vector(unsigned long value); | ||
10 | 8 | ||
11 | #define EMEV2_GPIO_BASE 200 | 9 | #define EMEV2_GPIO_BASE 200 |
12 | #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) | 10 | #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a73a4.h b/arch/arm/mach-shmobile/include/mach/r8a73a4.h index f043103e32c9..144a85e29245 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a73a4.h +++ b/arch/arm/mach-shmobile/include/mach/r8a73a4.h | |||
@@ -4,5 +4,6 @@ | |||
4 | void r8a73a4_add_standard_devices(void); | 4 | void r8a73a4_add_standard_devices(void); |
5 | void r8a73a4_clock_init(void); | 5 | void r8a73a4_clock_init(void); |
6 | void r8a73a4_pinmux_init(void); | 6 | void r8a73a4_pinmux_init(void); |
7 | void r8a73a4_init_delay(void); | ||
7 | 8 | ||
8 | #endif /* __ASM_R8A73A4_H__ */ | 9 | #endif /* __ASM_R8A73A4_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h index b34d19b5ca5c..56f375005fcd 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7740.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h | |||
@@ -42,6 +42,8 @@ enum { | |||
42 | SHDMA_SLAVE_FSIB_TX, | 42 | SHDMA_SLAVE_FSIB_TX, |
43 | SHDMA_SLAVE_USBHS_TX, | 43 | SHDMA_SLAVE_USBHS_TX, |
44 | SHDMA_SLAVE_USBHS_RX, | 44 | SHDMA_SLAVE_USBHS_RX, |
45 | SHDMA_SLAVE_MMCIF_TX, | ||
46 | SHDMA_SLAVE_MMCIF_RX, | ||
45 | }; | 47 | }; |
46 | 48 | ||
47 | extern void r8a7740_meram_workaround(void); | 49 | extern void r8a7740_meram_workaround(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 851d027a2f06..9b561bf4229f 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -33,7 +33,6 @@ extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info); | |||
33 | 33 | ||
34 | extern void r8a7778_init_late(void); | 34 | extern void r8a7778_init_late(void); |
35 | extern void r8a7778_init_delay(void); | 35 | extern void r8a7778_init_delay(void); |
36 | extern void r8a7778_init_irq(void); | ||
37 | extern void r8a7778_init_irq_dt(void); | 36 | extern void r8a7778_init_irq_dt(void); |
38 | extern void r8a7778_clock_init(void); | 37 | extern void r8a7778_clock_init(void); |
39 | extern void r8a7778_init_irq_extpin(int irlm); | 38 | extern void r8a7778_init_irq_extpin(int irlm); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 2e919e61fa0d..7aaef409a059 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h | |||
@@ -4,6 +4,10 @@ | |||
4 | void r8a7790_add_standard_devices(void); | 4 | void r8a7790_add_standard_devices(void); |
5 | void r8a7790_clock_init(void); | 5 | void r8a7790_clock_init(void); |
6 | void r8a7790_pinmux_init(void); | 6 | void r8a7790_pinmux_init(void); |
7 | void r8a7790_init_delay(void); | ||
7 | void r8a7790_timer_init(void); | 8 | void r8a7790_timer_init(void); |
8 | 9 | ||
10 | #define MD(nr) BIT(nr) | ||
11 | u32 r8a7790_read_mode_pins(void); | ||
12 | |||
9 | #endif /* __ASM_R8A7790_H__ */ | 13 | #endif /* __ASM_R8A7790_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index f2d8744c1f14..c3c4669a2d72 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef ZBOOT_H | 1 | #ifndef ZBOOT_H |
2 | #define ZBOOT_H | 2 | #define ZBOOT_H |
3 | 3 | ||
4 | #include <asm/mach-types.h> | ||
5 | #include <mach/zboot_macros.h> | 4 | #include <mach/zboot_macros.h> |
6 | 5 | ||
7 | /************************************************** | 6 | /************************************************** |
@@ -11,7 +10,6 @@ | |||
11 | **************************************************/ | 10 | **************************************************/ |
12 | 11 | ||
13 | #ifdef CONFIG_MACH_MACKEREL | 12 | #ifdef CONFIG_MACH_MACKEREL |
14 | #define MACH_TYPE MACH_TYPE_MACKEREL | ||
15 | #define MEMORY_START 0x40000000 | 13 | #define MEMORY_START 0x40000000 |
16 | #include "mach/head-mackerel.txt" | 14 | #include "mach/head-mackerel.txt" |
17 | #else | 15 | #else |
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c index 1ccddd228112..19980be7d6a9 100644 --- a/arch/arm/mach-shmobile/setup-emev2.c +++ b/arch/arm/mach-shmobile/setup-emev2.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/irqchip.h> | ||
24 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
25 | #include <linux/platform_data/gpio-em.h> | 24 | #include <linux/platform_data/gpio-em.h> |
26 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
@@ -39,13 +38,6 @@ | |||
39 | 38 | ||
40 | static struct map_desc emev2_io_desc[] __initdata = { | 39 | static struct map_desc emev2_io_desc[] __initdata = { |
41 | #ifdef CONFIG_SMP | 40 | #ifdef CONFIG_SMP |
42 | /* 128K entity map for 0xe0100000 (SMU) */ | ||
43 | { | ||
44 | .virtual = 0xe0100000, | ||
45 | .pfn = __phys_to_pfn(0xe0100000), | ||
46 | .length = SZ_128K, | ||
47 | .type = MT_DEVICE | ||
48 | }, | ||
49 | /* 2M mapping for SCU + L2 controller */ | 41 | /* 2M mapping for SCU + L2 controller */ |
50 | { | 42 | { |
51 | .virtual = 0xf0000000, | 43 | .virtual = 0xf0000000, |
@@ -63,102 +55,40 @@ void __init emev2_map_io(void) | |||
63 | 55 | ||
64 | /* UART */ | 56 | /* UART */ |
65 | static struct resource uart0_resources[] = { | 57 | static struct resource uart0_resources[] = { |
66 | [0] = { | 58 | DEFINE_RES_MEM(0xe1020000, 0x38), |
67 | .start = 0xe1020000, | 59 | DEFINE_RES_IRQ(40), |
68 | .end = 0xe1020037, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | [1] = { | ||
72 | .start = 40, | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | static struct platform_device uart0_device = { | ||
78 | .name = "serial8250-em", | ||
79 | .id = 0, | ||
80 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
81 | .resource = uart0_resources, | ||
82 | }; | 60 | }; |
83 | 61 | ||
84 | static struct resource uart1_resources[] = { | 62 | static struct resource uart1_resources[] = { |
85 | [0] = { | 63 | DEFINE_RES_MEM(0xe1030000, 0x38), |
86 | .start = 0xe1030000, | 64 | DEFINE_RES_IRQ(41), |
87 | .end = 0xe1030037, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, | ||
90 | [1] = { | ||
91 | .start = 41, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | } | ||
94 | }; | ||
95 | |||
96 | static struct platform_device uart1_device = { | ||
97 | .name = "serial8250-em", | ||
98 | .id = 1, | ||
99 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
100 | .resource = uart1_resources, | ||
101 | }; | 65 | }; |
102 | 66 | ||
103 | static struct resource uart2_resources[] = { | 67 | static struct resource uart2_resources[] = { |
104 | [0] = { | 68 | DEFINE_RES_MEM(0xe1040000, 0x38), |
105 | .start = 0xe1040000, | 69 | DEFINE_RES_IRQ(42), |
106 | .end = 0xe1040037, | ||
107 | .flags = IORESOURCE_MEM, | ||
108 | }, | ||
109 | [1] = { | ||
110 | .start = 42, | ||
111 | .flags = IORESOURCE_IRQ, | ||
112 | } | ||
113 | }; | ||
114 | |||
115 | static struct platform_device uart2_device = { | ||
116 | .name = "serial8250-em", | ||
117 | .id = 2, | ||
118 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
119 | .resource = uart2_resources, | ||
120 | }; | 70 | }; |
121 | 71 | ||
122 | static struct resource uart3_resources[] = { | 72 | static struct resource uart3_resources[] = { |
123 | [0] = { | 73 | DEFINE_RES_MEM(0xe1050000, 0x38), |
124 | .start = 0xe1050000, | 74 | DEFINE_RES_IRQ(43), |
125 | .end = 0xe1050037, | ||
126 | .flags = IORESOURCE_MEM, | ||
127 | }, | ||
128 | [1] = { | ||
129 | .start = 43, | ||
130 | .flags = IORESOURCE_IRQ, | ||
131 | } | ||
132 | }; | 75 | }; |
133 | 76 | ||
134 | static struct platform_device uart3_device = { | 77 | #define emev2_register_uart(idx) \ |
135 | .name = "serial8250-em", | 78 | platform_device_register_simple("serial8250-em", idx, \ |
136 | .id = 3, | 79 | uart##idx##_resources, \ |
137 | .num_resources = ARRAY_SIZE(uart3_resources), | 80 | ARRAY_SIZE(uart##idx##_resources)) |
138 | .resource = uart3_resources, | ||
139 | }; | ||
140 | 81 | ||
141 | /* STI */ | 82 | /* STI */ |
142 | static struct resource sti_resources[] = { | 83 | static struct resource sti_resources[] = { |
143 | [0] = { | 84 | DEFINE_RES_MEM(0xe0180000, 0x54), |
144 | .name = "STI", | 85 | DEFINE_RES_IRQ(157), |
145 | .start = 0xe0180000, | ||
146 | .end = 0xe0180053, | ||
147 | .flags = IORESOURCE_MEM, | ||
148 | }, | ||
149 | [1] = { | ||
150 | .start = 157, | ||
151 | .flags = IORESOURCE_IRQ, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | static struct platform_device sti_device = { | ||
156 | .name = "em_sti", | ||
157 | .id = 0, | ||
158 | .resource = sti_resources, | ||
159 | .num_resources = ARRAY_SIZE(sti_resources), | ||
160 | }; | 86 | }; |
161 | 87 | ||
88 | #define emev2_register_sti() \ | ||
89 | platform_device_register_simple("em_sti", 0, \ | ||
90 | sti_resources, \ | ||
91 | ARRAY_SIZE(sti_resources)) | ||
162 | 92 | ||
163 | /* GIO */ | 93 | /* GIO */ |
164 | static struct gpio_em_config gio0_config = { | 94 | static struct gpio_em_config gio0_config = { |
@@ -168,36 +98,10 @@ static struct gpio_em_config gio0_config = { | |||
168 | }; | 98 | }; |
169 | 99 | ||
170 | static struct resource gio0_resources[] = { | 100 | static struct resource gio0_resources[] = { |
171 | [0] = { | 101 | DEFINE_RES_MEM(0xe0050000, 0x2c), |
172 | .name = "GIO_000", | 102 | DEFINE_RES_MEM(0xe0050040, 0x20), |
173 | .start = 0xe0050000, | 103 | DEFINE_RES_IRQ(99), |
174 | .end = 0xe005002b, | 104 | DEFINE_RES_IRQ(100), |
175 | .flags = IORESOURCE_MEM, | ||
176 | }, | ||
177 | [1] = { | ||
178 | .name = "GIO_000", | ||
179 | .start = 0xe0050040, | ||
180 | .end = 0xe005005f, | ||
181 | .flags = IORESOURCE_MEM, | ||
182 | }, | ||
183 | [2] = { | ||
184 | .start = 99, | ||
185 | .flags = IORESOURCE_IRQ, | ||
186 | }, | ||
187 | [3] = { | ||
188 | .start = 100, | ||
189 | .flags = IORESOURCE_IRQ, | ||
190 | }, | ||
191 | }; | ||
192 | |||
193 | static struct platform_device gio0_device = { | ||
194 | .name = "em_gio", | ||
195 | .id = 0, | ||
196 | .resource = gio0_resources, | ||
197 | .num_resources = ARRAY_SIZE(gio0_resources), | ||
198 | .dev = { | ||
199 | .platform_data = &gio0_config, | ||
200 | }, | ||
201 | }; | 105 | }; |
202 | 106 | ||
203 | static struct gpio_em_config gio1_config = { | 107 | static struct gpio_em_config gio1_config = { |
@@ -207,36 +111,10 @@ static struct gpio_em_config gio1_config = { | |||
207 | }; | 111 | }; |
208 | 112 | ||
209 | static struct resource gio1_resources[] = { | 113 | static struct resource gio1_resources[] = { |
210 | [0] = { | 114 | DEFINE_RES_MEM(0xe0050080, 0x2c), |
211 | .name = "GIO_032", | 115 | DEFINE_RES_MEM(0xe00500c0, 0x20), |
212 | .start = 0xe0050080, | 116 | DEFINE_RES_IRQ(101), |
213 | .end = 0xe00500ab, | 117 | DEFINE_RES_IRQ(102), |
214 | .flags = IORESOURCE_MEM, | ||
215 | }, | ||
216 | [1] = { | ||
217 | .name = "GIO_032", | ||
218 | .start = 0xe00500c0, | ||
219 | .end = 0xe00500df, | ||
220 | .flags = IORESOURCE_MEM, | ||
221 | }, | ||
222 | [2] = { | ||
223 | .start = 101, | ||
224 | .flags = IORESOURCE_IRQ, | ||
225 | }, | ||
226 | [3] = { | ||
227 | .start = 102, | ||
228 | .flags = IORESOURCE_IRQ, | ||
229 | }, | ||
230 | }; | ||
231 | |||
232 | static struct platform_device gio1_device = { | ||
233 | .name = "em_gio", | ||
234 | .id = 1, | ||
235 | .resource = gio1_resources, | ||
236 | .num_resources = ARRAY_SIZE(gio1_resources), | ||
237 | .dev = { | ||
238 | .platform_data = &gio1_config, | ||
239 | }, | ||
240 | }; | 118 | }; |
241 | 119 | ||
242 | static struct gpio_em_config gio2_config = { | 120 | static struct gpio_em_config gio2_config = { |
@@ -246,36 +124,10 @@ static struct gpio_em_config gio2_config = { | |||
246 | }; | 124 | }; |
247 | 125 | ||
248 | static struct resource gio2_resources[] = { | 126 | static struct resource gio2_resources[] = { |
249 | [0] = { | 127 | DEFINE_RES_MEM(0xe0050100, 0x2c), |
250 | .name = "GIO_064", | 128 | DEFINE_RES_MEM(0xe0050140, 0x20), |
251 | .start = 0xe0050100, | 129 | DEFINE_RES_IRQ(103), |
252 | .end = 0xe005012b, | 130 | DEFINE_RES_IRQ(104), |
253 | .flags = IORESOURCE_MEM, | ||
254 | }, | ||
255 | [1] = { | ||
256 | .name = "GIO_064", | ||
257 | .start = 0xe0050140, | ||
258 | .end = 0xe005015f, | ||
259 | .flags = IORESOURCE_MEM, | ||
260 | }, | ||
261 | [2] = { | ||
262 | .start = 103, | ||
263 | .flags = IORESOURCE_IRQ, | ||
264 | }, | ||
265 | [3] = { | ||
266 | .start = 104, | ||
267 | .flags = IORESOURCE_IRQ, | ||
268 | }, | ||
269 | }; | ||
270 | |||
271 | static struct platform_device gio2_device = { | ||
272 | .name = "em_gio", | ||
273 | .id = 2, | ||
274 | .resource = gio2_resources, | ||
275 | .num_resources = ARRAY_SIZE(gio2_resources), | ||
276 | .dev = { | ||
277 | .platform_data = &gio2_config, | ||
278 | }, | ||
279 | }; | 131 | }; |
280 | 132 | ||
281 | static struct gpio_em_config gio3_config = { | 133 | static struct gpio_em_config gio3_config = { |
@@ -285,36 +137,10 @@ static struct gpio_em_config gio3_config = { | |||
285 | }; | 137 | }; |
286 | 138 | ||
287 | static struct resource gio3_resources[] = { | 139 | static struct resource gio3_resources[] = { |
288 | [0] = { | 140 | DEFINE_RES_MEM(0xe0050180, 0x2c), |
289 | .name = "GIO_096", | 141 | DEFINE_RES_MEM(0xe00501c0, 0x20), |
290 | .start = 0xe0050180, | 142 | DEFINE_RES_IRQ(105), |
291 | .end = 0xe00501ab, | 143 | DEFINE_RES_IRQ(106), |
292 | .flags = IORESOURCE_MEM, | ||
293 | }, | ||
294 | [1] = { | ||
295 | .name = "GIO_096", | ||
296 | .start = 0xe00501c0, | ||
297 | .end = 0xe00501df, | ||
298 | .flags = IORESOURCE_MEM, | ||
299 | }, | ||
300 | [2] = { | ||
301 | .start = 105, | ||
302 | .flags = IORESOURCE_IRQ, | ||
303 | }, | ||
304 | [3] = { | ||
305 | .start = 106, | ||
306 | .flags = IORESOURCE_IRQ, | ||
307 | }, | ||
308 | }; | ||
309 | |||
310 | static struct platform_device gio3_device = { | ||
311 | .name = "em_gio", | ||
312 | .id = 3, | ||
313 | .resource = gio3_resources, | ||
314 | .num_resources = ARRAY_SIZE(gio3_resources), | ||
315 | .dev = { | ||
316 | .platform_data = &gio3_config, | ||
317 | }, | ||
318 | }; | 144 | }; |
319 | 145 | ||
320 | static struct gpio_em_config gio4_config = { | 146 | static struct gpio_em_config gio4_config = { |
@@ -324,126 +150,52 @@ static struct gpio_em_config gio4_config = { | |||
324 | }; | 150 | }; |
325 | 151 | ||
326 | static struct resource gio4_resources[] = { | 152 | static struct resource gio4_resources[] = { |
327 | [0] = { | 153 | DEFINE_RES_MEM(0xe0050200, 0x2c), |
328 | .name = "GIO_128", | 154 | DEFINE_RES_MEM(0xe0050240, 0x20), |
329 | .start = 0xe0050200, | 155 | DEFINE_RES_IRQ(107), |
330 | .end = 0xe005022b, | 156 | DEFINE_RES_IRQ(108), |
331 | .flags = IORESOURCE_MEM, | ||
332 | }, | ||
333 | [1] = { | ||
334 | .name = "GIO_128", | ||
335 | .start = 0xe0050240, | ||
336 | .end = 0xe005025f, | ||
337 | .flags = IORESOURCE_MEM, | ||
338 | }, | ||
339 | [2] = { | ||
340 | .start = 107, | ||
341 | .flags = IORESOURCE_IRQ, | ||
342 | }, | ||
343 | [3] = { | ||
344 | .start = 108, | ||
345 | .flags = IORESOURCE_IRQ, | ||
346 | }, | ||
347 | }; | 157 | }; |
348 | 158 | ||
349 | static struct platform_device gio4_device = { | 159 | #define emev2_register_gio(idx) \ |
350 | .name = "em_gio", | 160 | platform_device_register_resndata(&platform_bus, "em_gio", \ |
351 | .id = 4, | 161 | idx, gio##idx##_resources, \ |
352 | .resource = gio4_resources, | 162 | ARRAY_SIZE(gio##idx##_resources), \ |
353 | .num_resources = ARRAY_SIZE(gio4_resources), | 163 | &gio##idx##_config, \ |
354 | .dev = { | 164 | sizeof(struct gpio_em_config)) |
355 | .platform_data = &gio4_config, | ||
356 | }, | ||
357 | }; | ||
358 | 165 | ||
359 | static struct resource pmu_resources[] = { | 166 | static struct resource pmu_resources[] = { |
360 | [0] = { | 167 | DEFINE_RES_IRQ(152), |
361 | .start = 152, | 168 | DEFINE_RES_IRQ(153), |
362 | .end = 152, | ||
363 | .flags = IORESOURCE_IRQ, | ||
364 | }, | ||
365 | [1] = { | ||
366 | .start = 153, | ||
367 | .end = 153, | ||
368 | .flags = IORESOURCE_IRQ, | ||
369 | }, | ||
370 | }; | 169 | }; |
371 | 170 | ||
372 | static struct platform_device pmu_device = { | 171 | #define emev2_register_pmu() \ |
373 | .name = "arm-pmu", | 172 | platform_device_register_simple("arm-pmu", -1, \ |
374 | .id = -1, | 173 | pmu_resources, \ |
375 | .num_resources = ARRAY_SIZE(pmu_resources), | 174 | ARRAY_SIZE(pmu_resources)) |
376 | .resource = pmu_resources, | ||
377 | }; | ||
378 | |||
379 | static struct platform_device *emev2_early_devices[] __initdata = { | ||
380 | &uart0_device, | ||
381 | &uart1_device, | ||
382 | &uart2_device, | ||
383 | &uart3_device, | ||
384 | }; | ||
385 | |||
386 | static struct platform_device *emev2_late_devices[] __initdata = { | ||
387 | &sti_device, | ||
388 | &gio0_device, | ||
389 | &gio1_device, | ||
390 | &gio2_device, | ||
391 | &gio3_device, | ||
392 | &gio4_device, | ||
393 | &pmu_device, | ||
394 | }; | ||
395 | 175 | ||
396 | void __init emev2_add_standard_devices(void) | 176 | void __init emev2_add_standard_devices(void) |
397 | { | 177 | { |
398 | emev2_clock_init(); | 178 | emev2_clock_init(); |
399 | 179 | ||
400 | platform_add_devices(emev2_early_devices, | 180 | emev2_register_uart(0); |
401 | ARRAY_SIZE(emev2_early_devices)); | 181 | emev2_register_uart(1); |
402 | 182 | emev2_register_uart(2); | |
403 | platform_add_devices(emev2_late_devices, | 183 | emev2_register_uart(3); |
404 | ARRAY_SIZE(emev2_late_devices)); | 184 | emev2_register_sti(); |
185 | emev2_register_gio(0); | ||
186 | emev2_register_gio(1); | ||
187 | emev2_register_gio(2); | ||
188 | emev2_register_gio(3); | ||
189 | emev2_register_gio(4); | ||
190 | emev2_register_pmu(); | ||
405 | } | 191 | } |
406 | 192 | ||
407 | static void __init emev2_init_delay(void) | 193 | void __init emev2_init_delay(void) |
408 | { | 194 | { |
409 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ | 195 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ |
410 | } | 196 | } |
411 | 197 | ||
412 | void __init emev2_add_early_devices(void) | ||
413 | { | ||
414 | emev2_init_delay(); | ||
415 | |||
416 | early_platform_add_devices(emev2_early_devices, | ||
417 | ARRAY_SIZE(emev2_early_devices)); | ||
418 | |||
419 | /* setup early console here as well */ | ||
420 | shmobile_setup_console(); | ||
421 | } | ||
422 | |||
423 | void __init emev2_init_irq(void) | ||
424 | { | ||
425 | void __iomem *gic_dist_base; | ||
426 | void __iomem *gic_cpu_base; | ||
427 | |||
428 | /* Static mappings, never released */ | ||
429 | gic_dist_base = ioremap(0xe0028000, PAGE_SIZE); | ||
430 | gic_cpu_base = ioremap(0xe0020000, PAGE_SIZE); | ||
431 | BUG_ON(!gic_dist_base || !gic_cpu_base); | ||
432 | |||
433 | /* Use GIC to handle interrupts */ | ||
434 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
435 | } | ||
436 | |||
437 | #ifdef CONFIG_USE_OF | 198 | #ifdef CONFIG_USE_OF |
438 | static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = { | ||
439 | { } | ||
440 | }; | ||
441 | |||
442 | static void __init emev2_add_standard_devices_dt(void) | ||
443 | { | ||
444 | of_platform_populate(NULL, of_default_bus_match_table, | ||
445 | emev2_auxdata_lookup, NULL); | ||
446 | } | ||
447 | 199 | ||
448 | static const char *emev2_boards_compat_dt[] __initdata = { | 200 | static const char *emev2_boards_compat_dt[] __initdata = { |
449 | "renesas,emev2", | 201 | "renesas,emev2", |
@@ -452,10 +204,8 @@ static const char *emev2_boards_compat_dt[] __initdata = { | |||
452 | 204 | ||
453 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") | 205 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") |
454 | .smp = smp_ops(emev2_smp_ops), | 206 | .smp = smp_ops(emev2_smp_ops), |
207 | .map_io = emev2_map_io, | ||
455 | .init_early = emev2_init_delay, | 208 | .init_early = emev2_init_delay, |
456 | .nr_irqs = NR_IRQS_LEGACY, | ||
457 | .init_irq = irqchip_init, | ||
458 | .init_machine = emev2_add_standard_devices_dt, | ||
459 | .dt_compat = emev2_boards_compat_dt, | 209 | .dt_compat = emev2_boards_compat_dt, |
460 | MACHINE_END | 210 | MACHINE_END |
461 | 211 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index 7f45c2edbca9..d533bd23865c 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
@@ -18,11 +18,11 @@ | |||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/irqchip.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
24 | #include <linux/platform_data/irq-renesas-irqc.h> | 23 | #include <linux/platform_data/irq-renesas-irqc.h> |
25 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
25 | #include <linux/sh_timer.h> | ||
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
28 | #include <mach/r8a73a4.h> | 28 | #include <mach/r8a73a4.h> |
@@ -169,6 +169,25 @@ static const struct resource thermal0_resources[] = { | |||
169 | thermal0_resources, \ | 169 | thermal0_resources, \ |
170 | ARRAY_SIZE(thermal0_resources)) | 170 | ARRAY_SIZE(thermal0_resources)) |
171 | 171 | ||
172 | static struct sh_timer_config cmt10_platform_data = { | ||
173 | .name = "CMT10", | ||
174 | .timer_bit = 0, | ||
175 | .clockevent_rating = 80, | ||
176 | }; | ||
177 | |||
178 | static struct resource cmt10_resources[] = { | ||
179 | DEFINE_RES_MEM(0xe6130010, 0x0c), | ||
180 | DEFINE_RES_MEM(0xe6130000, 0x04), | ||
181 | DEFINE_RES_IRQ(gic_spi(120)), /* CMT1_0 */ | ||
182 | }; | ||
183 | |||
184 | #define r8a7790_register_cmt(idx) \ | ||
185 | platform_device_register_resndata(&platform_bus, "sh_cmt", \ | ||
186 | idx, cmt##idx##_resources, \ | ||
187 | ARRAY_SIZE(cmt##idx##_resources), \ | ||
188 | &cmt##idx##_platform_data, \ | ||
189 | sizeof(struct sh_timer_config)) | ||
190 | |||
172 | void __init r8a73a4_add_standard_devices(void) | 191 | void __init r8a73a4_add_standard_devices(void) |
173 | { | 192 | { |
174 | r8a73a4_register_scif(SCIFA0); | 193 | r8a73a4_register_scif(SCIFA0); |
@@ -180,11 +199,20 @@ void __init r8a73a4_add_standard_devices(void) | |||
180 | r8a73a4_register_irqc(0); | 199 | r8a73a4_register_irqc(0); |
181 | r8a73a4_register_irqc(1); | 200 | r8a73a4_register_irqc(1); |
182 | r8a73a4_register_thermal(); | 201 | r8a73a4_register_thermal(); |
202 | r8a7790_register_cmt(10); | ||
203 | } | ||
204 | |||
205 | void __init r8a73a4_init_delay(void) | ||
206 | { | ||
207 | #ifndef CONFIG_ARM_ARCH_TIMER | ||
208 | shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */ | ||
209 | #endif | ||
183 | } | 210 | } |
184 | 211 | ||
185 | #ifdef CONFIG_USE_OF | 212 | #ifdef CONFIG_USE_OF |
186 | void __init r8a73a4_add_standard_devices_dt(void) | 213 | void __init r8a73a4_add_standard_devices_dt(void) |
187 | { | 214 | { |
215 | platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); | ||
188 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 216 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
189 | } | 217 | } |
190 | 218 | ||
@@ -194,7 +222,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = { | |||
194 | }; | 222 | }; |
195 | 223 | ||
196 | DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") | 224 | DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") |
197 | .init_irq = irqchip_init, | 225 | .init_early = r8a73a4_init_delay, |
198 | .init_machine = r8a73a4_add_standard_devices_dt, | 226 | .init_machine = r8a73a4_add_standard_devices_dt, |
199 | .init_time = shmobile_timer_init, | 227 | .init_time = shmobile_timer_init, |
200 | .dt_compat = r8a73a4_boards_compat_dt, | 228 | .dt_compat = r8a73a4_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 00c5a707238b..84c5bb6d9725 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -588,6 +588,16 @@ static const struct sh_dmae_slave_config r8a7740_dmae_slaves[] = { | |||
588 | .addr = 0xfe1f0064, | 588 | .addr = 0xfe1f0064, |
589 | .chcr = CHCR_TX(XMIT_SZ_32BIT), | 589 | .chcr = CHCR_TX(XMIT_SZ_32BIT), |
590 | .mid_rid = 0xb5, | 590 | .mid_rid = 0xb5, |
591 | }, { | ||
592 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
593 | .addr = 0xe6bd0034, | ||
594 | .chcr = CHCR_TX(XMIT_SZ_32BIT), | ||
595 | .mid_rid = 0xd1, | ||
596 | }, { | ||
597 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
598 | .addr = 0xe6bd0034, | ||
599 | .chcr = CHCR_RX(XMIT_SZ_32BIT), | ||
600 | .mid_rid = 0xd2, | ||
591 | }, | 601 | }, |
592 | }; | 602 | }; |
593 | 603 | ||
@@ -986,16 +996,22 @@ void __init r8a7740_add_early_devices(void) | |||
986 | 996 | ||
987 | #ifdef CONFIG_USE_OF | 997 | #ifdef CONFIG_USE_OF |
988 | 998 | ||
989 | static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { | 999 | void __init r8a7740_add_early_devices_dt(void) |
990 | { } | 1000 | { |
991 | }; | 1001 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ |
1002 | |||
1003 | early_platform_add_devices(r8a7740_early_devices, | ||
1004 | ARRAY_SIZE(r8a7740_early_devices)); | ||
1005 | |||
1006 | /* setup early console here as well */ | ||
1007 | shmobile_setup_console(); | ||
1008 | } | ||
992 | 1009 | ||
993 | void __init r8a7740_add_standard_devices_dt(void) | 1010 | void __init r8a7740_add_standard_devices_dt(void) |
994 | { | 1011 | { |
995 | platform_add_devices(r8a7740_devices_dt, | 1012 | platform_add_devices(r8a7740_devices_dt, |
996 | ARRAY_SIZE(r8a7740_devices_dt)); | 1013 | ARRAY_SIZE(r8a7740_devices_dt)); |
997 | of_platform_populate(NULL, of_default_bus_match_table, | 1014 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
998 | r8a7740_auxdata_lookup, NULL); | ||
999 | } | 1015 | } |
1000 | 1016 | ||
1001 | void __init r8a7740_init_delay(void) | 1017 | void __init r8a7740_init_delay(void) |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 80c20392ad7c..a3a2e37b03f3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -53,7 +53,7 @@ | |||
53 | .irqs = SCIx_IRQ_MUXED(irq), \ | 53 | .irqs = SCIx_IRQ_MUXED(irq), \ |
54 | } | 54 | } |
55 | 55 | ||
56 | static struct plat_sci_port scif_platform_data[] = { | 56 | static struct plat_sci_port scif_platform_data[] __initdata = { |
57 | SCIF_INFO(0xffe40000, gic_iid(0x66)), | 57 | SCIF_INFO(0xffe40000, gic_iid(0x66)), |
58 | SCIF_INFO(0xffe41000, gic_iid(0x67)), | 58 | SCIF_INFO(0xffe41000, gic_iid(0x67)), |
59 | SCIF_INFO(0xffe42000, gic_iid(0x68)), | 59 | SCIF_INFO(0xffe42000, gic_iid(0x68)), |
@@ -63,24 +63,24 @@ static struct plat_sci_port scif_platform_data[] = { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* TMU */ | 65 | /* TMU */ |
66 | static struct resource sh_tmu0_resources[] = { | 66 | static struct resource sh_tmu0_resources[] __initdata = { |
67 | DEFINE_RES_MEM(0xffd80008, 12), | 67 | DEFINE_RES_MEM(0xffd80008, 12), |
68 | DEFINE_RES_IRQ(gic_iid(0x40)), | 68 | DEFINE_RES_IRQ(gic_iid(0x40)), |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static struct sh_timer_config sh_tmu0_platform_data = { | 71 | static struct sh_timer_config sh_tmu0_platform_data __initdata = { |
72 | .name = "TMU00", | 72 | .name = "TMU00", |
73 | .channel_offset = 0x4, | 73 | .channel_offset = 0x4, |
74 | .timer_bit = 0, | 74 | .timer_bit = 0, |
75 | .clockevent_rating = 200, | 75 | .clockevent_rating = 200, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static struct resource sh_tmu1_resources[] = { | 78 | static struct resource sh_tmu1_resources[] __initdata = { |
79 | DEFINE_RES_MEM(0xffd80014, 12), | 79 | DEFINE_RES_MEM(0xffd80014, 12), |
80 | DEFINE_RES_IRQ(gic_iid(0x41)), | 80 | DEFINE_RES_IRQ(gic_iid(0x41)), |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct sh_timer_config sh_tmu1_platform_data = { | 83 | static struct sh_timer_config sh_tmu1_platform_data __initdata = { |
84 | .name = "TMU01", | 84 | .name = "TMU01", |
85 | .channel_offset = 0x10, | 85 | .channel_offset = 0x10, |
86 | .timer_bit = 1, | 86 | .timer_bit = 1, |
@@ -189,7 +189,7 @@ USB_PLATFORM_INFO(ehci); | |||
189 | USB_PLATFORM_INFO(ohci); | 189 | USB_PLATFORM_INFO(ohci); |
190 | 190 | ||
191 | /* Ether */ | 191 | /* Ether */ |
192 | static struct resource ether_resources[] = { | 192 | static struct resource ether_resources[] __initdata = { |
193 | DEFINE_RES_MEM(0xfde00000, 0x400), | 193 | DEFINE_RES_MEM(0xfde00000, 0x400), |
194 | DEFINE_RES_IRQ(gic_iid(0x89)), | 194 | DEFINE_RES_IRQ(gic_iid(0x89)), |
195 | }; | 195 | }; |
@@ -203,17 +203,17 @@ void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) | |||
203 | } | 203 | } |
204 | 204 | ||
205 | /* PFC/GPIO */ | 205 | /* PFC/GPIO */ |
206 | static struct resource pfc_resources[] = { | 206 | static struct resource pfc_resources[] __initdata = { |
207 | DEFINE_RES_MEM(0xfffc0000, 0x118), | 207 | DEFINE_RES_MEM(0xfffc0000, 0x118), |
208 | }; | 208 | }; |
209 | 209 | ||
210 | #define R8A7778_GPIO(idx) \ | 210 | #define R8A7778_GPIO(idx) \ |
211 | static struct resource r8a7778_gpio##idx##_resources[] = { \ | 211 | static struct resource r8a7778_gpio##idx##_resources[] __initdata = { \ |
212 | DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \ | 212 | DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \ |
213 | DEFINE_RES_IRQ(gic_iid(0x87)), \ | 213 | DEFINE_RES_IRQ(gic_iid(0x87)), \ |
214 | }; \ | 214 | }; \ |
215 | \ | 215 | \ |
216 | static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data = { \ | 216 | static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data __initdata = { \ |
217 | .gpio_base = 32 * (idx), \ | 217 | .gpio_base = 32 * (idx), \ |
218 | .irq_base = GPIO_IRQ_BASE(idx), \ | 218 | .irq_base = GPIO_IRQ_BASE(idx), \ |
219 | .number_of_pins = 32, \ | 219 | .number_of_pins = 32, \ |
@@ -249,7 +249,7 @@ void __init r8a7778_pinmux_init(void) | |||
249 | }; | 249 | }; |
250 | 250 | ||
251 | /* SDHI */ | 251 | /* SDHI */ |
252 | static struct resource sdhi_resources[] = { | 252 | static struct resource sdhi_resources[] __initdata = { |
253 | /* SDHI0 */ | 253 | /* SDHI0 */ |
254 | DEFINE_RES_MEM(0xFFE4C000, 0x100), | 254 | DEFINE_RES_MEM(0xFFE4C000, 0x100), |
255 | DEFINE_RES_IRQ(gic_iid(0x77)), | 255 | DEFINE_RES_IRQ(gic_iid(0x77)), |
@@ -365,12 +365,12 @@ void __init r8a7778_init_late(void) | |||
365 | platform_device_register_full(&ohci_info); | 365 | platform_device_register_full(&ohci_info); |
366 | } | 366 | } |
367 | 367 | ||
368 | static struct renesas_intc_irqpin_config irqpin_platform_data = { | 368 | static struct renesas_intc_irqpin_config irqpin_platform_data __initdata = { |
369 | .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ | 369 | .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ |
370 | .sense_bitfield_width = 2, | 370 | .sense_bitfield_width = 2, |
371 | }; | 371 | }; |
372 | 372 | ||
373 | static struct resource irqpin_resources[] = { | 373 | static struct resource irqpin_resources[] __initdata = { |
374 | DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */ | 374 | DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */ |
375 | DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */ | 375 | DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */ |
376 | DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */ | 376 | DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */ |
@@ -408,17 +408,25 @@ void __init r8a7778_init_irq_extpin(int irlm) | |||
408 | &irqpin_platform_data, sizeof(irqpin_platform_data)); | 408 | &irqpin_platform_data, sizeof(irqpin_platform_data)); |
409 | } | 409 | } |
410 | 410 | ||
411 | void __init r8a7778_init_delay(void) | ||
412 | { | ||
413 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ | ||
414 | } | ||
415 | |||
416 | #ifdef CONFIG_USE_OF | ||
411 | #define INT2SMSKCR0 0x82288 /* 0xfe782288 */ | 417 | #define INT2SMSKCR0 0x82288 /* 0xfe782288 */ |
412 | #define INT2SMSKCR1 0x8228c /* 0xfe78228c */ | 418 | #define INT2SMSKCR1 0x8228c /* 0xfe78228c */ |
413 | 419 | ||
414 | #define INT2NTSR0 0x00018 /* 0xfe700018 */ | 420 | #define INT2NTSR0 0x00018 /* 0xfe700018 */ |
415 | #define INT2NTSR1 0x0002c /* 0xfe70002c */ | 421 | #define INT2NTSR1 0x0002c /* 0xfe70002c */ |
416 | static void __init r8a7778_init_irq_common(void) | 422 | void __init r8a7778_init_irq_dt(void) |
417 | { | 423 | { |
418 | void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); | 424 | void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); |
419 | 425 | ||
420 | BUG_ON(!base); | 426 | BUG_ON(!base); |
421 | 427 | ||
428 | irqchip_init(); | ||
429 | |||
422 | /* route all interrupts to ARM */ | 430 | /* route all interrupts to ARM */ |
423 | __raw_writel(0x73ffffff, base + INT2NTSR0); | 431 | __raw_writel(0x73ffffff, base + INT2NTSR0); |
424 | __raw_writel(0xffffffff, base + INT2NTSR1); | 432 | __raw_writel(0xffffffff, base + INT2NTSR1); |
@@ -430,43 +438,6 @@ static void __init r8a7778_init_irq_common(void) | |||
430 | iounmap(base); | 438 | iounmap(base); |
431 | } | 439 | } |
432 | 440 | ||
433 | void __init r8a7778_init_irq(void) | ||
434 | { | ||
435 | void __iomem *gic_dist_base; | ||
436 | void __iomem *gic_cpu_base; | ||
437 | |||
438 | gic_dist_base = ioremap_nocache(0xfe438000, PAGE_SIZE); | ||
439 | gic_cpu_base = ioremap_nocache(0xfe430000, PAGE_SIZE); | ||
440 | BUG_ON(!gic_dist_base || !gic_cpu_base); | ||
441 | |||
442 | /* use GIC to handle interrupts */ | ||
443 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
444 | |||
445 | r8a7778_init_irq_common(); | ||
446 | } | ||
447 | |||
448 | void __init r8a7778_init_delay(void) | ||
449 | { | ||
450 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ | ||
451 | } | ||
452 | |||
453 | #ifdef CONFIG_USE_OF | ||
454 | void __init r8a7778_init_irq_dt(void) | ||
455 | { | ||
456 | irqchip_init(); | ||
457 | r8a7778_init_irq_common(); | ||
458 | } | ||
459 | |||
460 | static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = { | ||
461 | {}, | ||
462 | }; | ||
463 | |||
464 | void __init r8a7778_add_standard_devices_dt(void) | ||
465 | { | ||
466 | of_platform_populate(NULL, of_default_bus_match_table, | ||
467 | r8a7778_auxdata_lookup, NULL); | ||
468 | } | ||
469 | |||
470 | static const char *r8a7778_compat_dt[] __initdata = { | 441 | static const char *r8a7778_compat_dt[] __initdata = { |
471 | "renesas,r8a7778", | 442 | "renesas,r8a7778", |
472 | NULL, | 443 | NULL, |
@@ -475,7 +446,6 @@ static const char *r8a7778_compat_dt[] __initdata = { | |||
475 | DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") | 446 | DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") |
476 | .init_early = r8a7778_init_delay, | 447 | .init_early = r8a7778_init_delay, |
477 | .init_irq = r8a7778_init_irq_dt, | 448 | .init_irq = r8a7778_init_irq_dt, |
478 | .init_machine = r8a7778_add_standard_devices_dt, | ||
479 | .init_time = shmobile_timer_init, | 449 | .init_time = shmobile_timer_init, |
480 | .dt_compat = r8a7778_compat_dt, | 450 | .dt_compat = r8a7778_compat_dt, |
481 | .init_late = r8a7778_init_late, | 451 | .init_late = r8a7778_init_late, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 398687761f50..66d38261ecaa 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -665,10 +665,6 @@ void __init r8a7779_init_delay(void) | |||
665 | shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ | 665 | shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ |
666 | } | 666 | } |
667 | 667 | ||
668 | static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = { | ||
669 | {}, | ||
670 | }; | ||
671 | |||
672 | void __init r8a7779_add_standard_devices_dt(void) | 668 | void __init r8a7779_add_standard_devices_dt(void) |
673 | { | 669 | { |
674 | /* clocks are setup late during boot in the case of DT */ | 670 | /* clocks are setup late during boot in the case of DT */ |
@@ -676,8 +672,7 @@ void __init r8a7779_add_standard_devices_dt(void) | |||
676 | 672 | ||
677 | platform_add_devices(r8a7779_devices_dt, | 673 | platform_add_devices(r8a7779_devices_dt, |
678 | ARRAY_SIZE(r8a7779_devices_dt)); | 674 | ARRAY_SIZE(r8a7779_devices_dt)); |
679 | of_platform_populate(NULL, of_default_bus_match_table, | 675 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
680 | r8a7779_auxdata_lookup, NULL); | ||
681 | } | 676 | } |
682 | 677 | ||
683 | static const char *r8a7779_compat_dt[] __initdata = { | 678 | static const char *r8a7779_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 28f94752b8ff..4c96dad21195 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -19,12 +19,12 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/irqchip.h> | ||
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
25 | #include <linux/serial_sci.h> | ||
26 | #include <linux/platform_data/gpio-rcar.h> | 24 | #include <linux/platform_data/gpio-rcar.h> |
27 | #include <linux/platform_data/irq-renesas-irqc.h> | 25 | #include <linux/platform_data/irq-renesas-irqc.h> |
26 | #include <linux/serial_sci.h> | ||
27 | #include <linux/sh_timer.h> | ||
28 | #include <mach/common.h> | 28 | #include <mach/common.h> |
29 | #include <mach/irqs.h> | 29 | #include <mach/irqs.h> |
30 | #include <mach/r8a7790.h> | 30 | #include <mach/r8a7790.h> |
@@ -149,6 +149,36 @@ static struct resource irqc0_resources[] __initdata = { | |||
149 | &irqc##idx##_data, \ | 149 | &irqc##idx##_data, \ |
150 | sizeof(struct renesas_irqc_config)) | 150 | sizeof(struct renesas_irqc_config)) |
151 | 151 | ||
152 | static struct resource thermal_resources[] __initdata = { | ||
153 | DEFINE_RES_MEM(0xe61f0000, 0x14), | ||
154 | DEFINE_RES_MEM(0xe61f0100, 0x38), | ||
155 | DEFINE_RES_IRQ(gic_spi(69)), | ||
156 | }; | ||
157 | |||
158 | #define r8a7790_register_thermal() \ | ||
159 | platform_device_register_simple("rcar_thermal", -1, \ | ||
160 | thermal_resources, \ | ||
161 | ARRAY_SIZE(thermal_resources)) | ||
162 | |||
163 | static struct sh_timer_config cmt00_platform_data = { | ||
164 | .name = "CMT00", | ||
165 | .timer_bit = 0, | ||
166 | .clockevent_rating = 80, | ||
167 | }; | ||
168 | |||
169 | static struct resource cmt00_resources[] = { | ||
170 | DEFINE_RES_MEM(0xffca0510, 0x0c), | ||
171 | DEFINE_RES_MEM(0xffca0500, 0x04), | ||
172 | DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */ | ||
173 | }; | ||
174 | |||
175 | #define r8a7790_register_cmt(idx) \ | ||
176 | platform_device_register_resndata(&platform_bus, "sh_cmt", \ | ||
177 | idx, cmt##idx##_resources, \ | ||
178 | ARRAY_SIZE(cmt##idx##_resources), \ | ||
179 | &cmt##idx##_platform_data, \ | ||
180 | sizeof(struct sh_timer_config)) | ||
181 | |||
152 | void __init r8a7790_add_standard_devices(void) | 182 | void __init r8a7790_add_standard_devices(void) |
153 | { | 183 | { |
154 | r8a7790_register_scif(SCIFA0); | 184 | r8a7790_register_scif(SCIFA0); |
@@ -162,34 +192,91 @@ void __init r8a7790_add_standard_devices(void) | |||
162 | r8a7790_register_scif(HSCIF0); | 192 | r8a7790_register_scif(HSCIF0); |
163 | r8a7790_register_scif(HSCIF1); | 193 | r8a7790_register_scif(HSCIF1); |
164 | r8a7790_register_irqc(0); | 194 | r8a7790_register_irqc(0); |
195 | r8a7790_register_thermal(); | ||
196 | r8a7790_register_cmt(00); | ||
165 | } | 197 | } |
166 | 198 | ||
199 | #define MODEMR 0xe6160060 | ||
200 | |||
201 | u32 __init r8a7790_read_mode_pins(void) | ||
202 | { | ||
203 | void __iomem *modemr = ioremap_nocache(MODEMR, 4); | ||
204 | u32 mode; | ||
205 | |||
206 | BUG_ON(!modemr); | ||
207 | mode = ioread32(modemr); | ||
208 | iounmap(modemr); | ||
209 | |||
210 | return mode; | ||
211 | } | ||
212 | |||
213 | #define CNTCR 0 | ||
214 | #define CNTFID0 0x20 | ||
215 | |||
167 | void __init r8a7790_timer_init(void) | 216 | void __init r8a7790_timer_init(void) |
168 | { | 217 | { |
169 | void __iomem *cntcr; | 218 | #ifdef CONFIG_ARM_ARCH_TIMER |
219 | u32 mode = r8a7790_read_mode_pins(); | ||
220 | void __iomem *base; | ||
221 | int extal_mhz = 0; | ||
222 | u32 freq; | ||
223 | |||
224 | /* At Linux boot time the r8a7790 arch timer comes up | ||
225 | * with the counter disabled. Moreover, it may also report | ||
226 | * a potentially incorrect fixed 13 MHz frequency. To be | ||
227 | * correct these registers need to be updated to use the | ||
228 | * frequency EXTAL / 2 which can be determined by the MD pins. | ||
229 | */ | ||
230 | |||
231 | switch (mode & (MD(14) | MD(13))) { | ||
232 | case 0: | ||
233 | extal_mhz = 15; | ||
234 | break; | ||
235 | case MD(13): | ||
236 | extal_mhz = 20; | ||
237 | break; | ||
238 | case MD(14): | ||
239 | extal_mhz = 26; | ||
240 | break; | ||
241 | case MD(13) | MD(14): | ||
242 | extal_mhz = 30; | ||
243 | break; | ||
244 | } | ||
170 | 245 | ||
171 | /* make sure arch timer is started by setting bit 0 of CNTCT */ | 246 | /* The arch timer frequency equals EXTAL / 2 */ |
172 | cntcr = ioremap(0xe6080000, PAGE_SIZE); | 247 | freq = extal_mhz * (1000000 / 2); |
173 | iowrite32(1, cntcr); | 248 | |
174 | iounmap(cntcr); | 249 | /* Remap "armgcnt address map" space */ |
250 | base = ioremap(0xe6080000, PAGE_SIZE); | ||
251 | |||
252 | /* Update registers with correct frequency */ | ||
253 | iowrite32(freq, base + CNTFID0); | ||
254 | asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq)); | ||
255 | |||
256 | /* make sure arch timer is started by setting bit 0 of CNTCR */ | ||
257 | iowrite32(1, base + CNTCR); | ||
258 | iounmap(base); | ||
259 | #endif /* CONFIG_ARM_ARCH_TIMER */ | ||
175 | 260 | ||
176 | shmobile_timer_init(); | 261 | shmobile_timer_init(); |
177 | } | 262 | } |
178 | 263 | ||
179 | #ifdef CONFIG_USE_OF | 264 | void __init r8a7790_init_delay(void) |
180 | void __init r8a7790_add_standard_devices_dt(void) | ||
181 | { | 265 | { |
182 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 266 | #ifndef CONFIG_ARM_ARCH_TIMER |
267 | shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */ | ||
268 | #endif | ||
183 | } | 269 | } |
184 | 270 | ||
271 | #ifdef CONFIG_USE_OF | ||
272 | |||
185 | static const char *r8a7790_boards_compat_dt[] __initdata = { | 273 | static const char *r8a7790_boards_compat_dt[] __initdata = { |
186 | "renesas,r8a7790", | 274 | "renesas,r8a7790", |
187 | NULL, | 275 | NULL, |
188 | }; | 276 | }; |
189 | 277 | ||
190 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | 278 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") |
191 | .init_irq = irqchip_init, | 279 | .init_early = r8a7790_init_delay, |
192 | .init_machine = r8a7790_add_standard_devices_dt, | ||
193 | .init_time = r8a7790_timer_init, | 280 | .init_time = r8a7790_timer_init, |
194 | .dt_compat = r8a7790_boards_compat_dt, | 281 | .dt_compat = r8a7790_boards_compat_dt, |
195 | MACHINE_END | 282 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 5502d624aca6..13e6fdbde0a5 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -1147,10 +1147,6 @@ void __init sh7372_add_early_devices_dt(void) | |||
1147 | shmobile_setup_console(); | 1147 | shmobile_setup_console(); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = { | ||
1151 | { } | ||
1152 | }; | ||
1153 | |||
1154 | void __init sh7372_add_standard_devices_dt(void) | 1150 | void __init sh7372_add_standard_devices_dt(void) |
1155 | { | 1151 | { |
1156 | /* clocks are setup late during boot in the case of DT */ | 1152 | /* clocks are setup late during boot in the case of DT */ |
@@ -1159,8 +1155,7 @@ void __init sh7372_add_standard_devices_dt(void) | |||
1159 | platform_add_devices(sh7372_early_devices, | 1155 | platform_add_devices(sh7372_early_devices, |
1160 | ARRAY_SIZE(sh7372_early_devices)); | 1156 | ARRAY_SIZE(sh7372_early_devices)); |
1161 | 1157 | ||
1162 | of_platform_populate(NULL, of_default_bus_match_table, | 1158 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
1163 | sh7372_auxdata_lookup, NULL); | ||
1164 | } | 1159 | } |
1165 | 1160 | ||
1166 | static const char *sh7372_boards_compat_dt[] __initdata = { | 1161 | static const char *sh7372_boards_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 96e7ca1e4e11..516c2391b47a 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/irqchip.h> | ||
26 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
27 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
@@ -61,29 +60,16 @@ void __init sh73a0_map_io(void) | |||
61 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); | 60 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); |
62 | } | 61 | } |
63 | 62 | ||
64 | static struct resource sh73a0_pfc_resources[] = { | 63 | /* PFC */ |
65 | [0] = { | 64 | static struct resource pfc_resources[] __initdata = { |
66 | .start = 0xe6050000, | 65 | DEFINE_RES_MEM(0xe6050000, 0x8000), |
67 | .end = 0xe6057fff, | 66 | DEFINE_RES_MEM(0xe605801c, 0x000c), |
68 | .flags = IORESOURCE_MEM, | ||
69 | }, | ||
70 | [1] = { | ||
71 | .start = 0xe605801c, | ||
72 | .end = 0xe6058027, | ||
73 | .flags = IORESOURCE_MEM, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | static struct platform_device sh73a0_pfc_device = { | ||
78 | .name = "pfc-sh73a0", | ||
79 | .id = -1, | ||
80 | .resource = sh73a0_pfc_resources, | ||
81 | .num_resources = ARRAY_SIZE(sh73a0_pfc_resources), | ||
82 | }; | 67 | }; |
83 | 68 | ||
84 | void __init sh73a0_pinmux_init(void) | 69 | void __init sh73a0_pinmux_init(void) |
85 | { | 70 | { |
86 | platform_device_register(&sh73a0_pfc_device); | 71 | platform_device_register_simple("pfc-sh73a0", -1, pfc_resources, |
72 | ARRAY_SIZE(pfc_resources)); | ||
87 | } | 73 | } |
88 | 74 | ||
89 | static struct plat_sci_port scif0_platform_data = { | 75 | static struct plat_sci_port scif0_platform_data = { |
@@ -958,10 +944,6 @@ void __init sh73a0_add_early_devices(void) | |||
958 | 944 | ||
959 | #ifdef CONFIG_USE_OF | 945 | #ifdef CONFIG_USE_OF |
960 | 946 | ||
961 | static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { | ||
962 | {}, | ||
963 | }; | ||
964 | |||
965 | void __init sh73a0_add_standard_devices_dt(void) | 947 | void __init sh73a0_add_standard_devices_dt(void) |
966 | { | 948 | { |
967 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; | 949 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; |
@@ -971,8 +953,7 @@ void __init sh73a0_add_standard_devices_dt(void) | |||
971 | 953 | ||
972 | platform_add_devices(sh73a0_devices_dt, | 954 | platform_add_devices(sh73a0_devices_dt, |
973 | ARRAY_SIZE(sh73a0_devices_dt)); | 955 | ARRAY_SIZE(sh73a0_devices_dt)); |
974 | of_platform_populate(NULL, of_default_bus_match_table, | 956 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
975 | sh73a0_auxdata_lookup, NULL); | ||
976 | 957 | ||
977 | /* Instantiate cpufreq-cpu0 */ | 958 | /* Instantiate cpufreq-cpu0 */ |
978 | platform_device_register_full(&devinfo); | 959 | platform_device_register_full(&devinfo); |
@@ -988,7 +969,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") | |||
988 | .map_io = sh73a0_map_io, | 969 | .map_io = sh73a0_map_io, |
989 | .init_early = sh73a0_init_delay, | 970 | .init_early = sh73a0_init_delay, |
990 | .nr_irqs = NR_IRQS_LEGACY, | 971 | .nr_irqs = NR_IRQS_LEGACY, |
991 | .init_irq = irqchip_init, | ||
992 | .init_machine = sh73a0_add_standard_devices_dt, | 972 | .init_machine = sh73a0_add_standard_devices_dt, |
993 | .dt_compat = sh73a0_boards_compat_dt, | 973 | .dt_compat = sh73a0_boards_compat_dt, |
994 | MACHINE_END | 974 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S index 53f4840e4949..9782862899e8 100644 --- a/arch/arm/mach-shmobile/sleep-sh7372.S +++ b/arch/arm/mach-shmobile/sleep-sh7372.S | |||
@@ -41,6 +41,7 @@ | |||
41 | sh7372_resume_core_standby_sysc: | 41 | sh7372_resume_core_standby_sysc: |
42 | ldr pc, 1f | 42 | ldr pc, 1f |
43 | 43 | ||
44 | .align 2 | ||
44 | .globl sh7372_cpu_resume | 45 | .globl sh7372_cpu_resume |
45 | sh7372_cpu_resume: | 46 | sh7372_cpu_resume: |
46 | 1: .space 4 | 47 | 1: .space 4 |
@@ -96,6 +97,7 @@ sh7372_do_idle_sysc: | |||
96 | 1: | 97 | 1: |
97 | b 1b | 98 | b 1b |
98 | 99 | ||
100 | .align 2 | ||
99 | kernel_flush: | 101 | kernel_flush: |
100 | .word v7_flush_dcache_all | 102 | .word v7_flush_dcache_all |
101 | #endif | 103 | #endif |
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index 22a05a869d25..78e84c582453 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <asm/smp_scu.h> | 29 | #include <asm/smp_scu.h> |
30 | 30 | ||
31 | #define EMEV2_SCU_BASE 0x1e000000 | 31 | #define EMEV2_SCU_BASE 0x1e000000 |
32 | #define EMEV2_SMU_BASE 0xe0110000 | ||
33 | #define SMU_GENERAL_REG0 0x7c0 | ||
32 | 34 | ||
33 | static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) | 35 | static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) |
34 | { | 36 | { |
@@ -38,10 +40,18 @@ static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
38 | 40 | ||
39 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) | 41 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) |
40 | { | 42 | { |
43 | void __iomem *smu; | ||
44 | |||
45 | /* setup EMEV2 specific SCU base, enable */ | ||
46 | shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); | ||
41 | scu_enable(shmobile_scu_base); | 47 | scu_enable(shmobile_scu_base); |
42 | 48 | ||
43 | /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */ | 49 | /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */ |
44 | emev2_set_boot_vector(__pa(shmobile_boot_vector)); | 50 | smu = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); |
51 | if (smu) { | ||
52 | iowrite32(__pa(shmobile_boot_vector), smu + SMU_GENERAL_REG0); | ||
53 | iounmap(smu); | ||
54 | } | ||
45 | shmobile_boot_fn = virt_to_phys(shmobile_boot_scu); | 55 | shmobile_boot_fn = virt_to_phys(shmobile_boot_scu); |
46 | shmobile_boot_arg = (unsigned long)shmobile_scu_base; | 56 | shmobile_boot_arg = (unsigned long)shmobile_scu_base; |
47 | 57 | ||
@@ -49,21 +59,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) | |||
49 | scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); | 59 | scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); |
50 | } | 60 | } |
51 | 61 | ||
52 | static void __init emev2_smp_init_cpus(void) | ||
53 | { | ||
54 | unsigned int ncores; | ||
55 | |||
56 | /* setup EMEV2 specific SCU base */ | ||
57 | shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); | ||
58 | emev2_clock_init(); /* need ioremapped SMU */ | ||
59 | |||
60 | ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1; | ||
61 | |||
62 | shmobile_smp_init_cpus(ncores); | ||
63 | } | ||
64 | |||
65 | struct smp_operations emev2_smp_ops __initdata = { | 62 | struct smp_operations emev2_smp_ops __initdata = { |
66 | .smp_init_cpus = emev2_smp_init_cpus, | ||
67 | .smp_prepare_cpus = emev2_smp_prepare_cpus, | 63 | .smp_prepare_cpus = emev2_smp_prepare_cpus, |
68 | .smp_boot_secondary = emev2_boot_secondary, | 64 | .smp_boot_secondary = emev2_boot_secondary, |
69 | }; | 65 | }; |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index b8bbabec6310..c700e623f9d8 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -66,4 +66,12 @@ config ARCH_VEXPRESS_DCSCB | |||
66 | This is needed to provide CPU and cluster power management | 66 | This is needed to provide CPU and cluster power management |
67 | on RTSM implementing big.LITTLE. | 67 | on RTSM implementing big.LITTLE. |
68 | 68 | ||
69 | config ARCH_VEXPRESS_TC2_PM | ||
70 | bool "Versatile Express TC2 power management" | ||
71 | depends on MCPM | ||
72 | select ARM_CCI | ||
73 | help | ||
74 | Support for CPU and cluster power management on Versatile Express | ||
75 | with a TC2 (A15x2 A7x3) big.LITTLE core tile. | ||
76 | |||
69 | endmenu | 77 | endmenu |
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 48ba89a8149f..36ea8247123a 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile | |||
@@ -7,5 +7,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | |||
7 | obj-y := v2m.o | 7 | obj-y := v2m.o |
8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o | 8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o |
9 | obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o | 9 | obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o |
10 | obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o spc.o | ||
10 | obj-$(CONFIG_SMP) += platsmp.o | 11 | obj-$(CONFIG_SMP) += platsmp.o |
11 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 12 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c index 16d57a8a9d5a..3a6384c6c435 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c | |||
@@ -136,14 +136,35 @@ static void dcscb_power_down(void) | |||
136 | /* | 136 | /* |
137 | * Flush all cache levels for this cluster. | 137 | * Flush all cache levels for this cluster. |
138 | * | 138 | * |
139 | * A15/A7 can hit in the cache with SCTLR.C=0, so we don't need | 139 | * To do so we do: |
140 | * a preliminary flush here for those CPUs. At least, that's | 140 | * - Clear the SCTLR.C bit to prevent further cache allocations |
141 | * the theory -- without the extra flush, Linux explodes on | 141 | * - Flush the whole cache |
142 | * RTSM (to be investigated). | 142 | * - Clear the ACTLR "SMP" bit to disable local coherency |
143 | * | ||
144 | * Let's do it in the safest possible way i.e. with | ||
145 | * no memory access within the following sequence | ||
146 | * including to the stack. | ||
147 | * | ||
148 | * Note: fp is preserved to the stack explicitly prior doing | ||
149 | * this since adding it to the clobber list is incompatible | ||
150 | * with having CONFIG_FRAME_POINTER=y. | ||
143 | */ | 151 | */ |
144 | flush_cache_all(); | 152 | asm volatile( |
145 | set_cr(get_cr() & ~CR_C); | 153 | "str fp, [sp, #-4]! \n\t" |
146 | flush_cache_all(); | 154 | "mrc p15, 0, r0, c1, c0, 0 @ get CR \n\t" |
155 | "bic r0, r0, #"__stringify(CR_C)" \n\t" | ||
156 | "mcr p15, 0, r0, c1, c0, 0 @ set CR \n\t" | ||
157 | "isb \n\t" | ||
158 | "bl v7_flush_dcache_all \n\t" | ||
159 | "clrex \n\t" | ||
160 | "mrc p15, 0, r0, c1, c0, 1 @ get AUXCR \n\t" | ||
161 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" | ||
162 | "mcr p15, 0, r0, c1, c0, 1 @ set AUXCR \n\t" | ||
163 | "isb \n\t" | ||
164 | "dsb \n\t" | ||
165 | "ldr fp, [sp], #4" | ||
166 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", | ||
167 | "r9","r10","lr","memory"); | ||
147 | 168 | ||
148 | /* | 169 | /* |
149 | * This is a harmless no-op. On platforms with a real | 170 | * This is a harmless no-op. On platforms with a real |
@@ -152,9 +173,6 @@ static void dcscb_power_down(void) | |||
152 | */ | 173 | */ |
153 | outer_flush_all(); | 174 | outer_flush_all(); |
154 | 175 | ||
155 | /* Disable local coherency by clearing the ACTLR "SMP" bit: */ | ||
156 | set_auxcr(get_auxcr() & ~(1 << 6)); | ||
157 | |||
158 | /* | 176 | /* |
159 | * Disable cluster-level coherency by masking | 177 | * Disable cluster-level coherency by masking |
160 | * incoming snoops and DVM messages: | 178 | * incoming snoops and DVM messages: |
@@ -167,18 +185,24 @@ static void dcscb_power_down(void) | |||
167 | 185 | ||
168 | /* | 186 | /* |
169 | * Flush the local CPU cache. | 187 | * Flush the local CPU cache. |
170 | * | 188 | * Let's do it in the safest possible way as above. |
171 | * A15/A7 can hit in the cache with SCTLR.C=0, so we don't need | ||
172 | * a preliminary flush here for those CPUs. At least, that's | ||
173 | * the theory -- without the extra flush, Linux explodes on | ||
174 | * RTSM (to be investigated). | ||
175 | */ | 189 | */ |
176 | flush_cache_louis(); | 190 | asm volatile( |
177 | set_cr(get_cr() & ~CR_C); | 191 | "str fp, [sp, #-4]! \n\t" |
178 | flush_cache_louis(); | 192 | "mrc p15, 0, r0, c1, c0, 0 @ get CR \n\t" |
179 | 193 | "bic r0, r0, #"__stringify(CR_C)" \n\t" | |
180 | /* Disable local coherency by clearing the ACTLR "SMP" bit: */ | 194 | "mcr p15, 0, r0, c1, c0, 0 @ set CR \n\t" |
181 | set_auxcr(get_auxcr() & ~(1 << 6)); | 195 | "isb \n\t" |
196 | "bl v7_flush_dcache_louis \n\t" | ||
197 | "clrex \n\t" | ||
198 | "mrc p15, 0, r0, c1, c0, 1 @ get AUXCR \n\t" | ||
199 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" | ||
200 | "mcr p15, 0, r0, c1, c0, 1 @ set AUXCR \n\t" | ||
201 | "isb \n\t" | ||
202 | "dsb \n\t" | ||
203 | "ldr fp, [sp], #4" | ||
204 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", | ||
205 | "r9","r10","lr","memory"); | ||
182 | } | 206 | } |
183 | 207 | ||
184 | __mcpm_cpu_down(cpu, cluster); | 208 | __mcpm_cpu_down(cpu, cluster); |
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c new file mode 100644 index 000000000000..eefb029197ca --- /dev/null +++ b/arch/arm/mach-vexpress/spc.c | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Versatile Express Serial Power Controller (SPC) support | ||
3 | * | ||
4 | * Copyright (C) 2013 ARM Ltd. | ||
5 | * | ||
6 | * Authors: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> | ||
7 | * Achin Gupta <achin.gupta@arm.com> | ||
8 | * Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
15 | * kind, whether express or implied; without even the implied warranty | ||
16 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | */ | ||
19 | |||
20 | #include <linux/err.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/slab.h> | ||
23 | |||
24 | #include <asm/cacheflush.h> | ||
25 | |||
26 | #define SPCLOG "vexpress-spc: " | ||
27 | |||
28 | /* SPC wake-up IRQs status and mask */ | ||
29 | #define WAKE_INT_MASK 0x24 | ||
30 | #define WAKE_INT_RAW 0x28 | ||
31 | #define WAKE_INT_STAT 0x2c | ||
32 | /* SPC power down registers */ | ||
33 | #define A15_PWRDN_EN 0x30 | ||
34 | #define A7_PWRDN_EN 0x34 | ||
35 | /* SPC per-CPU mailboxes */ | ||
36 | #define A15_BX_ADDR0 0x68 | ||
37 | #define A7_BX_ADDR0 0x78 | ||
38 | |||
39 | /* wake-up interrupt masks */ | ||
40 | #define GBL_WAKEUP_INT_MSK (0x3 << 10) | ||
41 | |||
42 | /* TC2 static dual-cluster configuration */ | ||
43 | #define MAX_CLUSTERS 2 | ||
44 | |||
45 | struct ve_spc_drvdata { | ||
46 | void __iomem *baseaddr; | ||
47 | /* | ||
48 | * A15s cluster identifier | ||
49 | * It corresponds to A15 processors MPIDR[15:8] bitfield | ||
50 | */ | ||
51 | u32 a15_clusid; | ||
52 | }; | ||
53 | |||
54 | static struct ve_spc_drvdata *info; | ||
55 | |||
56 | static inline bool cluster_is_a15(u32 cluster) | ||
57 | { | ||
58 | return cluster == info->a15_clusid; | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * ve_spc_global_wakeup_irq() | ||
63 | * | ||
64 | * Function to set/clear global wakeup IRQs. Not protected by locking since | ||
65 | * it might be used in code paths where normal cacheable locks are not | ||
66 | * working. Locking must be provided by the caller to ensure atomicity. | ||
67 | * | ||
68 | * @set: if true, global wake-up IRQs are set, if false they are cleared | ||
69 | */ | ||
70 | void ve_spc_global_wakeup_irq(bool set) | ||
71 | { | ||
72 | u32 reg; | ||
73 | |||
74 | reg = readl_relaxed(info->baseaddr + WAKE_INT_MASK); | ||
75 | |||
76 | if (set) | ||
77 | reg |= GBL_WAKEUP_INT_MSK; | ||
78 | else | ||
79 | reg &= ~GBL_WAKEUP_INT_MSK; | ||
80 | |||
81 | writel_relaxed(reg, info->baseaddr + WAKE_INT_MASK); | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * ve_spc_cpu_wakeup_irq() | ||
86 | * | ||
87 | * Function to set/clear per-CPU wake-up IRQs. Not protected by locking since | ||
88 | * it might be used in code paths where normal cacheable locks are not | ||
89 | * working. Locking must be provided by the caller to ensure atomicity. | ||
90 | * | ||
91 | * @cluster: mpidr[15:8] bitfield describing cluster affinity level | ||
92 | * @cpu: mpidr[7:0] bitfield describing cpu affinity level | ||
93 | * @set: if true, wake-up IRQs are set, if false they are cleared | ||
94 | */ | ||
95 | void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set) | ||
96 | { | ||
97 | u32 mask, reg; | ||
98 | |||
99 | if (cluster >= MAX_CLUSTERS) | ||
100 | return; | ||
101 | |||
102 | mask = 1 << cpu; | ||
103 | |||
104 | if (!cluster_is_a15(cluster)) | ||
105 | mask <<= 4; | ||
106 | |||
107 | reg = readl_relaxed(info->baseaddr + WAKE_INT_MASK); | ||
108 | |||
109 | if (set) | ||
110 | reg |= mask; | ||
111 | else | ||
112 | reg &= ~mask; | ||
113 | |||
114 | writel_relaxed(reg, info->baseaddr + WAKE_INT_MASK); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * ve_spc_set_resume_addr() - set the jump address used for warm boot | ||
119 | * | ||
120 | * @cluster: mpidr[15:8] bitfield describing cluster affinity level | ||
121 | * @cpu: mpidr[7:0] bitfield describing cpu affinity level | ||
122 | * @addr: physical resume address | ||
123 | */ | ||
124 | void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr) | ||
125 | { | ||
126 | void __iomem *baseaddr; | ||
127 | |||
128 | if (cluster >= MAX_CLUSTERS) | ||
129 | return; | ||
130 | |||
131 | if (cluster_is_a15(cluster)) | ||
132 | baseaddr = info->baseaddr + A15_BX_ADDR0 + (cpu << 2); | ||
133 | else | ||
134 | baseaddr = info->baseaddr + A7_BX_ADDR0 + (cpu << 2); | ||
135 | |||
136 | writel_relaxed(addr, baseaddr); | ||
137 | } | ||
138 | |||
139 | /** | ||
140 | * ve_spc_powerdown() | ||
141 | * | ||
142 | * Function to enable/disable cluster powerdown. Not protected by locking | ||
143 | * since it might be used in code paths where normal cacheable locks are not | ||
144 | * working. Locking must be provided by the caller to ensure atomicity. | ||
145 | * | ||
146 | * @cluster: mpidr[15:8] bitfield describing cluster affinity level | ||
147 | * @enable: if true enables powerdown, if false disables it | ||
148 | */ | ||
149 | void ve_spc_powerdown(u32 cluster, bool enable) | ||
150 | { | ||
151 | u32 pwdrn_reg; | ||
152 | |||
153 | if (cluster >= MAX_CLUSTERS) | ||
154 | return; | ||
155 | |||
156 | pwdrn_reg = cluster_is_a15(cluster) ? A15_PWRDN_EN : A7_PWRDN_EN; | ||
157 | writel_relaxed(enable, info->baseaddr + pwdrn_reg); | ||
158 | } | ||
159 | |||
160 | int __init ve_spc_init(void __iomem *baseaddr, u32 a15_clusid) | ||
161 | { | ||
162 | info = kzalloc(sizeof(*info), GFP_KERNEL); | ||
163 | if (!info) { | ||
164 | pr_err(SPCLOG "unable to allocate mem\n"); | ||
165 | return -ENOMEM; | ||
166 | } | ||
167 | |||
168 | info->baseaddr = baseaddr; | ||
169 | info->a15_clusid = a15_clusid; | ||
170 | |||
171 | /* | ||
172 | * Multi-cluster systems may need this data when non-coherent, during | ||
173 | * cluster power-up/power-down. Make sure driver info reaches main | ||
174 | * memory. | ||
175 | */ | ||
176 | sync_cache_w(info); | ||
177 | sync_cache_w(&info); | ||
178 | |||
179 | return 0; | ||
180 | } | ||
diff --git a/arch/arm/mach-vexpress/spc.h b/arch/arm/mach-vexpress/spc.h new file mode 100644 index 000000000000..5f7e4a446a17 --- /dev/null +++ b/arch/arm/mach-vexpress/spc.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License version 2 as | ||
4 | * published by the Free Software Foundation. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * Copyright (C) 2012 ARM Limited | ||
12 | */ | ||
13 | |||
14 | |||
15 | #ifndef __SPC_H_ | ||
16 | #define __SPC_H_ | ||
17 | |||
18 | int __init ve_spc_init(void __iomem *base, u32 a15_clusid); | ||
19 | void ve_spc_global_wakeup_irq(bool set); | ||
20 | void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set); | ||
21 | void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr); | ||
22 | void ve_spc_powerdown(u32 cluster, bool enable); | ||
23 | |||
24 | #endif | ||
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c new file mode 100644 index 000000000000..2b7c93a724ed --- /dev/null +++ b/arch/arm/mach-vexpress/tc2_pm.c | |||
@@ -0,0 +1,352 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/tc2_pm.c - TC2 power management support | ||
3 | * | ||
4 | * Created by: Nicolas Pitre, October 2012 | ||
5 | * Copyright: (C) 2012-2013 Linaro Limited | ||
6 | * | ||
7 | * Some portions of this file were originally written by Achin Gupta | ||
8 | * Copyright: (C) 2012 ARM Limited | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/of_address.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/errno.h> | ||
21 | |||
22 | #include <asm/mcpm.h> | ||
23 | #include <asm/proc-fns.h> | ||
24 | #include <asm/cacheflush.h> | ||
25 | #include <asm/cputype.h> | ||
26 | #include <asm/cp15.h> | ||
27 | |||
28 | #include <linux/arm-cci.h> | ||
29 | |||
30 | #include "spc.h" | ||
31 | |||
32 | /* SCC conf registers */ | ||
33 | #define A15_CONF 0x400 | ||
34 | #define A7_CONF 0x500 | ||
35 | #define SYS_INFO 0x700 | ||
36 | #define SPC_BASE 0xb00 | ||
37 | |||
38 | /* | ||
39 | * We can't use regular spinlocks. In the switcher case, it is possible | ||
40 | * for an outbound CPU to call power_down() after its inbound counterpart | ||
41 | * is already live using the same logical CPU number which trips lockdep | ||
42 | * debugging. | ||
43 | */ | ||
44 | static arch_spinlock_t tc2_pm_lock = __ARCH_SPIN_LOCK_UNLOCKED; | ||
45 | |||
46 | #define TC2_CLUSTERS 2 | ||
47 | #define TC2_MAX_CPUS_PER_CLUSTER 3 | ||
48 | |||
49 | static unsigned int tc2_nr_cpus[TC2_CLUSTERS]; | ||
50 | |||
51 | /* Keep per-cpu usage count to cope with unordered up/down requests */ | ||
52 | static int tc2_pm_use_count[TC2_MAX_CPUS_PER_CLUSTER][TC2_CLUSTERS]; | ||
53 | |||
54 | #define tc2_cluster_unused(cluster) \ | ||
55 | (!tc2_pm_use_count[0][cluster] && \ | ||
56 | !tc2_pm_use_count[1][cluster] && \ | ||
57 | !tc2_pm_use_count[2][cluster]) | ||
58 | |||
59 | static int tc2_pm_power_up(unsigned int cpu, unsigned int cluster) | ||
60 | { | ||
61 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | ||
62 | if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster]) | ||
63 | return -EINVAL; | ||
64 | |||
65 | /* | ||
66 | * Since this is called with IRQs enabled, and no arch_spin_lock_irq | ||
67 | * variant exists, we need to disable IRQs manually here. | ||
68 | */ | ||
69 | local_irq_disable(); | ||
70 | arch_spin_lock(&tc2_pm_lock); | ||
71 | |||
72 | if (tc2_cluster_unused(cluster)) | ||
73 | ve_spc_powerdown(cluster, false); | ||
74 | |||
75 | tc2_pm_use_count[cpu][cluster]++; | ||
76 | if (tc2_pm_use_count[cpu][cluster] == 1) { | ||
77 | ve_spc_set_resume_addr(cluster, cpu, | ||
78 | virt_to_phys(mcpm_entry_point)); | ||
79 | ve_spc_cpu_wakeup_irq(cluster, cpu, true); | ||
80 | } else if (tc2_pm_use_count[cpu][cluster] != 2) { | ||
81 | /* | ||
82 | * The only possible values are: | ||
83 | * 0 = CPU down | ||
84 | * 1 = CPU (still) up | ||
85 | * 2 = CPU requested to be up before it had a chance | ||
86 | * to actually make itself down. | ||
87 | * Any other value is a bug. | ||
88 | */ | ||
89 | BUG(); | ||
90 | } | ||
91 | |||
92 | arch_spin_unlock(&tc2_pm_lock); | ||
93 | local_irq_enable(); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | static void tc2_pm_down(u64 residency) | ||
99 | { | ||
100 | unsigned int mpidr, cpu, cluster; | ||
101 | bool last_man = false, skip_wfi = false; | ||
102 | |||
103 | mpidr = read_cpuid_mpidr(); | ||
104 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
105 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
106 | |||
107 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | ||
108 | BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER); | ||
109 | |||
110 | __mcpm_cpu_going_down(cpu, cluster); | ||
111 | |||
112 | arch_spin_lock(&tc2_pm_lock); | ||
113 | BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP); | ||
114 | tc2_pm_use_count[cpu][cluster]--; | ||
115 | if (tc2_pm_use_count[cpu][cluster] == 0) { | ||
116 | ve_spc_cpu_wakeup_irq(cluster, cpu, true); | ||
117 | if (tc2_cluster_unused(cluster)) { | ||
118 | ve_spc_powerdown(cluster, true); | ||
119 | ve_spc_global_wakeup_irq(true); | ||
120 | last_man = true; | ||
121 | } | ||
122 | } else if (tc2_pm_use_count[cpu][cluster] == 1) { | ||
123 | /* | ||
124 | * A power_up request went ahead of us. | ||
125 | * Even if we do not want to shut this CPU down, | ||
126 | * the caller expects a certain state as if the WFI | ||
127 | * was aborted. So let's continue with cache cleaning. | ||
128 | */ | ||
129 | skip_wfi = true; | ||
130 | } else | ||
131 | BUG(); | ||
132 | |||
133 | if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) { | ||
134 | arch_spin_unlock(&tc2_pm_lock); | ||
135 | |||
136 | if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A15) { | ||
137 | /* | ||
138 | * On the Cortex-A15 we need to disable | ||
139 | * L2 prefetching before flushing the cache. | ||
140 | */ | ||
141 | asm volatile( | ||
142 | "mcr p15, 1, %0, c15, c0, 3 \n\t" | ||
143 | "isb \n\t" | ||
144 | "dsb " | ||
145 | : : "r" (0x400) ); | ||
146 | } | ||
147 | |||
148 | /* | ||
149 | * We need to disable and flush the whole (L1 and L2) cache. | ||
150 | * Let's do it in the safest possible way i.e. with | ||
151 | * no memory access within the following sequence | ||
152 | * including the stack. | ||
153 | * | ||
154 | * Note: fp is preserved to the stack explicitly prior doing | ||
155 | * this since adding it to the clobber list is incompatible | ||
156 | * with having CONFIG_FRAME_POINTER=y. | ||
157 | */ | ||
158 | asm volatile( | ||
159 | "str fp, [sp, #-4]! \n\t" | ||
160 | "mrc p15, 0, r0, c1, c0, 0 @ get CR \n\t" | ||
161 | "bic r0, r0, #"__stringify(CR_C)" \n\t" | ||
162 | "mcr p15, 0, r0, c1, c0, 0 @ set CR \n\t" | ||
163 | "isb \n\t" | ||
164 | "bl v7_flush_dcache_all \n\t" | ||
165 | "clrex \n\t" | ||
166 | "mrc p15, 0, r0, c1, c0, 1 @ get AUXCR \n\t" | ||
167 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" | ||
168 | "mcr p15, 0, r0, c1, c0, 1 @ set AUXCR \n\t" | ||
169 | "isb \n\t" | ||
170 | "dsb \n\t" | ||
171 | "ldr fp, [sp], #4" | ||
172 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", | ||
173 | "r9","r10","lr","memory"); | ||
174 | |||
175 | cci_disable_port_by_cpu(mpidr); | ||
176 | |||
177 | __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN); | ||
178 | } else { | ||
179 | /* | ||
180 | * If last man then undo any setup done previously. | ||
181 | */ | ||
182 | if (last_man) { | ||
183 | ve_spc_powerdown(cluster, false); | ||
184 | ve_spc_global_wakeup_irq(false); | ||
185 | } | ||
186 | |||
187 | arch_spin_unlock(&tc2_pm_lock); | ||
188 | |||
189 | /* | ||
190 | * We need to disable and flush only the L1 cache. | ||
191 | * Let's do it in the safest possible way as above. | ||
192 | */ | ||
193 | asm volatile( | ||
194 | "str fp, [sp, #-4]! \n\t" | ||
195 | "mrc p15, 0, r0, c1, c0, 0 @ get CR \n\t" | ||
196 | "bic r0, r0, #"__stringify(CR_C)" \n\t" | ||
197 | "mcr p15, 0, r0, c1, c0, 0 @ set CR \n\t" | ||
198 | "isb \n\t" | ||
199 | "bl v7_flush_dcache_louis \n\t" | ||
200 | "clrex \n\t" | ||
201 | "mrc p15, 0, r0, c1, c0, 1 @ get AUXCR \n\t" | ||
202 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" | ||
203 | "mcr p15, 0, r0, c1, c0, 1 @ set AUXCR \n\t" | ||
204 | "isb \n\t" | ||
205 | "dsb \n\t" | ||
206 | "ldr fp, [sp], #4" | ||
207 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", | ||
208 | "r9","r10","lr","memory"); | ||
209 | } | ||
210 | |||
211 | __mcpm_cpu_down(cpu, cluster); | ||
212 | |||
213 | /* Now we are prepared for power-down, do it: */ | ||
214 | if (!skip_wfi) | ||
215 | wfi(); | ||
216 | |||
217 | /* Not dead at this point? Let our caller cope. */ | ||
218 | } | ||
219 | |||
220 | static void tc2_pm_power_down(void) | ||
221 | { | ||
222 | tc2_pm_down(0); | ||
223 | } | ||
224 | |||
225 | static void tc2_pm_suspend(u64 residency) | ||
226 | { | ||
227 | unsigned int mpidr, cpu, cluster; | ||
228 | |||
229 | mpidr = read_cpuid_mpidr(); | ||
230 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
231 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
232 | ve_spc_set_resume_addr(cluster, cpu, virt_to_phys(mcpm_entry_point)); | ||
233 | tc2_pm_down(residency); | ||
234 | } | ||
235 | |||
236 | static void tc2_pm_powered_up(void) | ||
237 | { | ||
238 | unsigned int mpidr, cpu, cluster; | ||
239 | unsigned long flags; | ||
240 | |||
241 | mpidr = read_cpuid_mpidr(); | ||
242 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
243 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
244 | |||
245 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | ||
246 | BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER); | ||
247 | |||
248 | local_irq_save(flags); | ||
249 | arch_spin_lock(&tc2_pm_lock); | ||
250 | |||
251 | if (tc2_cluster_unused(cluster)) { | ||
252 | ve_spc_powerdown(cluster, false); | ||
253 | ve_spc_global_wakeup_irq(false); | ||
254 | } | ||
255 | |||
256 | if (!tc2_pm_use_count[cpu][cluster]) | ||
257 | tc2_pm_use_count[cpu][cluster] = 1; | ||
258 | |||
259 | ve_spc_cpu_wakeup_irq(cluster, cpu, false); | ||
260 | ve_spc_set_resume_addr(cluster, cpu, 0); | ||
261 | |||
262 | arch_spin_unlock(&tc2_pm_lock); | ||
263 | local_irq_restore(flags); | ||
264 | } | ||
265 | |||
266 | static const struct mcpm_platform_ops tc2_pm_power_ops = { | ||
267 | .power_up = tc2_pm_power_up, | ||
268 | .power_down = tc2_pm_power_down, | ||
269 | .suspend = tc2_pm_suspend, | ||
270 | .powered_up = tc2_pm_powered_up, | ||
271 | }; | ||
272 | |||
273 | static bool __init tc2_pm_usage_count_init(void) | ||
274 | { | ||
275 | unsigned int mpidr, cpu, cluster; | ||
276 | |||
277 | mpidr = read_cpuid_mpidr(); | ||
278 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
279 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
280 | |||
281 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | ||
282 | if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster]) { | ||
283 | pr_err("%s: boot CPU is out of bound!\n", __func__); | ||
284 | return false; | ||
285 | } | ||
286 | tc2_pm_use_count[cpu][cluster] = 1; | ||
287 | return true; | ||
288 | } | ||
289 | |||
290 | /* | ||
291 | * Enable cluster-level coherency, in preparation for turning on the MMU. | ||
292 | */ | ||
293 | static void __naked tc2_pm_power_up_setup(unsigned int affinity_level) | ||
294 | { | ||
295 | asm volatile (" \n" | ||
296 | " cmp r0, #1 \n" | ||
297 | " bxne lr \n" | ||
298 | " b cci_enable_port_for_self "); | ||
299 | } | ||
300 | |||
301 | static int __init tc2_pm_init(void) | ||
302 | { | ||
303 | int ret; | ||
304 | void __iomem *scc; | ||
305 | u32 a15_cluster_id, a7_cluster_id, sys_info; | ||
306 | struct device_node *np; | ||
307 | |||
308 | /* | ||
309 | * The power management-related features are hidden behind | ||
310 | * SCC registers. We need to extract runtime information like | ||
311 | * cluster ids and number of CPUs really available in clusters. | ||
312 | */ | ||
313 | np = of_find_compatible_node(NULL, NULL, | ||
314 | "arm,vexpress-scc,v2p-ca15_a7"); | ||
315 | scc = of_iomap(np, 0); | ||
316 | if (!scc) | ||
317 | return -ENODEV; | ||
318 | |||
319 | a15_cluster_id = readl_relaxed(scc + A15_CONF) & 0xf; | ||
320 | a7_cluster_id = readl_relaxed(scc + A7_CONF) & 0xf; | ||
321 | if (a15_cluster_id >= TC2_CLUSTERS || a7_cluster_id >= TC2_CLUSTERS) | ||
322 | return -EINVAL; | ||
323 | |||
324 | sys_info = readl_relaxed(scc + SYS_INFO); | ||
325 | tc2_nr_cpus[a15_cluster_id] = (sys_info >> 16) & 0xf; | ||
326 | tc2_nr_cpus[a7_cluster_id] = (sys_info >> 20) & 0xf; | ||
327 | |||
328 | /* | ||
329 | * A subset of the SCC registers is also used to communicate | ||
330 | * with the SPC (power controller). We need to be able to | ||
331 | * drive it very early in the boot process to power up | ||
332 | * processors, so we initialize the SPC driver here. | ||
333 | */ | ||
334 | ret = ve_spc_init(scc + SPC_BASE, a15_cluster_id); | ||
335 | if (ret) | ||
336 | return ret; | ||
337 | |||
338 | if (!cci_probed()) | ||
339 | return -ENODEV; | ||
340 | |||
341 | if (!tc2_pm_usage_count_init()) | ||
342 | return -EINVAL; | ||
343 | |||
344 | ret = mcpm_platform_register(&tc2_pm_power_ops); | ||
345 | if (!ret) { | ||
346 | mcpm_sync_init(tc2_pm_power_up_setup); | ||
347 | pr_info("TC2 power management initialized\n"); | ||
348 | } | ||
349 | return ret; | ||
350 | } | ||
351 | |||
352 | early_initcall(tc2_pm_init); | ||