[ifxmips] adds support for airties wav-281/arcor a800/arcaydian arv452
[openwrt/svn-archive/archive.git] / target / linux / ifxmips / patches-2.6.30 / 500-arv452.patch
1 Index: linux-2.6.30.10/arch/mips/ifxmips/board.c
2 ===================================================================
3 --- linux-2.6.30.10.orig/arch/mips/ifxmips/board.c 2010-03-24 16:45:31.000000000 +0100
4 +++ linux-2.6.30.10/arch/mips/ifxmips/board.c 2010-03-24 16:53:18.000000000 +0100
5 @@ -52,6 +52,7 @@
6 EASY50712,
7 EASY4010,
8 ARV4519,
9 + ARV452,
10 };
11
12 extern int ifxmips_pci_external_clock;
13 @@ -141,6 +142,15 @@
14 { .name = "ifx:green:usb", .gpio = 19, .active_low = 1, },
15 };
16
17 +static struct gpio_led arv452_gpio_leds[] = {
18 + { .name = "ifx:blue:power", .gpio = 3, .active_low = 1, },
19 + { .name = "ifx:blue:adsl", .gpio = 4, .active_low = 1, },
20 + { .name = "ifx:pink:internet", .gpio = 5, .active_low = 1, },
21 + { .name = "ifx:red:power", .gpio = 6, .active_low = 1, },
22 + { .name = "ifx:yello:wps", .gpio = 7, .active_low = 1, },
23 + { .name = "ifx:red:wps", .gpio = 9, .active_low = 1, },
24 +};
25 +
26 static struct gpio_led_platform_data ifxmips_gpio_led_data;
27
28 static struct platform_device ifxmips_gpio_leds = {
29 @@ -192,6 +202,14 @@
30 #endif
31 };
32
33 +struct platform_device *arv542_devs[] = {
34 + /*&ifxmips_gpio,*/ &ifxmips_mii, &ifxmips_mtd,
35 + &ifxmips_gpio_dev, &ifxmips_wdt, &dwc_usb,
36 +#ifdef CONFIG_LEDS_GPIO
37 + &ifxmips_gpio_leds,
38 +#endif
39 +};
40 +
41 static struct gpio_led easy50712_leds[] = {
42 { .name = "ifx:green:test0", .gpio = 0,},
43 { .name = "ifx:green:test1", .gpio = 1,},
44 @@ -237,7 +255,20 @@
45 .devs = arv5419_devs,
46 .reset_resource = {.name = "reset", .start = 1, .end = 14},
47 .pci_external_clock = 1,
48 +#ifdef CONFIG_LEDS_GPIO
49 .gpio_leds = arv4519_gpio_leds,
50 +#endif
51 + }, {
52 + /* arcaydian annex-b board used by airties, arcor */
53 + .type = ARV452,
54 + .name = "ARV452",
55 + .system_type = SYSTEM_DANUBE_CHIPID2,
56 + .devs = arv542_devs,
57 + .reset_resource = {.name = "reset", .start = 1, .end = 14},
58 + .pci_external_clock = 1,
59 +#ifdef CONFIG_LEDS_GPIO
60 + .gpio_leds = arv452_gpio_leds,
61 +#endif
62 },
63 };
64
65 @@ -382,6 +413,14 @@
66 ifxmips_gpio_led_data.num_leds = ARRAY_SIZE(arv4519_gpio_leds);
67 #endif
68 break;
69 + case ARV452:
70 + /* set some sane defaults for the gpios */
71 + board->num_devs = ARRAY_SIZE(arv542_devs);
72 + ifxmips_w32(0x8001e7ff, IFXMIPS_EBU_BUSCON1);
73 +#ifdef CONFIG_LEDS_GPIO
74 + ifxmips_gpio_led_data.num_leds = ARRAY_SIZE(arv452_gpio_leds);
75 +#endif
76 + break;
77 }
78 #ifdef CONFIG_LEDS_GPIO
79 ifxmips_gpio_led_data.leds = board->gpio_leds;