diff options
author | Olof Johansson <olof@lixom.net> | 2013-08-16 02:29:38 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-08-16 02:29:38 -0400 |
commit | 5ddc9d6023c9b60f7e5b6c1658c3316cf915c3d1 (patch) | |
tree | b5ec4ac00843b0f004283ae94027739bc4ef8e1b | |
parent | 3b6250e707d8092236f629443d722be33e1b4bf2 (diff) | |
parent | 5e9eaadb0b3fa8c12715d9761158ec328d7e9523 (diff) |
Merge tag 'boards-3.12-2' of git://git.infradead.org/linux-mvebu into next/boards
From Jason Cooper, mvebu boards changes for v3.12:
- kirkwood
- convert Dockstar, Guruplug, mv88f6281gtw_ge to DT
- remove legacy boards (which have DT support) sheevaplug, lacie boards
- ARRAY_AND_SIZE() cleanup
- dove
- some DT node updates (depends on irqchip/clocksource DT changes earlier)
- add the D2Plug board
* tag 'boards-3.12-2' of git://git.infradead.org/linux-mvebu:
ARM: dove: add initial DT file for Globalscale D2Plug
ARM: dove: add GPIO IR receiver node to SolidRun CuBox
ARM: dove: add common pinmux functions to DT
ARM: dove: add cpu device tree node
arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument
ARM: kirkwood: fix DT building and update defconfig
ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code
ARM: kirkwood: use dts pre-processor for mv88f6281gtw-ge
ARM: kirkwood: convert the mv88f6281gtw_ge board to DT
ARM: kirkwood: remove LaCie boards that are supported through DT
ARM: kirkwood: remove support for legacy booting of Sheevaplug
ARM: kirkwood: remove support for legacy booting of Guruplug
ARM: kirkwood: remove support for legacy booting of Dockstar
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/boot/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boot/dts/dove-cubox.dts | 30 | ||||
-rw-r--r-- | arch/arm/boot/dts/dove-d2plug.dts | 69 | ||||
-rw-r--r-- | arch/arm/boot/dts/dove.dtsi | 233 | ||||
-rw-r--r-- | arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 125 | ||||
-rw-r--r-- | arch/arm/configs/kirkwood_defconfig | 18 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Kconfig | 66 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Makefile | 10 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-dnskw.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c | 50 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/dockstar-setup.c | 111 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/guruplug-setup.c | 133 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | 172 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/netspace_v2-setup.c | 293 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/openrd-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/rd88f6281-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/sheevaplug-setup.c | 161 |
19 files changed, 490 insertions, 1036 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index af19e38f8e97..486526641acb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -47,6 +47,7 @@ dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \ | |||
47 | da850-evm.dtb | 47 | da850-evm.dtb |
48 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ | 48 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ |
49 | dove-cubox.dtb \ | 49 | dove-cubox.dtb \ |
50 | dove-d2plug.dtb \ | ||
50 | dove-dove-db.dtb | 51 | dove-dove-db.dtb |
51 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | 52 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ |
52 | exynos4210-smdkv310.dtb \ | 53 | exynos4210-smdkv310.dtb \ |
@@ -83,6 +84,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ | |||
83 | kirkwood-lschlv2.dtb \ | 84 | kirkwood-lschlv2.dtb \ |
84 | kirkwood-lsxhl.dtb \ | 85 | kirkwood-lsxhl.dtb \ |
85 | kirkwood-mplcec4.dtb \ | 86 | kirkwood-mplcec4.dtb \ |
87 | kirkwood-mv88f6281gtw-ge.dtb \ | ||
86 | kirkwood-netgear_readynas_duo_v2.dtb \ | 88 | kirkwood-netgear_readynas_duo_v2.dtb \ |
87 | kirkwood-ns2.dtb \ | 89 | kirkwood-ns2.dtb \ |
88 | kirkwood-ns2lite.dtb \ | 90 | kirkwood-ns2lite.dtb \ |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index 955188f6d2c1..022646ef4b38 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
@@ -42,6 +42,8 @@ | |||
42 | regulator-always-on; | 42 | regulator-always-on; |
43 | regulator-boot-on; | 43 | regulator-boot-on; |
44 | gpio = <&gpio0 1 0>; | 44 | gpio = <&gpio0 1 0>; |
45 | pinctrl-0 = <&pmx_gpio_1>; | ||
46 | pinctrl-names = "default"; | ||
45 | }; | 47 | }; |
46 | }; | 48 | }; |
47 | 49 | ||
@@ -53,6 +55,13 @@ | |||
53 | clock-frequency = <25000000>; | 55 | clock-frequency = <25000000>; |
54 | }; | 56 | }; |
55 | }; | 57 | }; |
58 | |||
59 | ir_recv: ir-receiver { | ||
60 | compatible = "gpio-ir-receiver"; | ||
61 | gpios = <&gpio0 19 1>; | ||
62 | pinctrl-0 = <&pmx_gpio_19>; | ||
63 | pinctrl-names = "default"; | ||
64 | }; | ||
56 | }; | 65 | }; |
57 | 66 | ||
58 | &uart0 { status = "okay"; }; | 67 | &uart0 { status = "okay"; }; |
@@ -110,6 +119,7 @@ | |||
110 | status = "okay"; | 119 | status = "okay"; |
111 | /* sdio0 card detect is connected to wrong pin on CuBox */ | 120 | /* sdio0 card detect is connected to wrong pin on CuBox */ |
112 | cd-gpios = <&gpio0 12 1>; | 121 | cd-gpios = <&gpio0 12 1>; |
122 | pinctrl-0 = <&pmx_sdio0 &pmx_gpio_12>; | ||
113 | }; | 123 | }; |
114 | 124 | ||
115 | &spi0 { | 125 | &spi0 { |
@@ -122,23 +132,3 @@ | |||
122 | reg = <0>; | 132 | reg = <0>; |
123 | }; | 133 | }; |
124 | }; | 134 | }; |
125 | |||
126 | &pinctrl { | ||
127 | pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>; | ||
128 | pinctrl-names = "default"; | ||
129 | |||
130 | pmx_gpio_1: pmx-gpio-1 { | ||
131 | marvell,pins = "mpp1"; | ||
132 | marvell,function = "gpio"; | ||
133 | }; | ||
134 | |||
135 | pmx_gpio_12: pmx-gpio-12 { | ||
136 | marvell,pins = "mpp12"; | ||
137 | marvell,function = "gpio"; | ||
138 | }; | ||
139 | |||
140 | pmx_gpio_18: pmx-gpio-18 { | ||
141 | marvell,pins = "mpp18"; | ||
142 | marvell,function = "gpio"; | ||
143 | }; | ||
144 | }; | ||
diff --git a/arch/arm/boot/dts/dove-d2plug.dts b/arch/arm/boot/dts/dove-d2plug.dts new file mode 100644 index 000000000000..e2222ce94f2f --- /dev/null +++ b/arch/arm/boot/dts/dove-d2plug.dts | |||
@@ -0,0 +1,69 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "dove.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Globalscale D2Plug"; | ||
7 | compatible = "globalscale,d2plug", "marvell,dove"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x40000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | |||
18 | leds { | ||
19 | compatible = "gpio-leds"; | ||
20 | pinctrl-0 = <&pmx_gpio_0 &pmx_gpio_1 &pmx_gpio_2>; | ||
21 | pinctrl-names = "default"; | ||
22 | |||
23 | wlan-ap { | ||
24 | label = "wlan-ap"; | ||
25 | gpios = <&gpio0 0 1>; | ||
26 | }; | ||
27 | |||
28 | wlan-act { | ||
29 | label = "wlan-act"; | ||
30 | gpios = <&gpio0 1 1>; | ||
31 | }; | ||
32 | |||
33 | bluetooth-act { | ||
34 | label = "bt-act"; | ||
35 | gpios = <&gpio0 2 1>; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
39 | |||
40 | &uart0 { status = "okay"; }; | ||
41 | &sata0 { status = "okay"; }; | ||
42 | &i2c0 { status = "okay"; }; | ||
43 | &mdio { status = "okay"; }; | ||
44 | ð { status = "okay"; }; | ||
45 | |||
46 | /* Samsung M8G2F eMMC */ | ||
47 | &sdio0 { | ||
48 | status = "okay"; | ||
49 | non-removable; | ||
50 | bus-width = <4>; | ||
51 | }; | ||
52 | |||
53 | /* Marvell SD8787 WLAN/BT */ | ||
54 | &sdio1 { | ||
55 | status = "okay"; | ||
56 | non-removable; | ||
57 | bus-width = <4>; | ||
58 | }; | ||
59 | |||
60 | &spi0 { | ||
61 | status = "okay"; | ||
62 | |||
63 | /* spi0.0: 4M Flash Macronix MX25L3205D */ | ||
64 | spi-flash@0 { | ||
65 | compatible = "st,m25l3205d"; | ||
66 | spi-max-frequency = <20000000>; | ||
67 | reg = <0>; | ||
68 | }; | ||
69 | }; | ||
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 8d5be1e856f2..cc279166646f 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi | |||
@@ -10,6 +10,23 @@ | |||
10 | gpio2 = &gpio2; | 10 | gpio2 = &gpio2; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | cpus { | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <0>; | ||
16 | |||
17 | cpu0: cpu@0 { | ||
18 | compatible = "marvell,pj4a", "marvell,sheeva-v7"; | ||
19 | device_type = "cpu"; | ||
20 | next-level-cache = <&l2>; | ||
21 | reg = <0>; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | l2: l2-cache { | ||
26 | compatible = "marvell,tauros2-cache"; | ||
27 | marvell,tauros2-cache-features = <0>; | ||
28 | }; | ||
29 | |||
13 | soc@f1000000 { | 30 | soc@f1000000 { |
14 | compatible = "simple-bus"; | 31 | compatible = "simple-bus"; |
15 | #address-cells = <1>; | 32 | #address-cells = <1>; |
@@ -25,11 +42,6 @@ | |||
25 | 0xf2100000 0xf2100000 0x0100000 /* PCIe0 I/O 1M */ | 42 | 0xf2100000 0xf2100000 0x0100000 /* PCIe0 I/O 1M */ |
26 | 0xf8000000 0xf8000000 0x8000000>; /* BootROM 128M */ | 43 | 0xf8000000 0xf8000000 0x8000000>; /* BootROM 128M */ |
27 | 44 | ||
28 | l2: l2-cache { | ||
29 | compatible = "marvell,tauros2-cache"; | ||
30 | marvell,tauros2-cache-features = <0>; | ||
31 | }; | ||
32 | |||
33 | timer: timer@20300 { | 45 | timer: timer@20300 { |
34 | compatible = "marvell,orion-timer"; | 46 | compatible = "marvell,orion-timer"; |
35 | reg = <0x20300 0x20>; | 47 | reg = <0x20300 0x20>; |
@@ -60,14 +72,14 @@ | |||
60 | #clock-cells = <1>; | 72 | #clock-cells = <1>; |
61 | }; | 73 | }; |
62 | 74 | ||
63 | gate_clk: clock-gating-control@d0038 { | 75 | gate_clk: clock-gating-ctrl@d0038 { |
64 | compatible = "marvell,dove-gating-clock"; | 76 | compatible = "marvell,dove-gating-clock"; |
65 | reg = <0xd0038 0x4>; | 77 | reg = <0xd0038 0x4>; |
66 | clocks = <&core_clk 0>; | 78 | clocks = <&core_clk 0>; |
67 | #clock-cells = <1>; | 79 | #clock-cells = <1>; |
68 | }; | 80 | }; |
69 | 81 | ||
70 | thermal: thermal@d001c { | 82 | thermal: thermal-diode@d001c { |
71 | compatible = "marvell,dove-thermal"; | 83 | compatible = "marvell,dove-thermal"; |
72 | reg = <0xd001c 0x0c>, <0xd005c 0x08>; | 84 | reg = <0xd001c 0x0c>, <0xd005c 0x08>; |
73 | }; | 85 | }; |
@@ -87,6 +99,8 @@ | |||
87 | reg-shift = <2>; | 99 | reg-shift = <2>; |
88 | interrupts = <8>; | 100 | interrupts = <8>; |
89 | clocks = <&core_clk 0>; | 101 | clocks = <&core_clk 0>; |
102 | pinctrl-0 = <&pmx_uart1>; | ||
103 | pinctrl-names = "default"; | ||
90 | status = "disabled"; | 104 | status = "disabled"; |
91 | }; | 105 | }; |
92 | 106 | ||
@@ -108,7 +122,7 @@ | |||
108 | status = "disabled"; | 122 | status = "disabled"; |
109 | }; | 123 | }; |
110 | 124 | ||
111 | gpio0: gpio@d0400 { | 125 | gpio0: gpio-ctrl@d0400 { |
112 | compatible = "marvell,orion-gpio"; | 126 | compatible = "marvell,orion-gpio"; |
113 | #gpio-cells = <2>; | 127 | #gpio-cells = <2>; |
114 | gpio-controller; | 128 | gpio-controller; |
@@ -119,7 +133,7 @@ | |||
119 | interrupts = <12>, <13>, <14>, <60>; | 133 | interrupts = <12>, <13>, <14>, <60>; |
120 | }; | 134 | }; |
121 | 135 | ||
122 | gpio1: gpio@d0420 { | 136 | gpio1: gpio-ctrl@d0420 { |
123 | compatible = "marvell,orion-gpio"; | 137 | compatible = "marvell,orion-gpio"; |
124 | #gpio-cells = <2>; | 138 | #gpio-cells = <2>; |
125 | gpio-controller; | 139 | gpio-controller; |
@@ -130,7 +144,7 @@ | |||
130 | interrupts = <61>; | 144 | interrupts = <61>; |
131 | }; | 145 | }; |
132 | 146 | ||
133 | gpio2: gpio@e8400 { | 147 | gpio2: gpio-ctrl@e8400 { |
134 | compatible = "marvell,orion-gpio"; | 148 | compatible = "marvell,orion-gpio"; |
135 | #gpio-cells = <2>; | 149 | #gpio-cells = <2>; |
136 | gpio-controller; | 150 | gpio-controller; |
@@ -138,13 +152,188 @@ | |||
138 | ngpios = <8>; | 152 | ngpios = <8>; |
139 | }; | 153 | }; |
140 | 154 | ||
141 | pinctrl: pinctrl@d0200 { | 155 | pinctrl: pin-ctrl@d0200 { |
142 | compatible = "marvell,dove-pinctrl"; | 156 | compatible = "marvell,dove-pinctrl"; |
143 | reg = <0xd0200 0x10>; | 157 | reg = <0xd0200 0x10>; |
144 | clocks = <&gate_clk 22>; | 158 | clocks = <&gate_clk 22>; |
159 | |||
160 | pmx_gpio_0: pmx-gpio-0 { | ||
161 | marvell,pins = "mpp0"; | ||
162 | marvell,function = "gpio"; | ||
163 | }; | ||
164 | |||
165 | pmx_gpio_1: pmx-gpio-1 { | ||
166 | marvell,pins = "mpp1"; | ||
167 | marvell,function = "gpio"; | ||
168 | }; | ||
169 | |||
170 | pmx_gpio_2: pmx-gpio-2 { | ||
171 | marvell,pins = "mpp2"; | ||
172 | marvell,function = "gpio"; | ||
173 | }; | ||
174 | |||
175 | pmx_gpio_3: pmx-gpio-3 { | ||
176 | marvell,pins = "mpp3"; | ||
177 | marvell,function = "gpio"; | ||
178 | }; | ||
179 | |||
180 | pmx_gpio_4: pmx-gpio-4 { | ||
181 | marvell,pins = "mpp4"; | ||
182 | marvell,function = "gpio"; | ||
183 | }; | ||
184 | |||
185 | pmx_gpio_5: pmx-gpio-5 { | ||
186 | marvell,pins = "mpp5"; | ||
187 | marvell,function = "gpio"; | ||
188 | }; | ||
189 | |||
190 | pmx_gpio_6: pmx-gpio-6 { | ||
191 | marvell,pins = "mpp6"; | ||
192 | marvell,function = "gpio"; | ||
193 | }; | ||
194 | |||
195 | pmx_gpio_7: pmx-gpio-7 { | ||
196 | marvell,pins = "mpp7"; | ||
197 | marvell,function = "gpio"; | ||
198 | }; | ||
199 | |||
200 | pmx_gpio_8: pmx-gpio-8 { | ||
201 | marvell,pins = "mpp8"; | ||
202 | marvell,function = "gpio"; | ||
203 | }; | ||
204 | |||
205 | pmx_gpio_9: pmx-gpio-9 { | ||
206 | marvell,pins = "mpp9"; | ||
207 | marvell,function = "gpio"; | ||
208 | }; | ||
209 | |||
210 | pmx_gpio_10: pmx-gpio-10 { | ||
211 | marvell,pins = "mpp10"; | ||
212 | marvell,function = "gpio"; | ||
213 | }; | ||
214 | |||
215 | pmx_gpio_11: pmx-gpio-11 { | ||
216 | marvell,pins = "mpp11"; | ||
217 | marvell,function = "gpio"; | ||
218 | }; | ||
219 | |||
220 | pmx_gpio_12: pmx-gpio-12 { | ||
221 | marvell,pins = "mpp12"; | ||
222 | marvell,function = "gpio"; | ||
223 | }; | ||
224 | |||
225 | pmx_gpio_13: pmx-gpio-13 { | ||
226 | marvell,pins = "mpp13"; | ||
227 | marvell,function = "gpio"; | ||
228 | }; | ||
229 | |||
230 | pmx_gpio_14: pmx-gpio-14 { | ||
231 | marvell,pins = "mpp14"; | ||
232 | marvell,function = "gpio"; | ||
233 | }; | ||
234 | |||
235 | pmx_gpio_15: pmx-gpio-15 { | ||
236 | marvell,pins = "mpp15"; | ||
237 | marvell,function = "gpio"; | ||
238 | }; | ||
239 | |||
240 | pmx_gpio_16: pmx-gpio-16 { | ||
241 | marvell,pins = "mpp16"; | ||
242 | marvell,function = "gpio"; | ||
243 | }; | ||
244 | |||
245 | pmx_gpio_17: pmx-gpio-17 { | ||
246 | marvell,pins = "mpp17"; | ||
247 | marvell,function = "gpio"; | ||
248 | }; | ||
249 | |||
250 | pmx_gpio_18: pmx-gpio-18 { | ||
251 | marvell,pins = "mpp18"; | ||
252 | marvell,function = "gpio"; | ||
253 | }; | ||
254 | |||
255 | pmx_gpio_19: pmx-gpio-19 { | ||
256 | marvell,pins = "mpp19"; | ||
257 | marvell,function = "gpio"; | ||
258 | }; | ||
259 | |||
260 | pmx_gpio_20: pmx-gpio-20 { | ||
261 | marvell,pins = "mpp20"; | ||
262 | marvell,function = "gpio"; | ||
263 | }; | ||
264 | |||
265 | pmx_gpio_21: pmx-gpio-21 { | ||
266 | marvell,pins = "mpp21"; | ||
267 | marvell,function = "gpio"; | ||
268 | }; | ||
269 | |||
270 | pmx_camera: pmx-camera { | ||
271 | marvell,pins = "mpp_camera"; | ||
272 | marvell,function = "camera"; | ||
273 | }; | ||
274 | |||
275 | pmx_camera_gpio: pmx-camera-gpio { | ||
276 | marvell,pins = "mpp_camera"; | ||
277 | marvell,function = "gpio"; | ||
278 | }; | ||
279 | |||
280 | pmx_sdio0: pmx-sdio0 { | ||
281 | marvell,pins = "mpp_sdio0"; | ||
282 | marvell,function = "sdio0"; | ||
283 | }; | ||
284 | |||
285 | pmx_sdio0_gpio: pmx-sdio0-gpio { | ||
286 | marvell,pins = "mpp_sdio0"; | ||
287 | marvell,function = "gpio"; | ||
288 | }; | ||
289 | |||
290 | pmx_sdio1: pmx-sdio1 { | ||
291 | marvell,pins = "mpp_sdio1"; | ||
292 | marvell,function = "sdio1"; | ||
293 | }; | ||
294 | |||
295 | pmx_sdio1_gpio: pmx-sdio1-gpio { | ||
296 | marvell,pins = "mpp_sdio1"; | ||
297 | marvell,function = "gpio"; | ||
298 | }; | ||
299 | |||
300 | pmx_audio1_gpio: pmx-audio1-gpio { | ||
301 | marvell,pins = "mpp_audio1"; | ||
302 | marvell,function = "gpio"; | ||
303 | }; | ||
304 | |||
305 | pmx_spi0: pmx-spi0 { | ||
306 | marvell,pins = "mpp_spi0"; | ||
307 | marvell,function = "spi0"; | ||
308 | }; | ||
309 | |||
310 | pmx_spi0_gpio: pmx-spi0-gpio { | ||
311 | marvell,pins = "mpp_spi0"; | ||
312 | marvell,function = "gpio"; | ||
313 | }; | ||
314 | |||
315 | pmx_uart1: pmx-uart1 { | ||
316 | marvell,pins = "mpp_uart1"; | ||
317 | marvell,function = "uart1"; | ||
318 | }; | ||
319 | |||
320 | pmx_uart1_gpio: pmx-uart1-gpio { | ||
321 | marvell,pins = "mpp_uart1"; | ||
322 | marvell,function = "gpio"; | ||
323 | }; | ||
324 | |||
325 | pmx_nand: pmx-nand { | ||
326 | marvell,pins = "mpp_nand"; | ||
327 | marvell,function = "nand"; | ||
328 | }; | ||
329 | |||
330 | pmx_nand_gpo: pmx-nand-gpo { | ||
331 | marvell,pins = "mpp_nand"; | ||
332 | marvell,function = "gpo"; | ||
333 | }; | ||
145 | }; | 334 | }; |
146 | 335 | ||
147 | spi0: spi@10600 { | 336 | spi0: spi-ctrl@10600 { |
148 | compatible = "marvell,orion-spi"; | 337 | compatible = "marvell,orion-spi"; |
149 | #address-cells = <1>; | 338 | #address-cells = <1>; |
150 | #size-cells = <0>; | 339 | #size-cells = <0>; |
@@ -152,10 +341,12 @@ | |||
152 | interrupts = <6>; | 341 | interrupts = <6>; |
153 | reg = <0x10600 0x28>; | 342 | reg = <0x10600 0x28>; |
154 | clocks = <&core_clk 0>; | 343 | clocks = <&core_clk 0>; |
344 | pinctrl-0 = <&pmx_spi0>; | ||
345 | pinctrl-names = "default"; | ||
155 | status = "disabled"; | 346 | status = "disabled"; |
156 | }; | 347 | }; |
157 | 348 | ||
158 | spi1: spi@14600 { | 349 | spi1: spi-ctrl@14600 { |
159 | compatible = "marvell,orion-spi"; | 350 | compatible = "marvell,orion-spi"; |
160 | #address-cells = <1>; | 351 | #address-cells = <1>; |
161 | #size-cells = <0>; | 352 | #size-cells = <0>; |
@@ -166,7 +357,7 @@ | |||
166 | status = "disabled"; | 357 | status = "disabled"; |
167 | }; | 358 | }; |
168 | 359 | ||
169 | i2c0: i2c@11000 { | 360 | i2c0: i2c-ctrl@11000 { |
170 | compatible = "marvell,mv64xxx-i2c"; | 361 | compatible = "marvell,mv64xxx-i2c"; |
171 | reg = <0x11000 0x20>; | 362 | reg = <0x11000 0x20>; |
172 | #address-cells = <1>; | 363 | #address-cells = <1>; |
@@ -194,23 +385,27 @@ | |||
194 | status = "okay"; | 385 | status = "okay"; |
195 | }; | 386 | }; |
196 | 387 | ||
197 | sdio0: sdio@92000 { | 388 | sdio0: sdio-host@92000 { |
198 | compatible = "marvell,dove-sdhci"; | 389 | compatible = "marvell,dove-sdhci"; |
199 | reg = <0x92000 0x100>; | 390 | reg = <0x92000 0x100>; |
200 | interrupts = <35>, <37>; | 391 | interrupts = <35>, <37>; |
201 | clocks = <&gate_clk 8>; | 392 | clocks = <&gate_clk 8>; |
393 | pinctrl-0 = <&pmx_sdio0>; | ||
394 | pinctrl-names = "default"; | ||
202 | status = "disabled"; | 395 | status = "disabled"; |
203 | }; | 396 | }; |
204 | 397 | ||
205 | sdio1: sdio@90000 { | 398 | sdio1: sdio-host@90000 { |
206 | compatible = "marvell,dove-sdhci"; | 399 | compatible = "marvell,dove-sdhci"; |
207 | reg = <0x90000 0x100>; | 400 | reg = <0x90000 0x100>; |
208 | interrupts = <36>, <38>; | 401 | interrupts = <36>, <38>; |
209 | clocks = <&gate_clk 9>; | 402 | clocks = <&gate_clk 9>; |
403 | pinctrl-0 = <&pmx_sdio1>; | ||
404 | pinctrl-names = "default"; | ||
210 | status = "disabled"; | 405 | status = "disabled"; |
211 | }; | 406 | }; |
212 | 407 | ||
213 | sata0: sata@a0000 { | 408 | sata0: sata-host@a0000 { |
214 | compatible = "marvell,orion-sata"; | 409 | compatible = "marvell,orion-sata"; |
215 | reg = <0xa0000 0x2400>; | 410 | reg = <0xa0000 0x2400>; |
216 | interrupts = <62>; | 411 | interrupts = <62>; |
@@ -219,12 +414,12 @@ | |||
219 | status = "disabled"; | 414 | status = "disabled"; |
220 | }; | 415 | }; |
221 | 416 | ||
222 | rtc@d8500 { | 417 | rtc: real-time-clock@d8500 { |
223 | compatible = "marvell,orion-rtc"; | 418 | compatible = "marvell,orion-rtc"; |
224 | reg = <0xd8500 0x20>; | 419 | reg = <0xd8500 0x20>; |
225 | }; | 420 | }; |
226 | 421 | ||
227 | crypto: crypto@30000 { | 422 | crypto: crypto-engine@30000 { |
228 | compatible = "marvell,orion-crypto"; | 423 | compatible = "marvell,orion-crypto"; |
229 | reg = <0x30000 0x10000>, | 424 | reg = <0x30000 0x10000>, |
230 | <0xc8000000 0x800>; | 425 | <0xc8000000 0x800>; |
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts new file mode 100644 index 000000000000..6317e1d088b3 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * Marvell 88F6281 GTW GE Board | ||
3 | * | ||
4 | * Lennert Buytenhek <buytenh@marvell.com> | ||
5 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | * | ||
11 | * This file contains the definitions that are common between the 6281 | ||
12 | * and 6282 variants of the Marvell Kirkwood Development Board. | ||
13 | */ | ||
14 | |||
15 | /dts-v1/; | ||
16 | |||
17 | #include "kirkwood.dtsi" | ||
18 | #include "kirkwood-6281.dtsi" | ||
19 | |||
20 | / { | ||
21 | model = "Marvell 88F6281 GTW GE Board"; | ||
22 | compatible = "marvell,mv88f6281gtw-ge", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
23 | |||
24 | memory { | ||
25 | device_type = "memory"; | ||
26 | reg = <0x00000000 0x20000000>; /* 512 MB */ | ||
27 | }; | ||
28 | |||
29 | chosen { | ||
30 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
31 | }; | ||
32 | |||
33 | ocp@f1000000 { | ||
34 | pinctrl@10000 { | ||
35 | pmx_usb_led: pmx-usb-led { | ||
36 | marvell,pins = "mpp12"; | ||
37 | marvell,function = "gpo"; | ||
38 | }; | ||
39 | |||
40 | pmx_leds: pmx-leds { | ||
41 | marvell,pins = "mpp20", "mpp21"; | ||
42 | marvell,function = "gpio"; | ||
43 | }; | ||
44 | |||
45 | pmx_keys: pmx-keys { | ||
46 | marvell,pins = "mpp46", "mpp47"; | ||
47 | marvell,function = "gpio"; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | spi@10600 { | ||
52 | pinctrl-0 = <&pmx_spi>; | ||
53 | pinctrl-names = "default"; | ||
54 | status = "okay"; | ||
55 | |||
56 | flash@0 { | ||
57 | #address-cells = <1>; | ||
58 | #size-cells = <1>; | ||
59 | compatible = "mx25l12805d"; | ||
60 | reg = <0>; | ||
61 | spi-max-frequency = <50000000>; | ||
62 | mode = <0>; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | serial@12000 { | ||
67 | pinctrl-0 = <&pmx_uart0>; | ||
68 | pinctrl-names = "default"; | ||
69 | clock-frequency = <200000000>; | ||
70 | status = "ok"; | ||
71 | }; | ||
72 | |||
73 | ehci@50000 { | ||
74 | status = "okay"; | ||
75 | }; | ||
76 | |||
77 | pcie-controller { | ||
78 | status = "okay"; | ||
79 | |||
80 | pcie@1,0 { | ||
81 | status = "okay"; | ||
82 | }; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | gpio-leds { | ||
87 | compatible = "gpio-leds"; | ||
88 | pinctrl-0 = <&pmx_leds &pmx_usb_led>; | ||
89 | pinctrl-names = "default"; | ||
90 | |||
91 | green-status { | ||
92 | label = "gtw:green:Status"; | ||
93 | gpios = <&gpio0 20 0>; | ||
94 | }; | ||
95 | |||
96 | red-status { | ||
97 | label = "gtw:red:Status"; | ||
98 | gpios = <&gpio0 21 0>; | ||
99 | }; | ||
100 | |||
101 | green-usb { | ||
102 | label = "gtw:green:USB"; | ||
103 | gpios = <&gpio0 12 0>; | ||
104 | }; | ||
105 | }; | ||
106 | |||
107 | gpio_keys { | ||
108 | compatible = "gpio-keys"; | ||
109 | #address-cells = <1>; | ||
110 | #size-cells = <0>; | ||
111 | pinctrl-0 = <&pmx_keys>; | ||
112 | pinctrl-names = "default"; | ||
113 | |||
114 | button@1 { | ||
115 | label = "SWR Button"; | ||
116 | linux,code = <0x198>; /* KEY_RESTART */ | ||
117 | gpios = <&gpio1 15 1>; | ||
118 | }; | ||
119 | button@2 { | ||
120 | label = "WPS Button"; | ||
121 | linux,code = <0x211>; /* KEY_WPS_BUTTON */ | ||
122 | gpios = <&gpio1 14 1>; | ||
123 | }; | ||
124 | }; | ||
125 | }; | ||
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index b180588960f7..e3f667a2e10e 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
@@ -10,26 +10,18 @@ CONFIG_MODULE_UNLOAD=y | |||
10 | # CONFIG_BLK_DEV_BSG is not set | 10 | # CONFIG_BLK_DEV_BSG is not set |
11 | CONFIG_ARCH_KIRKWOOD=y | 11 | CONFIG_ARCH_KIRKWOOD=y |
12 | CONFIG_MACH_D2NET_V2=y | 12 | CONFIG_MACH_D2NET_V2=y |
13 | CONFIG_MACH_DB88F6281_BP=y | ||
14 | CONFIG_MACH_DOCKSTAR=y | ||
15 | CONFIG_MACH_ESATA_SHEEVAPLUG=y | ||
16 | CONFIG_MACH_GURUPLUG=y | ||
17 | CONFIG_MACH_INETSPACE_V2=y | ||
18 | CONFIG_MACH_MV88F6281GTW_GE=y | ||
19 | CONFIG_MACH_NET2BIG_V2=y | 13 | CONFIG_MACH_NET2BIG_V2=y |
20 | CONFIG_MACH_NET5BIG_V2=y | 14 | CONFIG_MACH_NET5BIG_V2=y |
21 | CONFIG_MACH_NETSPACE_MAX_V2=y | ||
22 | CONFIG_MACH_NETSPACE_V2=y | ||
23 | CONFIG_MACH_OPENRD_BASE=y | 15 | CONFIG_MACH_OPENRD_BASE=y |
24 | CONFIG_MACH_OPENRD_CLIENT=y | 16 | CONFIG_MACH_OPENRD_CLIENT=y |
25 | CONFIG_MACH_OPENRD_ULTIMATE=y | 17 | CONFIG_MACH_OPENRD_ULTIMATE=y |
26 | CONFIG_MACH_RD88F6192_NAS=y | 18 | CONFIG_MACH_RD88F6192_NAS=y |
27 | CONFIG_MACH_RD88F6281=y | 19 | CONFIG_MACH_RD88F6281=y |
28 | CONFIG_MACH_SHEEVAPLUG=y | ||
29 | CONFIG_MACH_T5325=y | 20 | CONFIG_MACH_T5325=y |
30 | CONFIG_MACH_TS219=y | 21 | CONFIG_MACH_TS219=y |
31 | CONFIG_MACH_TS41X=y | 22 | CONFIG_MACH_TS41X=y |
32 | CONFIG_MACH_DLINK_KIRKWOOD_DT=y | 23 | CONFIG_ARCH_KIRKWOOD_DT=y |
24 | CONFIG_MACH_MV88F6281GTW_GE_DT=y | ||
33 | # CONFIG_CPU_FEROCEON_OLD_ID is not set | 25 | # CONFIG_CPU_FEROCEON_OLD_ID is not set |
34 | CONFIG_PCI_MVEBU=y | 26 | CONFIG_PCI_MVEBU=y |
35 | CONFIG_PREEMPT=y | 27 | CONFIG_PREEMPT=y |
@@ -77,7 +69,6 @@ CONFIG_ATA=y | |||
77 | CONFIG_SATA_AHCI=y | 69 | CONFIG_SATA_AHCI=y |
78 | CONFIG_SATA_MV=y | 70 | CONFIG_SATA_MV=y |
79 | CONFIG_NETDEVICES=y | 71 | CONFIG_NETDEVICES=y |
80 | CONFIG_MII=y | ||
81 | CONFIG_NET_DSA_MV88E6123_61_65=y | 72 | CONFIG_NET_DSA_MV88E6123_61_65=y |
82 | CONFIG_MV643XX_ETH=y | 73 | CONFIG_MV643XX_ETH=y |
83 | CONFIG_MARVELL_PHY=y | 74 | CONFIG_MARVELL_PHY=y |
@@ -102,7 +93,6 @@ CONFIG_SPI_ORION=y | |||
102 | CONFIG_GPIO_SYSFS=y | 93 | CONFIG_GPIO_SYSFS=y |
103 | # CONFIG_HWMON is not set | 94 | # CONFIG_HWMON is not set |
104 | CONFIG_THERMAL=y | 95 | CONFIG_THERMAL=y |
105 | CONFIG_KIRKWOOD_THERMAL=y | ||
106 | CONFIG_WATCHDOG=y | 96 | CONFIG_WATCHDOG=y |
107 | CONFIG_ORION_WATCHDOG=y | 97 | CONFIG_ORION_WATCHDOG=y |
108 | CONFIG_HID_DRAGONRISE=y | 98 | CONFIG_HID_DRAGONRISE=y |
@@ -163,12 +153,12 @@ CONFIG_NLS_CODEPAGE_850=y | |||
163 | CONFIG_NLS_ISO8859_1=y | 153 | CONFIG_NLS_ISO8859_1=y |
164 | CONFIG_NLS_ISO8859_2=y | 154 | CONFIG_NLS_ISO8859_2=y |
165 | CONFIG_NLS_UTF8=y | 155 | CONFIG_NLS_UTF8=y |
166 | CONFIG_MAGIC_SYSRQ=y | 156 | CONFIG_DEBUG_INFO=y |
167 | CONFIG_DEBUG_FS=y | 157 | CONFIG_DEBUG_FS=y |
158 | CONFIG_MAGIC_SYSRQ=y | ||
168 | CONFIG_DEBUG_KERNEL=y | 159 | CONFIG_DEBUG_KERNEL=y |
169 | # CONFIG_SCHED_DEBUG is not set | 160 | # CONFIG_SCHED_DEBUG is not set |
170 | # CONFIG_DEBUG_PREEMPT is not set | 161 | # CONFIG_DEBUG_PREEMPT is not set |
171 | CONFIG_DEBUG_INFO=y | ||
172 | # CONFIG_FTRACE is not set | 162 | # CONFIG_FTRACE is not set |
173 | CONFIG_DEBUG_USER=y | 163 | CONFIG_DEBUG_USER=y |
174 | CONFIG_DEBUG_LL=y | 164 | CONFIG_DEBUG_LL=y |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 60d0896bcc26..fe8319ad3158 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -12,41 +12,6 @@ config MACH_D2NET_V2 | |||
12 | Say 'Y' here if you want your kernel to support the | 12 | Say 'Y' here if you want your kernel to support the |
13 | LaCie d2 Network v2 NAS. | 13 | LaCie d2 Network v2 NAS. |
14 | 14 | ||
15 | config MACH_DOCKSTAR | ||
16 | bool "Seagate FreeAgent DockStar" | ||
17 | select KIRKWOOD_LEGACY | ||
18 | help | ||
19 | Say 'Y' here if you want your kernel to support the | ||
20 | Seagate FreeAgent DockStar. | ||
21 | |||
22 | config MACH_ESATA_SHEEVAPLUG | ||
23 | bool "Marvell eSATA SheevaPlug Reference Board" | ||
24 | select KIRKWOOD_LEGACY | ||
25 | help | ||
26 | Say 'Y' here if you want your kernel to support the | ||
27 | Marvell eSATA SheevaPlug Reference Board. | ||
28 | |||
29 | config MACH_GURUPLUG | ||
30 | bool "Marvell GuruPlug Reference Board" | ||
31 | select KIRKWOOD_LEGACY | ||
32 | help | ||
33 | Say 'Y' here if you want your kernel to support the | ||
34 | Marvell GuruPlug Reference Board. | ||
35 | |||
36 | config MACH_INETSPACE_V2 | ||
37 | bool "LaCie Internet Space v2 NAS Board" | ||
38 | select KIRKWOOD_LEGACY | ||
39 | help | ||
40 | Say 'Y' here if you want your kernel to support the | ||
41 | LaCie Internet Space v2 NAS. | ||
42 | |||
43 | config MACH_MV88F6281GTW_GE | ||
44 | bool "Marvell 88F6281 GTW GE Board" | ||
45 | select KIRKWOOD_LEGACY | ||
46 | help | ||
47 | Say 'Y' here if you want your kernel to support the | ||
48 | Marvell 88F6281 GTW GE Board. | ||
49 | |||
50 | config MACH_NET2BIG_V2 | 15 | config MACH_NET2BIG_V2 |
51 | bool "LaCie 2Big Network v2 NAS Board" | 16 | bool "LaCie 2Big Network v2 NAS Board" |
52 | select KIRKWOOD_LEGACY | 17 | select KIRKWOOD_LEGACY |
@@ -61,20 +26,6 @@ config MACH_NET5BIG_V2 | |||
61 | Say 'Y' here if you want your kernel to support the | 26 | Say 'Y' here if you want your kernel to support the |
62 | LaCie 5Big Network v2 NAS. | 27 | LaCie 5Big Network v2 NAS. |
63 | 28 | ||
64 | config MACH_NETSPACE_MAX_V2 | ||
65 | bool "LaCie Network Space Max v2 NAS Board" | ||
66 | select KIRKWOOD_LEGACY | ||
67 | help | ||
68 | Say 'Y' here if you want your kernel to support the | ||
69 | LaCie Network Space Max v2 NAS. | ||
70 | |||
71 | config MACH_NETSPACE_V2 | ||
72 | bool "LaCie Network Space v2 NAS Board" | ||
73 | select KIRKWOOD_LEGACY | ||
74 | help | ||
75 | Say 'Y' here if you want your kernel to support the | ||
76 | LaCie Network Space v2 NAS. | ||
77 | |||
78 | config MACH_OPENRD | 29 | config MACH_OPENRD |
79 | select KIRKWOOD_LEGACY | 30 | select KIRKWOOD_LEGACY |
80 | bool | 31 | bool |
@@ -114,13 +65,6 @@ config MACH_RD88F6281 | |||
114 | Say 'Y' here if you want your kernel to support the | 65 | Say 'Y' here if you want your kernel to support the |
115 | Marvell RD-88F6281 Reference Board. | 66 | Marvell RD-88F6281 Reference Board. |
116 | 67 | ||
117 | config MACH_SHEEVAPLUG | ||
118 | bool "Marvell SheevaPlug Reference Board" | ||
119 | select KIRKWOOD_LEGACY | ||
120 | help | ||
121 | Say 'Y' here if you want your kernel to support the | ||
122 | Marvell SheevaPlug Reference Board. | ||
123 | |||
124 | config MACH_T5325 | 68 | config MACH_T5325 |
125 | bool "HP t5325 Thin Client" | 69 | bool "HP t5325 Thin Client" |
126 | select KIRKWOOD_LEGACY | 70 | select KIRKWOOD_LEGACY |
@@ -149,6 +93,7 @@ comment "Device tree entries" | |||
149 | config ARCH_KIRKWOOD_DT | 93 | config ARCH_KIRKWOOD_DT |
150 | bool "Marvell Kirkwood Flattened Device Tree" | 94 | bool "Marvell Kirkwood Flattened Device Tree" |
151 | select KIRKWOOD_CLK | 95 | select KIRKWOOD_CLK |
96 | select OF_IRQ | ||
152 | select ORION_IRQCHIP | 97 | select ORION_IRQCHIP |
153 | select ORION_TIMER | 98 | select ORION_TIMER |
154 | select POWER_SUPPLY | 99 | select POWER_SUPPLY |
@@ -161,13 +106,12 @@ config ARCH_KIRKWOOD_DT | |||
161 | Say 'Y' here if you want your kernel to support the | 106 | Say 'Y' here if you want your kernel to support the |
162 | Marvell Kirkwood using flattened device tree. | 107 | Marvell Kirkwood using flattened device tree. |
163 | 108 | ||
164 | config MACH_DLINK_KIRKWOOD_DT | 109 | config MACH_MV88F6281GTW_GE_DT |
165 | bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" | 110 | bool "Marvell 88F6281 GTW GE Board (Flattened Device Tree)" |
166 | select ARCH_KIRKWOOD_DT | 111 | depends on ARCH_KIRKWOOD_DT |
167 | help | 112 | help |
168 | Say 'Y' here if you want your kernel to support the | 113 | Say 'Y' here if you want your kernel to support the |
169 | Kirkwood-based D-Link NASes such as DNS-320 & DNS-325, | 114 | Marvell 88F6281 GTW GE Board (Flattened Device Tree). |
170 | using Flattened Device Tree. | ||
171 | 115 | ||
172 | endmenu | 116 | endmenu |
173 | 117 | ||
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 88e2dd33ce2f..d1f8e3d0793b 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -1,22 +1,14 @@ | |||
1 | obj-y += common.o pcie.o | 1 | obj-y += common.o pcie.o |
2 | obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o | 2 | obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o |
3 | obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o | 3 | obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o |
4 | obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o | ||
5 | obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o | ||
6 | obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o | ||
7 | obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o | ||
8 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o | ||
9 | obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | 4 | obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o |
10 | obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | 5 | obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o |
11 | obj-$(CONFIG_MACH_NETSPACE_MAX_V2) += netspace_v2-setup.o lacie_v2-common.o | ||
12 | obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o | ||
13 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o | 6 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o |
14 | obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o | 7 | obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o |
15 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o | 8 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o |
16 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | ||
17 | obj-$(CONFIG_MACH_T5325) += t5325-setup.o | 9 | obj-$(CONFIG_MACH_T5325) += t5325-setup.o |
18 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o | 10 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o |
19 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o | 11 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o |
20 | 12 | ||
21 | obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o | 13 | obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o |
22 | obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o | 14 | obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o |
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c deleted file mode 100644 index 2af7a95d8a3c..000000000000 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jamie Lentin <jm@lentin.co.uk> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-dnskw.c | ||
5 | * | ||
6 | * D-link DNS-320 & DNS-325 NAS Init for drivers not converted to | ||
7 | * flattened device tree yet. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include "common.h" | ||
19 | |||
20 | /* Register any GPIO for output and set the value */ | ||
21 | static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) | ||
22 | { | ||
23 | if (gpio_request(gpio, name) == 0 && | ||
24 | gpio_direction_output(gpio, 0) == 0) { | ||
25 | gpio_set_value(gpio, def); | ||
26 | if (gpio_export(gpio, 0) != 0) | ||
27 | pr_err("dnskw: Failed to export GPIO %s\n", name); | ||
28 | } else | ||
29 | pr_err("dnskw: Failed to register %s\n", name); | ||
30 | } | ||
31 | |||
32 | void __init dnskw_init(void) | ||
33 | { | ||
34 | /* Set NAS to turn back on after a power failure */ | ||
35 | dnskw_gpio_register(37, "dnskw:power:recover", 1); | ||
36 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index fac0f8ef380a..b1872e93a78d 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -106,8 +106,8 @@ static void __init kirkwood_dt_init(void) | |||
106 | kexec_reinit = kirkwood_enable_pcie; | 106 | kexec_reinit = kirkwood_enable_pcie; |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | if (of_machine_is_compatible("dlink,dns-kirkwood")) | 109 | if (of_machine_is_compatible("marvell,mv88f6281gtw-ge")) |
110 | dnskw_init(); | 110 | mv88f6281gtw_ge_init(); |
111 | 111 | ||
112 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 112 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
113 | } | 113 | } |
diff --git a/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c new file mode 100644 index 000000000000..ee5eea678c11 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c | ||
3 | * | ||
4 | * Marvell 88F6281 GTW GE Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/timer.h> | ||
16 | #include <linux/mv643xx_eth.h> | ||
17 | #include <linux/ethtool.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <net/dsa.h> | ||
20 | #include <asm/mach-types.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <asm/mach/pci.h> | ||
23 | #include <mach/kirkwood.h> | ||
24 | #include "common.h" | ||
25 | |||
26 | static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { | ||
27 | .phy_addr = MV643XX_ETH_PHY_NONE, | ||
28 | .speed = SPEED_1000, | ||
29 | .duplex = DUPLEX_FULL, | ||
30 | }; | ||
31 | |||
32 | static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { | ||
33 | .port_names[0] = "lan1", | ||
34 | .port_names[1] = "lan2", | ||
35 | .port_names[2] = "lan3", | ||
36 | .port_names[3] = "lan4", | ||
37 | .port_names[4] = "wan", | ||
38 | .port_names[5] = "cpu", | ||
39 | }; | ||
40 | |||
41 | static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { | ||
42 | .nr_chips = 1, | ||
43 | .chip = &mv88f6281gtw_ge_switch_chip_data, | ||
44 | }; | ||
45 | |||
46 | void __init mv88f6281gtw_ge_init(void) | ||
47 | { | ||
48 | kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); | ||
49 | kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); | ||
50 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 9d8caae9dd59..1296de94febf 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -59,10 +59,10 @@ void kirkwood_restart(enum reboot_mode, const char *); | |||
59 | void kirkwood_clk_init(void); | 59 | void kirkwood_clk_init(void); |
60 | 60 | ||
61 | /* board init functions for boards not fully converted to fdt */ | 61 | /* board init functions for boards not fully converted to fdt */ |
62 | #ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT | 62 | #ifdef CONFIG_MACH_MV88F6281GTW_GE_DT |
63 | void dnskw_init(void); | 63 | void mv88f6281gtw_ge_init(void); |
64 | #else | 64 | #else |
65 | static inline void dnskw_init(void) {}; | 65 | static inline void mv88f6281gtw_ge_init(void) {}; |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | /* early init functions not converted to fdt yet */ | 68 | /* early init functions not converted to fdt yet */ |
diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c deleted file mode 100644 index 060ccf9cb63f..000000000000 --- a/arch/arm/mach-kirkwood/dockstar-setup.c +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/dockstar-setup.c | ||
3 | * | ||
4 | * Seagate FreeAgent DockStar Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/ata_platform.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/mv643xx_eth.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/leds.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <mach/kirkwood.h> | ||
22 | #include "common.h" | ||
23 | #include "mpp.h" | ||
24 | |||
25 | static struct mtd_partition dockstar_nand_parts[] = { | ||
26 | { | ||
27 | .name = "u-boot", | ||
28 | .offset = 0, | ||
29 | .size = SZ_1M | ||
30 | }, { | ||
31 | .name = "uImage", | ||
32 | .offset = MTDPART_OFS_NXTBLK, | ||
33 | .size = SZ_4M | ||
34 | }, { | ||
35 | .name = "root", | ||
36 | .offset = MTDPART_OFS_NXTBLK, | ||
37 | .size = MTDPART_SIZ_FULL | ||
38 | }, | ||
39 | }; | ||
40 | |||
41 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { | ||
42 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
43 | }; | ||
44 | |||
45 | static struct gpio_led dockstar_led_pins[] = { | ||
46 | { | ||
47 | .name = "dockstar:green:health", | ||
48 | .default_trigger = "default-on", | ||
49 | .gpio = 46, | ||
50 | .active_low = 1, | ||
51 | }, | ||
52 | { | ||
53 | .name = "dockstar:orange:misc", | ||
54 | .default_trigger = "none", | ||
55 | .gpio = 47, | ||
56 | .active_low = 1, | ||
57 | }, | ||
58 | }; | ||
59 | |||
60 | static struct gpio_led_platform_data dockstar_led_data = { | ||
61 | .leds = dockstar_led_pins, | ||
62 | .num_leds = ARRAY_SIZE(dockstar_led_pins), | ||
63 | }; | ||
64 | |||
65 | static struct platform_device dockstar_leds = { | ||
66 | .name = "leds-gpio", | ||
67 | .id = -1, | ||
68 | .dev = { | ||
69 | .platform_data = &dockstar_led_data, | ||
70 | } | ||
71 | }; | ||
72 | |||
73 | static unsigned int dockstar_mpp_config[] __initdata = { | ||
74 | MPP29_GPIO, /* USB Power Enable */ | ||
75 | MPP46_GPIO, /* LED green */ | ||
76 | MPP47_GPIO, /* LED orange */ | ||
77 | 0 | ||
78 | }; | ||
79 | |||
80 | static void __init dockstar_init(void) | ||
81 | { | ||
82 | /* | ||
83 | * Basic setup. Needs to be called early. | ||
84 | */ | ||
85 | kirkwood_init(); | ||
86 | |||
87 | /* setup gpio pin select */ | ||
88 | kirkwood_mpp_conf(dockstar_mpp_config); | ||
89 | |||
90 | kirkwood_uart0_init(); | ||
91 | kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts), 25); | ||
92 | |||
93 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
94 | gpio_direction_output(29, 1) != 0) | ||
95 | pr_err("can't set up GPIO 29 (USB Power Enable)\n"); | ||
96 | kirkwood_ehci_init(); | ||
97 | |||
98 | kirkwood_ge00_init(&dockstar_ge00_data); | ||
99 | |||
100 | platform_device_register(&dockstar_leds); | ||
101 | } | ||
102 | |||
103 | MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar") | ||
104 | .atag_offset = 0x100, | ||
105 | .init_machine = dockstar_init, | ||
106 | .map_io = kirkwood_map_io, | ||
107 | .init_early = kirkwood_init_early, | ||
108 | .init_irq = kirkwood_init_irq, | ||
109 | .init_time = kirkwood_timer_init, | ||
110 | .restart = kirkwood_restart, | ||
111 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c deleted file mode 100644 index 08dd739aa709..000000000000 --- a/arch/arm/mach-kirkwood/guruplug-setup.c +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/guruplug-setup.c | ||
3 | * | ||
4 | * Marvell GuruPlug Reference Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/mtd/partitions.h> | ||
15 | #include <linux/ata_platform.h> | ||
16 | #include <linux/mv643xx_eth.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/leds.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <mach/kirkwood.h> | ||
22 | #include <linux/platform_data/mmc-mvsdio.h> | ||
23 | #include "common.h" | ||
24 | #include "mpp.h" | ||
25 | |||
26 | static struct mtd_partition guruplug_nand_parts[] = { | ||
27 | { | ||
28 | .name = "u-boot", | ||
29 | .offset = 0, | ||
30 | .size = SZ_1M | ||
31 | }, { | ||
32 | .name = "uImage", | ||
33 | .offset = MTDPART_OFS_NXTBLK, | ||
34 | .size = SZ_4M | ||
35 | }, { | ||
36 | .name = "root", | ||
37 | .offset = MTDPART_OFS_NXTBLK, | ||
38 | .size = MTDPART_SIZ_FULL | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | static struct mv643xx_eth_platform_data guruplug_ge00_data = { | ||
43 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
44 | }; | ||
45 | |||
46 | static struct mv643xx_eth_platform_data guruplug_ge01_data = { | ||
47 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
48 | }; | ||
49 | |||
50 | static struct mv_sata_platform_data guruplug_sata_data = { | ||
51 | .n_ports = 1, | ||
52 | }; | ||
53 | |||
54 | static struct mvsdio_platform_data guruplug_mvsdio_data = { | ||
55 | /* unfortunately the CD signal has not been connected */ | ||
56 | .gpio_card_detect = -1, | ||
57 | .gpio_write_protect = -1, | ||
58 | }; | ||
59 | |||
60 | static struct gpio_led guruplug_led_pins[] = { | ||
61 | { | ||
62 | .name = "guruplug:red:health", | ||
63 | .gpio = 46, | ||
64 | .active_low = 1, | ||
65 | }, | ||
66 | { | ||
67 | .name = "guruplug:green:health", | ||
68 | .gpio = 47, | ||
69 | .active_low = 1, | ||
70 | }, | ||
71 | { | ||
72 | .name = "guruplug:red:wmode", | ||
73 | .gpio = 48, | ||
74 | .active_low = 1, | ||
75 | }, | ||
76 | { | ||
77 | .name = "guruplug:green:wmode", | ||
78 | .gpio = 49, | ||
79 | .active_low = 1, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct gpio_led_platform_data guruplug_led_data = { | ||
84 | .leds = guruplug_led_pins, | ||
85 | .num_leds = ARRAY_SIZE(guruplug_led_pins), | ||
86 | }; | ||
87 | |||
88 | static struct platform_device guruplug_leds = { | ||
89 | .name = "leds-gpio", | ||
90 | .id = -1, | ||
91 | .dev = { | ||
92 | .platform_data = &guruplug_led_data, | ||
93 | } | ||
94 | }; | ||
95 | |||
96 | static unsigned int guruplug_mpp_config[] __initdata = { | ||
97 | MPP46_GPIO, /* M_RLED */ | ||
98 | MPP47_GPIO, /* M_GLED */ | ||
99 | MPP48_GPIO, /* B_RLED */ | ||
100 | MPP49_GPIO, /* B_GLED */ | ||
101 | 0 | ||
102 | }; | ||
103 | |||
104 | static void __init guruplug_init(void) | ||
105 | { | ||
106 | /* | ||
107 | * Basic setup. Needs to be called early. | ||
108 | */ | ||
109 | kirkwood_init(); | ||
110 | kirkwood_mpp_conf(guruplug_mpp_config); | ||
111 | |||
112 | kirkwood_uart0_init(); | ||
113 | kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25); | ||
114 | |||
115 | kirkwood_ehci_init(); | ||
116 | kirkwood_ge00_init(&guruplug_ge00_data); | ||
117 | kirkwood_ge01_init(&guruplug_ge01_data); | ||
118 | kirkwood_sata_init(&guruplug_sata_data); | ||
119 | kirkwood_sdio_init(&guruplug_mvsdio_data); | ||
120 | |||
121 | platform_device_register(&guruplug_leds); | ||
122 | } | ||
123 | |||
124 | MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") | ||
125 | /* Maintainer: Siddarth Gore <gores@marvell.com> */ | ||
126 | .atag_offset = 0x100, | ||
127 | .init_machine = guruplug_init, | ||
128 | .map_io = kirkwood_map_io, | ||
129 | .init_early = kirkwood_init_early, | ||
130 | .init_irq = kirkwood_init_irq, | ||
131 | .init_time = kirkwood_timer_init, | ||
132 | .restart = kirkwood_restart, | ||
133 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c deleted file mode 100644 index ba384b992bef..000000000000 --- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | ||
3 | * | ||
4 | * Marvell 88F6281 GTW GE Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/irq.h> | ||
16 | #include <linux/mtd/physmap.h> | ||
17 | #include <linux/timer.h> | ||
18 | #include <linux/mv643xx_eth.h> | ||
19 | #include <linux/ethtool.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/leds.h> | ||
22 | #include <linux/input.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <linux/spi/flash.h> | ||
25 | #include <linux/spi/spi.h> | ||
26 | #include <net/dsa.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/pci.h> | ||
30 | #include <mach/kirkwood.h> | ||
31 | #include "common.h" | ||
32 | #include "mpp.h" | ||
33 | |||
34 | static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { | ||
35 | .phy_addr = MV643XX_ETH_PHY_NONE, | ||
36 | .speed = SPEED_1000, | ||
37 | .duplex = DUPLEX_FULL, | ||
38 | }; | ||
39 | |||
40 | static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { | ||
41 | .port_names[0] = "lan1", | ||
42 | .port_names[1] = "lan2", | ||
43 | .port_names[2] = "lan3", | ||
44 | .port_names[3] = "lan4", | ||
45 | .port_names[4] = "wan", | ||
46 | .port_names[5] = "cpu", | ||
47 | }; | ||
48 | |||
49 | static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { | ||
50 | .nr_chips = 1, | ||
51 | .chip = &mv88f6281gtw_ge_switch_chip_data, | ||
52 | }; | ||
53 | |||
54 | static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = { | ||
55 | .type = "mx25l12805d", | ||
56 | }; | ||
57 | |||
58 | static struct spi_board_info __initdata mv88f6281gtw_ge_spi_slave_info[] = { | ||
59 | { | ||
60 | .modalias = "m25p80", | ||
61 | .platform_data = &mv88f6281gtw_ge_spi_slave_data, | ||
62 | .irq = -1, | ||
63 | .max_speed_hz = 50000000, | ||
64 | .bus_num = 0, | ||
65 | .chip_select = 0, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = { | ||
70 | { | ||
71 | .code = KEY_RESTART, | ||
72 | .gpio = 47, | ||
73 | .desc = "SWR Button", | ||
74 | .active_low = 1, | ||
75 | }, { | ||
76 | .code = KEY_WPS_BUTTON, | ||
77 | .gpio = 46, | ||
78 | .desc = "WPS Button", | ||
79 | .active_low = 1, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct gpio_keys_platform_data mv88f6281gtw_ge_button_data = { | ||
84 | .buttons = mv88f6281gtw_ge_button_pins, | ||
85 | .nbuttons = ARRAY_SIZE(mv88f6281gtw_ge_button_pins), | ||
86 | }; | ||
87 | |||
88 | static struct platform_device mv88f6281gtw_ge_buttons = { | ||
89 | .name = "gpio-keys", | ||
90 | .id = -1, | ||
91 | .num_resources = 0, | ||
92 | .dev = { | ||
93 | .platform_data = &mv88f6281gtw_ge_button_data, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct gpio_led mv88f6281gtw_ge_led_pins[] = { | ||
98 | { | ||
99 | .name = "gtw:green:Status", | ||
100 | .gpio = 20, | ||
101 | .active_low = 0, | ||
102 | }, { | ||
103 | .name = "gtw:red:Status", | ||
104 | .gpio = 21, | ||
105 | .active_low = 0, | ||
106 | }, { | ||
107 | .name = "gtw:green:USB", | ||
108 | .gpio = 12, | ||
109 | .active_low = 0, | ||
110 | }, | ||
111 | }; | ||
112 | |||
113 | static struct gpio_led_platform_data mv88f6281gtw_ge_led_data = { | ||
114 | .leds = mv88f6281gtw_ge_led_pins, | ||
115 | .num_leds = ARRAY_SIZE(mv88f6281gtw_ge_led_pins), | ||
116 | }; | ||
117 | |||
118 | static struct platform_device mv88f6281gtw_ge_leds = { | ||
119 | .name = "leds-gpio", | ||
120 | .id = -1, | ||
121 | .dev = { | ||
122 | .platform_data = &mv88f6281gtw_ge_led_data, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | static unsigned int mv88f6281gtw_ge_mpp_config[] __initdata = { | ||
127 | MPP12_GPO, /* Status#_USB pin */ | ||
128 | MPP20_GPIO, /* Status#_GLED pin */ | ||
129 | MPP21_GPIO, /* Status#_RLED pin */ | ||
130 | MPP46_GPIO, /* WPS_Switch pin */ | ||
131 | MPP47_GPIO, /* SW_Init pin */ | ||
132 | 0 | ||
133 | }; | ||
134 | |||
135 | static void __init mv88f6281gtw_ge_init(void) | ||
136 | { | ||
137 | /* | ||
138 | * Basic setup. Needs to be called early. | ||
139 | */ | ||
140 | kirkwood_init(); | ||
141 | kirkwood_mpp_conf(mv88f6281gtw_ge_mpp_config); | ||
142 | |||
143 | kirkwood_ehci_init(); | ||
144 | kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); | ||
145 | kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); | ||
146 | spi_register_board_info(mv88f6281gtw_ge_spi_slave_info, | ||
147 | ARRAY_SIZE(mv88f6281gtw_ge_spi_slave_info)); | ||
148 | kirkwood_spi_init(); | ||
149 | kirkwood_uart0_init(); | ||
150 | platform_device_register(&mv88f6281gtw_ge_leds); | ||
151 | platform_device_register(&mv88f6281gtw_ge_buttons); | ||
152 | } | ||
153 | |||
154 | static int __init mv88f6281gtw_ge_pci_init(void) | ||
155 | { | ||
156 | if (machine_is_mv88f6281gtw_ge()) | ||
157 | kirkwood_pcie_init(KW_PCIE0); | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | subsys_initcall(mv88f6281gtw_ge_pci_init); | ||
162 | |||
163 | MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") | ||
164 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | ||
165 | .atag_offset = 0x100, | ||
166 | .init_machine = mv88f6281gtw_ge_init, | ||
167 | .map_io = kirkwood_map_io, | ||
168 | .init_early = kirkwood_init_early, | ||
169 | .init_irq = kirkwood_init_irq, | ||
170 | .init_time = kirkwood_timer_init, | ||
171 | .restart = kirkwood_restart, | ||
172 | MACHINE_END | ||
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c deleted file mode 100644 index 3b706611da8e..000000000000 --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c +++ /dev/null | |||
@@ -1,293 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/netspace_v2-setup.c | ||
3 | * | ||
4 | * LaCie Network Space v2 board setup | ||
5 | * | ||
6 | * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com> | ||
7 | * Copyright (C) 2009 Benoît Canet <benoit.canet@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/ata_platform.h> | ||
28 | #include <linux/mv643xx_eth.h> | ||
29 | #include <linux/input.h> | ||
30 | #include <linux/gpio.h> | ||
31 | #include <linux/gpio_keys.h> | ||
32 | #include <linux/leds.h> | ||
33 | #include <linux/gpio-fan.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <mach/kirkwood.h> | ||
37 | #include <linux/platform_data/leds-kirkwood-ns2.h> | ||
38 | #include "common.h" | ||
39 | #include "mpp.h" | ||
40 | #include "lacie_v2-common.h" | ||
41 | |||
42 | /***************************************************************************** | ||
43 | * Ethernet | ||
44 | ****************************************************************************/ | ||
45 | |||
46 | static struct mv643xx_eth_platform_data netspace_v2_ge00_data = { | ||
47 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
48 | }; | ||
49 | |||
50 | /***************************************************************************** | ||
51 | * SATA | ||
52 | ****************************************************************************/ | ||
53 | |||
54 | static struct mv_sata_platform_data netspace_v2_sata_data = { | ||
55 | .n_ports = 2, | ||
56 | }; | ||
57 | |||
58 | /***************************************************************************** | ||
59 | * GPIO keys | ||
60 | ****************************************************************************/ | ||
61 | |||
62 | #define NETSPACE_V2_PUSH_BUTTON 32 | ||
63 | |||
64 | static struct gpio_keys_button netspace_v2_buttons[] = { | ||
65 | [0] = { | ||
66 | .code = KEY_POWER, | ||
67 | .gpio = NETSPACE_V2_PUSH_BUTTON, | ||
68 | .desc = "Power push button", | ||
69 | .active_low = 0, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | static struct gpio_keys_platform_data netspace_v2_button_data = { | ||
74 | .buttons = netspace_v2_buttons, | ||
75 | .nbuttons = ARRAY_SIZE(netspace_v2_buttons), | ||
76 | }; | ||
77 | |||
78 | static struct platform_device netspace_v2_gpio_buttons = { | ||
79 | .name = "gpio-keys", | ||
80 | .id = -1, | ||
81 | .dev = { | ||
82 | .platform_data = &netspace_v2_button_data, | ||
83 | }, | ||
84 | }; | ||
85 | |||
86 | /***************************************************************************** | ||
87 | * GPIO LEDs | ||
88 | ****************************************************************************/ | ||
89 | |||
90 | #define NETSPACE_V2_GPIO_RED_LED 12 | ||
91 | |||
92 | static struct gpio_led netspace_v2_gpio_led_pins[] = { | ||
93 | { | ||
94 | .name = "ns_v2:red:fail", | ||
95 | .gpio = NETSPACE_V2_GPIO_RED_LED, | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct gpio_led_platform_data netspace_v2_gpio_leds_data = { | ||
100 | .num_leds = ARRAY_SIZE(netspace_v2_gpio_led_pins), | ||
101 | .leds = netspace_v2_gpio_led_pins, | ||
102 | }; | ||
103 | |||
104 | static struct platform_device netspace_v2_gpio_leds = { | ||
105 | .name = "leds-gpio", | ||
106 | .id = -1, | ||
107 | .dev = { | ||
108 | .platform_data = &netspace_v2_gpio_leds_data, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | /***************************************************************************** | ||
113 | * Dual-GPIO CPLD LEDs | ||
114 | ****************************************************************************/ | ||
115 | |||
116 | #define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29 | ||
117 | #define NETSPACE_V2_GPIO_BLUE_LED_CMD 30 | ||
118 | |||
119 | static struct ns2_led netspace_v2_led_pins[] = { | ||
120 | { | ||
121 | .name = "ns_v2:blue:sata", | ||
122 | .cmd = NETSPACE_V2_GPIO_BLUE_LED_CMD, | ||
123 | .slow = NETSPACE_V2_GPIO_BLUE_LED_SLOW, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | static struct ns2_led_platform_data netspace_v2_leds_data = { | ||
128 | .num_leds = ARRAY_SIZE(netspace_v2_led_pins), | ||
129 | .leds = netspace_v2_led_pins, | ||
130 | }; | ||
131 | |||
132 | static struct platform_device netspace_v2_leds = { | ||
133 | .name = "leds-ns2", | ||
134 | .id = -1, | ||
135 | .dev = { | ||
136 | .platform_data = &netspace_v2_leds_data, | ||
137 | }, | ||
138 | }; | ||
139 | |||
140 | /***************************************************************************** | ||
141 | * GPIO fan | ||
142 | ****************************************************************************/ | ||
143 | |||
144 | /* Designed for fan 40x40x16: ADDA AD0412LB-D50 6000rpm@12v */ | ||
145 | static struct gpio_fan_speed netspace_max_v2_fan_speed[] = { | ||
146 | { 0, 0 }, | ||
147 | { 1500, 15 }, | ||
148 | { 1700, 14 }, | ||
149 | { 1800, 13 }, | ||
150 | { 2100, 12 }, | ||
151 | { 3100, 11 }, | ||
152 | { 3300, 10 }, | ||
153 | { 4300, 9 }, | ||
154 | { 5500, 8 }, | ||
155 | }; | ||
156 | |||
157 | static unsigned netspace_max_v2_fan_ctrl[] = { 22, 7, 33, 23 }; | ||
158 | |||
159 | static struct gpio_fan_alarm netspace_max_v2_fan_alarm = { | ||
160 | .gpio = 25, | ||
161 | .active_low = 1, | ||
162 | }; | ||
163 | |||
164 | static struct gpio_fan_platform_data netspace_max_v2_fan_data = { | ||
165 | .num_ctrl = ARRAY_SIZE(netspace_max_v2_fan_ctrl), | ||
166 | .ctrl = netspace_max_v2_fan_ctrl, | ||
167 | .alarm = &netspace_max_v2_fan_alarm, | ||
168 | .num_speed = ARRAY_SIZE(netspace_max_v2_fan_speed), | ||
169 | .speed = netspace_max_v2_fan_speed, | ||
170 | }; | ||
171 | |||
172 | static struct platform_device netspace_max_v2_gpio_fan = { | ||
173 | .name = "gpio-fan", | ||
174 | .id = -1, | ||
175 | .dev = { | ||
176 | .platform_data = &netspace_max_v2_fan_data, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | /***************************************************************************** | ||
181 | * General Setup | ||
182 | ****************************************************************************/ | ||
183 | |||
184 | static unsigned int netspace_v2_mpp_config[] __initdata = { | ||
185 | MPP0_SPI_SCn, | ||
186 | MPP1_SPI_MOSI, | ||
187 | MPP2_SPI_SCK, | ||
188 | MPP3_SPI_MISO, | ||
189 | MPP4_NF_IO6, | ||
190 | MPP5_NF_IO7, | ||
191 | MPP6_SYSRST_OUTn, | ||
192 | MPP7_GPO, /* Fan speed (bit 1) */ | ||
193 | MPP8_TW0_SDA, | ||
194 | MPP9_TW0_SCK, | ||
195 | MPP10_UART0_TXD, | ||
196 | MPP11_UART0_RXD, | ||
197 | MPP12_GPO, /* Red led */ | ||
198 | MPP14_GPIO, /* USB fuse */ | ||
199 | MPP16_GPIO, /* SATA 0 power */ | ||
200 | MPP17_GPIO, /* SATA 1 power */ | ||
201 | MPP18_NF_IO0, | ||
202 | MPP19_NF_IO1, | ||
203 | MPP20_SATA1_ACTn, | ||
204 | MPP21_SATA0_ACTn, | ||
205 | MPP22_GPIO, /* Fan speed (bit 0) */ | ||
206 | MPP23_GPIO, /* Fan power */ | ||
207 | MPP24_GPIO, /* USB mode select */ | ||
208 | MPP25_GPIO, /* Fan rotation fail */ | ||
209 | MPP26_GPIO, /* USB device vbus */ | ||
210 | MPP28_GPIO, /* USB enable host vbus */ | ||
211 | MPP29_GPIO, /* Blue led (slow register) */ | ||
212 | MPP30_GPIO, /* Blue led (command register) */ | ||
213 | MPP31_GPIO, /* Board power off */ | ||
214 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | ||
215 | MPP33_GPO, /* Fan speed (bit 2) */ | ||
216 | 0 | ||
217 | }; | ||
218 | |||
219 | #define NETSPACE_V2_GPIO_POWER_OFF 31 | ||
220 | |||
221 | static void netspace_v2_power_off(void) | ||
222 | { | ||
223 | gpio_set_value(NETSPACE_V2_GPIO_POWER_OFF, 1); | ||
224 | } | ||
225 | |||
226 | static void __init netspace_v2_init(void) | ||
227 | { | ||
228 | /* | ||
229 | * Basic setup. Needs to be called early. | ||
230 | */ | ||
231 | kirkwood_init(); | ||
232 | kirkwood_mpp_conf(netspace_v2_mpp_config); | ||
233 | |||
234 | if (machine_is_netspace_max_v2()) | ||
235 | lacie_v2_hdd_power_init(2); | ||
236 | else | ||
237 | lacie_v2_hdd_power_init(1); | ||
238 | |||
239 | kirkwood_ehci_init(); | ||
240 | kirkwood_ge00_init(&netspace_v2_ge00_data); | ||
241 | kirkwood_sata_init(&netspace_v2_sata_data); | ||
242 | kirkwood_uart0_init(); | ||
243 | lacie_v2_register_flash(); | ||
244 | lacie_v2_register_i2c_devices(); | ||
245 | |||
246 | platform_device_register(&netspace_v2_leds); | ||
247 | platform_device_register(&netspace_v2_gpio_leds); | ||
248 | platform_device_register(&netspace_v2_gpio_buttons); | ||
249 | if (machine_is_netspace_max_v2()) | ||
250 | platform_device_register(&netspace_max_v2_gpio_fan); | ||
251 | |||
252 | if (gpio_request(NETSPACE_V2_GPIO_POWER_OFF, "power-off") == 0 && | ||
253 | gpio_direction_output(NETSPACE_V2_GPIO_POWER_OFF, 0) == 0) | ||
254 | pm_power_off = netspace_v2_power_off; | ||
255 | else | ||
256 | pr_err("netspace_v2: failed to configure power-off GPIO\n"); | ||
257 | } | ||
258 | |||
259 | #ifdef CONFIG_MACH_NETSPACE_V2 | ||
260 | MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") | ||
261 | .atag_offset = 0x100, | ||
262 | .init_machine = netspace_v2_init, | ||
263 | .map_io = kirkwood_map_io, | ||
264 | .init_early = kirkwood_init_early, | ||
265 | .init_irq = kirkwood_init_irq, | ||
266 | .init_time = kirkwood_timer_init, | ||
267 | .restart = kirkwood_restart, | ||
268 | MACHINE_END | ||
269 | #endif | ||
270 | |||
271 | #ifdef CONFIG_MACH_INETSPACE_V2 | ||
272 | MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") | ||
273 | .atag_offset = 0x100, | ||
274 | .init_machine = netspace_v2_init, | ||
275 | .map_io = kirkwood_map_io, | ||
276 | .init_early = kirkwood_init_early, | ||
277 | .init_irq = kirkwood_init_irq, | ||
278 | .init_time = kirkwood_timer_init, | ||
279 | .restart = kirkwood_restart, | ||
280 | MACHINE_END | ||
281 | #endif | ||
282 | |||
283 | #ifdef CONFIG_MACH_NETSPACE_MAX_V2 | ||
284 | MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") | ||
285 | .atag_offset = 0x100, | ||
286 | .init_machine = netspace_v2_init, | ||
287 | .map_io = kirkwood_map_io, | ||
288 | .init_early = kirkwood_init_early, | ||
289 | .init_irq = kirkwood_init_irq, | ||
290 | .init_time = kirkwood_timer_init, | ||
291 | .restart = kirkwood_restart, | ||
292 | MACHINE_END | ||
293 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c index 6a6eb548307d..e5cf84103583 100644 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ b/arch/arm/mach-kirkwood/openrd-setup.c | |||
@@ -158,7 +158,8 @@ static void __init openrd_init(void) | |||
158 | kirkwood_mpp_conf(openrd_mpp_config); | 158 | kirkwood_mpp_conf(openrd_mpp_config); |
159 | 159 | ||
160 | kirkwood_uart0_init(); | 160 | kirkwood_uart0_init(); |
161 | kirkwood_nand_init(ARRAY_AND_SIZE(openrd_nand_parts), 25); | 161 | kirkwood_nand_init(openrd_nand_parts, ARRAY_SIZE(openrd_nand_parts), |
162 | 25); | ||
162 | 163 | ||
163 | kirkwood_ehci_init(); | 164 | kirkwood_ehci_init(); |
164 | 165 | ||
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index d24223166e06..5154bd2a3ad3 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c | |||
@@ -87,7 +87,9 @@ static void __init rd88f6281_init(void) | |||
87 | kirkwood_init(); | 87 | kirkwood_init(); |
88 | kirkwood_mpp_conf(rd88f6281_mpp_config); | 88 | kirkwood_mpp_conf(rd88f6281_mpp_config); |
89 | 89 | ||
90 | kirkwood_nand_init(ARRAY_AND_SIZE(rd88f6281_nand_parts), 25); | 90 | kirkwood_nand_init(rd88f6281_nand_parts, |
91 | ARRAY_SIZE(rd88f6281_nand_parts), | ||
92 | 25); | ||
91 | kirkwood_ehci_init(); | 93 | kirkwood_ehci_init(); |
92 | 94 | ||
93 | kirkwood_ge00_init(&rd88f6281_ge00_data); | 95 | kirkwood_ge00_init(&rd88f6281_ge00_data); |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c deleted file mode 100644 index 55b68fa39f45..000000000000 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/sheevaplug-setup.c | ||
3 | * | ||
4 | * Marvell SheevaPlug Reference Board Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/ata_platform.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/mv643xx_eth.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/leds.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <mach/kirkwood.h> | ||
22 | #include <linux/platform_data/mmc-mvsdio.h> | ||
23 | #include "common.h" | ||
24 | #include "mpp.h" | ||
25 | |||
26 | static struct mtd_partition sheevaplug_nand_parts[] = { | ||
27 | { | ||
28 | .name = "u-boot", | ||
29 | .offset = 0, | ||
30 | .size = SZ_1M | ||
31 | }, { | ||
32 | .name = "uImage", | ||
33 | .offset = MTDPART_OFS_NXTBLK, | ||
34 | .size = SZ_4M | ||
35 | }, { | ||
36 | .name = "root", | ||
37 | .offset = MTDPART_OFS_NXTBLK, | ||
38 | .size = MTDPART_SIZ_FULL | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { | ||
43 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
44 | }; | ||
45 | |||
46 | static struct mv_sata_platform_data sheeva_esata_sata_data = { | ||
47 | .n_ports = 2, | ||
48 | }; | ||
49 | |||
50 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { | ||
51 | /* unfortunately the CD signal has not been connected */ | ||
52 | }; | ||
53 | |||
54 | static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { | ||
55 | .gpio_write_protect = 44, /* MPP44 used as SD write protect */ | ||
56 | .gpio_card_detect = 47, /* MPP47 used as SD card detect */ | ||
57 | }; | ||
58 | |||
59 | static struct gpio_led sheevaplug_led_pins[] = { | ||
60 | { | ||
61 | .name = "plug:red:misc", | ||
62 | .default_trigger = "none", | ||
63 | .gpio = 46, | ||
64 | .active_low = 1, | ||
65 | }, | ||
66 | { | ||
67 | .name = "plug:green:health", | ||
68 | .default_trigger = "default-on", | ||
69 | .gpio = 49, | ||
70 | .active_low = 1, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static struct gpio_led_platform_data sheevaplug_led_data = { | ||
75 | .leds = sheevaplug_led_pins, | ||
76 | .num_leds = ARRAY_SIZE(sheevaplug_led_pins), | ||
77 | }; | ||
78 | |||
79 | static struct platform_device sheevaplug_leds = { | ||
80 | .name = "leds-gpio", | ||
81 | .id = -1, | ||
82 | .dev = { | ||
83 | .platform_data = &sheevaplug_led_data, | ||
84 | } | ||
85 | }; | ||
86 | |||
87 | static unsigned int sheevaplug_mpp_config[] __initdata = { | ||
88 | MPP29_GPIO, /* USB Power Enable */ | ||
89 | MPP46_GPIO, /* LED Red */ | ||
90 | MPP49_GPIO, /* LED */ | ||
91 | 0 | ||
92 | }; | ||
93 | |||
94 | static unsigned int sheeva_esata_mpp_config[] __initdata = { | ||
95 | MPP29_GPIO, /* USB Power Enable */ | ||
96 | MPP44_GPIO, /* SD Write Protect */ | ||
97 | MPP47_GPIO, /* SD Card Detect */ | ||
98 | MPP49_GPIO, /* LED Green */ | ||
99 | 0 | ||
100 | }; | ||
101 | |||
102 | static void __init sheevaplug_init(void) | ||
103 | { | ||
104 | /* | ||
105 | * Basic setup. Needs to be called early. | ||
106 | */ | ||
107 | kirkwood_init(); | ||
108 | |||
109 | /* setup gpio pin select */ | ||
110 | if (machine_is_esata_sheevaplug()) | ||
111 | kirkwood_mpp_conf(sheeva_esata_mpp_config); | ||
112 | else | ||
113 | kirkwood_mpp_conf(sheevaplug_mpp_config); | ||
114 | |||
115 | kirkwood_uart0_init(); | ||
116 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); | ||
117 | |||
118 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
119 | gpio_direction_output(29, 1) != 0) | ||
120 | pr_err("can't set up GPIO 29 (USB Power Enable)\n"); | ||
121 | kirkwood_ehci_init(); | ||
122 | |||
123 | kirkwood_ge00_init(&sheevaplug_ge00_data); | ||
124 | |||
125 | /* honor lower power consumption for plugs with out eSATA */ | ||
126 | if (machine_is_esata_sheevaplug()) | ||
127 | kirkwood_sata_init(&sheeva_esata_sata_data); | ||
128 | |||
129 | /* enable sd wp and sd cd on plugs with esata */ | ||
130 | if (machine_is_esata_sheevaplug()) | ||
131 | kirkwood_sdio_init(&sheeva_esata_mvsdio_data); | ||
132 | else | ||
133 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | ||
134 | |||
135 | platform_device_register(&sheevaplug_leds); | ||
136 | } | ||
137 | |||
138 | #ifdef CONFIG_MACH_SHEEVAPLUG | ||
139 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") | ||
140 | /* Maintainer: shadi Ammouri <shadi@marvell.com> */ | ||
141 | .atag_offset = 0x100, | ||
142 | .init_machine = sheevaplug_init, | ||
143 | .map_io = kirkwood_map_io, | ||
144 | .init_early = kirkwood_init_early, | ||
145 | .init_irq = kirkwood_init_irq, | ||
146 | .init_time = kirkwood_timer_init, | ||
147 | .restart = kirkwood_restart, | ||
148 | MACHINE_END | ||
149 | #endif | ||
150 | |||
151 | #ifdef CONFIG_MACH_ESATA_SHEEVAPLUG | ||
152 | MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") | ||
153 | .atag_offset = 0x100, | ||
154 | .init_machine = sheevaplug_init, | ||
155 | .map_io = kirkwood_map_io, | ||
156 | .init_early = kirkwood_init_early, | ||
157 | .init_irq = kirkwood_init_irq, | ||
158 | .init_time = kirkwood_timer_init, | ||
159 | .restart = kirkwood_restart, | ||
160 | MACHINE_END | ||
161 | #endif | ||