2 * Edimax BR-61xx support
4 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
14 #define BR61XX_GPIO_DEV_MASK 0
16 #ifdef CONFIG_MTD_PARTITIONS
17 static struct mtd_partition br61xx_partitions
[] = {
22 .mask_flags
= MTD_WRITEABLE
,
25 .offset
= MTDPART_OFS_APPEND
,
29 .offset
= MTDPART_OFS_APPEND
,
30 .size
= MTDPART_SIZ_FULL
,
33 #endif /* CONFIG_MTD_PARTITIONS */
35 static struct gpio_button br61xx_gpio_buttons
[] __initdata
= {
37 .desc
= "reset_button",
41 .gpio
= ADM5120_GPIO_PIN2
,
45 static u8 br61xx_vlans
[6] __initdata
= {
46 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
49 void __init
br61xx_generic_setup(void)
52 #ifdef CONFIG_MTD_PARTITIONS
53 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(br61xx_partitions
);
54 adm5120_flash0_data
.parts
= br61xx_partitions
;
55 #endif /* CONFIG_MTD_PARTITIONS */
56 adm5120_add_device_flash(0);
58 adm5120_add_device_gpio(BR61XX_GPIO_DEV_MASK
);
59 adm5120_add_device_switch(5, br61xx_vlans
);
60 adm5120_add_device_gpio_buttons(ARRAY_SIZE(br61xx_gpio_buttons
),
63 /* TODO: setup mac addresses */