summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAndy Boyett <agb@openwrt.org>2009-02-26 01:22:57 +0000
committerAndy Boyett <agb@openwrt.org>2009-02-26 01:22:57 +0000
commit0b44a56a36b4178d7eaf123afa2830bc217cb738 (patch)
tree12dfd972e9eadf5c4687c5ac90890da10e485ee2 /target
parentec0f53cb372495a3059441068d93671f4ed70a8f (diff)
downloadmtk-20170518-0b44a56a36b4178d7eaf123afa2830bc217cb738.zip
mtk-20170518-0b44a56a36b4178d7eaf123afa2830bc217cb738.tar.gz
mtk-20170518-0b44a56a36b4178d7eaf123afa2830bc217cb738.tar.bz2
wnr2000: configure eth1 (WAN) and detect the ar8216 switch on eth0 (LAN)
ar8216 headers are embedded in packets on eth0 so it is not usable yet SVN-Revision: 14661
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
index 1b419c5..be51727 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
@@ -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));