diff options
Diffstat (limited to 'arch/arm/mach-kirkwood')
30 files changed, 99 insertions, 1926 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index b634f9650a7b..fe8319ad3158 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -2,67 +2,32 @@ if ARCH_KIRKWOOD | |||
2 | 2 | ||
3 | menu "Marvell Kirkwood Implementations" | 3 | menu "Marvell Kirkwood Implementations" |
4 | 4 | ||
5 | config KIRKWOOD_LEGACY | ||
6 | bool | ||
7 | |||
5 | config MACH_D2NET_V2 | 8 | config MACH_D2NET_V2 |
6 | bool "LaCie d2 Network v2 NAS Board" | 9 | bool "LaCie d2 Network v2 NAS Board" |
10 | select KIRKWOOD_LEGACY | ||
7 | help | 11 | help |
8 | Say 'Y' here if you want your kernel to support the | 12 | Say 'Y' here if you want your kernel to support the |
9 | LaCie d2 Network v2 NAS. | 13 | LaCie d2 Network v2 NAS. |
10 | 14 | ||
11 | config MACH_DOCKSTAR | ||
12 | bool "Seagate FreeAgent DockStar" | ||
13 | help | ||
14 | Say 'Y' here if you want your kernel to support the | ||
15 | Seagate FreeAgent DockStar. | ||
16 | |||
17 | config MACH_ESATA_SHEEVAPLUG | ||
18 | bool "Marvell eSATA SheevaPlug Reference Board" | ||
19 | help | ||
20 | Say 'Y' here if you want your kernel to support the | ||
21 | Marvell eSATA SheevaPlug Reference Board. | ||
22 | |||
23 | config MACH_GURUPLUG | ||
24 | bool "Marvell GuruPlug Reference Board" | ||
25 | help | ||
26 | Say 'Y' here if you want your kernel to support the | ||
27 | Marvell GuruPlug Reference Board. | ||
28 | |||
29 | config MACH_INETSPACE_V2 | ||
30 | bool "LaCie Internet Space v2 NAS Board" | ||
31 | help | ||
32 | Say 'Y' here if you want your kernel to support the | ||
33 | LaCie Internet Space v2 NAS. | ||
34 | |||
35 | config MACH_MV88F6281GTW_GE | ||
36 | bool "Marvell 88F6281 GTW GE Board" | ||
37 | help | ||
38 | Say 'Y' here if you want your kernel to support the | ||
39 | Marvell 88F6281 GTW GE Board. | ||
40 | |||
41 | config MACH_NET2BIG_V2 | 15 | config MACH_NET2BIG_V2 |
42 | bool "LaCie 2Big Network v2 NAS Board" | 16 | bool "LaCie 2Big Network v2 NAS Board" |
17 | select KIRKWOOD_LEGACY | ||
43 | help | 18 | help |
44 | Say 'Y' here if you want your kernel to support the | 19 | Say 'Y' here if you want your kernel to support the |
45 | LaCie 2Big Network v2 NAS. | 20 | LaCie 2Big Network v2 NAS. |
46 | 21 | ||
47 | config MACH_NET5BIG_V2 | 22 | config MACH_NET5BIG_V2 |
48 | bool "LaCie 5Big Network v2 NAS Board" | 23 | bool "LaCie 5Big Network v2 NAS Board" |
24 | select KIRKWOOD_LEGACY | ||
49 | help | 25 | help |
50 | Say 'Y' here if you want your kernel to support the | 26 | Say 'Y' here if you want your kernel to support the |
51 | LaCie 5Big Network v2 NAS. | 27 | LaCie 5Big Network v2 NAS. |
52 | 28 | ||
53 | config MACH_NETSPACE_MAX_V2 | ||
54 | bool "LaCie Network Space Max v2 NAS Board" | ||
55 | help | ||
56 | Say 'Y' here if you want your kernel to support the | ||
57 | LaCie Network Space Max v2 NAS. | ||
58 | |||
59 | config MACH_NETSPACE_V2 | ||
60 | bool "LaCie Network Space v2 NAS Board" | ||
61 | help | ||
62 | Say 'Y' here if you want your kernel to support the | ||
63 | LaCie Network Space v2 NAS. | ||
64 | |||
65 | config MACH_OPENRD | 29 | config MACH_OPENRD |
30 | select KIRKWOOD_LEGACY | ||
66 | bool | 31 | bool |
67 | 32 | ||
68 | config MACH_OPENRD_BASE | 33 | config MACH_OPENRD_BASE |
@@ -88,30 +53,28 @@ config MACH_OPENRD_ULTIMATE | |||
88 | 53 | ||
89 | config MACH_RD88F6192_NAS | 54 | config MACH_RD88F6192_NAS |
90 | bool "Marvell RD-88F6192-NAS Reference Board" | 55 | bool "Marvell RD-88F6192-NAS Reference Board" |
56 | select KIRKWOOD_LEGACY | ||
91 | help | 57 | help |
92 | Say 'Y' here if you want your kernel to support the | 58 | Say 'Y' here if you want your kernel to support the |
93 | Marvell RD-88F6192-NAS Reference Board. | 59 | Marvell RD-88F6192-NAS Reference Board. |
94 | 60 | ||
95 | config MACH_RD88F6281 | 61 | config MACH_RD88F6281 |
96 | bool "Marvell RD-88F6281 Reference Board" | 62 | bool "Marvell RD-88F6281 Reference Board" |
63 | select KIRKWOOD_LEGACY | ||
97 | help | 64 | help |
98 | Say 'Y' here if you want your kernel to support the | 65 | Say 'Y' here if you want your kernel to support the |
99 | Marvell RD-88F6281 Reference Board. | 66 | Marvell RD-88F6281 Reference Board. |
100 | 67 | ||
101 | config MACH_SHEEVAPLUG | ||
102 | bool "Marvell SheevaPlug Reference Board" | ||
103 | help | ||
104 | Say 'Y' here if you want your kernel to support the | ||
105 | Marvell SheevaPlug Reference Board. | ||
106 | |||
107 | config MACH_T5325 | 68 | config MACH_T5325 |
108 | bool "HP t5325 Thin Client" | 69 | bool "HP t5325 Thin Client" |
70 | select KIRKWOOD_LEGACY | ||
109 | help | 71 | help |
110 | Say 'Y' here if you want your kernel to support the | 72 | Say 'Y' here if you want your kernel to support the |
111 | HP t5325 Thin Client. | 73 | HP t5325 Thin Client. |
112 | 74 | ||
113 | config MACH_TS219 | 75 | config MACH_TS219 |
114 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | 76 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" |
77 | select KIRKWOOD_LEGACY | ||
115 | help | 78 | help |
116 | Say 'Y' here if you want your kernel to support the | 79 | Say 'Y' here if you want your kernel to support the |
117 | QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and | 80 | QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and |
@@ -119,6 +82,7 @@ config MACH_TS219 | |||
119 | 82 | ||
120 | config MACH_TS41X | 83 | config MACH_TS41X |
121 | bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS" | 84 | bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS" |
85 | select KIRKWOOD_LEGACY | ||
122 | help | 86 | help |
123 | Say 'Y' here if you want your kernel to support the | 87 | Say 'Y' here if you want your kernel to support the |
124 | QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo | 88 | QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo |
@@ -129,6 +93,9 @@ comment "Device tree entries" | |||
129 | config ARCH_KIRKWOOD_DT | 93 | config ARCH_KIRKWOOD_DT |
130 | bool "Marvell Kirkwood Flattened Device Tree" | 94 | bool "Marvell Kirkwood Flattened Device Tree" |
131 | select KIRKWOOD_CLK | 95 | select KIRKWOOD_CLK |
96 | select OF_IRQ | ||
97 | select ORION_IRQCHIP | ||
98 | select ORION_TIMER | ||
132 | select POWER_SUPPLY | 99 | select POWER_SUPPLY |
133 | select POWER_RESET | 100 | select POWER_RESET |
134 | select POWER_RESET_GPIO | 101 | select POWER_RESET_GPIO |
@@ -139,184 +106,12 @@ config ARCH_KIRKWOOD_DT | |||
139 | Say 'Y' here if you want your kernel to support the | 106 | Say 'Y' here if you want your kernel to support the |
140 | Marvell Kirkwood using flattened device tree. | 107 | Marvell Kirkwood using flattened device tree. |
141 | 108 | ||
142 | config MACH_CLOUDBOX_DT | 109 | config MACH_MV88F6281GTW_GE_DT |
143 | bool "LaCie CloudBox NAS (Flattened Device Tree)" | 110 | bool "Marvell 88F6281 GTW GE Board (Flattened Device Tree)" |
144 | select ARCH_KIRKWOOD_DT | 111 | depends on ARCH_KIRKWOOD_DT |
145 | help | ||
146 | Say 'Y' here if you want your kernel to support the LaCie | ||
147 | CloudBox NAS, using Flattened Device Tree. | ||
148 | |||
149 | config MACH_DB88F628X_BP_DT | ||
150 | bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)" | ||
151 | help | ||
152 | Say 'Y' here if you want your kernel to support the Marvell | ||
153 | DB-88F6281-BP and DB-88F6282-BP Development Board (Flattened | ||
154 | Device Tree). | ||
155 | |||
156 | config MACH_DLINK_KIRKWOOD_DT | ||
157 | bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" | ||
158 | select ARCH_KIRKWOOD_DT | ||
159 | help | ||
160 | Say 'Y' here if you want your kernel to support the | ||
161 | Kirkwood-based D-Link NASes such as DNS-320 & DNS-325, | ||
162 | using Flattened Device Tree. | ||
163 | |||
164 | config MACH_DOCKSTAR_DT | ||
165 | bool "Seagate FreeAgent Dockstar (Flattened Device Tree)" | ||
166 | select 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 | Seagate FreeAgent Dockstar (Flattened Device Tree). | 114 | Marvell 88F6281 GTW GE Board (Flattened Device Tree). |
170 | |||
171 | config MACH_DREAMPLUG_DT | ||
172 | bool "Marvell DreamPlug (Flattened Device Tree)" | ||
173 | select ARCH_KIRKWOOD_DT | ||
174 | help | ||
175 | Say 'Y' here if you want your kernel to support the | ||
176 | Marvell DreamPlug (Flattened Device Tree). | ||
177 | |||
178 | config MACH_GOFLEXNET_DT | ||
179 | bool "Seagate GoFlex Net (Flattened Device Tree)" | ||
180 | select ARCH_KIRKWOOD_DT | ||
181 | help | ||
182 | Say 'Y' here if you want your kernel to support the | ||
183 | Seagate GoFlex Net (Flattened Device Tree). | ||
184 | |||
185 | config MACH_GURUPLUG_DT | ||
186 | bool "Marvell GuruPlug Reference Board (Flattened Device Tree)" | ||
187 | select ARCH_KIRKWOOD_DT | ||
188 | help | ||
189 | Say 'Y' here if you want your kernel to support the | ||
190 | Marvell GuruPlug Reference Board (Flattened Device Tree). | ||
191 | |||
192 | config MACH_IB62X0_DT | ||
193 | bool "RaidSonic IB-NAS6210, IB-NAS6220 (Flattened Device Tree)" | ||
194 | select ARCH_KIRKWOOD_DT | ||
195 | help | ||
196 | Say 'Y' here if you want your kernel to support the | ||
197 | RaidSonic IB-NAS6210 & IB-NAS6220 devices, using | ||
198 | Flattened Device Tree. | ||
199 | |||
200 | config MACH_ICONNECT_DT | ||
201 | bool "Iomega Iconnect (Flattened Device Tree)" | ||
202 | select ARCH_KIRKWOOD_DT | ||
203 | help | ||
204 | Say 'Y' here to enable Iomega Iconnect support. | ||
205 | |||
206 | config MACH_INETSPACE_V2_DT | ||
207 | bool "LaCie Internet Space v2 NAS (Flattened Device Tree)" | ||
208 | select ARCH_KIRKWOOD_DT | ||
209 | help | ||
210 | Say 'Y' here if you want your kernel to support the LaCie | ||
211 | Internet Space v2 NAS, using Flattened Device Tree. | ||
212 | |||
213 | config MACH_IOMEGA_IX2_200_DT | ||
214 | bool "Iomega StorCenter ix2-200 (Flattened Device Tree)" | ||
215 | select ARCH_KIRKWOOD_DT | ||
216 | help | ||
217 | Say 'Y' here if you want your kernel to support the | ||
218 | Iomega StorCenter ix2-200 (Flattened Device Tree). | ||
219 | |||
220 | config MACH_KM_KIRKWOOD_DT | ||
221 | bool "Keymile Kirkwood Reference Design (Flattened Device Tree)" | ||
222 | select ARCH_KIRKWOOD_DT | ||
223 | help | ||
224 | Say 'Y' here if you want your kernel to support the | ||
225 | Keymile Kirkwood Reference Desgin, using Flattened Device Tree. | ||
226 | |||
227 | config MACH_LSXL_DT | ||
228 | bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)" | ||
229 | select ARCH_KIRKWOOD_DT | ||
230 | select POWER_RESET_RESTART | ||
231 | help | ||
232 | Say 'Y' here if you want your kernel to support the | ||
233 | Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using | ||
234 | Flattened Device Tree. | ||
235 | |||
236 | config MACH_MPLCEC4_DT | ||
237 | bool "MPL CEC4 (Flattened Device Tree)" | ||
238 | select ARCH_KIRKWOOD_DT | ||
239 | help | ||
240 | Say 'Y' here if you want your kernel to support the | ||
241 | MPL CEC4 (Flattened Device Tree). | ||
242 | |||
243 | config MACH_NETSPACE_LITE_V2_DT | ||
244 | bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)" | ||
245 | select ARCH_KIRKWOOD_DT | ||
246 | help | ||
247 | Say 'Y' here if you want your kernel to support the LaCie | ||
248 | Network Space Lite v2 NAS, using Flattened Device Tree. | ||
249 | |||
250 | config MACH_NETSPACE_MAX_V2_DT | ||
251 | bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)" | ||
252 | select ARCH_KIRKWOOD_DT | ||
253 | help | ||
254 | Say 'Y' here if you want your kernel to support the LaCie | ||
255 | Network Space Max v2 NAS, using Flattened Device Tree. | ||
256 | |||
257 | config MACH_NETSPACE_MINI_V2_DT | ||
258 | bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)" | ||
259 | select ARCH_KIRKWOOD_DT | ||
260 | help | ||
261 | Say 'Y' here if you want your kernel to support the LaCie | ||
262 | Network Space Mini v2 NAS using Flattened Device Tree. | ||
263 | |||
264 | This board is embedded in a product named CloudBox, which | ||
265 | provides automatic backup on a 100GB cloud storage. This | ||
266 | should not confused with a more recent LaCie NAS also named | ||
267 | CloudBox. For this last, the disk capacity is 1TB or above. | ||
268 | |||
269 | config MACH_NETSPACE_V2_DT | ||
270 | bool "LaCie Network Space v2 NAS (Flattened Device Tree)" | ||
271 | select ARCH_KIRKWOOD_DT | ||
272 | help | ||
273 | Say 'Y' here if you want your kernel to support the LaCie | ||
274 | Network Space v2 NAS, using Flattened Device Tree. | ||
275 | |||
276 | config MACH_OPENBLOCKS_A6_DT | ||
277 | bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)" | ||
278 | select ARCH_KIRKWOOD_DT | ||
279 | help | ||
280 | Say 'Y' here if you want your kernel to support the | ||
281 | Plat'Home OpenBlocks A6 (Flattened Device Tree). | ||
282 | |||
283 | config MACH_READYNAS_DT | ||
284 | bool "NETGEAR ReadyNAS Duo v2 (Flattened Device Tree)" | ||
285 | select ARCH_KIRKWOOD_DT | ||
286 | select ARM_APPENDED_DTB | ||
287 | select ARM_ATAG_DTB_COMPAT | ||
288 | help | ||
289 | Say 'Y' here if you want your kernel to support the | ||
290 | NETGEAR ReadyNAS Duo v2 using Fattened Device Tree. | ||
291 | |||
292 | config MACH_SHEEVAPLUG_DT | ||
293 | bool "Marvell (eSATA) SheevaPlug (Flattened Device Tree)" | ||
294 | select ARCH_KIRKWOOD_DT | ||
295 | help | ||
296 | Say 'Y' here if you want your kernel to support the | ||
297 | Marvell (eSATA) SheevaPlug (Flattened Device Tree). | ||
298 | |||
299 | config MACH_TOPKICK_DT | ||
300 | bool "USI Topkick (Flattened Device Tree)" | ||
301 | select ARCH_KIRKWOOD_DT | ||
302 | help | ||
303 | Say 'Y' here if you want your kernel to support the | ||
304 | USI Topkick, using Flattened Device Tree | ||
305 | |||
306 | config MACH_TS219_DT | ||
307 | bool "Device Tree for QNAP TS-11X, TS-21X NAS" | ||
308 | select ARCH_KIRKWOOD_DT | ||
309 | select ARM_APPENDED_DTB | ||
310 | select ARM_ATAG_DTB_COMPAT | ||
311 | select POWER_RESET_QNAP | ||
312 | help | ||
313 | Say 'Y' here if you want your kernel to support the QNAP | ||
314 | TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and | ||
315 | TS-219P+ Turbo NAS devices using Fattened Device Tree. | ||
316 | There are two different Device Tree descriptions, depending | ||
317 | on if the device is based on an if the board uses the MV6281 | ||
318 | or MV6282. If you have the wrong one, the buttons will not | ||
319 | work. | ||
320 | 115 | ||
321 | endmenu | 116 | endmenu |
322 | 117 | ||
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index ac4cd75dd499..d1f8e3d0793b 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -1,44 +1,14 @@ | |||
1 | obj-y += common.o irq.o pcie.o mpp.o | 1 | obj-y += common.o pcie.o |
2 | 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_CLOUDBOX_DT) += board-ns2.o | 14 | obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o |
23 | obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o | ||
24 | obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o | ||
25 | obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o | ||
26 | obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o | ||
27 | obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o | ||
28 | obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o | ||
29 | obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o | ||
30 | obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o | ||
31 | obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o | ||
32 | obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o | ||
33 | obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o | ||
34 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o | ||
35 | obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o | ||
36 | obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o | ||
37 | obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o | ||
38 | obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o | ||
39 | obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o | ||
40 | obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o | ||
41 | obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o | ||
42 | obj-$(CONFIG_MACH_SHEEVAPLUG_DT) += board-sheevaplug.o | ||
43 | obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o | ||
44 | obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o | ||
diff --git a/arch/arm/mach-kirkwood/board-db88f628x-bp.c b/arch/arm/mach-kirkwood/board-db88f628x-bp.c deleted file mode 100644 index 2f574bc8ed40..000000000000 --- a/arch/arm/mach-kirkwood/board-db88f628x-bp.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Saeed Bishara <saeed@marvell.com> | ||
3 | * | ||
4 | * Marvell DB-88F628{1,2}-BP Development 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/of.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include "common.h" | ||
16 | |||
17 | static struct mv643xx_eth_platform_data db88f628x_ge00_data = { | ||
18 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
19 | }; | ||
20 | |||
21 | void __init db88f628x_init(void) | ||
22 | { | ||
23 | kirkwood_ge00_init(&db88f628x_ge00_data); | ||
24 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c deleted file mode 100644 index a1aa87f09180..000000000000 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ /dev/null | |||
@@ -1,43 +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/mv643xx_eth.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include "common.h" | ||
20 | |||
21 | static struct mv643xx_eth_platform_data dnskw_ge00_data = { | ||
22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
23 | }; | ||
24 | |||
25 | /* Register any GPIO for output and set the value */ | ||
26 | static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) | ||
27 | { | ||
28 | if (gpio_request(gpio, name) == 0 && | ||
29 | gpio_direction_output(gpio, 0) == 0) { | ||
30 | gpio_set_value(gpio, def); | ||
31 | if (gpio_export(gpio, 0) != 0) | ||
32 | pr_err("dnskw: Failed to export GPIO %s\n", name); | ||
33 | } else | ||
34 | pr_err("dnskw: Failed to register %s\n", name); | ||
35 | } | ||
36 | |||
37 | void __init dnskw_init(void) | ||
38 | { | ||
39 | kirkwood_ge00_init(&dnskw_ge00_data); | ||
40 | |||
41 | /* Set NAS to turn back on after a power failure */ | ||
42 | dnskw_gpio_register(37, "dnskw:power:recover", 1); | ||
43 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c deleted file mode 100644 index d7196db33984..000000000000 --- a/arch/arm/mach-kirkwood/board-dockstar.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-dockstar.c | ||
3 | * | ||
4 | * Seagate FreeAgent Dockstar Board Init for drivers not converted to | ||
5 | * flattened device tree yet. | ||
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 | * Copied and modified for Seagate GoFlex Net support by | ||
12 | * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's | ||
13 | * GoFlex kernel patches. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/mv643xx_eth.h> | ||
20 | #include "common.h" | ||
21 | |||
22 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { | ||
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
24 | }; | ||
25 | |||
26 | void __init dockstar_dt_init(void) | ||
27 | { | ||
28 | /* | ||
29 | * Basic setup. Needs to be called early. | ||
30 | */ | ||
31 | kirkwood_ge00_init(&dockstar_ge00_data); | ||
32 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c deleted file mode 100644 index 0903242c00dc..000000000000 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-dreamplug.c | ||
5 | * | ||
6 | * Marvell DreamPlug Reference Board Init for drivers not converted to | ||
7 | * flattened device tree yet. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/mv643xx_eth.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include "common.h" | ||
19 | |||
20 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | ||
21 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
22 | }; | ||
23 | |||
24 | static struct mv643xx_eth_platform_data dreamplug_ge01_data = { | ||
25 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
26 | }; | ||
27 | |||
28 | void __init dreamplug_init(void) | ||
29 | { | ||
30 | /* | ||
31 | * Basic setup. Needs to be called early. | ||
32 | */ | ||
33 | kirkwood_ge00_init(&dreamplug_ge00_data); | ||
34 | kirkwood_ge01_init(&dreamplug_ge01_data); | ||
35 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 682b7ac8deb8..82d3ad8e87cf 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -15,6 +15,9 @@ | |||
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/clk-provider.h> | 17 | #include <linux/clk-provider.h> |
18 | #include <linux/clocksource.h> | ||
19 | #include <linux/dma-mapping.h> | ||
20 | #include <linux/irqchip.h> | ||
18 | #include <linux/kexec.h> | 21 | #include <linux/kexec.h> |
19 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
@@ -49,10 +52,6 @@ static void __init kirkwood_legacy_clk_init(void) | |||
49 | orion_clkdev_add("1", "pcie", | 52 | orion_clkdev_add("1", "pcie", |
50 | of_clk_get_from_provider(&clkspec)); | 53 | of_clk_get_from_provider(&clkspec)); |
51 | 54 | ||
52 | clkspec.args[0] = CGC_BIT_SDIO; | ||
53 | orion_clkdev_add(NULL, "mvsdio", | ||
54 | of_clk_get_from_provider(&clkspec)); | ||
55 | |||
56 | /* | 55 | /* |
57 | * The ethernet interfaces forget the MAC address assigned by | 56 | * The ethernet interfaces forget the MAC address assigned by |
58 | * u-boot if the clocks are turned off. Until proper DT support | 57 | * u-boot if the clocks are turned off. Until proper DT support |
@@ -60,19 +59,24 @@ static void __init kirkwood_legacy_clk_init(void) | |||
60 | */ | 59 | */ |
61 | clkspec.args[0] = CGC_BIT_GE0; | 60 | clkspec.args[0] = CGC_BIT_GE0; |
62 | clk = of_clk_get_from_provider(&clkspec); | 61 | clk = of_clk_get_from_provider(&clkspec); |
63 | orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk); | ||
64 | clk_prepare_enable(clk); | 62 | clk_prepare_enable(clk); |
65 | 63 | ||
66 | clkspec.args[0] = CGC_BIT_GE1; | 64 | clkspec.args[0] = CGC_BIT_GE1; |
67 | clk = of_clk_get_from_provider(&clkspec); | 65 | clk = of_clk_get_from_provider(&clkspec); |
68 | orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk); | ||
69 | clk_prepare_enable(clk); | 66 | clk_prepare_enable(clk); |
70 | } | 67 | } |
71 | 68 | ||
72 | static void __init kirkwood_of_clk_init(void) | 69 | static void __init kirkwood_dt_time_init(void) |
73 | { | 70 | { |
74 | of_clk_init(NULL); | 71 | of_clk_init(NULL); |
75 | kirkwood_legacy_clk_init(); | 72 | clocksource_of_init(); |
73 | } | ||
74 | |||
75 | static void __init kirkwood_dt_init_early(void) | ||
76 | { | ||
77 | mvebu_mbus_init("marvell,kirkwood-mbus", | ||
78 | BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, | ||
79 | DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); | ||
76 | } | 80 | } |
77 | 81 | ||
78 | static void __init kirkwood_dt_init(void) | 82 | static void __init kirkwood_dt_init(void) |
@@ -94,8 +98,8 @@ static void __init kirkwood_dt_init(void) | |||
94 | 98 | ||
95 | kirkwood_cpufreq_init(); | 99 | kirkwood_cpufreq_init(); |
96 | 100 | ||
97 | /* Setup root of clk tree */ | 101 | /* Setup clocks for legacy devices */ |
98 | kirkwood_of_clk_init(); | 102 | kirkwood_legacy_clk_init(); |
99 | 103 | ||
100 | kirkwood_cpuidle_init(); | 104 | kirkwood_cpuidle_init(); |
101 | 105 | ||
@@ -103,105 +107,22 @@ static void __init kirkwood_dt_init(void) | |||
103 | kexec_reinit = kirkwood_enable_pcie; | 107 | kexec_reinit = kirkwood_enable_pcie; |
104 | #endif | 108 | #endif |
105 | 109 | ||
106 | if (of_machine_is_compatible("globalscale,dreamplug")) | 110 | if (of_machine_is_compatible("marvell,mv88f6281gtw-ge")) |
107 | dreamplug_init(); | 111 | mv88f6281gtw_ge_init(); |
108 | |||
109 | if (of_machine_is_compatible("globalscale,guruplug")) | ||
110 | guruplug_dt_init(); | ||
111 | |||
112 | if (of_machine_is_compatible("globalscale,sheevaplug")) | ||
113 | sheevaplug_dt_init(); | ||
114 | |||
115 | if (of_machine_is_compatible("dlink,dns-kirkwood")) | ||
116 | dnskw_init(); | ||
117 | |||
118 | if (of_machine_is_compatible("iom,iconnect")) | ||
119 | iconnect_init(); | ||
120 | |||
121 | if (of_machine_is_compatible("raidsonic,ib-nas62x0")) | ||
122 | ib62x0_init(); | ||
123 | |||
124 | if (of_machine_is_compatible("qnap,ts219")) | ||
125 | qnap_dt_ts219_init(); | ||
126 | |||
127 | if (of_machine_is_compatible("seagate,dockstar")) | ||
128 | dockstar_dt_init(); | ||
129 | |||
130 | if (of_machine_is_compatible("seagate,goflexnet")) | ||
131 | goflexnet_init(); | ||
132 | |||
133 | if (of_machine_is_compatible("buffalo,lsxl")) | ||
134 | lsxl_init(); | ||
135 | |||
136 | if (of_machine_is_compatible("iom,ix2-200")) | ||
137 | iomega_ix2_200_init(); | ||
138 | |||
139 | if (of_machine_is_compatible("keymile,km_kirkwood")) | ||
140 | km_kirkwood_init(); | ||
141 | |||
142 | if (of_machine_is_compatible("lacie,cloudbox") || | ||
143 | of_machine_is_compatible("lacie,inetspace_v2") || | ||
144 | of_machine_is_compatible("lacie,netspace_lite_v2") || | ||
145 | of_machine_is_compatible("lacie,netspace_max_v2") || | ||
146 | of_machine_is_compatible("lacie,netspace_mini_v2") || | ||
147 | of_machine_is_compatible("lacie,netspace_v2")) | ||
148 | ns2_init(); | ||
149 | |||
150 | if (of_machine_is_compatible("marvell,db-88f6281-bp") || | ||
151 | of_machine_is_compatible("marvell,db-88f6282-bp")) | ||
152 | db88f628x_init(); | ||
153 | |||
154 | if (of_machine_is_compatible("mpl,cec4")) | ||
155 | mplcec4_init(); | ||
156 | |||
157 | if (of_machine_is_compatible("netgear,readynas-duo-v2")) | ||
158 | netgear_readynas_init(); | ||
159 | |||
160 | if (of_machine_is_compatible("plathome,openblocks-a6")) | ||
161 | openblocks_a6_init(); | ||
162 | |||
163 | if (of_machine_is_compatible("usi,topkick")) | ||
164 | usi_topkick_init(); | ||
165 | 112 | ||
166 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 113 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
167 | } | 114 | } |
168 | 115 | ||
169 | static const char * const kirkwood_dt_board_compat[] = { | 116 | static const char * const kirkwood_dt_board_compat[] = { |
170 | "globalscale,dreamplug", | 117 | "marvell,kirkwood", |
171 | "globalscale,guruplug", | ||
172 | "globalscale,sheevaplug", | ||
173 | "dlink,dns-320", | ||
174 | "dlink,dns-325", | ||
175 | "iom,iconnect", | ||
176 | "raidsonic,ib-nas62x0", | ||
177 | "qnap,ts219", | ||
178 | "seagate,dockstar", | ||
179 | "seagate,goflexnet", | ||
180 | "buffalo,lsxl", | ||
181 | "iom,ix2-200", | ||
182 | "keymile,km_kirkwood", | ||
183 | "lacie,cloudbox", | ||
184 | "lacie,inetspace_v2", | ||
185 | "lacie,netspace_lite_v2", | ||
186 | "lacie,netspace_max_v2", | ||
187 | "lacie,netspace_mini_v2", | ||
188 | "lacie,netspace_v2", | ||
189 | "marvell,db-88f6281-bp", | ||
190 | "marvell,db-88f6282-bp", | ||
191 | "mpl,cec4", | ||
192 | "netgear,readynas-duo-v2", | ||
193 | "plathome,openblocks-a6", | ||
194 | "usi,topkick", | ||
195 | "zyxel,nsa310", | ||
196 | NULL | 118 | NULL |
197 | }; | 119 | }; |
198 | 120 | ||
199 | DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") | 121 | DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") |
200 | /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ | 122 | /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ |
201 | .map_io = kirkwood_map_io, | 123 | .map_io = kirkwood_map_io, |
202 | .init_early = kirkwood_init_early, | 124 | .init_early = kirkwood_dt_init_early, |
203 | .init_irq = orion_dt_init_irq, | 125 | .init_time = kirkwood_dt_time_init, |
204 | .init_time = kirkwood_timer_init, | ||
205 | .init_machine = kirkwood_dt_init, | 126 | .init_machine = kirkwood_dt_init, |
206 | .restart = kirkwood_restart, | 127 | .restart = kirkwood_restart, |
207 | .dt_compat = kirkwood_dt_board_compat, | 128 | .dt_compat = kirkwood_dt_board_compat, |
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c deleted file mode 100644 index 9db979aec82e..000000000000 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-goflexnet.c | ||
5 | * | ||
6 | * Seagate GoFlext Net Board Init for drivers not converted to | ||
7 | * flattened device tree yet. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | * | ||
13 | * Copied and modified for Seagate GoFlex Net support by | ||
14 | * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's | ||
15 | * GoFlex kernel patches. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/mv643xx_eth.h> | ||
22 | #include "common.h" | ||
23 | |||
24 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { | ||
25 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
26 | }; | ||
27 | |||
28 | void __init goflexnet_init(void) | ||
29 | { | ||
30 | /* | ||
31 | * Basic setup. Needs to be called early. | ||
32 | */ | ||
33 | kirkwood_ge00_init(&goflexnet_ge00_data); | ||
34 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-guruplug.c b/arch/arm/mach-kirkwood/board-guruplug.c deleted file mode 100644 index a857163954a5..000000000000 --- a/arch/arm/mach-kirkwood/board-guruplug.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-guruplug.c | ||
3 | * | ||
4 | * Marvell Guruplug Reference Board Init for drivers not converted to | ||
5 | * flattened device tree yet. | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include <linux/gpio.h> | ||
16 | #include "common.h" | ||
17 | |||
18 | static struct mv643xx_eth_platform_data guruplug_ge00_data = { | ||
19 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
20 | }; | ||
21 | |||
22 | static struct mv643xx_eth_platform_data guruplug_ge01_data = { | ||
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
24 | }; | ||
25 | |||
26 | void __init guruplug_dt_init(void) | ||
27 | { | ||
28 | /* | ||
29 | * Basic setup. Needs to be called early. | ||
30 | */ | ||
31 | kirkwood_ge00_init(&guruplug_ge00_data); | ||
32 | kirkwood_ge01_init(&guruplug_ge01_data); | ||
33 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c deleted file mode 100644 index 9a857ae83984..000000000000 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Simon Baatz <gmbnomis@gmail.com> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-ib62x0.c | ||
5 | * | ||
6 | * RaidSonic ICY BOX IB-NAS6210 & IB-NAS6220 init for drivers not | ||
7 | * converted to 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/mv643xx_eth.h> | ||
17 | #include "common.h" | ||
18 | |||
19 | static struct mv643xx_eth_platform_data ib62x0_ge00_data = { | ||
20 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
21 | }; | ||
22 | |||
23 | void __init ib62x0_init(void) | ||
24 | { | ||
25 | /* | ||
26 | * Basic setup. Needs to be called early. | ||
27 | */ | ||
28 | kirkwood_ge00_init(&ib62x0_ge00_data); | ||
29 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c deleted file mode 100644 index 98b5ad1bba90..000000000000 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-iconnect.c | ||
3 | * | ||
4 | * Iomega i-connect 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/of.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include "common.h" | ||
16 | |||
17 | static struct mv643xx_eth_platform_data iconnect_ge00_data = { | ||
18 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | ||
19 | }; | ||
20 | |||
21 | void __init iconnect_init(void) | ||
22 | { | ||
23 | kirkwood_ge00_init(&iconnect_ge00_data); | ||
24 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c deleted file mode 100644 index e5f70415905a..000000000000 --- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-iomega_ix2_200.c | ||
3 | * | ||
4 | * Iomega StorCenter ix2-200 | ||
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/mv643xx_eth.h> | ||
14 | #include <linux/ethtool.h> | ||
15 | #include "common.h" | ||
16 | |||
17 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { | ||
18 | .phy_addr = MV643XX_ETH_PHY_NONE, | ||
19 | .speed = SPEED_1000, | ||
20 | .duplex = DUPLEX_FULL, | ||
21 | }; | ||
22 | |||
23 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge01_data = { | ||
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | ||
25 | }; | ||
26 | |||
27 | void __init iomega_ix2_200_init(void) | ||
28 | { | ||
29 | /* | ||
30 | * Basic setup. Needs to be called early. | ||
31 | */ | ||
32 | kirkwood_ge00_init(&iomega_ix2_200_ge00_data); | ||
33 | kirkwood_ge01_init(&iomega_ix2_200_ge01_data); | ||
34 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c deleted file mode 100644 index 44e4605ba0bf..000000000000 --- a/arch/arm/mach-kirkwood/board-km_kirkwood.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 2012 KEYMILE AG, CH-3097 Bern | ||
3 | * Valentin Longchamp <valentin.longchamp@keymile.com> | ||
4 | * | ||
5 | * arch/arm/mach-kirkwood/board-km_kirkwood.c | ||
6 | * | ||
7 | * Keymile km_kirkwood Reference Desing Init for drivers not converted to | ||
8 | * flattened device tree yet. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/clk-private.h> | ||
20 | #include "common.h" | ||
21 | |||
22 | static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { | ||
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
24 | }; | ||
25 | |||
26 | void __init km_kirkwood_init(void) | ||
27 | { | ||
28 | struct clk *sata_clk; | ||
29 | /* | ||
30 | * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing | ||
31 | * SATA bits (14-15) of the Clock Gating Control Register. Since these | ||
32 | * devices are also not present in this variant, their clocks get | ||
33 | * disabled because unused when clk_disable_unused() gets called. | ||
34 | * That's why we change the flags to these clocks to CLK_IGNORE_UNUSED | ||
35 | */ | ||
36 | sata_clk = clk_get_sys("sata_mv.0", "0"); | ||
37 | if (!IS_ERR(sata_clk)) | ||
38 | sata_clk->flags |= CLK_IGNORE_UNUSED; | ||
39 | sata_clk = clk_get_sys("sata_mv.0", "1"); | ||
40 | if (!IS_ERR(sata_clk)) | ||
41 | sata_clk->flags |= CLK_IGNORE_UNUSED; | ||
42 | |||
43 | kirkwood_ge00_init(&km_kirkwood_ge00_data); | ||
44 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c deleted file mode 100644 index 348395238df6..000000000000 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Michael Walle <michael@walle.cc> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-lsxl.c | ||
5 | * | ||
6 | * Buffalo Linkstation LS-XHL and LS-CHLv2 init for drivers not | ||
7 | * converted to 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/mv643xx_eth.h> | ||
18 | #include "common.h" | ||
19 | |||
20 | static struct mv643xx_eth_platform_data lsxl_ge00_data = { | ||
21 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
22 | }; | ||
23 | |||
24 | static struct mv643xx_eth_platform_data lsxl_ge01_data = { | ||
25 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
26 | }; | ||
27 | |||
28 | void __init lsxl_init(void) | ||
29 | { | ||
30 | /* | ||
31 | * Basic setup. Needs to be called early. | ||
32 | */ | ||
33 | |||
34 | kirkwood_ge00_init(&lsxl_ge00_data); | ||
35 | kirkwood_ge01_init(&lsxl_ge01_data); | ||
36 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c deleted file mode 100644 index 938712e248f1..000000000000 --- a/arch/arm/mach-kirkwood/board-mplcec4.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 MPL AG, Switzerland | ||
3 | * Stefan Peter <s.peter@mpl.ch> | ||
4 | * | ||
5 | * arch/arm/mach-kirkwood/board-mplcec4.c | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include "common.h" | ||
16 | |||
17 | static struct mv643xx_eth_platform_data mplcec4_ge00_data = { | ||
18 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
19 | }; | ||
20 | |||
21 | static struct mv643xx_eth_platform_data mplcec4_ge01_data = { | ||
22 | .phy_addr = MV643XX_ETH_PHY_ADDR(2), | ||
23 | }; | ||
24 | |||
25 | void __init mplcec4_init(void) | ||
26 | { | ||
27 | /* | ||
28 | * Basic setup. Needs to be called early. | ||
29 | */ | ||
30 | kirkwood_ge00_init(&mplcec4_ge00_data); | ||
31 | kirkwood_ge01_init(&mplcec4_ge01_data); | ||
32 | } | ||
33 | |||
34 | |||
35 | |||
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/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c deleted file mode 100644 index f8f660525ace..000000000000 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-ns2.c | ||
5 | * | ||
6 | * LaCie Network Space v2 board (and parents) initialization for drivers | ||
7 | * not converted to 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/mv643xx_eth.h> | ||
18 | #include <linux/of.h> | ||
19 | #include "common.h" | ||
20 | |||
21 | static struct mv643xx_eth_platform_data ns2_ge00_data = { | ||
22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
23 | }; | ||
24 | |||
25 | void __init ns2_init(void) | ||
26 | { | ||
27 | /* | ||
28 | * Basic setup. Needs to be called early. | ||
29 | */ | ||
30 | if (of_machine_is_compatible("lacie,cloudbox") || | ||
31 | of_machine_is_compatible("lacie,netspace_lite_v2") || | ||
32 | of_machine_is_compatible("lacie,netspace_mini_v2")) | ||
33 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
34 | kirkwood_ge00_init(&ns2_ge00_data); | ||
35 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c deleted file mode 100644 index b11d8fdeca93..000000000000 --- a/arch/arm/mach-kirkwood/board-openblocks_a6.c +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-openblocks_a6.c | ||
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/mv643xx_eth.h> | ||
14 | #include "common.h" | ||
15 | |||
16 | static struct mv643xx_eth_platform_data openblocks_ge00_data = { | ||
17 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
18 | }; | ||
19 | |||
20 | void __init openblocks_a6_init(void) | ||
21 | { | ||
22 | /* | ||
23 | * Basic setup. Needs to be called early. | ||
24 | */ | ||
25 | kirkwood_ge00_init(&openblocks_ge00_data); | ||
26 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-readynas.c b/arch/arm/mach-kirkwood/board-readynas.c deleted file mode 100644 index 341b82d9cadb..000000000000 --- a/arch/arm/mach-kirkwood/board-readynas.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * NETGEAR ReadyNAS Duo v2 Board setup for drivers not already | ||
3 | * converted to DT. | ||
4 | * | ||
5 | * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/mv643xx_eth.h> | ||
17 | #include <mach/kirkwood.h> | ||
18 | #include "common.h" | ||
19 | |||
20 | static struct mv643xx_eth_platform_data netgear_readynas_ge00_data = { | ||
21 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
22 | }; | ||
23 | |||
24 | void __init netgear_readynas_init(void) | ||
25 | { | ||
26 | kirkwood_ge00_init(&netgear_readynas_ge00_data); | ||
27 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-sheevaplug.c b/arch/arm/mach-kirkwood/board-sheevaplug.c deleted file mode 100644 index fa389373ca74..000000000000 --- a/arch/arm/mach-kirkwood/board-sheevaplug.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-sheevaplug.c | ||
3 | * | ||
4 | * Marvell Sheevaplug Reference Board Init for drivers not converted to | ||
5 | * flattened device tree yet. | ||
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 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include "common.h" | ||
16 | |||
17 | static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { | ||
18 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
19 | }; | ||
20 | |||
21 | void __init sheevaplug_dt_init(void) | ||
22 | { | ||
23 | /* | ||
24 | * Basic setup. Needs to be called early. | ||
25 | */ | ||
26 | kirkwood_ge00_init(&sheevaplug_ge00_data); | ||
27 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c deleted file mode 100644 index 860f44ab457d..000000000000 --- a/arch/arm/mach-kirkwood/board-ts219.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * QNAP TS-11x/TS-21x Turbo NAS Board Setup via DT | ||
4 | * | ||
5 | * Copyright (C) 2012 Andrew Lunn <andrew@lunn.ch> | ||
6 | * | ||
7 | * Based on the board file ts219-setup.c: | ||
8 | * | ||
9 | * Copyright (C) 2009 Martin Michlmayr <tbm@cyrius.com> | ||
10 | * Copyright (C) 2008 Byron Bradley <byron.bbradley@gmail.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version | ||
15 | * 2 of the License, or (at your option) any later version. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/mv643xx_eth.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | #include <mach/kirkwood.h> | ||
25 | #include "common.h" | ||
26 | |||
27 | static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { | ||
28 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
29 | }; | ||
30 | |||
31 | void __init qnap_dt_ts219_init(void) | ||
32 | { | ||
33 | u32 dev, rev; | ||
34 | |||
35 | kirkwood_pcie_id(&dev, &rev); | ||
36 | if (dev == MV88F6282_DEV_ID) | ||
37 | qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
38 | |||
39 | kirkwood_ge00_init(&qnap_ts219_ge00_data); | ||
40 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c deleted file mode 100644 index 1cc04ec33f0b..000000000000 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-usi_topkick.c | ||
5 | * | ||
6 | * USI Topkick Init for drivers not converted to flattened device tree yet. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mv643xx_eth.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include "common.h" | ||
18 | |||
19 | static struct mv643xx_eth_platform_data topkick_ge00_data = { | ||
20 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
21 | }; | ||
22 | |||
23 | void __init usi_topkick_init(void) | ||
24 | { | ||
25 | /* | ||
26 | * Basic setup. Needs to be called early. | ||
27 | */ | ||
28 | kirkwood_ge00_init(&topkick_ge00_data); | ||
29 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index fcf3ba682e24..1296de94febf 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -59,119 +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_DREAMPLUG_DT | 62 | #ifdef CONFIG_MACH_MV88F6281GTW_GE_DT |
63 | void dreamplug_init(void); | 63 | void mv88f6281gtw_ge_init(void); |
64 | #else | 64 | #else |
65 | static inline void dreamplug_init(void) {}; | 65 | static inline void mv88f6281gtw_ge_init(void) {}; |
66 | #endif | ||
67 | #ifdef CONFIG_MACH_GURUPLUG_DT | ||
68 | void guruplug_dt_init(void); | ||
69 | #else | ||
70 | static inline void guruplug_dt_init(void) {}; | ||
71 | #endif | ||
72 | #ifdef CONFIG_MACH_SHEEVAPLUG_DT | ||
73 | void sheevaplug_dt_init(void); | ||
74 | #else | ||
75 | static inline void sheevaplug_dt_init(void) {}; | ||
76 | #endif | ||
77 | #ifdef CONFIG_MACH_TS219_DT | ||
78 | void qnap_dt_ts219_init(void); | ||
79 | #else | ||
80 | static inline void qnap_dt_ts219_init(void) {}; | ||
81 | #endif | ||
82 | |||
83 | #ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT | ||
84 | void dnskw_init(void); | ||
85 | #else | ||
86 | static inline void dnskw_init(void) {}; | ||
87 | #endif | ||
88 | |||
89 | #ifdef CONFIG_MACH_ICONNECT_DT | ||
90 | void iconnect_init(void); | ||
91 | #else | ||
92 | static inline void iconnect_init(void) {}; | ||
93 | #endif | ||
94 | |||
95 | #ifdef CONFIG_MACH_IB62X0_DT | ||
96 | void ib62x0_init(void); | ||
97 | #else | ||
98 | static inline void ib62x0_init(void) {}; | ||
99 | #endif | ||
100 | |||
101 | #ifdef CONFIG_MACH_DOCKSTAR_DT | ||
102 | void dockstar_dt_init(void); | ||
103 | #else | ||
104 | static inline void dockstar_dt_init(void) {}; | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_MACH_GOFLEXNET_DT | ||
108 | void goflexnet_init(void); | ||
109 | #else | ||
110 | static inline void goflexnet_init(void) {}; | ||
111 | #endif | ||
112 | |||
113 | #ifdef CONFIG_MACH_LSXL_DT | ||
114 | void lsxl_init(void); | ||
115 | #else | ||
116 | static inline void lsxl_init(void) {}; | ||
117 | #endif | ||
118 | |||
119 | #ifdef CONFIG_MACH_IOMEGA_IX2_200_DT | ||
120 | void iomega_ix2_200_init(void); | ||
121 | #else | ||
122 | static inline void iomega_ix2_200_init(void) {}; | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_MACH_KM_KIRKWOOD_DT | ||
126 | void km_kirkwood_init(void); | ||
127 | #else | ||
128 | static inline void km_kirkwood_init(void) {}; | ||
129 | #endif | ||
130 | |||
131 | #ifdef CONFIG_MACH_DB88F628X_BP_DT | ||
132 | void db88f628x_init(void); | ||
133 | #else | ||
134 | static inline void db88f628x_init(void) {}; | ||
135 | #endif | ||
136 | |||
137 | #ifdef CONFIG_MACH_MPLCEC4_DT | ||
138 | void mplcec4_init(void); | ||
139 | #else | ||
140 | static inline void mplcec4_init(void) {}; | ||
141 | #endif | ||
142 | |||
143 | #if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ | ||
144 | defined(CONFIG_MACH_NETSPACE_V2_DT) || \ | ||
145 | defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ | ||
146 | defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \ | ||
147 | defined(CONFIG_MACH_NETSPACE_MINI_V2_DT) | ||
148 | void ns2_init(void); | ||
149 | #else | ||
150 | static inline void ns2_init(void) {}; | ||
151 | #endif | ||
152 | |||
153 | #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT | ||
154 | void openblocks_a6_init(void); | ||
155 | #else | ||
156 | static inline void openblocks_a6_init(void) {}; | ||
157 | #endif | ||
158 | |||
159 | #ifdef CONFIG_MACH_READYNAS_DT | ||
160 | void netgear_readynas_init(void); | ||
161 | #else | ||
162 | static inline void netgear_readynas_init(void) {}; | ||
163 | #endif | ||
164 | |||
165 | #ifdef CONFIG_MACH_TOPKICK_DT | ||
166 | void usi_topkick_init(void); | ||
167 | #else | ||
168 | static inline void usi_topkick_init(void) {}; | ||
169 | #endif | ||
170 | |||
171 | #ifdef CONFIG_MACH_CLOUDBOX_DT | ||
172 | void cloudbox_init(void); | ||
173 | #else | ||
174 | static inline void cloudbox_init(void) {}; | ||
175 | #endif | 66 | #endif |
176 | 67 | ||
177 | /* 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 | ||