aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-01 22:49:02 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-01 22:49:02 +0000
commitf188f1bad53adc92a116227be05f9bc119f6d86e (patch)
tree1733784409577fe3c0bfc6657cf31a1003c831e5 /target/linux/ar71xx/files/arch/mips
parent0612667c340030b489976cd9e8a8094550065245 (diff)
downloadupstream-f188f1bad53adc92a116227be05f9bc119f6d86e.tar.gz
upstream-f188f1bad53adc92a116227be05f9bc119f6d86e.tar.bz2
upstream-f188f1bad53adc92a116227be05f9bc119f6d86e.zip
ar71xx: add support for Ubiquiti AirRouter
Signed-off-by: Gergely Barta <gergely.barta@printerfairkft.hu> SVN-Revision: 29395
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c31
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h1
2 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
index 06ce2126ee..ab399f6f17 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -283,6 +283,37 @@ static void __init ubnt_nano_m_setup(void)
MIPS_MACHINE(AR71XX_MACH_UBNT_NANO_M, "UBNT-NM", "Ubiquiti Nanostation M",
ubnt_nano_m_setup);
+static struct gpio_led ubnt_airrouter_leds_gpio[] __initdata = {
+ {
+ .name = "ubnt:green:globe",
+ .gpio = 0,
+ .active_low = 1,
+ }
+};
+
+static void __init ubnt_airrouter_setup(void)
+{
+ u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+ ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_mdio(0, ~UBNT_M_WAN_PHYMASK);
+
+ ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0);
+ ubnt_init_secondary_mac(mac1);
+
+ ar71xx_add_device_eth(1);
+ ar71xx_add_device_eth(0);
+ ar71xx_add_device_usb();
+
+ ap91_pci_init(ee, NULL);
+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_airrouter_leds_gpio),
+ ubnt_airrouter_leds_gpio);
+}
+
+MIPS_MACHINE(AR71XX_MACH_UBNT_AIRROUTER, "UBNT-AR", "Ubiquiti AirRouter",
+ ubnt_airrouter_setup);
+
static struct gpio_led ubnt_unifi_leds_gpio[] __initdata = {
{
.name = "ubnt:orange:dome",
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
index be7df85d4a..6b2c160c96 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
@@ -57,6 +57,7 @@ enum ar71xx_mach_type {
AR71XX_MACH_TL_WR741ND_V4, /* TP-LINK TL-WR741ND v4*/
AR71XX_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
AR71XX_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
+ AR71XX_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
AR71XX_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
AR71XX_MACH_UBNT_LSX, /* Ubiquiti LSX */