diff options
Diffstat (limited to 'arch/arm/mach-orion5x')
24 files changed, 654 insertions, 1134 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 986c3bf4e6b8..0ab531d047fc 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -13,12 +13,11 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/dma-mapping.h> | ||
16 | #include <linux/serial_8250.h> | 17 | #include <linux/serial_8250.h> |
17 | #include <linux/mbus.h> | 18 | #include <linux/mbus.h> |
18 | #include <linux/mv643xx_eth.h> | ||
19 | #include <linux/mv643xx_i2c.h> | 19 | #include <linux/mv643xx_i2c.h> |
20 | #include <linux/ata_platform.h> | 20 | #include <linux/ata_platform.h> |
21 | #include <linux/spi/orion_spi.h> | ||
22 | #include <net/dsa.h> | 21 | #include <net/dsa.h> |
23 | #include <asm/page.h> | 22 | #include <asm/page.h> |
24 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
@@ -29,11 +28,9 @@ | |||
29 | #include <mach/bridge-regs.h> | 28 | #include <mach/bridge-regs.h> |
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | #include <mach/orion5x.h> | 30 | #include <mach/orion5x.h> |
32 | #include <plat/ehci-orion.h> | ||
33 | #include <plat/mv_xor.h> | ||
34 | #include <plat/orion_nand.h> | 31 | #include <plat/orion_nand.h> |
35 | #include <plat/orion_wdt.h> | ||
36 | #include <plat/time.h> | 32 | #include <plat/time.h> |
33 | #include <plat/common.h> | ||
37 | #include "common.h" | 34 | #include "common.h" |
38 | 35 | ||
39 | /***************************************************************************** | 36 | /***************************************************************************** |
@@ -70,530 +67,124 @@ void __init orion5x_map_io(void) | |||
70 | 67 | ||
71 | 68 | ||
72 | /***************************************************************************** | 69 | /***************************************************************************** |
73 | * EHCI | ||
74 | ****************************************************************************/ | ||
75 | static struct orion_ehci_data orion5x_ehci_data = { | ||
76 | .dram = &orion5x_mbus_dram_info, | ||
77 | .phy_version = EHCI_PHY_ORION, | ||
78 | }; | ||
79 | |||
80 | static u64 ehci_dmamask = 0xffffffffUL; | ||
81 | |||
82 | |||
83 | /***************************************************************************** | ||
84 | * EHCI0 | 70 | * EHCI0 |
85 | ****************************************************************************/ | 71 | ****************************************************************************/ |
86 | static struct resource orion5x_ehci0_resources[] = { | ||
87 | { | ||
88 | .start = ORION5X_USB0_PHYS_BASE, | ||
89 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, | ||
90 | .flags = IORESOURCE_MEM, | ||
91 | }, { | ||
92 | .start = IRQ_ORION5X_USB0_CTRL, | ||
93 | .end = IRQ_ORION5X_USB0_CTRL, | ||
94 | .flags = IORESOURCE_IRQ, | ||
95 | }, | ||
96 | }; | ||
97 | |||
98 | static struct platform_device orion5x_ehci0 = { | ||
99 | .name = "orion-ehci", | ||
100 | .id = 0, | ||
101 | .dev = { | ||
102 | .dma_mask = &ehci_dmamask, | ||
103 | .coherent_dma_mask = 0xffffffff, | ||
104 | .platform_data = &orion5x_ehci_data, | ||
105 | }, | ||
106 | .resource = orion5x_ehci0_resources, | ||
107 | .num_resources = ARRAY_SIZE(orion5x_ehci0_resources), | ||
108 | }; | ||
109 | |||
110 | void __init orion5x_ehci0_init(void) | 72 | void __init orion5x_ehci0_init(void) |
111 | { | 73 | { |
112 | platform_device_register(&orion5x_ehci0); | 74 | orion_ehci_init(&orion5x_mbus_dram_info, |
75 | ORION5X_USB0_PHYS_BASE, IRQ_ORION5X_USB0_CTRL); | ||
113 | } | 76 | } |
114 | 77 | ||
115 | 78 | ||
116 | /***************************************************************************** | 79 | /***************************************************************************** |
117 | * EHCI1 | 80 | * EHCI1 |
118 | ****************************************************************************/ | 81 | ****************************************************************************/ |
119 | static struct resource orion5x_ehci1_resources[] = { | ||
120 | { | ||
121 | .start = ORION5X_USB1_PHYS_BASE, | ||
122 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, | ||
123 | .flags = IORESOURCE_MEM, | ||
124 | }, { | ||
125 | .start = IRQ_ORION5X_USB1_CTRL, | ||
126 | .end = IRQ_ORION5X_USB1_CTRL, | ||
127 | .flags = IORESOURCE_IRQ, | ||
128 | }, | ||
129 | }; | ||
130 | |||
131 | static struct platform_device orion5x_ehci1 = { | ||
132 | .name = "orion-ehci", | ||
133 | .id = 1, | ||
134 | .dev = { | ||
135 | .dma_mask = &ehci_dmamask, | ||
136 | .coherent_dma_mask = 0xffffffff, | ||
137 | .platform_data = &orion5x_ehci_data, | ||
138 | }, | ||
139 | .resource = orion5x_ehci1_resources, | ||
140 | .num_resources = ARRAY_SIZE(orion5x_ehci1_resources), | ||
141 | }; | ||
142 | |||
143 | void __init orion5x_ehci1_init(void) | 82 | void __init orion5x_ehci1_init(void) |
144 | { | 83 | { |
145 | platform_device_register(&orion5x_ehci1); | 84 | orion_ehci_1_init(&orion5x_mbus_dram_info, |
85 | ORION5X_USB1_PHYS_BASE, IRQ_ORION5X_USB1_CTRL); | ||
146 | } | 86 | } |
147 | 87 | ||
148 | 88 | ||
149 | /***************************************************************************** | 89 | /***************************************************************************** |
150 | * GigE | 90 | * GE00 |
151 | ****************************************************************************/ | 91 | ****************************************************************************/ |
152 | struct mv643xx_eth_shared_platform_data orion5x_eth_shared_data = { | ||
153 | .dram = &orion5x_mbus_dram_info, | ||
154 | }; | ||
155 | |||
156 | static struct resource orion5x_eth_shared_resources[] = { | ||
157 | { | ||
158 | .start = ORION5X_ETH_PHYS_BASE + 0x2000, | ||
159 | .end = ORION5X_ETH_PHYS_BASE + 0x3fff, | ||
160 | .flags = IORESOURCE_MEM, | ||
161 | }, { | ||
162 | .start = IRQ_ORION5X_ETH_ERR, | ||
163 | .end = IRQ_ORION5X_ETH_ERR, | ||
164 | .flags = IORESOURCE_IRQ, | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | static struct platform_device orion5x_eth_shared = { | ||
169 | .name = MV643XX_ETH_SHARED_NAME, | ||
170 | .id = 0, | ||
171 | .dev = { | ||
172 | .platform_data = &orion5x_eth_shared_data, | ||
173 | }, | ||
174 | .num_resources = ARRAY_SIZE(orion5x_eth_shared_resources), | ||
175 | .resource = orion5x_eth_shared_resources, | ||
176 | }; | ||
177 | |||
178 | static struct resource orion5x_eth_resources[] = { | ||
179 | { | ||
180 | .name = "eth irq", | ||
181 | .start = IRQ_ORION5X_ETH_SUM, | ||
182 | .end = IRQ_ORION5X_ETH_SUM, | ||
183 | .flags = IORESOURCE_IRQ, | ||
184 | }, | ||
185 | }; | ||
186 | |||
187 | static struct platform_device orion5x_eth = { | ||
188 | .name = MV643XX_ETH_NAME, | ||
189 | .id = 0, | ||
190 | .num_resources = 1, | ||
191 | .resource = orion5x_eth_resources, | ||
192 | .dev = { | ||
193 | .coherent_dma_mask = 0xffffffff, | ||
194 | }, | ||
195 | }; | ||
196 | |||
197 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | 92 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) |
198 | { | 93 | { |
199 | eth_data->shared = &orion5x_eth_shared; | 94 | orion_ge00_init(eth_data, &orion5x_mbus_dram_info, |
200 | orion5x_eth.dev.platform_data = eth_data; | 95 | ORION5X_ETH_PHYS_BASE, IRQ_ORION5X_ETH_SUM, |
201 | 96 | IRQ_ORION5X_ETH_ERR, orion5x_tclk); | |
202 | platform_device_register(&orion5x_eth_shared); | ||
203 | platform_device_register(&orion5x_eth); | ||
204 | } | 97 | } |
205 | 98 | ||
206 | 99 | ||
207 | /***************************************************************************** | 100 | /***************************************************************************** |
208 | * Ethernet switch | 101 | * Ethernet switch |
209 | ****************************************************************************/ | 102 | ****************************************************************************/ |
210 | static struct resource orion5x_switch_resources[] = { | ||
211 | { | ||
212 | .start = 0, | ||
213 | .end = 0, | ||
214 | .flags = IORESOURCE_IRQ, | ||
215 | }, | ||
216 | }; | ||
217 | |||
218 | static struct platform_device orion5x_switch_device = { | ||
219 | .name = "dsa", | ||
220 | .id = 0, | ||
221 | .num_resources = 0, | ||
222 | .resource = orion5x_switch_resources, | ||
223 | }; | ||
224 | |||
225 | void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) | 103 | void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) |
226 | { | 104 | { |
227 | int i; | 105 | orion_ge00_switch_init(d, irq); |
228 | |||
229 | if (irq != NO_IRQ) { | ||
230 | orion5x_switch_resources[0].start = irq; | ||
231 | orion5x_switch_resources[0].end = irq; | ||
232 | orion5x_switch_device.num_resources = 1; | ||
233 | } | ||
234 | |||
235 | d->netdev = &orion5x_eth.dev; | ||
236 | for (i = 0; i < d->nr_chips; i++) | ||
237 | d->chip[i].mii_bus = &orion5x_eth_shared.dev; | ||
238 | orion5x_switch_device.dev.platform_data = d; | ||
239 | |||
240 | platform_device_register(&orion5x_switch_device); | ||
241 | } | 106 | } |
242 | 107 | ||
243 | 108 | ||
244 | /***************************************************************************** | 109 | /***************************************************************************** |
245 | * I2C | 110 | * I2C |
246 | ****************************************************************************/ | 111 | ****************************************************************************/ |
247 | static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = { | ||
248 | .freq_m = 8, /* assumes 166 MHz TCLK */ | ||
249 | .freq_n = 3, | ||
250 | .timeout = 1000, /* Default timeout of 1 second */ | ||
251 | }; | ||
252 | |||
253 | static struct resource orion5x_i2c_resources[] = { | ||
254 | { | ||
255 | .start = I2C_PHYS_BASE, | ||
256 | .end = I2C_PHYS_BASE + 0x1f, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }, { | ||
259 | .start = IRQ_ORION5X_I2C, | ||
260 | .end = IRQ_ORION5X_I2C, | ||
261 | .flags = IORESOURCE_IRQ, | ||
262 | }, | ||
263 | }; | ||
264 | |||
265 | static struct platform_device orion5x_i2c = { | ||
266 | .name = MV64XXX_I2C_CTLR_NAME, | ||
267 | .id = 0, | ||
268 | .num_resources = ARRAY_SIZE(orion5x_i2c_resources), | ||
269 | .resource = orion5x_i2c_resources, | ||
270 | .dev = { | ||
271 | .platform_data = &orion5x_i2c_pdata, | ||
272 | }, | ||
273 | }; | ||
274 | |||
275 | void __init orion5x_i2c_init(void) | 112 | void __init orion5x_i2c_init(void) |
276 | { | 113 | { |
277 | platform_device_register(&orion5x_i2c); | 114 | orion_i2c_init(I2C_PHYS_BASE, IRQ_ORION5X_I2C, 8); |
115 | |||
278 | } | 116 | } |
279 | 117 | ||
280 | 118 | ||
281 | /***************************************************************************** | 119 | /***************************************************************************** |
282 | * SATA | 120 | * SATA |
283 | ****************************************************************************/ | 121 | ****************************************************************************/ |
284 | static struct resource orion5x_sata_resources[] = { | ||
285 | { | ||
286 | .name = "sata base", | ||
287 | .start = ORION5X_SATA_PHYS_BASE, | ||
288 | .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1, | ||
289 | .flags = IORESOURCE_MEM, | ||
290 | }, { | ||
291 | .name = "sata irq", | ||
292 | .start = IRQ_ORION5X_SATA, | ||
293 | .end = IRQ_ORION5X_SATA, | ||
294 | .flags = IORESOURCE_IRQ, | ||
295 | }, | ||
296 | }; | ||
297 | |||
298 | static struct platform_device orion5x_sata = { | ||
299 | .name = "sata_mv", | ||
300 | .id = 0, | ||
301 | .dev = { | ||
302 | .coherent_dma_mask = 0xffffffff, | ||
303 | }, | ||
304 | .num_resources = ARRAY_SIZE(orion5x_sata_resources), | ||
305 | .resource = orion5x_sata_resources, | ||
306 | }; | ||
307 | |||
308 | void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) | 122 | void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) |
309 | { | 123 | { |
310 | sata_data->dram = &orion5x_mbus_dram_info; | 124 | orion_sata_init(sata_data, &orion5x_mbus_dram_info, |
311 | orion5x_sata.dev.platform_data = sata_data; | 125 | ORION5X_SATA_PHYS_BASE, IRQ_ORION5X_SATA); |
312 | platform_device_register(&orion5x_sata); | ||
313 | } | 126 | } |
314 | 127 | ||
315 | 128 | ||
316 | /***************************************************************************** | 129 | /***************************************************************************** |
317 | * SPI | 130 | * SPI |
318 | ****************************************************************************/ | 131 | ****************************************************************************/ |
319 | static struct orion_spi_info orion5x_spi_plat_data = { | ||
320 | .tclk = 0, | ||
321 | .enable_clock_fix = 1, | ||
322 | }; | ||
323 | |||
324 | static struct resource orion5x_spi_resources[] = { | ||
325 | { | ||
326 | .name = "spi base", | ||
327 | .start = SPI_PHYS_BASE, | ||
328 | .end = SPI_PHYS_BASE + 0x1f, | ||
329 | .flags = IORESOURCE_MEM, | ||
330 | }, | ||
331 | }; | ||
332 | |||
333 | static struct platform_device orion5x_spi = { | ||
334 | .name = "orion_spi", | ||
335 | .id = 0, | ||
336 | .dev = { | ||
337 | .platform_data = &orion5x_spi_plat_data, | ||
338 | }, | ||
339 | .num_resources = ARRAY_SIZE(orion5x_spi_resources), | ||
340 | .resource = orion5x_spi_resources, | ||
341 | }; | ||
342 | |||
343 | void __init orion5x_spi_init() | 132 | void __init orion5x_spi_init() |
344 | { | 133 | { |
345 | platform_device_register(&orion5x_spi); | 134 | orion_spi_init(SPI_PHYS_BASE, orion5x_tclk); |
346 | } | 135 | } |
347 | 136 | ||
348 | 137 | ||
349 | /***************************************************************************** | 138 | /***************************************************************************** |
350 | * UART0 | 139 | * UART0 |
351 | ****************************************************************************/ | 140 | ****************************************************************************/ |
352 | static struct plat_serial8250_port orion5x_uart0_data[] = { | ||
353 | { | ||
354 | .mapbase = UART0_PHYS_BASE, | ||
355 | .membase = (char *)UART0_VIRT_BASE, | ||
356 | .irq = IRQ_ORION5X_UART0, | ||
357 | .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, | ||
358 | .iotype = UPIO_MEM, | ||
359 | .regshift = 2, | ||
360 | .uartclk = 0, | ||
361 | }, { | ||
362 | }, | ||
363 | }; | ||
364 | |||
365 | static struct resource orion5x_uart0_resources[] = { | ||
366 | { | ||
367 | .start = UART0_PHYS_BASE, | ||
368 | .end = UART0_PHYS_BASE + 0xff, | ||
369 | .flags = IORESOURCE_MEM, | ||
370 | }, { | ||
371 | .start = IRQ_ORION5X_UART0, | ||
372 | .end = IRQ_ORION5X_UART0, | ||
373 | .flags = IORESOURCE_IRQ, | ||
374 | }, | ||
375 | }; | ||
376 | |||
377 | static struct platform_device orion5x_uart0 = { | ||
378 | .name = "serial8250", | ||
379 | .id = PLAT8250_DEV_PLATFORM, | ||
380 | .dev = { | ||
381 | .platform_data = orion5x_uart0_data, | ||
382 | }, | ||
383 | .resource = orion5x_uart0_resources, | ||
384 | .num_resources = ARRAY_SIZE(orion5x_uart0_resources), | ||
385 | }; | ||
386 | |||
387 | void __init orion5x_uart0_init(void) | 141 | void __init orion5x_uart0_init(void) |
388 | { | 142 | { |
389 | platform_device_register(&orion5x_uart0); | 143 | orion_uart0_init(UART0_VIRT_BASE, UART0_PHYS_BASE, |
144 | IRQ_ORION5X_UART0, orion5x_tclk); | ||
390 | } | 145 | } |
391 | 146 | ||
392 | |||
393 | /***************************************************************************** | 147 | /***************************************************************************** |
394 | * UART1 | 148 | * UART1 |
395 | ****************************************************************************/ | 149 | ****************************************************************************/ |
396 | static struct plat_serial8250_port orion5x_uart1_data[] = { | ||
397 | { | ||
398 | .mapbase = UART1_PHYS_BASE, | ||
399 | .membase = (char *)UART1_VIRT_BASE, | ||
400 | .irq = IRQ_ORION5X_UART1, | ||
401 | .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, | ||
402 | .iotype = UPIO_MEM, | ||
403 | .regshift = 2, | ||
404 | .uartclk = 0, | ||
405 | }, { | ||
406 | }, | ||
407 | }; | ||
408 | |||
409 | static struct resource orion5x_uart1_resources[] = { | ||
410 | { | ||
411 | .start = UART1_PHYS_BASE, | ||
412 | .end = UART1_PHYS_BASE + 0xff, | ||
413 | .flags = IORESOURCE_MEM, | ||
414 | }, { | ||
415 | .start = IRQ_ORION5X_UART1, | ||
416 | .end = IRQ_ORION5X_UART1, | ||
417 | .flags = IORESOURCE_IRQ, | ||
418 | }, | ||
419 | }; | ||
420 | |||
421 | static struct platform_device orion5x_uart1 = { | ||
422 | .name = "serial8250", | ||
423 | .id = PLAT8250_DEV_PLATFORM1, | ||
424 | .dev = { | ||
425 | .platform_data = orion5x_uart1_data, | ||
426 | }, | ||
427 | .resource = orion5x_uart1_resources, | ||
428 | .num_resources = ARRAY_SIZE(orion5x_uart1_resources), | ||
429 | }; | ||
430 | |||
431 | void __init orion5x_uart1_init(void) | 150 | void __init orion5x_uart1_init(void) |
432 | { | 151 | { |
433 | platform_device_register(&orion5x_uart1); | 152 | orion_uart1_init(UART1_VIRT_BASE, UART1_PHYS_BASE, |
153 | IRQ_ORION5X_UART1, orion5x_tclk); | ||
434 | } | 154 | } |
435 | 155 | ||
436 | |||
437 | /***************************************************************************** | 156 | /***************************************************************************** |
438 | * XOR engine | 157 | * XOR engine |
439 | ****************************************************************************/ | 158 | ****************************************************************************/ |
440 | struct mv_xor_platform_shared_data orion5x_xor_shared_data = { | ||
441 | .dram = &orion5x_mbus_dram_info, | ||
442 | }; | ||
443 | |||
444 | static struct resource orion5x_xor_shared_resources[] = { | ||
445 | { | ||
446 | .name = "xor low", | ||
447 | .start = ORION5X_XOR_PHYS_BASE, | ||
448 | .end = ORION5X_XOR_PHYS_BASE + 0xff, | ||
449 | .flags = IORESOURCE_MEM, | ||
450 | }, { | ||
451 | .name = "xor high", | ||
452 | .start = ORION5X_XOR_PHYS_BASE + 0x200, | ||
453 | .end = ORION5X_XOR_PHYS_BASE + 0x2ff, | ||
454 | .flags = IORESOURCE_MEM, | ||
455 | }, | ||
456 | }; | ||
457 | |||
458 | static struct platform_device orion5x_xor_shared = { | ||
459 | .name = MV_XOR_SHARED_NAME, | ||
460 | .id = 0, | ||
461 | .dev = { | ||
462 | .platform_data = &orion5x_xor_shared_data, | ||
463 | }, | ||
464 | .num_resources = ARRAY_SIZE(orion5x_xor_shared_resources), | ||
465 | .resource = orion5x_xor_shared_resources, | ||
466 | }; | ||
467 | |||
468 | static u64 orion5x_xor_dmamask = DMA_BIT_MASK(32); | ||
469 | |||
470 | static struct resource orion5x_xor0_resources[] = { | ||
471 | [0] = { | ||
472 | .start = IRQ_ORION5X_XOR0, | ||
473 | .end = IRQ_ORION5X_XOR0, | ||
474 | .flags = IORESOURCE_IRQ, | ||
475 | }, | ||
476 | }; | ||
477 | |||
478 | static struct mv_xor_platform_data orion5x_xor0_data = { | ||
479 | .shared = &orion5x_xor_shared, | ||
480 | .hw_id = 0, | ||
481 | .pool_size = PAGE_SIZE, | ||
482 | }; | ||
483 | |||
484 | static struct platform_device orion5x_xor0_channel = { | ||
485 | .name = MV_XOR_NAME, | ||
486 | .id = 0, | ||
487 | .num_resources = ARRAY_SIZE(orion5x_xor0_resources), | ||
488 | .resource = orion5x_xor0_resources, | ||
489 | .dev = { | ||
490 | .dma_mask = &orion5x_xor_dmamask, | ||
491 | .coherent_dma_mask = DMA_BIT_MASK(64), | ||
492 | .platform_data = &orion5x_xor0_data, | ||
493 | }, | ||
494 | }; | ||
495 | |||
496 | static struct resource orion5x_xor1_resources[] = { | ||
497 | [0] = { | ||
498 | .start = IRQ_ORION5X_XOR1, | ||
499 | .end = IRQ_ORION5X_XOR1, | ||
500 | .flags = IORESOURCE_IRQ, | ||
501 | }, | ||
502 | }; | ||
503 | |||
504 | static struct mv_xor_platform_data orion5x_xor1_data = { | ||
505 | .shared = &orion5x_xor_shared, | ||
506 | .hw_id = 1, | ||
507 | .pool_size = PAGE_SIZE, | ||
508 | }; | ||
509 | |||
510 | static struct platform_device orion5x_xor1_channel = { | ||
511 | .name = MV_XOR_NAME, | ||
512 | .id = 1, | ||
513 | .num_resources = ARRAY_SIZE(orion5x_xor1_resources), | ||
514 | .resource = orion5x_xor1_resources, | ||
515 | .dev = { | ||
516 | .dma_mask = &orion5x_xor_dmamask, | ||
517 | .coherent_dma_mask = DMA_BIT_MASK(64), | ||
518 | .platform_data = &orion5x_xor1_data, | ||
519 | }, | ||
520 | }; | ||
521 | |||
522 | void __init orion5x_xor_init(void) | 159 | void __init orion5x_xor_init(void) |
523 | { | 160 | { |
524 | platform_device_register(&orion5x_xor_shared); | 161 | orion_xor0_init(&orion5x_mbus_dram_info, |
525 | 162 | ORION5X_XOR_PHYS_BASE, | |
526 | /* | 163 | ORION5X_XOR_PHYS_BASE + 0x200, |
527 | * two engines can't do memset simultaneously, this limitation | 164 | IRQ_ORION5X_XOR0, IRQ_ORION5X_XOR1); |
528 | * satisfied by removing memset support from one of the engines. | ||
529 | */ | ||
530 | dma_cap_set(DMA_MEMCPY, orion5x_xor0_data.cap_mask); | ||
531 | dma_cap_set(DMA_XOR, orion5x_xor0_data.cap_mask); | ||
532 | platform_device_register(&orion5x_xor0_channel); | ||
533 | |||
534 | dma_cap_set(DMA_MEMCPY, orion5x_xor1_data.cap_mask); | ||
535 | dma_cap_set(DMA_MEMSET, orion5x_xor1_data.cap_mask); | ||
536 | dma_cap_set(DMA_XOR, orion5x_xor1_data.cap_mask); | ||
537 | platform_device_register(&orion5x_xor1_channel); | ||
538 | } | 165 | } |
539 | 166 | ||
540 | static struct resource orion5x_crypto_res[] = { | 167 | /***************************************************************************** |
541 | { | 168 | * Cryptographic Engines and Security Accelerator (CESA) |
542 | .name = "regs", | 169 | ****************************************************************************/ |
543 | .start = ORION5X_CRYPTO_PHYS_BASE, | 170 | static void __init orion5x_crypto_init(void) |
544 | .end = ORION5X_CRYPTO_PHYS_BASE + 0xffff, | ||
545 | .flags = IORESOURCE_MEM, | ||
546 | }, { | ||
547 | .name = "sram", | ||
548 | .start = ORION5X_SRAM_PHYS_BASE, | ||
549 | .end = ORION5X_SRAM_PHYS_BASE + SZ_8K - 1, | ||
550 | .flags = IORESOURCE_MEM, | ||
551 | }, { | ||
552 | .name = "crypto interrupt", | ||
553 | .start = IRQ_ORION5X_CESA, | ||
554 | .end = IRQ_ORION5X_CESA, | ||
555 | .flags = IORESOURCE_IRQ, | ||
556 | }, | ||
557 | }; | ||
558 | |||
559 | static struct platform_device orion5x_crypto_device = { | ||
560 | .name = "mv_crypto", | ||
561 | .id = -1, | ||
562 | .num_resources = ARRAY_SIZE(orion5x_crypto_res), | ||
563 | .resource = orion5x_crypto_res, | ||
564 | }; | ||
565 | |||
566 | static int __init orion5x_crypto_init(void) | ||
567 | { | 171 | { |
568 | int ret; | 172 | int ret; |
569 | 173 | ||
570 | ret = orion5x_setup_sram_win(); | 174 | ret = orion5x_setup_sram_win(); |
571 | if (ret) | 175 | if (ret) |
572 | return ret; | 176 | return; |
573 | 177 | ||
574 | return platform_device_register(&orion5x_crypto_device); | 178 | orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, |
179 | SZ_8K, IRQ_ORION5X_CESA); | ||
575 | } | 180 | } |
576 | 181 | ||
577 | /***************************************************************************** | 182 | /***************************************************************************** |
578 | * Watchdog | 183 | * Watchdog |
579 | ****************************************************************************/ | 184 | ****************************************************************************/ |
580 | static struct orion_wdt_platform_data orion5x_wdt_data = { | ||
581 | .tclk = 0, | ||
582 | }; | ||
583 | |||
584 | static struct platform_device orion5x_wdt_device = { | ||
585 | .name = "orion_wdt", | ||
586 | .id = -1, | ||
587 | .dev = { | ||
588 | .platform_data = &orion5x_wdt_data, | ||
589 | }, | ||
590 | .num_resources = 0, | ||
591 | }; | ||
592 | |||
593 | void __init orion5x_wdt_init(void) | 185 | void __init orion5x_wdt_init(void) |
594 | { | 186 | { |
595 | orion5x_wdt_data.tclk = orion5x_tclk; | 187 | orion_wdt_init(orion5x_tclk); |
596 | platform_device_register(&orion5x_wdt_device); | ||
597 | } | 188 | } |
598 | 189 | ||
599 | 190 | ||
@@ -685,11 +276,6 @@ void __init orion5x_init(void) | |||
685 | orion5x_id(&dev, &rev, &dev_name); | 276 | orion5x_id(&dev, &rev, &dev_name); |
686 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); | 277 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); |
687 | 278 | ||
688 | orion5x_eth_shared_data.t_clk = orion5x_tclk; | ||
689 | orion5x_spi_plat_data.tclk = orion5x_tclk; | ||
690 | orion5x_uart0_data[0].uartclk = orion5x_tclk; | ||
691 | orion5x_uart1_data[0].uartclk = orion5x_tclk; | ||
692 | |||
693 | /* | 279 | /* |
694 | * Setup Orion address map | 280 | * Setup Orion address map |
695 | */ | 281 | */ |
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c index 425807579303..19cf5bf99f1b 100644 --- a/arch/arm/mach-orion5x/d2net-setup.c +++ b/arch/arm/mach-orion5x/d2net-setup.c | |||
@@ -267,28 +267,28 @@ static struct platform_device d2net_gpio_buttons = { | |||
267 | * General Setup | 267 | * General Setup |
268 | ****************************************************************************/ | 268 | ****************************************************************************/ |
269 | 269 | ||
270 | static struct orion5x_mpp_mode d2net_mpp_modes[] __initdata = { | 270 | static unsigned int d2net_mpp_modes[] __initdata = { |
271 | { 0, MPP_GPIO }, /* Board ID (bit 0) */ | 271 | MPP0_GPIO, /* Board ID (bit 0) */ |
272 | { 1, MPP_GPIO }, /* Board ID (bit 1) */ | 272 | MPP1_GPIO, /* Board ID (bit 1) */ |
273 | { 2, MPP_GPIO }, /* Board ID (bit 2) */ | 273 | MPP2_GPIO, /* Board ID (bit 2) */ |
274 | { 3, MPP_GPIO }, /* SATA 0 power */ | 274 | MPP3_GPIO, /* SATA 0 power */ |
275 | { 4, MPP_UNUSED }, | 275 | MPP4_UNUSED, |
276 | { 5, MPP_GPIO }, /* Fan fail detection */ | 276 | MPP5_GPIO, /* Fan fail detection */ |
277 | { 6, MPP_GPIO }, /* Red front LED */ | 277 | MPP6_GPIO, /* Red front LED */ |
278 | { 7, MPP_UNUSED }, | 278 | MPP7_UNUSED, |
279 | { 8, MPP_GPIO }, /* Rear power switch (on|auto) */ | 279 | MPP8_GPIO, /* Rear power switch (on|auto) */ |
280 | { 9, MPP_GPIO }, /* Rear power switch (auto|off) */ | 280 | MPP9_GPIO, /* Rear power switch (auto|off) */ |
281 | { 10, MPP_UNUSED }, | 281 | MPP10_UNUSED, |
282 | { 11, MPP_UNUSED }, | 282 | MPP11_UNUSED, |
283 | { 12, MPP_GPIO }, /* SATA 1 power */ | 283 | MPP12_GPIO, /* SATA 1 power */ |
284 | { 13, MPP_UNUSED }, | 284 | MPP13_UNUSED, |
285 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 285 | MPP14_SATA_LED, /* SATA 0 active */ |
286 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 286 | MPP15_SATA_LED, /* SATA 1 active */ |
287 | { 16, MPP_GPIO }, /* Blue front LED blink control */ | 287 | MPP16_GPIO, /* Blue front LED blink control */ |
288 | { 17, MPP_UNUSED }, | 288 | MPP17_UNUSED, |
289 | { 18, MPP_GPIO }, /* Front button (0 = Released, 1 = Pushed ) */ | 289 | MPP18_GPIO, /* Front button (0 = Released, 1 = Pushed ) */ |
290 | { 19, MPP_UNUSED }, | 290 | MPP19_UNUSED, |
291 | { -1 } | 291 | 0, |
292 | /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */ | 292 | /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */ |
293 | /* 23: Blue front LED off */ | 293 | /* 23: Blue front LED off */ |
294 | /* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */ | 294 | /* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */ |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index b7d4591214e0..f95d3cb01cbf 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -298,28 +298,28 @@ static struct i2c_board_info __initdata db88f5281_i2c_rtc = { | |||
298 | /***************************************************************************** | 298 | /***************************************************************************** |
299 | * General Setup | 299 | * General Setup |
300 | ****************************************************************************/ | 300 | ****************************************************************************/ |
301 | static struct orion5x_mpp_mode db88f5281_mpp_modes[] __initdata = { | 301 | static unsigned int db88f5281_mpp_modes[] __initdata = { |
302 | { 0, MPP_GPIO }, /* USB Over Current */ | 302 | MPP0_GPIO, /* USB Over Current */ |
303 | { 1, MPP_GPIO }, /* USB Vbat input */ | 303 | MPP1_GPIO, /* USB Vbat input */ |
304 | { 2, MPP_PCI_ARB }, /* PCI_REQn[2] */ | 304 | MPP2_PCI_ARB, /* PCI_REQn[2] */ |
305 | { 3, MPP_PCI_ARB }, /* PCI_GNTn[2] */ | 305 | MPP3_PCI_ARB, /* PCI_GNTn[2] */ |
306 | { 4, MPP_PCI_ARB }, /* PCI_REQn[3] */ | 306 | MPP4_PCI_ARB, /* PCI_REQn[3] */ |
307 | { 5, MPP_PCI_ARB }, /* PCI_GNTn[3] */ | 307 | MPP5_PCI_ARB, /* PCI_GNTn[3] */ |
308 | { 6, MPP_GPIO }, /* JP0, CON17.2 */ | 308 | MPP6_GPIO, /* JP0, CON17.2 */ |
309 | { 7, MPP_GPIO }, /* JP1, CON17.1 */ | 309 | MPP7_GPIO, /* JP1, CON17.1 */ |
310 | { 8, MPP_GPIO }, /* JP2, CON11.2 */ | 310 | MPP8_GPIO, /* JP2, CON11.2 */ |
311 | { 9, MPP_GPIO }, /* JP3, CON11.3 */ | 311 | MPP9_GPIO, /* JP3, CON11.3 */ |
312 | { 10, MPP_GPIO }, /* RTC int */ | 312 | MPP10_GPIO, /* RTC int */ |
313 | { 11, MPP_GPIO }, /* Baud Rate Generator */ | 313 | MPP11_GPIO, /* Baud Rate Generator */ |
314 | { 12, MPP_GPIO }, /* PCI int 1 */ | 314 | MPP12_GPIO, /* PCI int 1 */ |
315 | { 13, MPP_GPIO }, /* PCI int 2 */ | 315 | MPP13_GPIO, /* PCI int 2 */ |
316 | { 14, MPP_NAND }, /* NAND_REn[2] */ | 316 | MPP14_NAND, /* NAND_REn[2] */ |
317 | { 15, MPP_NAND }, /* NAND_WEn[2] */ | 317 | MPP15_NAND, /* NAND_WEn[2] */ |
318 | { 16, MPP_UART }, /* UART1_RX */ | 318 | MPP16_UART, /* UART1_RX */ |
319 | { 17, MPP_UART }, /* UART1_TX */ | 319 | MPP17_UART, /* UART1_TX */ |
320 | { 18, MPP_UART }, /* UART1_CTSn */ | 320 | MPP18_UART, /* UART1_CTSn */ |
321 | { 19, MPP_UART }, /* UART1_RTSn */ | 321 | MPP19_UART, /* UART1_RTSn */ |
322 | { -1 }, | 322 | 0, |
323 | }; | 323 | }; |
324 | 324 | ||
325 | static void __init db88f5281_init(void) | 325 | static void __init db88f5281_init(void) |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 90ab022eabeb..855e0e77d563 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -385,76 +385,76 @@ static struct mv_sata_platform_data dns323_sata_data = { | |||
385 | /**************************************************************************** | 385 | /**************************************************************************** |
386 | * General Setup | 386 | * General Setup |
387 | */ | 387 | */ |
388 | static struct orion5x_mpp_mode dns323a_mpp_modes[] __initdata = { | 388 | static unsigned int dns323a_mpp_modes[] __initdata = { |
389 | { 0, MPP_PCIE_RST_OUTn }, | 389 | MPP0_PCIE_RST_OUTn, |
390 | { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ | 390 | MPP1_GPIO, /* right amber LED (sata ch0) */ |
391 | { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ | 391 | MPP2_GPIO, /* left amber LED (sata ch1) */ |
392 | { 3, MPP_UNUSED }, | 392 | MPP3_UNUSED, |
393 | { 4, MPP_GPIO }, /* power button LED */ | 393 | MPP4_GPIO, /* power button LED */ |
394 | { 5, MPP_GPIO }, /* power button LED */ | 394 | MPP5_GPIO, /* power button LED */ |
395 | { 6, MPP_GPIO }, /* GMT G751-2f overtemp */ | 395 | MPP6_GPIO, /* GMT G751-2f overtemp */ |
396 | { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */ | 396 | MPP7_GPIO, /* M41T80 nIRQ/OUT/SQW */ |
397 | { 8, MPP_GPIO }, /* triggers power off */ | 397 | MPP8_GPIO, /* triggers power off */ |
398 | { 9, MPP_GPIO }, /* power button switch */ | 398 | MPP9_GPIO, /* power button switch */ |
399 | { 10, MPP_GPIO }, /* reset button switch */ | 399 | MPP10_GPIO, /* reset button switch */ |
400 | { 11, MPP_UNUSED }, | 400 | MPP11_UNUSED, |
401 | { 12, MPP_UNUSED }, | 401 | MPP12_UNUSED, |
402 | { 13, MPP_UNUSED }, | 402 | MPP13_UNUSED, |
403 | { 14, MPP_UNUSED }, | 403 | MPP14_UNUSED, |
404 | { 15, MPP_UNUSED }, | 404 | MPP15_UNUSED, |
405 | { 16, MPP_UNUSED }, | 405 | MPP16_UNUSED, |
406 | { 17, MPP_UNUSED }, | 406 | MPP17_UNUSED, |
407 | { 18, MPP_UNUSED }, | 407 | MPP18_UNUSED, |
408 | { 19, MPP_UNUSED }, | 408 | MPP19_UNUSED, |
409 | { -1 }, | 409 | 0, |
410 | }; | 410 | }; |
411 | 411 | ||
412 | static struct orion5x_mpp_mode dns323b_mpp_modes[] __initdata = { | 412 | static unsigned int dns323b_mpp_modes[] __initdata = { |
413 | { 0, MPP_UNUSED }, | 413 | MPP0_UNUSED, |
414 | { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ | 414 | MPP1_GPIO, /* right amber LED (sata ch0) */ |
415 | { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ | 415 | MPP2_GPIO, /* left amber LED (sata ch1) */ |
416 | { 3, MPP_GPIO }, /* system up flag */ | 416 | MPP3_GPIO, /* system up flag */ |
417 | { 4, MPP_GPIO }, /* power button LED */ | 417 | MPP4_GPIO, /* power button LED */ |
418 | { 5, MPP_GPIO }, /* power button LED */ | 418 | MPP5_GPIO, /* power button LED */ |
419 | { 6, MPP_GPIO }, /* GMT G751-2f overtemp */ | 419 | MPP6_GPIO, /* GMT G751-2f overtemp */ |
420 | { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */ | 420 | MPP7_GPIO, /* M41T80 nIRQ/OUT/SQW */ |
421 | { 8, MPP_GPIO }, /* triggers power off */ | 421 | MPP8_GPIO, /* triggers power off */ |
422 | { 9, MPP_GPIO }, /* power button switch */ | 422 | MPP9_GPIO, /* power button switch */ |
423 | { 10, MPP_GPIO }, /* reset button switch */ | 423 | MPP10_GPIO, /* reset button switch */ |
424 | { 11, MPP_UNUSED }, | 424 | MPP11_UNUSED, |
425 | { 12, MPP_SATA_LED }, | 425 | MPP12_SATA_LED, |
426 | { 13, MPP_SATA_LED }, | 426 | MPP13_SATA_LED, |
427 | { 14, MPP_SATA_LED }, | 427 | MPP14_SATA_LED, |
428 | { 15, MPP_SATA_LED }, | 428 | MPP15_SATA_LED, |
429 | { 16, MPP_UNUSED }, | 429 | MPP16_UNUSED, |
430 | { 17, MPP_UNUSED }, | 430 | MPP17_UNUSED, |
431 | { 18, MPP_UNUSED }, | 431 | MPP18_UNUSED, |
432 | { 19, MPP_UNUSED }, | 432 | MPP19_UNUSED, |
433 | { -1 }, | 433 | 0, |
434 | }; | 434 | }; |
435 | 435 | ||
436 | static struct orion5x_mpp_mode dns323c_mpp_modes[] __initdata = { | 436 | static unsigned int dns323c_mpp_modes[] __initdata = { |
437 | { 0, MPP_GPIO }, /* ? input */ | 437 | MPP0_GPIO, /* ? input */ |
438 | { 1, MPP_GPIO }, /* input power switch (0 = pressed) */ | 438 | MPP1_GPIO, /* input power switch (0 = pressed) */ |
439 | { 2, MPP_GPIO }, /* output power off */ | 439 | MPP2_GPIO, /* output power off */ |
440 | { 3, MPP_UNUSED }, /* ? output */ | 440 | MPP3_UNUSED, /* ? output */ |
441 | { 4, MPP_UNUSED }, /* ? output */ | 441 | MPP4_UNUSED, /* ? output */ |
442 | { 5, MPP_UNUSED }, /* ? output */ | 442 | MPP5_UNUSED, /* ? output */ |
443 | { 6, MPP_UNUSED }, /* ? output */ | 443 | MPP6_UNUSED, /* ? output */ |
444 | { 7, MPP_UNUSED }, /* ? output */ | 444 | MPP7_UNUSED, /* ? output */ |
445 | { 8, MPP_GPIO }, /* i/o right amber LED */ | 445 | MPP8_GPIO, /* i/o right amber LED */ |
446 | { 9, MPP_GPIO }, /* i/o left amber LED */ | 446 | MPP9_GPIO, /* i/o left amber LED */ |
447 | { 10, MPP_GPIO }, /* input */ | 447 | MPP10_GPIO, /* input */ |
448 | { 11, MPP_UNUSED }, | 448 | MPP11_UNUSED, |
449 | { 12, MPP_SATA_LED }, | 449 | MPP12_SATA_LED, |
450 | { 13, MPP_SATA_LED }, | 450 | MPP13_SATA_LED, |
451 | { 14, MPP_SATA_LED }, | 451 | MPP14_SATA_LED, |
452 | { 15, MPP_SATA_LED }, | 452 | MPP15_SATA_LED, |
453 | { 16, MPP_UNUSED }, | 453 | MPP16_UNUSED, |
454 | { 17, MPP_GPIO }, /* power button LED */ | 454 | MPP17_GPIO, /* power button LED */ |
455 | { 18, MPP_GPIO }, /* fan speed bit 0 */ | 455 | MPP18_GPIO, /* fan speed bit 0 */ |
456 | { 19, MPP_GPIO }, /* fan speed bit 1 */ | 456 | MPP19_GPIO, /* fan speed bit 1 */ |
457 | { -1 }, | 457 | 0, |
458 | }; | 458 | }; |
459 | 459 | ||
460 | /* Rev C1 Fan speed notes: | 460 | /* Rev C1 Fan speed notes: |
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c index d037a90c216c..b67cff0d4cfe 100644 --- a/arch/arm/mach-orion5x/edmini_v2-setup.c +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c | |||
@@ -180,31 +180,31 @@ static struct platform_device edmini_v2_gpio_buttons = { | |||
180 | /***************************************************************************** | 180 | /***************************************************************************** |
181 | * General Setup | 181 | * General Setup |
182 | ****************************************************************************/ | 182 | ****************************************************************************/ |
183 | static struct orion5x_mpp_mode edminiv2_mpp_modes[] __initdata = { | 183 | static unsigned int edminiv2_mpp_modes[] __initdata = { |
184 | { 0, MPP_UNUSED }, | 184 | MPP0_UNUSED, |
185 | { 1, MPP_UNUSED }, | 185 | MPP1_UNUSED, |
186 | { 2, MPP_UNUSED }, | 186 | MPP2_UNUSED, |
187 | { 3, MPP_GPIO }, /* RTC interrupt */ | 187 | MPP3_GPIO, /* RTC interrupt */ |
188 | { 4, MPP_UNUSED }, | 188 | MPP4_UNUSED, |
189 | { 5, MPP_UNUSED }, | 189 | MPP5_UNUSED, |
190 | { 6, MPP_UNUSED }, | 190 | MPP6_UNUSED, |
191 | { 7, MPP_UNUSED }, | 191 | MPP7_UNUSED, |
192 | { 8, MPP_UNUSED }, | 192 | MPP8_UNUSED, |
193 | { 9, MPP_UNUSED }, | 193 | MPP9_UNUSED, |
194 | { 10, MPP_UNUSED }, | 194 | MPP10_UNUSED, |
195 | { 11, MPP_UNUSED }, | 195 | MPP11_UNUSED, |
196 | { 12, MPP_SATA_LED }, /* SATA 0 presence */ | 196 | MPP12_SATA_LED, /* SATA 0 presence */ |
197 | { 13, MPP_SATA_LED }, /* SATA 1 presence */ | 197 | MPP13_SATA_LED, /* SATA 1 presence */ |
198 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 198 | MPP14_SATA_LED, /* SATA 0 active */ |
199 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 199 | MPP15_SATA_LED, /* SATA 1 active */ |
200 | /* 16: Power LED control (0 = On, 1 = Off) */ | 200 | /* 16: Power LED control (0 = On, 1 = Off) */ |
201 | { 16, MPP_GPIO }, | 201 | MPP16_GPIO, |
202 | /* 17: Power LED control select (0 = CPLD, 1 = GPIO16) */ | 202 | /* 17: Power LED control select (0 = CPLD, 1 = GPIO16) */ |
203 | { 17, MPP_GPIO }, | 203 | MPP17_GPIO, |
204 | /* 18: Power button status (0 = Released, 1 = Pressed) */ | 204 | /* 18: Power button status (0 = Released, 1 = Pressed) */ |
205 | { 18, MPP_GPIO }, | 205 | MPP18_GPIO, |
206 | { 19, MPP_UNUSED }, | 206 | MPP19_UNUSED, |
207 | { -1 } | 207 | 0, |
208 | }; | 208 | }; |
209 | 209 | ||
210 | static void __init edmini_v2_init(void) | 210 | static void __init edmini_v2_init(void) |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 47497c76162a..c0eb6462633f 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -315,28 +315,28 @@ static void kurobox_pro_power_off(void) | |||
315 | /***************************************************************************** | 315 | /***************************************************************************** |
316 | * General Setup | 316 | * General Setup |
317 | ****************************************************************************/ | 317 | ****************************************************************************/ |
318 | static struct orion5x_mpp_mode kurobox_pro_mpp_modes[] __initdata = { | 318 | static unsigned int kurobox_pro_mpp_modes[] __initdata = { |
319 | { 0, MPP_UNUSED }, | 319 | MPP0_UNUSED, |
320 | { 1, MPP_UNUSED }, | 320 | MPP1_UNUSED, |
321 | { 2, MPP_GPIO }, /* GPIO Micon */ | 321 | MPP2_GPIO, /* GPIO Micon */ |
322 | { 3, MPP_GPIO }, /* GPIO Rtc */ | 322 | MPP3_GPIO, /* GPIO Rtc */ |
323 | { 4, MPP_UNUSED }, | 323 | MPP4_UNUSED, |
324 | { 5, MPP_UNUSED }, | 324 | MPP5_UNUSED, |
325 | { 6, MPP_NAND }, /* NAND Flash REn */ | 325 | MPP6_NAND, /* NAND Flash REn */ |
326 | { 7, MPP_NAND }, /* NAND Flash WEn */ | 326 | MPP7_NAND, /* NAND Flash WEn */ |
327 | { 8, MPP_UNUSED }, | 327 | MPP8_UNUSED, |
328 | { 9, MPP_UNUSED }, | 328 | MPP9_UNUSED, |
329 | { 10, MPP_UNUSED }, | 329 | MPP10_UNUSED, |
330 | { 11, MPP_UNUSED }, | 330 | MPP11_UNUSED, |
331 | { 12, MPP_SATA_LED }, /* SATA 0 presence */ | 331 | MPP12_SATA_LED, /* SATA 0 presence */ |
332 | { 13, MPP_SATA_LED }, /* SATA 1 presence */ | 332 | MPP13_SATA_LED, /* SATA 1 presence */ |
333 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 333 | MPP14_SATA_LED, /* SATA 0 active */ |
334 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 334 | MPP15_SATA_LED, /* SATA 1 active */ |
335 | { 16, MPP_UART }, /* UART1 RXD */ | 335 | MPP16_UART, /* UART1 RXD */ |
336 | { 17, MPP_UART }, /* UART1 TXD */ | 336 | MPP17_UART, /* UART1 TXD */ |
337 | { 18, MPP_UART }, /* UART1 CTSn */ | 337 | MPP18_UART, /* UART1 CTSn */ |
338 | { 19, MPP_UART }, /* UART1 RTSn */ | 338 | MPP19_UART, /* UART1 RTSn */ |
339 | { -1 }, | 339 | 0, |
340 | }; | 340 | }; |
341 | 341 | ||
342 | static void __init kurobox_pro_init(void) | 342 | static void __init kurobox_pro_init(void) |
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c index 6ae12aa6d759..5065803ca82a 100644 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ b/arch/arm/mach-orion5x/ls-chl-setup.c | |||
@@ -251,28 +251,28 @@ static struct platform_device lschl_fan_device = { | |||
251 | * GPIO Data | 251 | * GPIO Data |
252 | ****************************************************************************/ | 252 | ****************************************************************************/ |
253 | 253 | ||
254 | static struct orion5x_mpp_mode lschl_mpp_modes[] __initdata = { | 254 | static unsigned int lschl_mpp_modes[] __initdata = { |
255 | { 0, MPP_GPIO }, /* LED POWER */ | 255 | MPP0_GPIO, /* LED POWER */ |
256 | { 1, MPP_GPIO }, /* HDD POWER */ | 256 | MPP1_GPIO, /* HDD POWER */ |
257 | { 2, MPP_GPIO }, /* LED ALARM */ | 257 | MPP2_GPIO, /* LED ALARM */ |
258 | { 3, MPP_GPIO }, /* LED INFO */ | 258 | MPP3_GPIO, /* LED INFO */ |
259 | { 4, MPP_UNUSED }, | 259 | MPP4_UNUSED, |
260 | { 5, MPP_UNUSED }, | 260 | MPP5_UNUSED, |
261 | { 6, MPP_GPIO }, /* FAN LOCK */ | 261 | MPP6_GPIO, /* FAN LOCK */ |
262 | { 7, MPP_GPIO }, /* SW INIT */ | 262 | MPP7_GPIO, /* SW INIT */ |
263 | { 8, MPP_GPIO }, /* SW POWER */ | 263 | MPP8_GPIO, /* SW POWER */ |
264 | { 9, MPP_GPIO }, /* USB POWER */ | 264 | MPP9_GPIO, /* USB POWER */ |
265 | { 10, MPP_GPIO }, /* SW AUTO POWER */ | 265 | MPP10_GPIO, /* SW AUTO POWER */ |
266 | { 11, MPP_UNUSED }, | 266 | MPP11_UNUSED, |
267 | { 12, MPP_UNUSED }, | 267 | MPP12_UNUSED, |
268 | { 13, MPP_UNUSED }, | 268 | MPP13_UNUSED, |
269 | { 14, MPP_GPIO }, /* FAN HIGH */ | 269 | MPP14_GPIO, /* FAN HIGH */ |
270 | { 15, MPP_GPIO }, /* SW FUNC */ | 270 | MPP15_GPIO, /* SW FUNC */ |
271 | { 16, MPP_GPIO }, /* FAN LOW */ | 271 | MPP16_GPIO, /* FAN LOW */ |
272 | { 17, MPP_GPIO }, /* LED FUNC */ | 272 | MPP17_GPIO, /* LED FUNC */ |
273 | { 18, MPP_UNUSED }, | 273 | MPP18_UNUSED, |
274 | { 19, MPP_UNUSED }, | 274 | MPP19_UNUSED, |
275 | { -1 }, | 275 | 0, |
276 | }; | 276 | }; |
277 | 277 | ||
278 | static void __init lschl_init(void) | 278 | static void __init lschl_init(void) |
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index 7adafd79cf98..8503d0a42d41 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c | |||
@@ -200,28 +200,28 @@ static void ls_hgl_power_off(void) | |||
200 | 200 | ||
201 | #define LS_HGL_GPIO_HDD_POWER 1 | 201 | #define LS_HGL_GPIO_HDD_POWER 1 |
202 | 202 | ||
203 | static struct orion5x_mpp_mode ls_hgl_mpp_modes[] __initdata = { | 203 | static unsigned int ls_hgl_mpp_modes[] __initdata = { |
204 | { 0, MPP_GPIO }, /* LED_PWR */ | 204 | MPP0_GPIO, /* LED_PWR */ |
205 | { 1, MPP_GPIO }, /* HDD_PWR */ | 205 | MPP1_GPIO, /* HDD_PWR */ |
206 | { 2, MPP_GPIO }, /* LED_ALARM */ | 206 | MPP2_GPIO, /* LED_ALARM */ |
207 | { 3, MPP_GPIO }, /* LED_INFO */ | 207 | MPP3_GPIO, /* LED_INFO */ |
208 | { 4, MPP_UNUSED }, | 208 | MPP4_UNUSED, |
209 | { 5, MPP_UNUSED }, | 209 | MPP5_UNUSED, |
210 | { 6, MPP_GPIO }, /* FAN_LCK */ | 210 | MPP6_GPIO, /* FAN_LCK */ |
211 | { 7, MPP_GPIO }, /* INIT */ | 211 | MPP7_GPIO, /* INIT */ |
212 | { 8, MPP_GPIO }, /* POWER */ | 212 | MPP8_GPIO, /* POWER */ |
213 | { 9, MPP_GPIO }, /* USB_PWR */ | 213 | MPP9_GPIO, /* USB_PWR */ |
214 | { 10, MPP_GPIO }, /* AUTO_POWER */ | 214 | MPP10_GPIO, /* AUTO_POWER */ |
215 | { 11, MPP_UNUSED }, /* LED_ETH (dummy) */ | 215 | MPP11_UNUSED, /* LED_ETH (dummy) */ |
216 | { 12, MPP_UNUSED }, | 216 | MPP12_UNUSED, |
217 | { 13, MPP_UNUSED }, | 217 | MPP13_UNUSED, |
218 | { 14, MPP_UNUSED }, | 218 | MPP14_UNUSED, |
219 | { 15, MPP_GPIO }, /* FUNC */ | 219 | MPP15_GPIO, /* FUNC */ |
220 | { 16, MPP_UNUSED }, | 220 | MPP16_UNUSED, |
221 | { 17, MPP_GPIO }, /* LED_FUNC */ | 221 | MPP17_GPIO, /* LED_FUNC */ |
222 | { 18, MPP_UNUSED }, | 222 | MPP18_UNUSED, |
223 | { 19, MPP_UNUSED }, | 223 | MPP19_UNUSED, |
224 | { -1 }, | 224 | 0, |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static void __init ls_hgl_init(void) | 227 | static void __init ls_hgl_init(void) |
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c index 869958f5c394..9c82723c05c0 100644 --- a/arch/arm/mach-orion5x/lsmini-setup.c +++ b/arch/arm/mach-orion5x/lsmini-setup.c | |||
@@ -201,28 +201,28 @@ static void lsmini_power_off(void) | |||
201 | #define LSMINI_GPIO_HDD_POWER0 1 | 201 | #define LSMINI_GPIO_HDD_POWER0 1 |
202 | #define LSMINI_GPIO_HDD_POWER1 19 | 202 | #define LSMINI_GPIO_HDD_POWER1 19 |
203 | 203 | ||
204 | static struct orion5x_mpp_mode lsmini_mpp_modes[] __initdata = { | 204 | static unsigned int lsmini_mpp_modes[] __initdata = { |
205 | { 0, MPP_UNUSED }, /* LED_RESERVE1 (unused) */ | 205 | MPP0_UNUSED, /* LED_RESERVE1 (unused) */ |
206 | { 1, MPP_GPIO }, /* HDD_PWR */ | 206 | MPP1_GPIO, /* HDD_PWR */ |
207 | { 2, MPP_GPIO }, /* LED_ALARM */ | 207 | MPP2_GPIO, /* LED_ALARM */ |
208 | { 3, MPP_GPIO }, /* LED_INFO */ | 208 | MPP3_GPIO, /* LED_INFO */ |
209 | { 4, MPP_UNUSED }, | 209 | MPP4_UNUSED, |
210 | { 5, MPP_UNUSED }, | 210 | MPP5_UNUSED, |
211 | { 6, MPP_UNUSED }, | 211 | MPP6_UNUSED, |
212 | { 7, MPP_UNUSED }, | 212 | MPP7_UNUSED, |
213 | { 8, MPP_UNUSED }, | 213 | MPP8_UNUSED, |
214 | { 9, MPP_GPIO }, /* LED_FUNC */ | 214 | MPP9_GPIO, /* LED_FUNC */ |
215 | { 10, MPP_UNUSED }, | 215 | MPP10_UNUSED, |
216 | { 11, MPP_UNUSED }, /* LED_ETH (dummy) */ | 216 | MPP11_UNUSED, /* LED_ETH (dummy) */ |
217 | { 12, MPP_UNUSED }, | 217 | MPP12_UNUSED, |
218 | { 13, MPP_UNUSED }, | 218 | MPP13_UNUSED, |
219 | { 14, MPP_GPIO }, /* LED_PWR */ | 219 | MPP14_GPIO, /* LED_PWR */ |
220 | { 15, MPP_GPIO }, /* FUNC */ | 220 | MPP15_GPIO, /* FUNC */ |
221 | { 16, MPP_GPIO }, /* USB_PWR */ | 221 | MPP16_GPIO, /* USB_PWR */ |
222 | { 17, MPP_GPIO }, /* AUTO_POWER */ | 222 | MPP17_GPIO, /* AUTO_POWER */ |
223 | { 18, MPP_GPIO }, /* POWER */ | 223 | MPP18_GPIO, /* POWER */ |
224 | { 19, MPP_GPIO }, /* HDD_PWR1 */ | 224 | MPP19_GPIO, /* HDD_PWR1 */ |
225 | { -1 }, | 225 | 0, |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static void __init lsmini_init(void) | 228 | static void __init lsmini_init(void) |
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index 2288207726e4..f12c41b98d46 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -12,154 +12,34 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/gpio.h> | ||
16 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
17 | #include "common.h" | 16 | #include <plat/mpp.h> |
18 | #include "mpp.h" | 17 | #include "mpp.h" |
18 | #include "common.h" | ||
19 | 19 | ||
20 | static int is_5181l(void) | 20 | static unsigned int __init orion5x_variant(void) |
21 | { | ||
22 | u32 dev; | ||
23 | u32 rev; | ||
24 | |||
25 | orion5x_pcie_id(&dev, &rev); | ||
26 | |||
27 | return !!(dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0); | ||
28 | } | ||
29 | |||
30 | static int is_5182(void) | ||
31 | { | 21 | { |
32 | u32 dev; | 22 | u32 dev; |
33 | u32 rev; | 23 | u32 rev; |
34 | 24 | ||
35 | orion5x_pcie_id(&dev, &rev); | 25 | orion5x_pcie_id(&dev, &rev); |
36 | 26 | ||
37 | return !!(dev == MV88F5182_DEV_ID); | 27 | if (dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0) |
38 | } | 28 | return MPP_F5181_MASK; |
39 | 29 | ||
40 | static int is_5281(void) | 30 | if (dev == MV88F5182_DEV_ID) |
41 | { | 31 | return MPP_F5182_MASK; |
42 | u32 dev; | ||
43 | u32 rev; | ||
44 | 32 | ||
45 | orion5x_pcie_id(&dev, &rev); | 33 | if (dev == MV88F5281_DEV_ID) |
34 | return MPP_F5281_MASK; | ||
46 | 35 | ||
47 | return !!(dev == MV88F5281_DEV_ID); | 36 | printk(KERN_ERR "MPP setup: unknown orion5x variant " |
37 | "(dev %#x rev %#x)\n", dev, rev); | ||
38 | return 0; | ||
48 | } | 39 | } |
49 | 40 | ||
50 | static int __init determine_type_encoding(int mpp, enum orion5x_mpp_type type) | 41 | void __init orion5x_mpp_conf(unsigned int *mpp_list) |
51 | { | 42 | { |
52 | switch (type) { | 43 | orion_mpp_conf(mpp_list, orion5x_variant(), |
53 | case MPP_UNUSED: | 44 | MPP_MAX, ORION5X_DEV_BUS_VIRT_BASE); |
54 | case MPP_GPIO: | ||
55 | if (mpp == 0) | ||
56 | return 3; | ||
57 | if (mpp >= 1 && mpp <= 15) | ||
58 | return 0; | ||
59 | if (mpp >= 16 && mpp <= 19) { | ||
60 | if (is_5182()) | ||
61 | return 5; | ||
62 | if (type == MPP_UNUSED) | ||
63 | return 0; | ||
64 | } | ||
65 | return -1; | ||
66 | |||
67 | case MPP_PCIE_RST_OUTn: | ||
68 | if (mpp == 0) | ||
69 | return 0; | ||
70 | return -1; | ||
71 | |||
72 | case MPP_PCI_ARB: | ||
73 | if (mpp >= 0 && mpp <= 7) | ||
74 | return 2; | ||
75 | return -1; | ||
76 | |||
77 | case MPP_PCI_PMEn: | ||
78 | if (mpp == 2) | ||
79 | return 3; | ||
80 | return -1; | ||
81 | |||
82 | case MPP_GIGE: | ||
83 | if (mpp >= 8 && mpp <= 19) | ||
84 | return 1; | ||
85 | return -1; | ||
86 | |||
87 | case MPP_NAND: | ||
88 | if (is_5182() || is_5281()) { | ||
89 | if (mpp >= 4 && mpp <= 7) | ||
90 | return 4; | ||
91 | if (mpp >= 12 && mpp <= 17) | ||
92 | return 4; | ||
93 | } | ||
94 | return -1; | ||
95 | |||
96 | case MPP_PCI_CLK: | ||
97 | if (is_5181l() && mpp >= 6 && mpp <= 7) | ||
98 | return 5; | ||
99 | return -1; | ||
100 | |||
101 | case MPP_SATA_LED: | ||
102 | if (is_5182()) { | ||
103 | if (mpp >= 4 && mpp <= 7) | ||
104 | return 5; | ||
105 | if (mpp >= 12 && mpp <= 15) | ||
106 | return 5; | ||
107 | } | ||
108 | return -1; | ||
109 | |||
110 | case MPP_UART: | ||
111 | if (mpp >= 16 && mpp <= 19) | ||
112 | return 0; | ||
113 | return -1; | ||
114 | } | ||
115 | |||
116 | printk(KERN_INFO "unknown MPP type %d\n", type); | ||
117 | |||
118 | return -1; | ||
119 | } | ||
120 | |||
121 | void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) | ||
122 | { | ||
123 | u32 mpp_0_7_ctrl = readl(MPP_0_7_CTRL); | ||
124 | u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL); | ||
125 | u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL); | ||
126 | |||
127 | for ( ; mode->mpp >= 0; mode++) { | ||
128 | u32 *reg; | ||
129 | int num_type; | ||
130 | int shift; | ||
131 | |||
132 | if (mode->mpp >= 0 && mode->mpp <= 7) | ||
133 | reg = &mpp_0_7_ctrl; | ||
134 | else if (mode->mpp >= 8 && mode->mpp <= 15) | ||
135 | reg = &mpp_8_15_ctrl; | ||
136 | else if (mode->mpp >= 16 && mode->mpp <= 19) | ||
137 | reg = &mpp_16_19_ctrl; | ||
138 | else { | ||
139 | printk(KERN_ERR "orion5x_mpp_conf: invalid MPP " | ||
140 | "(%d)\n", mode->mpp); | ||
141 | continue; | ||
142 | } | ||
143 | |||
144 | num_type = determine_type_encoding(mode->mpp, mode->type); | ||
145 | if (num_type < 0) { | ||
146 | printk(KERN_ERR "orion5x_mpp_conf: invalid MPP " | ||
147 | "combination (%d, %d)\n", mode->mpp, | ||
148 | mode->type); | ||
149 | continue; | ||
150 | } | ||
151 | |||
152 | shift = (mode->mpp & 7) << 2; | ||
153 | *reg &= ~(0xf << shift); | ||
154 | *reg |= (num_type & 0xf) << shift; | ||
155 | |||
156 | if (mode->type == MPP_UNUSED && (mode->mpp < 16 || is_5182())) | ||
157 | orion_gpio_set_unused(mode->mpp); | ||
158 | |||
159 | orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); | ||
160 | } | ||
161 | |||
162 | writel(mpp_0_7_ctrl, MPP_0_7_CTRL); | ||
163 | writel(mpp_8_15_ctrl, MPP_8_15_CTRL); | ||
164 | writel(mpp_16_19_ctrl, MPP_16_19_CTRL); | ||
165 | } | 45 | } |
diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h index 290e610dc012..eac68978a2c2 100644 --- a/arch/arm/mach-orion5x/mpp.h +++ b/arch/arm/mach-orion5x/mpp.h | |||
@@ -1,74 +1,129 @@ | |||
1 | #ifndef __ARCH_ORION5X_MPP_H | 1 | #ifndef __ARCH_ORION5X_MPP_H |
2 | #define __ARCH_ORION5X_MPP_H | 2 | #define __ARCH_ORION5X_MPP_H |
3 | 3 | ||
4 | enum orion5x_mpp_type { | 4 | #define MPP(_num, _sel, _in, _out, _F5181l, _F5182, _F5281) ( \ |
5 | /* | 5 | /* MPP number */ ((_num) & 0xff) | \ |
6 | * This MPP is unused. | 6 | /* MPP select value */ (((_sel) & 0xf) << 8) | \ |
7 | */ | 7 | /* may be input signal */ ((!!(_in)) << 12) | \ |
8 | MPP_UNUSED, | 8 | /* may be output signal */ ((!!(_out)) << 13) | \ |
9 | 9 | /* available on F5181l */ ((!!(_F5181l)) << 14) | \ | |
10 | /* | 10 | /* available on F5182 */ ((!!(_F5182)) << 15) | \ |
11 | * This MPP pin is used as a generic GPIO pin. Valid for | 11 | /* available on F5281 */ ((!!(_F5281)) << 16)) |
12 | * MPPs 0-15 and device bus data pins 16-31. On 5182, also | ||
13 | * valid for MPPs 16-19. | ||
14 | */ | ||
15 | MPP_GPIO, | ||
16 | |||
17 | /* | ||
18 | * This MPP is used as PCIe_RST_OUTn pin. Valid for | ||
19 | * MPP 0 only. | ||
20 | */ | ||
21 | MPP_PCIE_RST_OUTn, | ||
22 | |||
23 | /* | ||
24 | * This MPP is used as PCI arbiter pin (REQn/GNTn). | ||
25 | * Valid for MPPs 0-7 only. | ||
26 | */ | ||
27 | MPP_PCI_ARB, | ||
28 | |||
29 | /* | ||
30 | * This MPP is used as PCI_PMEn pin. Valid for MPP 2 only. | ||
31 | */ | ||
32 | MPP_PCI_PMEn, | ||
33 | |||
34 | /* | ||
35 | * This MPP is used as GigE half-duplex (COL, CRS) or GMII | ||
36 | * (RXERR, CRS, TXERR, TXD[7:4], RXD[7:4]) pin. Valid for | ||
37 | * MPPs 8-19 only. | ||
38 | */ | ||
39 | MPP_GIGE, | ||
40 | |||
41 | /* | ||
42 | * This MPP is used as NAND REn/WEn pin. Valid for MPPs | ||
43 | * 4-7 and 12-17 only, and only on the 5181l/5182/5281. | ||
44 | */ | ||
45 | MPP_NAND, | ||
46 | |||
47 | /* | ||
48 | * This MPP is used as a PCI clock output pin. Valid for | ||
49 | * MPPs 6-7 only, and only on the 5181l. | ||
50 | */ | ||
51 | MPP_PCI_CLK, | ||
52 | |||
53 | /* | ||
54 | * This MPP is used as a SATA presence/activity LED. | ||
55 | * Valid for MPPs 4-7 and 12-15 only, and only on the 5182. | ||
56 | */ | ||
57 | MPP_SATA_LED, | ||
58 | |||
59 | /* | ||
60 | * This MPP is used as UART1 RXD/TXD/CTSn/RTSn pin. | ||
61 | * Valid for MPPs 16-19 only. | ||
62 | */ | ||
63 | MPP_UART, | ||
64 | }; | ||
65 | |||
66 | struct orion5x_mpp_mode { | ||
67 | int mpp; | ||
68 | enum orion5x_mpp_type type; | ||
69 | }; | ||
70 | |||
71 | void orion5x_mpp_conf(struct orion5x_mpp_mode *mode); | ||
72 | 12 | ||
13 | /* num sel i o 5181 5182 5281 */ | ||
14 | |||
15 | #define MPP_F5181_MASK MPP(0, 0x0, 0, 0, 1, 0, 0) | ||
16 | #define MPP_F5182_MASK MPP(0, 0x0, 0, 0, 0, 1, 0) | ||
17 | #define MPP_F5281_MASK MPP(0, 0x0, 0, 0, 0, 0, 1) | ||
18 | |||
19 | #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1, 1, 1) | ||
20 | #define MPP0_GPIO MPP(0, 0x3, 1, 1, 1, 1, 1) | ||
21 | #define MPP0_PCIE_RST_OUTn MPP(0, 0x0, 0, 0, 1, 1, 1) | ||
22 | #define MPP0_PCI_ARB MPP(0, 0x2, 0, 0, 1, 1, 1) | ||
23 | |||
24 | #define MPP1_UNUSED MPP(1, 0x0, 0, 0, 1, 1, 1) | ||
25 | #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1, 1, 1) | ||
26 | #define MPP1_PCI_ARB MPP(1, 0x2, 0, 0, 1, 1, 1) | ||
27 | |||
28 | #define MPP2_UNUSED MPP(2, 0x0, 0, 0, 1, 1, 1) | ||
29 | #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1, 1, 1) | ||
30 | #define MPP2_PCI_ARB MPP(2, 0x2, 0, 0, 1, 1, 1) | ||
31 | #define MPP2_PCI_PMEn MPP(2, 0x3, 0, 0, 1, 1, 1) | ||
32 | |||
33 | #define MPP3_UNUSED MPP(3, 0x0, 0, 0, 1, 1, 1) | ||
34 | #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1, 1, 1) | ||
35 | #define MPP3_PCI_ARB MPP(3, 0x2, 0, 0, 1, 1, 1) | ||
36 | |||
37 | #define MPP4_UNUSED MPP(4, 0x0, 0, 0, 1, 1, 1) | ||
38 | #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1, 1, 1) | ||
39 | #define MPP4_PCI_ARB MPP(4, 0x2, 0, 0, 1, 1, 1) | ||
40 | #define MPP4_NAND MPP(4, 0x4, 0, 0, 0, 1, 1) | ||
41 | #define MPP4_SATA_LED MPP(4, 0x5, 0, 0, 0, 1, 0) | ||
42 | |||
43 | #define MPP5_UNUSED MPP(5, 0x0, 0, 0, 1, 1, 1) | ||
44 | #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1, 1, 1) | ||
45 | #define MPP5_PCI_ARB MPP(5, 0x2, 0, 0, 1, 1, 1) | ||
46 | #define MPP5_NAND MPP(5, 0x4, 0, 0, 0, 1, 1) | ||
47 | #define MPP5_SATA_LED MPP(5, 0x5, 0, 0, 0, 1, 0) | ||
48 | |||
49 | #define MPP6_UNUSED MPP(6, 0x0, 0, 0, 1, 1, 1) | ||
50 | #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1, 1, 1) | ||
51 | #define MPP6_PCI_ARB MPP(6, 0x2, 0, 0, 1, 1, 1) | ||
52 | #define MPP6_NAND MPP(6, 0x4, 0, 0, 0, 1, 1) | ||
53 | #define MPP6_PCI_CLK MPP(6, 0x5, 0, 0, 1, 0, 0) | ||
54 | #define MPP6_SATA_LED MPP(6, 0x5, 0, 0, 0, 1, 0) | ||
55 | |||
56 | #define MPP7_UNUSED MPP(7, 0x0, 0, 0, 1, 1, 1) | ||
57 | #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1, 1, 1) | ||
58 | #define MPP7_PCI_ARB MPP(7, 0x2, 0, 0, 1, 1, 1) | ||
59 | #define MPP7_NAND MPP(7, 0x4, 0, 0, 0, 1, 1) | ||
60 | #define MPP7_PCI_CLK MPP(7, 0x5, 0, 0, 1, 0, 0) | ||
61 | #define MPP7_SATA_LED MPP(7, 0x5, 0, 0, 0, 1, 0) | ||
62 | |||
63 | #define MPP8_UNUSED MPP(8, 0x0, 0, 0, 1, 1, 1) | ||
64 | #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1, 1, 1) | ||
65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) | ||
66 | |||
67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) | ||
68 | #define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) | ||
69 | #define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) | ||
70 | |||
71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) | ||
72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) | ||
73 | #define MPP10_GIGE MPP(10, 0x1, 0, 0, 1, 1, 1) | ||
74 | |||
75 | #define MPP11_UNUSED MPP(11, 0x0, 0, 0, 1, 1, 1) | ||
76 | #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1, 1, 1) | ||
77 | #define MPP11_GIGE MPP(11, 0x1, 0, 0, 1, 1, 1) | ||
78 | |||
79 | #define MPP12_UNUSED MPP(12, 0x0, 0, 0, 1, 1, 1) | ||
80 | #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1, 1, 1) | ||
81 | #define MPP12_GIGE MPP(12, 0x1, 0, 0, 1, 1, 1) | ||
82 | #define MPP12_NAND MPP(12, 0x4, 0, 0, 0, 1, 1) | ||
83 | #define MPP12_SATA_LED MPP(12, 0x5, 0, 0, 0, 1, 0) | ||
84 | |||
85 | #define MPP13_UNUSED MPP(13, 0x0, 0, 0, 1, 1, 1) | ||
86 | #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1, 1, 1) | ||
87 | #define MPP13_GIGE MPP(13, 0x1, 0, 0, 1, 1, 1) | ||
88 | #define MPP13_NAND MPP(13, 0x4, 0, 0, 0, 1, 1) | ||
89 | #define MPP13_SATA_LED MPP(13, 0x5, 0, 0, 0, 1, 0) | ||
90 | |||
91 | #define MPP14_UNUSED MPP(14, 0x0, 0, 0, 1, 1, 1) | ||
92 | #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1, 1, 1) | ||
93 | #define MPP14_GIGE MPP(14, 0x1, 0, 0, 1, 1, 1) | ||
94 | #define MPP14_NAND MPP(14, 0x4, 0, 0, 0, 1, 1) | ||
95 | #define MPP14_SATA_LED MPP(14, 0x5, 0, 0, 0, 1, 0) | ||
96 | |||
97 | #define MPP15_UNUSED MPP(15, 0x0, 0, 0, 1, 1, 1) | ||
98 | #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1, 1, 1) | ||
99 | #define MPP15_GIGE MPP(15, 0x1, 0, 0, 1, 1, 1) | ||
100 | #define MPP15_NAND MPP(15, 0x4, 0, 0, 0, 1, 1) | ||
101 | #define MPP15_SATA_LED MPP(15, 0x5, 0, 0, 0, 1, 0) | ||
102 | |||
103 | #define MPP16_UNUSED MPP(16, 0x0, 0, 0, 1, 1, 1) | ||
104 | #define MPP16_GPIO MPP(16, 0x5, 1, 1, 0, 1, 0) | ||
105 | #define MPP16_GIGE MPP(16, 0x1, 0, 0, 1, 1, 1) | ||
106 | #define MPP16_NAND MPP(16, 0x4, 0, 0, 0, 1, 1) | ||
107 | #define MPP16_UART MPP(16, 0x0, 0, 0, 0, 1, 1) | ||
108 | |||
109 | #define MPP17_UNUSED MPP(17, 0x0, 0, 0, 1, 1, 1) | ||
110 | #define MPP17_GPIO MPP(17, 0x5, 1, 1, 0, 1, 0) | ||
111 | #define MPP17_GIGE MPP(17, 0x1, 0, 0, 1, 1, 1) | ||
112 | #define MPP17_NAND MPP(17, 0x4, 0, 0, 0, 1, 1) | ||
113 | #define MPP17_UART MPP(17, 0x0, 0, 0, 0, 1, 1) | ||
114 | |||
115 | #define MPP18_UNUSED MPP(18, 0x0, 0, 0, 1, 1, 1) | ||
116 | #define MPP18_GPIO MPP(18, 0x5, 1, 1, 0, 1, 0) | ||
117 | #define MPP18_GIGE MPP(18, 0x1, 0, 0, 1, 1, 1) | ||
118 | #define MPP18_UART MPP(18, 0x0, 0, 0, 0, 1, 1) | ||
119 | |||
120 | #define MPP19_UNUSED MPP(19, 0x0, 0, 0, 1, 1, 1) | ||
121 | #define MPP19_GPIO MPP(19, 0x5, 1, 1, 0, 1, 0) | ||
122 | #define MPP19_GIGE MPP(19, 0x1, 0, 0, 1, 1, 1) | ||
123 | #define MPP19_UART MPP(19, 0x0, 0, 0, 0, 1, 1) | ||
124 | |||
125 | #define MPP_MAX 19 | ||
126 | |||
127 | void orion5x_mpp_conf(unsigned int *mpp_list); | ||
73 | 128 | ||
74 | #endif | 129 | #endif |
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index b43b208153cb..59263b73d1e4 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -193,28 +193,28 @@ static void mss2_power_off(void) | |||
193 | /**************************************************************************** | 193 | /**************************************************************************** |
194 | * General Setup | 194 | * General Setup |
195 | ****************************************************************************/ | 195 | ****************************************************************************/ |
196 | static struct orion5x_mpp_mode mss2_mpp_modes[] __initdata = { | 196 | static unsigned int mss2_mpp_modes[] __initdata = { |
197 | { 0, MPP_GPIO }, /* Power LED */ | 197 | MPP0_GPIO, /* Power LED */ |
198 | { 1, MPP_GPIO }, /* Error LED */ | 198 | MPP1_GPIO, /* Error LED */ |
199 | { 2, MPP_UNUSED }, | 199 | MPP2_UNUSED, |
200 | { 3, MPP_GPIO }, /* RTC interrupt */ | 200 | MPP3_GPIO, /* RTC interrupt */ |
201 | { 4, MPP_GPIO }, /* HDD ind. (Single/Dual)*/ | 201 | MPP4_GPIO, /* HDD ind. (Single/Dual)*/ |
202 | { 5, MPP_GPIO }, /* HD0 5V control */ | 202 | MPP5_GPIO, /* HD0 5V control */ |
203 | { 6, MPP_GPIO }, /* HD0 12V control */ | 203 | MPP6_GPIO, /* HD0 12V control */ |
204 | { 7, MPP_GPIO }, /* HD1 5V control */ | 204 | MPP7_GPIO, /* HD1 5V control */ |
205 | { 8, MPP_GPIO }, /* HD1 12V control */ | 205 | MPP8_GPIO, /* HD1 12V control */ |
206 | { 9, MPP_UNUSED }, | 206 | MPP9_UNUSED, |
207 | { 10, MPP_GPIO }, /* Fan control */ | 207 | MPP10_GPIO, /* Fan control */ |
208 | { 11, MPP_GPIO }, /* Power button */ | 208 | MPP11_GPIO, /* Power button */ |
209 | { 12, MPP_GPIO }, /* Reset button */ | 209 | MPP12_GPIO, /* Reset button */ |
210 | { 13, MPP_UNUSED }, | 210 | MPP13_UNUSED, |
211 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 211 | MPP14_SATA_LED, /* SATA 0 active */ |
212 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 212 | MPP15_SATA_LED, /* SATA 1 active */ |
213 | { 16, MPP_UNUSED }, | 213 | MPP16_UNUSED, |
214 | { 17, MPP_UNUSED }, | 214 | MPP17_UNUSED, |
215 | { 18, MPP_UNUSED }, | 215 | MPP18_UNUSED, |
216 | { 19, MPP_UNUSED }, | 216 | MPP19_UNUSED, |
217 | { -1 }, | 217 | 0, |
218 | }; | 218 | }; |
219 | 219 | ||
220 | static void __init mss2_init(void) | 220 | static void __init mss2_init(void) |
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index c55d071707f5..63ff10c3c464 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c | |||
@@ -108,28 +108,28 @@ static struct platform_device mv2120_button_device = { | |||
108 | /**************************************************************************** | 108 | /**************************************************************************** |
109 | * General Setup | 109 | * General Setup |
110 | ****************************************************************************/ | 110 | ****************************************************************************/ |
111 | static struct orion5x_mpp_mode mv2120_mpp_modes[] __initdata = { | 111 | static unsigned int mv2120_mpp_modes[] __initdata = { |
112 | { 0, MPP_GPIO }, /* Sys status LED */ | 112 | MPP0_GPIO, /* Sys status LED */ |
113 | { 1, MPP_GPIO }, /* Sys error LED */ | 113 | MPP1_GPIO, /* Sys error LED */ |
114 | { 2, MPP_GPIO }, /* OverTemp interrupt */ | 114 | MPP2_GPIO, /* OverTemp interrupt */ |
115 | { 3, MPP_GPIO }, /* RTC interrupt */ | 115 | MPP3_GPIO, /* RTC interrupt */ |
116 | { 4, MPP_GPIO }, /* V_LED 5V */ | 116 | MPP4_GPIO, /* V_LED 5V */ |
117 | { 5, MPP_GPIO }, /* V_LED 3.3V */ | 117 | MPP5_GPIO, /* V_LED 3.3V */ |
118 | { 6, MPP_UNUSED }, | 118 | MPP6_UNUSED, |
119 | { 7, MPP_UNUSED }, | 119 | MPP7_UNUSED, |
120 | { 8, MPP_GPIO }, /* SATA 0 fail LED */ | 120 | MPP8_GPIO, /* SATA 0 fail LED */ |
121 | { 9, MPP_GPIO }, /* SATA 1 fail LED */ | 121 | MPP9_GPIO, /* SATA 1 fail LED */ |
122 | { 10, MPP_UNUSED }, | 122 | MPP10_UNUSED, |
123 | { 11, MPP_UNUSED }, | 123 | MPP11_UNUSED, |
124 | { 12, MPP_SATA_LED }, /* SATA 0 presence */ | 124 | MPP12_SATA_LED, /* SATA 0 presence */ |
125 | { 13, MPP_SATA_LED }, /* SATA 1 presence */ | 125 | MPP13_SATA_LED, /* SATA 1 presence */ |
126 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 126 | MPP14_SATA_LED, /* SATA 0 active */ |
127 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 127 | MPP15_SATA_LED, /* SATA 1 active */ |
128 | { 16, MPP_UNUSED }, | 128 | MPP16_UNUSED, |
129 | { 17, MPP_GPIO }, /* Reset button */ | 129 | MPP17_GPIO, /* Reset button */ |
130 | { 18, MPP_GPIO }, /* Power button */ | 130 | MPP18_GPIO, /* Power button */ |
131 | { 19, MPP_GPIO }, /* Power off */ | 131 | MPP19_GPIO, /* Power off */ |
132 | { -1 }, | 132 | 0, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static struct i2c_board_info __initdata mv2120_i2c_rtc = { | 135 | static struct i2c_board_info __initdata mv2120_i2c_rtc = { |
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index a5930f83958b..e43b39cc7fe9 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c | |||
@@ -339,28 +339,28 @@ static struct platform_device net2big_gpio_buttons = { | |||
339 | * General Setup | 339 | * General Setup |
340 | ****************************************************************************/ | 340 | ****************************************************************************/ |
341 | 341 | ||
342 | static struct orion5x_mpp_mode net2big_mpp_modes[] __initdata = { | 342 | static unsigned int net2big_mpp_modes[] __initdata = { |
343 | { 0, MPP_GPIO }, /* Raid mode (bit 0) */ | 343 | MPP0_GPIO, /* Raid mode (bit 0) */ |
344 | { 1, MPP_GPIO }, /* USB port 2 fuse (0 = Fail, 1 = Ok) */ | 344 | MPP1_GPIO, /* USB port 2 fuse (0 = Fail, 1 = Ok) */ |
345 | { 2, MPP_GPIO }, /* Raid mode (bit 1) */ | 345 | MPP2_GPIO, /* Raid mode (bit 1) */ |
346 | { 3, MPP_GPIO }, /* Board ID (bit 0) */ | 346 | MPP3_GPIO, /* Board ID (bit 0) */ |
347 | { 4, MPP_GPIO }, /* Fan activity (0 = Off, 1 = On) */ | 347 | MPP4_GPIO, /* Fan activity (0 = Off, 1 = On) */ |
348 | { 5, MPP_GPIO }, /* Fan fail detection */ | 348 | MPP5_GPIO, /* Fan fail detection */ |
349 | { 6, MPP_GPIO }, /* Red front LED (0 = Off, 1 = On) */ | 349 | MPP6_GPIO, /* Red front LED (0 = Off, 1 = On) */ |
350 | { 7, MPP_GPIO }, /* Disable initial blinking on front LED */ | 350 | MPP7_GPIO, /* Disable initial blinking on front LED */ |
351 | { 8, MPP_GPIO }, /* Rear power switch (on|auto) */ | 351 | MPP8_GPIO, /* Rear power switch (on|auto) */ |
352 | { 9, MPP_GPIO }, /* Rear power switch (auto|off) */ | 352 | MPP9_GPIO, /* Rear power switch (auto|off) */ |
353 | { 10, MPP_GPIO }, /* SATA 1 red LED (0 = Off, 1 = On) */ | 353 | MPP10_GPIO, /* SATA 1 red LED (0 = Off, 1 = On) */ |
354 | { 11, MPP_GPIO }, /* SATA 0 red LED (0 = Off, 1 = On) */ | 354 | MPP11_GPIO, /* SATA 0 red LED (0 = Off, 1 = On) */ |
355 | { 12, MPP_GPIO }, /* Board ID (bit 1) */ | 355 | MPP12_GPIO, /* Board ID (bit 1) */ |
356 | { 13, MPP_GPIO }, /* SATA 1 blue LED blink control */ | 356 | MPP13_GPIO, /* SATA 1 blue LED blink control */ |
357 | { 14, MPP_SATA_LED }, | 357 | MPP14_SATA_LED, |
358 | { 15, MPP_SATA_LED }, | 358 | MPP15_SATA_LED, |
359 | { 16, MPP_GPIO }, /* Blue front LED control */ | 359 | MPP16_GPIO, /* Blue front LED control */ |
360 | { 17, MPP_GPIO }, /* SATA 0 blue LED blink control */ | 360 | MPP17_GPIO, /* SATA 0 blue LED blink control */ |
361 | { 18, MPP_GPIO }, /* Front button (0 = Released, 1 = Pushed ) */ | 361 | MPP18_GPIO, /* Front button (0 = Released, 1 = Pushed ) */ |
362 | { 19, MPP_GPIO }, /* SATA{0,1} power On/Off request */ | 362 | MPP19_GPIO, /* SATA{0,1} power On/Off request */ |
363 | { -1 } | 363 | 0, |
364 | /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */ | 364 | /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */ |
365 | /* 23: SATA 0 power status */ | 365 | /* 23: SATA 0 power status */ |
366 | /* 24: Board power off */ | 366 | /* 24: Board power off */ |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 34310ab56e29..9eec7c2375e9 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -64,28 +64,28 @@ static struct platform_device rd88f5181l_fxo_nor_boot_flash = { | |||
64 | /***************************************************************************** | 64 | /***************************************************************************** |
65 | * General Setup | 65 | * General Setup |
66 | ****************************************************************************/ | 66 | ****************************************************************************/ |
67 | static struct orion5x_mpp_mode rd88f5181l_fxo_mpp_modes[] __initdata = { | 67 | static unsigned int rd88f5181l_fxo_mpp_modes[] __initdata = { |
68 | { 0, MPP_GPIO }, /* LED1 CardBus LED (front panel) */ | 68 | MPP0_GPIO, /* LED1 CardBus LED (front panel) */ |
69 | { 1, MPP_GPIO }, /* PCI_intA */ | 69 | MPP1_GPIO, /* PCI_intA */ |
70 | { 2, MPP_GPIO }, /* Hard Reset / Factory Init*/ | 70 | MPP2_GPIO, /* Hard Reset / Factory Init*/ |
71 | { 3, MPP_GPIO }, /* FXS or DAA select */ | 71 | MPP3_GPIO, /* FXS or DAA select */ |
72 | { 4, MPP_GPIO }, /* LED6 - phone LED (front panel) */ | 72 | MPP4_GPIO, /* LED6 - phone LED (front panel) */ |
73 | { 5, MPP_GPIO }, /* LED5 - phone LED (front panel) */ | 73 | MPP5_GPIO, /* LED5 - phone LED (front panel) */ |
74 | { 6, MPP_PCI_CLK }, /* CPU PCI refclk */ | 74 | MPP6_PCI_CLK, /* CPU PCI refclk */ |
75 | { 7, MPP_PCI_CLK }, /* PCI/PCIe refclk */ | 75 | MPP7_PCI_CLK, /* PCI/PCIe refclk */ |
76 | { 8, MPP_GPIO }, /* CardBus reset */ | 76 | MPP8_GPIO, /* CardBus reset */ |
77 | { 9, MPP_GPIO }, /* GE_RXERR */ | 77 | MPP9_GPIO, /* GE_RXERR */ |
78 | { 10, MPP_GPIO }, /* LED2 MiniPCI LED (front panel) */ | 78 | MPP10_GPIO, /* LED2 MiniPCI LED (front panel) */ |
79 | { 11, MPP_GPIO }, /* Lifeline control */ | 79 | MPP11_GPIO, /* Lifeline control */ |
80 | { 12, MPP_GIGE }, /* GE_TXD[4] */ | 80 | MPP12_GIGE, /* GE_TXD[4] */ |
81 | { 13, MPP_GIGE }, /* GE_TXD[5] */ | 81 | MPP13_GIGE, /* GE_TXD[5] */ |
82 | { 14, MPP_GIGE }, /* GE_TXD[6] */ | 82 | MPP14_GIGE, /* GE_TXD[6] */ |
83 | { 15, MPP_GIGE }, /* GE_TXD[7] */ | 83 | MPP15_GIGE, /* GE_TXD[7] */ |
84 | { 16, MPP_GIGE }, /* GE_RXD[4] */ | 84 | MPP16_GIGE, /* GE_RXD[4] */ |
85 | { 17, MPP_GIGE }, /* GE_RXD[5] */ | 85 | MPP17_GIGE, /* GE_RXD[5] */ |
86 | { 18, MPP_GIGE }, /* GE_RXD[6] */ | 86 | MPP18_GIGE, /* GE_RXD[6] */ |
87 | { 19, MPP_GIGE }, /* GE_RXD[7] */ | 87 | MPP19_GIGE, /* GE_RXD[7] */ |
88 | { -1 }, | 88 | 0, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = { | 91 | static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = { |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index c1f79fa014ed..0cc90bbfd326 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -65,28 +65,28 @@ static struct platform_device rd88f5181l_ge_nor_boot_flash = { | |||
65 | /***************************************************************************** | 65 | /***************************************************************************** |
66 | * General Setup | 66 | * General Setup |
67 | ****************************************************************************/ | 67 | ****************************************************************************/ |
68 | static struct orion5x_mpp_mode rd88f5181l_ge_mpp_modes[] __initdata = { | 68 | static unsigned int rd88f5181l_ge_mpp_modes[] __initdata = { |
69 | { 0, MPP_GPIO }, /* LED1 */ | 69 | MPP0_GPIO, /* LED1 */ |
70 | { 1, MPP_GPIO }, /* LED5 */ | 70 | MPP1_GPIO, /* LED5 */ |
71 | { 2, MPP_GPIO }, /* LED4 */ | 71 | MPP2_GPIO, /* LED4 */ |
72 | { 3, MPP_GPIO }, /* LED3 */ | 72 | MPP3_GPIO, /* LED3 */ |
73 | { 4, MPP_GPIO }, /* PCI_intA */ | 73 | MPP4_GPIO, /* PCI_intA */ |
74 | { 5, MPP_GPIO }, /* RTC interrupt */ | 74 | MPP5_GPIO, /* RTC interrupt */ |
75 | { 6, MPP_PCI_CLK }, /* CPU PCI refclk */ | 75 | MPP6_PCI_CLK, /* CPU PCI refclk */ |
76 | { 7, MPP_PCI_CLK }, /* PCI/PCIe refclk */ | 76 | MPP7_PCI_CLK, /* PCI/PCIe refclk */ |
77 | { 8, MPP_GPIO }, /* 88e6131 interrupt */ | 77 | MPP8_GPIO, /* 88e6131 interrupt */ |
78 | { 9, MPP_GPIO }, /* GE_RXERR */ | 78 | MPP9_GPIO, /* GE_RXERR */ |
79 | { 10, MPP_GPIO }, /* PCI_intB */ | 79 | MPP10_GPIO, /* PCI_intB */ |
80 | { 11, MPP_GPIO }, /* LED2 */ | 80 | MPP11_GPIO, /* LED2 */ |
81 | { 12, MPP_GIGE }, /* GE_TXD[4] */ | 81 | MPP12_GIGE, /* GE_TXD[4] */ |
82 | { 13, MPP_GIGE }, /* GE_TXD[5] */ | 82 | MPP13_GIGE, /* GE_TXD[5] */ |
83 | { 14, MPP_GIGE }, /* GE_TXD[6] */ | 83 | MPP14_GIGE, /* GE_TXD[6] */ |
84 | { 15, MPP_GIGE }, /* GE_TXD[7] */ | 84 | MPP15_GIGE, /* GE_TXD[7] */ |
85 | { 16, MPP_GIGE }, /* GE_RXD[4] */ | 85 | MPP16_GIGE, /* GE_RXD[4] */ |
86 | { 17, MPP_GIGE }, /* GE_RXD[5] */ | 86 | MPP17_GIGE, /* GE_RXD[5] */ |
87 | { 18, MPP_GIGE }, /* GE_RXD[6] */ | 87 | MPP18_GIGE, /* GE_RXD[6] */ |
88 | { 19, MPP_GIGE }, /* GE_RXD[7] */ | 88 | MPP19_GIGE, /* GE_RXD[7] */ |
89 | { -1 }, | 89 | 0, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = { | 92 | static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = { |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 4fc46772a087..48da39b9bdb0 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -241,28 +241,28 @@ static struct mv_sata_platform_data rd88f5182_sata_data = { | |||
241 | /***************************************************************************** | 241 | /***************************************************************************** |
242 | * General Setup | 242 | * General Setup |
243 | ****************************************************************************/ | 243 | ****************************************************************************/ |
244 | static struct orion5x_mpp_mode rd88f5182_mpp_modes[] __initdata = { | 244 | static unsigned int rd88f5182_mpp_modes[] __initdata = { |
245 | { 0, MPP_GPIO }, /* Debug Led */ | 245 | MPP0_GPIO, /* Debug Led */ |
246 | { 1, MPP_GPIO }, /* Reset Switch */ | 246 | MPP1_GPIO, /* Reset Switch */ |
247 | { 2, MPP_UNUSED }, | 247 | MPP2_UNUSED, |
248 | { 3, MPP_GPIO }, /* RTC Int */ | 248 | MPP3_GPIO, /* RTC Int */ |
249 | { 4, MPP_GPIO }, | 249 | MPP4_GPIO, |
250 | { 5, MPP_GPIO }, | 250 | MPP5_GPIO, |
251 | { 6, MPP_GPIO }, /* PCI_intA */ | 251 | MPP6_GPIO, /* PCI_intA */ |
252 | { 7, MPP_GPIO }, /* PCI_intB */ | 252 | MPP7_GPIO, /* PCI_intB */ |
253 | { 8, MPP_UNUSED }, | 253 | MPP8_UNUSED, |
254 | { 9, MPP_UNUSED }, | 254 | MPP9_UNUSED, |
255 | { 10, MPP_UNUSED }, | 255 | MPP10_UNUSED, |
256 | { 11, MPP_UNUSED }, | 256 | MPP11_UNUSED, |
257 | { 12, MPP_SATA_LED }, /* SATA 0 presence */ | 257 | MPP12_SATA_LED, /* SATA 0 presence */ |
258 | { 13, MPP_SATA_LED }, /* SATA 1 presence */ | 258 | MPP13_SATA_LED, /* SATA 1 presence */ |
259 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 259 | MPP14_SATA_LED, /* SATA 0 active */ |
260 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 260 | MPP15_SATA_LED, /* SATA 1 active */ |
261 | { 16, MPP_UNUSED }, | 261 | MPP16_UNUSED, |
262 | { 17, MPP_UNUSED }, | 262 | MPP17_UNUSED, |
263 | { 18, MPP_UNUSED }, | 263 | MPP18_UNUSED, |
264 | { 19, MPP_UNUSED }, | 264 | MPP19_UNUSED, |
265 | { -1 }, | 265 | 0, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static void __init rd88f5182_init(void) | 268 | static void __init rd88f5182_init(void) |
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index b080c6966d10..ad2eba9286ad 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mach/pci.h> | 27 | #include <asm/mach/pci.h> |
28 | #include <mach/orion5x.h> | 28 | #include <mach/orion5x.h> |
29 | #include "common.h" | 29 | #include "common.h" |
30 | #include "mpp.h" | ||
31 | 30 | ||
32 | static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { | 31 | static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { |
33 | .phy_addr = -1, | 32 | .phy_addr = -1, |
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 616004143912..29ce826c3c21 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -295,28 +295,28 @@ static void tsp2_power_off(void) | |||
295 | /***************************************************************************** | 295 | /***************************************************************************** |
296 | * General Setup | 296 | * General Setup |
297 | ****************************************************************************/ | 297 | ****************************************************************************/ |
298 | static struct orion5x_mpp_mode tsp2_mpp_modes[] __initdata = { | 298 | static unsigned int tsp2_mpp_modes[] __initdata = { |
299 | { 0, MPP_PCIE_RST_OUTn }, | 299 | MPP0_PCIE_RST_OUTn, |
300 | { 1, MPP_UNUSED }, | 300 | MPP1_UNUSED, |
301 | { 2, MPP_UNUSED }, | 301 | MPP2_UNUSED, |
302 | { 3, MPP_UNUSED }, | 302 | MPP3_UNUSED, |
303 | { 4, MPP_NAND }, /* BOOT NAND Flash REn */ | 303 | MPP4_NAND, /* BOOT NAND Flash REn */ |
304 | { 5, MPP_NAND }, /* BOOT NAND Flash WEn */ | 304 | MPP5_NAND, /* BOOT NAND Flash WEn */ |
305 | { 6, MPP_NAND }, /* BOOT NAND Flash HREn[0] */ | 305 | MPP6_NAND, /* BOOT NAND Flash HREn[0] */ |
306 | { 7, MPP_NAND }, /* BOOT NAND Flash WEn[0] */ | 306 | MPP7_NAND, /* BOOT NAND Flash WEn[0] */ |
307 | { 8, MPP_GPIO }, /* MICON int */ | 307 | MPP8_GPIO, /* MICON int */ |
308 | { 9, MPP_GPIO }, /* RTC int */ | 308 | MPP9_GPIO, /* RTC int */ |
309 | { 10, MPP_UNUSED }, | 309 | MPP10_UNUSED, |
310 | { 11, MPP_GPIO }, /* PCI Int A */ | 310 | MPP11_GPIO, /* PCI Int A */ |
311 | { 12, MPP_UNUSED }, | 311 | MPP12_UNUSED, |
312 | { 13, MPP_GPIO }, /* UPS on UART0 enable */ | 312 | MPP13_GPIO, /* UPS on UART0 enable */ |
313 | { 14, MPP_GPIO }, /* UPS low battery detection */ | 313 | MPP14_GPIO, /* UPS low battery detection */ |
314 | { 15, MPP_UNUSED }, | 314 | MPP15_UNUSED, |
315 | { 16, MPP_UART }, /* UART1 RXD */ | 315 | MPP16_UART, /* UART1 RXD */ |
316 | { 17, MPP_UART }, /* UART1 TXD */ | 316 | MPP17_UART, /* UART1 TXD */ |
317 | { 18, MPP_UART }, /* UART1 CTSn */ | 317 | MPP18_UART, /* UART1 CTSn */ |
318 | { 19, MPP_UART }, /* UART1 RTSn */ | 318 | MPP19_UART, /* UART1 RTSn */ |
319 | { -1 }, | 319 | 0, |
320 | }; | 320 | }; |
321 | 321 | ||
322 | static void __init tsp2_init(void) | 322 | static void __init tsp2_init(void) |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index e6d64494d3de..47162fd5f044 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -244,28 +244,28 @@ static struct mv_sata_platform_data qnap_ts209_sata_data = { | |||
244 | 244 | ||
245 | * General Setup | 245 | * General Setup |
246 | ****************************************************************************/ | 246 | ****************************************************************************/ |
247 | static struct orion5x_mpp_mode ts209_mpp_modes[] __initdata = { | 247 | static unsigned int ts209_mpp_modes[] __initdata = { |
248 | { 0, MPP_UNUSED }, | 248 | MPP0_UNUSED, |
249 | { 1, MPP_GPIO }, /* USB copy button */ | 249 | MPP1_GPIO, /* USB copy button */ |
250 | { 2, MPP_GPIO }, /* Load defaults button */ | 250 | MPP2_GPIO, /* Load defaults button */ |
251 | { 3, MPP_GPIO }, /* GPIO RTC */ | 251 | MPP3_GPIO, /* GPIO RTC */ |
252 | { 4, MPP_UNUSED }, | 252 | MPP4_UNUSED, |
253 | { 5, MPP_UNUSED }, | 253 | MPP5_UNUSED, |
254 | { 6, MPP_GPIO }, /* PCI Int A */ | 254 | MPP6_GPIO, /* PCI Int A */ |
255 | { 7, MPP_GPIO }, /* PCI Int B */ | 255 | MPP7_GPIO, /* PCI Int B */ |
256 | { 8, MPP_UNUSED }, | 256 | MPP8_UNUSED, |
257 | { 9, MPP_UNUSED }, | 257 | MPP9_UNUSED, |
258 | { 10, MPP_UNUSED }, | 258 | MPP10_UNUSED, |
259 | { 11, MPP_UNUSED }, | 259 | MPP11_UNUSED, |
260 | { 12, MPP_SATA_LED }, /* SATA 0 presence */ | 260 | MPP12_SATA_LED, /* SATA 0 presence */ |
261 | { 13, MPP_SATA_LED }, /* SATA 1 presence */ | 261 | MPP13_SATA_LED, /* SATA 1 presence */ |
262 | { 14, MPP_SATA_LED }, /* SATA 0 active */ | 262 | MPP14_SATA_LED, /* SATA 0 active */ |
263 | { 15, MPP_SATA_LED }, /* SATA 1 active */ | 263 | MPP15_SATA_LED, /* SATA 1 active */ |
264 | { 16, MPP_UART }, /* UART1 RXD */ | 264 | MPP16_UART, /* UART1 RXD */ |
265 | { 17, MPP_UART }, /* UART1 TXD */ | 265 | MPP17_UART, /* UART1 TXD */ |
266 | { 18, MPP_GPIO }, /* SW_RST */ | 266 | MPP18_GPIO, /* SW_RST */ |
267 | { 19, MPP_UNUSED }, | 267 | MPP19_UNUSED, |
268 | { -1 }, | 268 | 0, |
269 | }; | 269 | }; |
270 | 270 | ||
271 | static void __init qnap_ts209_init(void) | 271 | static void __init qnap_ts209_init(void) |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 9eac8192d923..5aacc7ac5cf4 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -242,28 +242,28 @@ static struct platform_device qnap_ts409_button_device = { | |||
242 | /***************************************************************************** | 242 | /***************************************************************************** |
243 | * General Setup | 243 | * General Setup |
244 | ****************************************************************************/ | 244 | ****************************************************************************/ |
245 | static struct orion5x_mpp_mode ts409_mpp_modes[] __initdata = { | 245 | static unsigned int ts409_mpp_modes[] __initdata = { |
246 | { 0, MPP_UNUSED }, | 246 | MPP0_UNUSED, |
247 | { 1, MPP_UNUSED }, | 247 | MPP1_UNUSED, |
248 | { 2, MPP_UNUSED }, | 248 | MPP2_UNUSED, |
249 | { 3, MPP_UNUSED }, | 249 | MPP3_UNUSED, |
250 | { 4, MPP_GPIO }, /* HDD 1 status */ | 250 | MPP4_GPIO, /* HDD 1 status */ |
251 | { 5, MPP_GPIO }, /* HDD 2 status */ | 251 | MPP5_GPIO, /* HDD 2 status */ |
252 | { 6, MPP_GPIO }, /* HDD 3 status */ | 252 | MPP6_GPIO, /* HDD 3 status */ |
253 | { 7, MPP_GPIO }, /* HDD 4 status */ | 253 | MPP7_GPIO, /* HDD 4 status */ |
254 | { 8, MPP_UNUSED }, | 254 | MPP8_UNUSED, |
255 | { 9, MPP_UNUSED }, | 255 | MPP9_UNUSED, |
256 | { 10, MPP_GPIO }, /* RTC int */ | 256 | MPP10_GPIO, /* RTC int */ |
257 | { 11, MPP_UNUSED }, | 257 | MPP11_UNUSED, |
258 | { 12, MPP_UNUSED }, | 258 | MPP12_UNUSED, |
259 | { 13, MPP_UNUSED }, | 259 | MPP13_UNUSED, |
260 | { 14, MPP_GPIO }, /* SW_RST */ | 260 | MPP14_GPIO, /* SW_RST */ |
261 | { 15, MPP_GPIO }, /* USB copy button */ | 261 | MPP15_GPIO, /* USB copy button */ |
262 | { 16, MPP_UART }, /* UART1 RXD */ | 262 | MPP16_UART, /* UART1 RXD */ |
263 | { 17, MPP_UART }, /* UART1 TXD */ | 263 | MPP17_UART, /* UART1 TXD */ |
264 | { 18, MPP_UNUSED }, | 264 | MPP18_UNUSED, |
265 | { 19, MPP_UNUSED }, | 265 | MPP19_UNUSED, |
266 | { -1 }, | 266 | 0, |
267 | }; | 267 | }; |
268 | 268 | ||
269 | static void __init qnap_ts409_init(void) | 269 | static void __init qnap_ts409_init(void) |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index edb1dd2d1611..6b7b54116f30 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -557,27 +557,27 @@ static struct kobj_attribute ts78xx_fpga_attr = | |||
557 | /***************************************************************************** | 557 | /***************************************************************************** |
558 | * General Setup | 558 | * General Setup |
559 | ****************************************************************************/ | 559 | ****************************************************************************/ |
560 | static struct orion5x_mpp_mode ts78xx_mpp_modes[] __initdata = { | 560 | static unsigned int ts78xx_mpp_modes[] __initdata = { |
561 | { 0, MPP_UNUSED }, | 561 | MPP0_UNUSED, |
562 | { 1, MPP_GPIO }, /* JTAG Clock */ | 562 | MPP1_GPIO, /* JTAG Clock */ |
563 | { 2, MPP_GPIO }, /* JTAG Data In */ | 563 | MPP2_GPIO, /* JTAG Data In */ |
564 | { 3, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB2B */ | 564 | MPP3_GPIO, /* Lat ECP2 256 FPGA - PB2B */ |
565 | { 4, MPP_GPIO }, /* JTAG Data Out */ | 565 | MPP4_GPIO, /* JTAG Data Out */ |
566 | { 5, MPP_GPIO }, /* JTAG TMS */ | 566 | MPP5_GPIO, /* JTAG TMS */ |
567 | { 6, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */ | 567 | MPP6_GPIO, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */ |
568 | { 7, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB22B */ | 568 | MPP7_GPIO, /* Lat ECP2 256 FPGA - PB22B */ |
569 | { 8, MPP_UNUSED }, | 569 | MPP8_UNUSED, |
570 | { 9, MPP_UNUSED }, | 570 | MPP9_UNUSED, |
571 | { 10, MPP_UNUSED }, | 571 | MPP10_UNUSED, |
572 | { 11, MPP_UNUSED }, | 572 | MPP11_UNUSED, |
573 | { 12, MPP_UNUSED }, | 573 | MPP12_UNUSED, |
574 | { 13, MPP_UNUSED }, | 574 | MPP13_UNUSED, |
575 | { 14, MPP_UNUSED }, | 575 | MPP14_UNUSED, |
576 | { 15, MPP_UNUSED }, | 576 | MPP15_UNUSED, |
577 | { 16, MPP_UART }, | 577 | MPP16_UART, |
578 | { 17, MPP_UART }, | 578 | MPP17_UART, |
579 | { 18, MPP_UART }, | 579 | MPP18_UART, |
580 | { 19, MPP_UART }, | 580 | MPP19_UART, |
581 | /* | 581 | /* |
582 | * MPP[20] PCI Clock Out 1 | 582 | * MPP[20] PCI Clock Out 1 |
583 | * MPP[21] PCI Clock Out 0 | 583 | * MPP[21] PCI Clock Out 0 |
@@ -586,7 +586,7 @@ static struct orion5x_mpp_mode ts78xx_mpp_modes[] __initdata = { | |||
586 | * MPP[24] Unused | 586 | * MPP[24] Unused |
587 | * MPP[25] Unused | 587 | * MPP[25] Unused |
588 | */ | 588 | */ |
589 | { -1 }, | 589 | 0, |
590 | }; | 590 | }; |
591 | 591 | ||
592 | static void __init ts78xx_init(void) | 592 | static void __init ts78xx_init(void) |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 4e5216be0745..444a1c7fdfd6 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -24,28 +24,28 @@ | |||
24 | #include "common.h" | 24 | #include "common.h" |
25 | #include "mpp.h" | 25 | #include "mpp.h" |
26 | 26 | ||
27 | static struct orion5x_mpp_mode wnr854t_mpp_modes[] __initdata = { | 27 | static unsigned int wnr854t_mpp_modes[] __initdata = { |
28 | { 0, MPP_GPIO }, /* Power LED green (0=on) */ | 28 | MPP0_GPIO, /* Power LED green (0=on) */ |
29 | { 1, MPP_GPIO }, /* Reset Button (0=off) */ | 29 | MPP1_GPIO, /* Reset Button (0=off) */ |
30 | { 2, MPP_GPIO }, /* Power LED blink (0=off) */ | 30 | MPP2_GPIO, /* Power LED blink (0=off) */ |
31 | { 3, MPP_GPIO }, /* WAN Status LED amber (0=off) */ | 31 | MPP3_GPIO, /* WAN Status LED amber (0=off) */ |
32 | { 4, MPP_GPIO }, /* PCI int */ | 32 | MPP4_GPIO, /* PCI int */ |
33 | { 5, MPP_GPIO }, /* ??? */ | 33 | MPP5_GPIO, /* ??? */ |
34 | { 6, MPP_GPIO }, /* ??? */ | 34 | MPP6_GPIO, /* ??? */ |
35 | { 7, MPP_GPIO }, /* ??? */ | 35 | MPP7_GPIO, /* ??? */ |
36 | { 8, MPP_UNUSED }, /* ??? */ | 36 | MPP8_UNUSED, /* ??? */ |
37 | { 9, MPP_GIGE }, /* GE_RXERR */ | 37 | MPP9_GIGE, /* GE_RXERR */ |
38 | { 10, MPP_UNUSED }, /* ??? */ | 38 | MPP10_UNUSED, /* ??? */ |
39 | { 11, MPP_UNUSED }, /* ??? */ | 39 | MPP11_UNUSED, /* ??? */ |
40 | { 12, MPP_GIGE }, /* GE_TXD[4] */ | 40 | MPP12_GIGE, /* GE_TXD[4] */ |
41 | { 13, MPP_GIGE }, /* GE_TXD[5] */ | 41 | MPP13_GIGE, /* GE_TXD[5] */ |
42 | { 14, MPP_GIGE }, /* GE_TXD[6] */ | 42 | MPP14_GIGE, /* GE_TXD[6] */ |
43 | { 15, MPP_GIGE }, /* GE_TXD[7] */ | 43 | MPP15_GIGE, /* GE_TXD[7] */ |
44 | { 16, MPP_GIGE }, /* GE_RXD[4] */ | 44 | MPP16_GIGE, /* GE_RXD[4] */ |
45 | { 17, MPP_GIGE }, /* GE_RXD[5] */ | 45 | MPP17_GIGE, /* GE_RXD[5] */ |
46 | { 18, MPP_GIGE }, /* GE_RXD[6] */ | 46 | MPP18_GIGE, /* GE_RXD[6] */ |
47 | { 19, MPP_GIGE }, /* GE_RXD[7] */ | 47 | MPP19_GIGE, /* GE_RXD[7] */ |
48 | { -1 }, | 48 | 0, |
49 | }; | 49 | }; |
50 | 50 | ||
51 | /* | 51 | /* |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index fab79d09cc5c..d1952be0ae1c 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -101,28 +101,28 @@ static struct platform_device wrt350n_v2_button_device = { | |||
101 | /* | 101 | /* |
102 | * General setup | 102 | * General setup |
103 | */ | 103 | */ |
104 | static struct orion5x_mpp_mode wrt350n_v2_mpp_modes[] __initdata = { | 104 | static unsigned int wrt350n_v2_mpp_modes[] __initdata = { |
105 | { 0, MPP_GPIO }, /* Power LED green (0=on) */ | 105 | MPP0_GPIO, /* Power LED green (0=on) */ |
106 | { 1, MPP_GPIO }, /* Security LED (0=on) */ | 106 | MPP1_GPIO, /* Security LED (0=on) */ |
107 | { 2, MPP_GPIO }, /* Internal Button (0=on) */ | 107 | MPP2_GPIO, /* Internal Button (0=on) */ |
108 | { 3, MPP_GPIO }, /* Reset Button (0=on) */ | 108 | MPP3_GPIO, /* Reset Button (0=on) */ |
109 | { 4, MPP_GPIO }, /* PCI int */ | 109 | MPP4_GPIO, /* PCI int */ |
110 | { 5, MPP_GPIO }, /* Power LED orange (0=on) */ | 110 | MPP5_GPIO, /* Power LED orange (0=on) */ |
111 | { 6, MPP_GPIO }, /* USB LED (0=on) */ | 111 | MPP6_GPIO, /* USB LED (0=on) */ |
112 | { 7, MPP_GPIO }, /* Wireless LED (0=on) */ | 112 | MPP7_GPIO, /* Wireless LED (0=on) */ |
113 | { 8, MPP_UNUSED }, /* ??? */ | 113 | MPP8_UNUSED, /* ??? */ |
114 | { 9, MPP_GIGE }, /* GE_RXERR */ | 114 | MPP9_GIGE, /* GE_RXERR */ |
115 | { 10, MPP_UNUSED }, /* ??? */ | 115 | MPP10_UNUSED, /* ??? */ |
116 | { 11, MPP_UNUSED }, /* ??? */ | 116 | MPP11_UNUSED, /* ??? */ |
117 | { 12, MPP_GIGE }, /* GE_TXD[4] */ | 117 | MPP12_GIGE, /* GE_TXD[4] */ |
118 | { 13, MPP_GIGE }, /* GE_TXD[5] */ | 118 | MPP13_GIGE, /* GE_TXD[5] */ |
119 | { 14, MPP_GIGE }, /* GE_TXD[6] */ | 119 | MPP14_GIGE, /* GE_TXD[6] */ |
120 | { 15, MPP_GIGE }, /* GE_TXD[7] */ | 120 | MPP15_GIGE, /* GE_TXD[7] */ |
121 | { 16, MPP_GIGE }, /* GE_RXD[4] */ | 121 | MPP16_GIGE, /* GE_RXD[4] */ |
122 | { 17, MPP_GIGE }, /* GE_RXD[5] */ | 122 | MPP17_GIGE, /* GE_RXD[5] */ |
123 | { 18, MPP_GIGE }, /* GE_RXD[6] */ | 123 | MPP18_GIGE, /* GE_RXD[6] */ |
124 | { 19, MPP_GIGE }, /* GE_RXD[7] */ | 124 | MPP19_GIGE, /* GE_RXD[7] */ |
125 | { -1 }, | 125 | 0, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | /* | 128 | /* |