wnr2000: configure eth1 (WAN) and detect the ar8216 switch on eth0 (LAN)
authorAndy Boyett <agb@openwrt.org>
Thu, 26 Feb 2009 01:22:57 +0000 (01:22 +0000)
committerAndy Boyett <agb@openwrt.org>
Thu, 26 Feb 2009 01:22:57 +0000 (01:22 +0000)
ar8216 headers are embedded in packets on eth0 so it is not usable yet

SVN-Revision: 14661

target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c

index 1b419c599aae4a8b79a22dff8ae19b2995cc2add..be51727c9c1142f66a26dd362c8cf802c790833c 100644 (file)
@@ -127,6 +127,19 @@ static struct gpio_button wnr2000_gpio_buttons[] __initdata = {
 
 static void __init wnr2000_setup(void)
 {
+       ar71xx_add_device_mdio(0x0);
+
+       ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth0_data.phy_mask = 0xf;
+       ar71xx_eth0_data.speed = SPEED_100;
+       ar71xx_eth0_data.duplex = DUPLEX_FULL;
+
+       ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth1_data.phy_mask = 0x10;
+
+       ar71xx_add_device_eth(0);
+       ar71xx_add_device_eth(1);
+
        ar71xx_add_device_spi(NULL, wnr2000_spi_info,
                                        ARRAY_SIZE(wnr2000_spi_info));