aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-11-12 10:54:18 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-11-12 10:54:18 +0000
commit346e44105a97a044b5e4f35a4c8090027af47ab2 (patch)
treed5e0acecc2283aafa8f47e4a870bd68ecdba24bf
parentb1ba5e2f3d944146973f108f5debbc47bc145a09 (diff)
downloadupstream-346e44105a97a044b5e4f35a4c8090027af47ab2.tar.gz
upstream-346e44105a97a044b5e4f35a4c8090027af47ab2.tar.bz2
upstream-346e44105a97a044b5e4f35a4c8090027af47ab2.zip
ar71xx: register the first ethernet interface on the DB120 board
SVN-Revision: 28979
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-db120.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-db120.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-db120.c
index 56c2bf7526..815efb6260 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-db120.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-db120.c
@@ -30,6 +30,8 @@
#define DB120_GPIO_BTN_SW1 16
+#define DB120_MAC0_OFFSET 0
+#define DB120_MAC1_OFFSET 6
#define DB120_CALDATA_OFFSET 0x1000
#define DB120_WMAC_MAC_OFFSET 0x1002
@@ -125,6 +127,14 @@ static void __init db120_setup(void)
ARRAY_SIZE(db120_gpio_keys),
db120_gpio_keys);
+ /* GMAC0 is connected to an AR8327 switch */
+ ar71xx_init_mac(ar71xx_eth0_data.mac_addr, art + DB120_MAC0_OFFSET, 0);
+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ar71xx_eth0_data.speed = SPEED_1000;
+ ar71xx_eth0_data.duplex = DUPLEX_FULL;
+
+ ar71xx_add_device_eth(0);
+
ar9xxx_add_device_wmac(art + DB120_CALDATA_OFFSET,
art + DB120_WMAC_MAC_OFFSET);