diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-04-09 08:40:09 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-04-09 08:40:09 +0000 |
commit | d6c03638848d1b31beb79a828e875119f12cf316 (patch) | |
tree | 508b81abd6a925903585ac0ece65ccecf39fd620 /target/linux/ar71xx/files/arch | |
parent | 4c29a2c2630d362813b79a6033c5ce32620b5db2 (diff) | |
download | upstream-d6c03638848d1b31beb79a828e875119f12cf316.tar.gz upstream-d6c03638848d1b31beb79a828e875119f12cf316.tar.bz2 upstream-d6c03638848d1b31beb79a828e875119f12cf316.zip |
ar71xx: make the AR8216 driver usable on the TEW-632BRP/DIR-615-Cx boards
Cc: backfire@openwrt.org
SVN-Revision: 20752
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c | 12 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c index f5eb7b2e43..8433b0cf14 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c @@ -128,6 +128,11 @@ static struct gpio_button dir_615c1_gpio_buttons[] __initdata = { } }; +#define DIR_615C1_LAN_PHYMASK BIT(0) +#define DIR_615C1_WAN_PHYMASK BIT(4) +#define DIR_615C1_MDIO_MASK (~(DIR_615C1_LAN_PHYMASK | \ + DIR_615C1_WAN_PHYMASK)) + static void __init dir_615c1_setup(void) { const char *config = (char *) KSEG1ADDR(DIR_615C1_CONFIG_ADDR); @@ -141,14 +146,13 @@ static void __init dir_615c1_setup(void) wlan_mac = mac; } - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(DIR_615C1_MDIO_MASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.speed = SPEED_100; - ar71xx_eth0_data.duplex = DUPLEX_FULL; + ar71xx_eth0_data.phy_mask = DIR_615C1_LAN_PHYMASK; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth1_data.phy_mask = 0x10; + ar71xx_eth1_data.phy_mask = DIR_615C1_WAN_PHYMASK; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c index 2bf9ad9b03..787f83eb01 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c @@ -104,6 +104,11 @@ static struct gpio_button tew_632brp_gpio_buttons[] __initdata = { } }; +#define TEW_632BRP_LAN_PHYMASK BIT(0) +#define TEW_632BRP_WAN_PHYMASK BIT(4) +#define TEW_632BRP_MDIO_MASK (~(TEW_632BRP_LAN_PHYMASK | \ + TEW_632BRP_WAN_PHYMASK)) + static void __init tew_632brp_setup(void) { const char *config = (char *) KSEG1ADDR(TEW_632BRP_CONFIG_ADDR); @@ -117,14 +122,13 @@ static void __init tew_632brp_setup(void) wlan_mac = mac; } - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(TEW_632BRP_MDIO_MASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.speed = SPEED_100; - ar71xx_eth0_data.duplex = DUPLEX_FULL; + ar71xx_eth0_data.phy_mask = TEW_632BRP_LAN_PHYMASK; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth1_data.phy_mask = 0x10; + ar71xx_eth1_data.phy_mask = TEW_632BRP_WAN_PHYMASK; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); |