1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <linux/leds.h>
4 #include <linux/gpio.h>
5 #include <linux/gpio_buttons.h>
6 #include <linux/mtd/mtd.h>
7 #include <linux/mtd/partitions.h>
8 #include <linux/mtd/physmap.h>
9 #include <linux/input.h>
13 #include <ifxmips_prom.h>
15 #include "arcaydian.h"
18 #define ARV452_EBU_GPIO_START 0x14000000
19 #define ARV452_EBU_GPIO_SIZE 0x00001000
21 #define ARV452_GPIO_BUTTON_RESET 14
22 #define ARV452_BUTTONS_POLL_INTERVAL 20
24 #define ARV452_LATCH_SWITCH (1 << 10)
26 #ifdef CONFIG_MTD_PARTITIONS
27 static struct mtd_partition arv4525_partitions[] =
50 .name = "board_config",
62 static struct physmap_flash_data arv4525_flash_data = {
63 #ifdef CONFIG_MTD_PARTITIONS
64 .nr_parts = ARRAY_SIZE(arv4525_partitions),
65 .parts = arv4525_partitions,
69 static struct gpio_led
70 arv4525_leds_gpio[] __initdata = {
71 { .name = "ifx:blue:power", .gpio = 3, .active_low = 1, },
72 { .name = "ifx:blue:adsl", .gpio = 4, .active_low = 1, },
73 { .name = "ifx:blue:internet", .gpio = 5, .active_low = 1, },
74 { .name = "ifx:red:power", .gpio = 6, .active_low = 1, },
75 { .name = "ifx:yello:wps", .gpio = 7, .active_low = 1, },
76 { .name = "ifx:red:wps", .gpio = 9, .active_low = 1, },
77 { .name = "ifx:blue:voip", .gpio = 32, .active_low = 1, },
78 { .name = "ifx:blue:fxs1", .gpio = 33, .active_low = 1, },
79 { .name = "ifx:blue:fxs2", .gpio = 34, .active_low = 1, },
80 { .name = "ifx:blue:fxo", .gpio = 35, .active_low = 1, },
81 { .name = "ifx:blue:voice", .gpio = 36, .active_low = 1, },
82 { .name = "ifx:blue:usb", .gpio = 37, .active_low = 1, },
83 { .name = "ifx:blue:wlan", .gpio = 38, .active_low = 1, },
86 static struct gpio_button
87 arv4525_gpio_buttons[] __initdata = {
93 .gpio = ARV452_GPIO_BUTTON_RESET,
98 static struct resource arv4525_ebu_resource =
101 .start = ARV452_EBU_GPIO_START,
102 .end = ARV452_EBU_GPIO_START + ARV452_EBU_GPIO_SIZE - 1,
103 .flags = IORESOURCE_MEM,
109 unsigned char mac[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
111 ifxmix_detect_brn_block();
113 ifxmips_find_brn_mac(mac);
115 ifxmips_register_gpio();
117 danube_register_ebu_gpio(&arv4525_ebu_resource, ARV452_LATCH_SWITCH);
119 ifxmips_register_mtd(&arv4525_flash_data);
121 danube_register_pci(PCI_CLOCK_INT, 0);
123 ifxmips_register_wdt();
125 ifxmips_register_gpio_leds(arv4525_leds_gpio, ARRAY_SIZE(arv4525_leds_gpio));
127 danube_register_ethernet(mac, MII_MODE);
129 danube_register_usb();
132 MIPS_MACHINE(IFXMIPS_MACH_ARV4525,