aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-05-25 17:31:05 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-05-25 17:31:05 +0000
commitca40d416f7ce6f9a4a8dfb9c77a21c7163c7545e (patch)
tree3f2cc5c8632fbf225443a34462e7eaa4b30b8f39
parente35ee94c7419a78bf94b43b07e2022e699dcfc18 (diff)
downloadupstream-ca40d416f7ce6f9a4a8dfb9c77a21c7163c7545e.tar.gz
upstream-ca40d416f7ce6f9a4a8dfb9c77a21c7163c7545e.tar.bz2
upstream-ca40d416f7ce6f9a4a8dfb9c77a21c7163c7545e.zip
[ar71xx] update board setup code of the RouterStation Pro (patch by Ubiquiti Networks)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16065 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c20
1 files changed, 20 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 2397c5db5b..70d4cba929 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -125,6 +125,9 @@ static void __init ubnt_generic_setup(void)
#define UBNT_RS_WAN_PHYMASK (1 << 20)
#define UBNT_RS_LAN_PHYMASK ((1 << 16) | (1 << 17) | (1 << 18) | (1 << 19))
+#define UBNT_RSPRO_WAN_PHYMASK (1 << 4)
+#define UBNT_RSPRO_LAN_PHYMASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3))
+
static void __init ubnt_rs_setup(void)
{
ubnt_generic_setup();
@@ -155,7 +158,24 @@ static void __init ubnt_rspro_setup(void)
{
ubnt_generic_setup();
+ ar71xx_add_device_mdio(~(UBNT_RSPRO_WAN_PHYMASK | UBNT_RSPRO_LAN_PHYMASK));
+
+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ar71xx_eth0_data.phy_mask = UBNT_RSPRO_WAN_PHYMASK;
+
+ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ar71xx_eth1_data.phy_mask = UBNT_RSPRO_LAN_PHYMASK;
+
+ ar71xx_eth1_data.speed = SPEED_1000;
+ ar71xx_eth1_data.duplex = DUPLEX_FULL;
+
+ ar71xx_add_device_eth(0);
+ ar71xx_add_device_eth(1);
+
ar71xx_add_device_usb();
+
+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_rs_leds_gpio),
+ ubnt_rs_leds_gpio);
}
MIPS_MACHINE(AR71XX_MACH_UBNT_RSPRO, "Ubiquiti RouterStation Pro",