[ep93xx] package more board specific modules:
[openwrt.git] / target / linux / lantiq / patches-3.0 / 450-mach-arv45xx.patch
1 --- a/arch/mips/lantiq/xway/Kconfig
2 +++ b/arch/mips/lantiq/xway/Kconfig
3 @@ -6,6 +6,10 @@
4 bool "Easy50712 - Danube"
5 default y
6
7 +config LANTIQ_MACH_ARV45XX
8 + bool "ARV45XX"
9 + default y
10 +
11 endmenu
12
13 endif
14 --- a/arch/mips/lantiq/xway/Makefile
15 +++ b/arch/mips/lantiq/xway/Makefile
16 @@ -5,3 +5,4 @@
17
18 obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
19 obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
20 +obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
21 --- /dev/null
22 +++ b/arch/mips/lantiq/xway/mach-arv45xx.c
23 @@ -0,0 +1,495 @@
24 +/*
25 + * This program is free software; you can redistribute it and/or modify it
26 + * under the terms of the GNU General Public License version 2 as published
27 + * by the Free Software Foundation.
28 + *
29 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
30 + */
31 +
32 +#include <linux/init.h>
33 +#include <linux/platform_device.h>
34 +#include <linux/leds.h>
35 +#include <linux/gpio.h>
36 +#include <linux/gpio_buttons.h>
37 +#include <linux/mtd/mtd.h>
38 +#include <linux/mtd/partitions.h>
39 +#include <linux/mtd/physmap.h>
40 +#include <linux/input.h>
41 +#include <linux/etherdevice.h>
42 +#include <linux/ath5k_platform.h>
43 +#include <linux/pci.h>
44 +
45 +#include <lantiq_soc.h>
46 +#include <lantiq_platform.h>
47 +
48 +#include "../machtypes.h"
49 +#include "devices.h"
50 +#include "dev-leds-gpio.h"
51 +#include "dev-dwc_otg.h"
52 +
53 +static struct mtd_partition arv4510_partitions[] =
54 +{
55 + {
56 + .name = "uboot",
57 + .offset = 0x0,
58 + .size = 0x20000,
59 + },
60 + {
61 + .name = "uboot_env",
62 + .offset = 0x20000,
63 + .size = 0x120000,
64 + },
65 + {
66 + .name = "linux",
67 + .offset = 0x40000,
68 + .size = 0xfa0000,
69 + },
70 + {
71 + .name = "board_config",
72 + .offset = 0xfe0000,
73 + .size = 0x20000,
74 + },
75 +};
76 +
77 +static struct mtd_partition arv45xx_partitions[] =
78 +{
79 + {
80 + .name = "uboot",
81 + .offset = 0x0,
82 + .size = 0x20000,
83 + },
84 + {
85 + .name = "uboot_env",
86 + .offset = 0x20000,
87 + .size = 0x10000,
88 + },
89 + {
90 + .name = "linux",
91 + .offset = 0x30000,
92 + .size = 0x3c0000,
93 + },
94 + {
95 + .name = "board_config",
96 + .offset = 0x3f0000,
97 + .size = 0x10000,
98 + },
99 +};
100 +
101 +static struct mtd_partition arv75xx_partitions[] =
102 +{
103 + {
104 + .name = "uboot",
105 + .offset = 0x0,
106 + .size = 0x10000,
107 + },
108 + {
109 + .name = "uboot_env",
110 + .offset = 0x10000,
111 + .size = 0x10000,
112 + },
113 + {
114 + .name = "linux",
115 + .offset = 0x20000,
116 + .size = 0x7d0000,
117 + },
118 + {
119 + .name = "board_config",
120 + .offset = 0x7f0000,
121 + .size = 0x10000,
122 + },
123 +};
124 +
125 +static struct physmap_flash_data arv4510_flash_data = {
126 + .nr_parts = ARRAY_SIZE(arv4510_partitions),
127 + .parts = arv4510_partitions,
128 +};
129 +
130 +static struct physmap_flash_data arv45xx_flash_data = {
131 + .nr_parts = ARRAY_SIZE(arv45xx_partitions),
132 + .parts = arv45xx_partitions,
133 +};
134 +
135 +static struct physmap_flash_data arv75xx_flash_data = {
136 + .nr_parts = ARRAY_SIZE(arv75xx_partitions),
137 + .parts = arv75xx_partitions,
138 +};
139 +
140 +static struct ltq_pci_data ltq_pci_data = {
141 + .clock = PCI_CLOCK_EXT,
142 + .gpio = PCI_GNT1 | PCI_REQ1,
143 + .irq = {
144 + [14] = INT_NUM_IM0_IRL0 + 22,
145 + },
146 +};
147 +
148 +static struct ltq_eth_data ltq_eth_data = {
149 + .mii_mode = PHY_INTERFACE_MODE_RMII,
150 +};
151 +
152 +static struct gpio_led
153 +arv4510pw_leds_gpio[] __initdata = {
154 + { .name = "soc:green:foo", .gpio = 4, .active_low = 1, },
155 +};
156 +
157 +static struct gpio_led
158 +arv4518pw_leds_gpio[] __initdata = {
159 + { .name = "soc:green:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
160 + { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
161 + { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
162 + { .name = "soc:green:wlan", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
163 + { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
164 + { .name = "soc:red:fail", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
165 + { .name = "soc:green:usb", .gpio = 19, .active_low = 1, .default_trigger = "default-on" },
166 + { .name = "soc:green:voip", .gpio = 72, .active_low = 1, .default_trigger = "default-on" },
167 + { .name = "soc:green:fxs1", .gpio = 73, .active_low = 1, .default_trigger = "default-on" },
168 + { .name = "soc:green:fxs2", .gpio = 74, .active_low = 1, .default_trigger = "default-on" },
169 + { .name = "soc:green:fxo", .gpio = 75, .active_low = 1, .default_trigger = "default-on" },
170 +};
171 +
172 +static struct gpio_button
173 +arv4518pw_gpio_buttons[] __initdata = {
174 + { .desc = "wlan", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 28, .active_low = 1, },
175 + { .desc = "wps", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 29, .active_low = 1, },
176 + { .desc = "reset", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 30, .active_low = 1, },
177 +};
178 +
179 +static struct gpio_led
180 +arv4520pw_leds_gpio[] __initdata = {
181 + { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
182 + { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
183 + { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
184 + { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
185 + { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, },
186 + { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
187 + { .name = "soc:blue:voip", .gpio = 72, .active_low = 1, },
188 + { .name = "soc:blue:fxs1", .gpio = 73, .active_low = 1, },
189 + { .name = "soc:blue:fxs2", .gpio = 74, .active_low = 1, },
190 + { .name = "soc:blue:fxo", .gpio = 75, .active_low = 1, },
191 + { .name = "soc:blue:voice", .gpio = 76, .active_low = 1, },
192 + { .name = "soc:blue:usb", .gpio = 77, .active_low = 1, },
193 + { .name = "soc:blue:wlan", .gpio = 78, .active_low = 1, },
194 +};
195 +
196 +static struct gpio_led
197 +arv452cpw_leds_gpio[] __initdata = {
198 + { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
199 + { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
200 + { .name = "soc:blue:isdn", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
201 + { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
202 + { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
203 + { .name = "soc:red:wps", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
204 + { .name = "soc:blue:fxs1", .gpio = 72, .active_low = 1, .default_trigger = "default-on" },
205 + { .name = "soc:blue:fxs2", .gpio = 73, .active_low = 1, .default_trigger = "default-on" },
206 + { .name = "soc:blue:wps", .gpio = 74, .active_low = 1, .default_trigger = "default-on" },
207 + { .name = "soc:blue:fxo", .gpio = 75, .active_low = 1, .default_trigger = "default-on" },
208 + { .name = "soc:blue:voice", .gpio = 76, .active_low = 1, .default_trigger = "default-on" },
209 + { .name = "soc:blue:usb", .gpio = 77, .active_low = 1, .default_trigger = "default-on" },
210 + { .name = "soc:blue:wlan", .gpio = 78, .active_low = 1, .default_trigger = "default-on" },
211 + { .name = "soc:blue:internet", .gpio = 80, .active_low = 1, .default_trigger = "default-on" },
212 + { .name = "soc:red:internet", .gpio = 81, .active_low = 1, .default_trigger = "default-on" },
213 +};
214 +
215 +static struct gpio_led
216 +arv4525pw_leds_gpio[] __initdata = {
217 + { .name = "soc:green:festnetz", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
218 + { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
219 + { .name = "soc:green:dsl", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
220 + { .name = "soc:green:wlan", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
221 + { .name = "soc:green:online", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
222 +};
223 +
224 +static struct gpio_led
225 +arv752dpw22_leds_gpio[] __initdata = {
226 + { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
227 + { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
228 + { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
229 + { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
230 + { .name = "soc:red:fxo", .gpio = 75, .active_low = 1, .default_trigger = "default-on" },
231 + { .name = "soc:red:voice", .gpio = 76, .active_low = 1, .default_trigger = "default-on" },
232 + { .name = "soc:green:usb", .gpio = 77, .active_low = 1, .default_trigger = "default-on" },
233 + { .name = "soc:green:wlan", .gpio = 78, .active_low = 1, .default_trigger = "default-on" },
234 + { .name = "soc:green:wlan1", .gpio = 79, .active_low = 1, .default_trigger = "default-on" },
235 + { .name = "soc:blue:wlan", .gpio = 80, .active_low = 1, .default_trigger = "default-on" },
236 + { .name = "soc:blue:wlan1", .gpio = 81, .active_low = 1, .default_trigger = "default-on" },
237 + { .name = "soc:green:eth1", .gpio = 83, .active_low = 1, .default_trigger = "default-on" },
238 + { .name = "soc:green:eth2", .gpio = 84, .active_low = 1, .default_trigger = "default-on" },
239 + { .name = "soc:green:eth3", .gpio = 85, .active_low = 1, .default_trigger = "default-on" },
240 + { .name = "soc:green:eth4", .gpio = 86, .active_low = 1, .default_trigger = "default-on", },
241 +};
242 +
243 +static struct gpio_button
244 +arv752dpw22_gpio_buttons[] __initdata = {
245 + { .desc = "btn0", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 12, .active_low = 1, },
246 + { .desc = "btn1", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 13, .active_low = 1, },
247 + { .desc = "btn2", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 28, .active_low = 1, },
248 +};
249 +
250 +static struct gpio_led
251 +arv7518pw_leds_gpio[] __initdata = {
252 + { .name = "soc:green:power", .gpio = 2, .active_low = 1, },
253 + { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
254 + { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
255 + { .name = "soc:green:wlan", .gpio = 6, .active_low = 1, },
256 + { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
257 + { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
258 +};
259 +
260 +static struct gpio_button
261 +arv7518pw_gpio_buttons[] __initdata = {
262 + { .desc = "reset", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 23, .active_low = 1, },
263 + { .desc = "wlan", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 25, .active_low = 1, },
264 +};
265 +
266 +static void
267 +arv45xx_register_ethernet(void)
268 +{
269 +#define ARV45XX_BRN_MAC 0x3f0016
270 + memcpy_fromio(&ltq_eth_data.mac.sa_data,
271 + (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
272 + ltq_register_etop(&ltq_eth_data);
273 +}
274 +
275 +static void
276 +arv75xx_register_ethernet(void)
277 +{
278 +#define ARV75XX_BRN_MAC 0x7f0016
279 + memcpy_fromio(&ltq_eth_data.mac.sa_data,
280 + (void *)KSEG1ADDR(LTQ_FLASH_START + ARV75XX_BRN_MAC), 6);
281 + ltq_register_etop(&ltq_eth_data);
282 +}
283 +
284 +static void
285 +bewan_register_ethernet(void)
286 +{
287 +#define BEWAN_BRN_MAC 0x3f0014
288 + memcpy_fromio(&ltq_eth_data.mac.sa_data,
289 + (void *)KSEG1ADDR(LTQ_FLASH_START + BEWAN_BRN_MAC), 6);
290 + ltq_register_etop(&ltq_eth_data);
291 +}
292 +
293 +static u16 arv45xx_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
294 +static struct ath5k_platform_data arv45xx_ath5k_platform_data;
295 +
296 +/*static int arv45xx_pci_plat_dev_init(struct pci_dev *dev)
297 +{
298 + dev->dev.platform_data = &arv45xx_ath5k_platform_data;
299 + return 0;
300 +}
301 +*/
302 +void __init
303 +arv45xx_register_ath5k(void)
304 +{
305 +#define ARV45XX_BRN_ATH 0x3f0478
306 + int i;
307 + unsigned char eeprom_mac[6];
308 + static u16 eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
309 + u32 *p = (u32*)arv45xx_ath5k_eeprom_data;
310 +
311 + memcpy_fromio(eeprom_mac,
312 + (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
313 + eeprom_mac[5]++;
314 + memcpy_fromio(arv45xx_ath5k_eeprom_data,
315 + (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_ATH), ATH5K_PLAT_EEP_MAX_WORDS);
316 + // swap eeprom bytes
317 + for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS>>1; i++){
318 + //arv4518_ath5k_eeprom_data[i] = ((eeprom_data[i]&0xff)<<8)|((eeprom_data[i]&0xff00)>>8);
319 + p[i] = ((eeprom_data[(i<<1)+1]&0xff)<<24)|((eeprom_data[(i<<1)+1]&0xff00)<<8)|((eeprom_data[i<<1]&0xff)<<8)|((eeprom_data[i<<1]&0xff00)>>8);
320 + if (i == 0xbf>>1){
321 + // printk ("regdomain: 0x%x --> 0x%x\n", p[i], (p[i] & 0xffff0000)|0x67);
322 + /* regdomain is invalid?? how did original fw convert
323 + * value to 0x82d4 ??
324 + * for now, force to 0x67 */
325 + p[i] &= 0xffff0000;
326 + p[i] |= 0x67;
327 + }
328 + }
329 + arv45xx_ath5k_platform_data.eeprom_data = arv45xx_ath5k_eeprom_data;
330 + arv45xx_ath5k_platform_data.macaddr = eeprom_mac;
331 + //lqpci_plat_dev_init = arv45xx_pci_plat_dev_init;
332 +}
333 +
334 +static void __init
335 +arv3527p_init(void)
336 +{
337 + ltq_register_gpio_stp();
338 + //ltq_add_device_leds_gpio(arv3527p_leds_gpio, ARRAY_SIZE(arv3527p_leds_gpio));
339 + ltq_register_nor(&arv45xx_flash_data);
340 + arv45xx_register_ethernet();
341 +}
342 +
343 +MIPS_MACHINE(LANTIQ_MACH_ARV3527P,
344 + "ARV3527P",
345 + "ARV3527P - Arcor Easybox 401",
346 + arv3527p_init);
347 +
348 +static void __init
349 +arv4510pw_init(void)
350 +{
351 + ltq_register_gpio_stp();
352 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4510pw_leds_gpio), arv4510pw_leds_gpio);
353 + ltq_register_nor(&arv4510_flash_data);
354 + ltq_pci_data.irq[12] = (INT_NUM_IM2_IRL0 + 31);
355 + ltq_pci_data.irq[15] = (INT_NUM_IM0_IRL0 + 26);
356 + ltq_pci_data.gpio |= PCI_EXIN2 | PCI_REQ2;
357 + ltq_register_pci(&ltq_pci_data);
358 + bewan_register_ethernet();
359 +}
360 +
361 +MIPS_MACHINE(LANTIQ_MACH_ARV4510PW,
362 + "ARV4510PW",
363 + "ARV4510PW - Wippies Homebox",
364 + arv4510pw_init);
365 +
366 +static void __init
367 +arv4518pw_init(void)
368 +{
369 +#define ARV4518PW_EBU 0
370 +#define ARV4518PW_USB 14
371 +#define ARV4518PW_SWITCH_RESET 13
372 +
373 + ltq_register_gpio_ebu(ARV4518PW_EBU);
374 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4518pw_leds_gpio), arv4518pw_leds_gpio);
375 + ltq_register_gpio_buttons(arv4518pw_gpio_buttons, ARRAY_SIZE(arv4518pw_gpio_buttons));
376 + ltq_register_nor(&arv45xx_flash_data);
377 + ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ2;
378 + ltq_register_pci(&ltq_pci_data);
379 + ltq_register_madwifi_eep();
380 + xway_register_dwc(ARV4518PW_USB);
381 + arv45xx_register_ethernet();
382 + arv45xx_register_ath5k();
383 +
384 + gpio_request(ARV4518PW_SWITCH_RESET, "switch");
385 + gpio_direction_output(ARV4518PW_SWITCH_RESET, 1);
386 + gpio_export(ARV4518PW_SWITCH_RESET, 0);
387 +}
388 +
389 +MIPS_MACHINE(LANTIQ_MACH_ARV4518PW,
390 + "ARV4518PW",
391 + "ARV4518PW - SMC7908A-ISP, Airties WAV-221",
392 + arv4518pw_init);
393 +
394 +static void __init
395 +arv4520pw_init(void)
396 +{
397 +#define ARV4520PW_EBU 0x400
398 +#define ARV4520PW_USB 28
399 +#define ARV4520PW_SWITCH_RESET 82
400 +
401 + ltq_register_gpio_ebu(ARV4520PW_EBU);
402 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4520pw_leds_gpio), arv4520pw_leds_gpio);
403 + ltq_register_nor(&arv45xx_flash_data);
404 + ltq_register_pci(&ltq_pci_data);
405 + ltq_register_tapi();
406 + arv45xx_register_ethernet();
407 + xway_register_dwc(ARV4520PW_USB);
408 +
409 + gpio_request(ARV4520PW_SWITCH_RESET, "switch");
410 + gpio_set_value(ARV4520PW_SWITCH_RESET, 1);
411 +}
412 +
413 +MIPS_MACHINE(LANTIQ_MACH_ARV4520PW,
414 + "ARV4520PW",
415 + "ARV4520PW - Airties WAV-281, Arcor A800",
416 + arv4520pw_init);
417 +
418 +static void __init
419 +arv452Cpw_init(void)
420 +{
421 +#define ARV452CPW_EBU 0x77f
422 +#define ARV452CPW_USB 28
423 +#define ARV452CPW_RELAY1 31
424 +#define ARV452CPW_RELAY2 79
425 +#define ARV452CPW_SWITCH_RESET 82
426 +
427 + ltq_register_gpio_ebu(ARV452CPW_EBU);
428 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv452cpw_leds_gpio), arv452cpw_leds_gpio);
429 + ltq_register_nor(&arv45xx_flash_data);
430 + ltq_register_pci(&ltq_pci_data);
431 + ltq_register_madwifi_eep();
432 + xway_register_dwc(ARV452CPW_USB);
433 + arv45xx_register_ethernet();
434 + arv45xx_register_ath5k();
435 +
436 + gpio_request(ARV452CPW_SWITCH_RESET, "switch");
437 + gpio_set_value(ARV452CPW_SWITCH_RESET, 1);
438 + gpio_export(ARV452CPW_SWITCH_RESET, 0);
439 +
440 + gpio_request(ARV452CPW_RELAY1, "relay1");
441 + gpio_direction_output(ARV452CPW_RELAY1, 1);
442 + gpio_export(ARV452CPW_RELAY1, 0);
443 +
444 + gpio_request(ARV452CPW_RELAY2, "relay2");
445 + gpio_set_value(ARV452CPW_RELAY2, 1);
446 + gpio_export(ARV452CPW_RELAY2, 0);
447 +}
448 +
449 +MIPS_MACHINE(LANTIQ_MACH_ARV452CPW,
450 + "ARV452CPW",
451 + "ARV452CPW - Arcor A801",
452 + arv452Cpw_init);
453 +
454 +static void __init
455 +arv4525pw_init(void)
456 +{
457 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4525pw_leds_gpio), arv4525pw_leds_gpio);
458 + ltq_register_nor(&arv45xx_flash_data);
459 + ltq_pci_data.clock = PCI_CLOCK_INT;
460 + ltq_register_pci(&ltq_pci_data);
461 + ltq_register_madwifi_eep();
462 + ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
463 + arv45xx_register_ethernet();
464 +}
465 +
466 +MIPS_MACHINE(LANTIQ_MACH_ARV4525PW,
467 + "ARV4525PW",
468 + "ARV4525PW - Speedport W502V",
469 + arv4525pw_init);
470 +
471 +static void __init
472 +arv7518pw_init(void)
473 +{
474 +#define ARV7518PW_EBU 0x2
475 +#define ARV7518PW_USB 14
476 +
477 + ltq_register_gpio_ebu(ARV7518PW_EBU);
478 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv7518pw_leds_gpio), arv7518pw_leds_gpio);
479 + ltq_register_gpio_buttons(arv7518pw_gpio_buttons, ARRAY_SIZE(arv7518pw_gpio_buttons));
480 + ltq_register_nor(&arv75xx_flash_data);
481 + ltq_register_pci(&ltq_pci_data);
482 + ltq_register_tapi();
483 + xway_register_dwc(ARV7518PW_USB);
484 + arv75xx_register_ethernet();
485 + //arv7518_register_ath9k(mac);
486 +}
487 +
488 +MIPS_MACHINE(LANTIQ_MACH_ARV7518PW,
489 + "ARV7518PW",
490 + "ARV7518PW - ASTORIA",
491 + arv7518pw_init);
492 +
493 +static void __init
494 +arv752dpw22_init(void)
495 +{
496 +#define ARV752DPW22_EBU 0x2
497 +#define ARV752DPW22_USB 72
498 +#define ARV752DPW22_RELAY 73
499 +
500 + ltq_register_gpio_ebu(ARV752DPW22_EBU);
501 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv752dpw22_leds_gpio), arv752dpw22_leds_gpio);
502 + ltq_register_gpio_buttons(arv752dpw22_gpio_buttons, ARRAY_SIZE(arv752dpw22_gpio_buttons));
503 + ltq_register_nor(&arv75xx_flash_data);
504 + ltq_pci_data.irq[15] = (INT_NUM_IM2_IRL0 + 31);
505 + ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
506 + ltq_register_pci(&ltq_pci_data);
507 + xway_register_dwc(ARV752DPW22_USB);
508 + arv75xx_register_ethernet();
509 +
510 + gpio_request(ARV752DPW22_RELAY, "relay");
511 + gpio_set_value(ARV752DPW22_RELAY, 1);
512 + gpio_export(ARV752DPW22_RELAY, 0);
513 +}
514 +
515 +MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
516 + "ARV752DPW22",
517 + "ARV752DPW22 - Arcor A803",
518 + arv752dpw22_init);
519 --- a/arch/mips/lantiq/machtypes.h
520 +++ b/arch/mips/lantiq/machtypes.h
521 @@ -22,6 +22,17 @@
522 LANTIQ_MACH_EASY98000NAND, /* Falcon Eval Board, NAND Flash */
523 LANTIQ_MACH_EASY98020, /* Falcon Reference Board */
524 LANTIQ_MACH_95C3AM1, /* Board 95C3AM1 */
525 +
526 + /* Arcadyan */
527 + LANTIQ_MACH_ARV3527P, /* Arcor easybox a401 */
528 + LANTIQ_MACH_ARV4510PW, /* Wippies Homebox */
529 + LANTIQ_MACH_ARV4518PW, /* Airties WAV-221, SMC-7908A-ISP */
530 + LANTIQ_MACH_ARV4520PW, /* Airties WAV-281, Arcor EasyboxA800 */
531 + LANTIQ_MACH_ARV452CPW, /* Arcor EasyboxA801 */
532 + LANTIQ_MACH_ARV4525PW, /* Speedport W502V */
533 + LANTIQ_MACH_ARV752DPW, /* Arcor easybox a802 */
534 + LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */
535 + LANTIQ_MACH_ARV7518PW, /* ASTORIA */
536 };
537
538 #endif
This page took 0.064641 seconds and 5 git commands to generate.