aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-06-09 19:48:35 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-06-09 19:48:35 +0000
commit17432443006057beef5f563438bef9eb38f06149 (patch)
tree753fc00bd30970295b584116ad8261f8fc04b7d6 /target/linux/ar71xx/files
parent8c2198b92bafcc3518443e67ed7cc167ef5d6dbe (diff)
downloadupstream-17432443006057beef5f563438bef9eb38f06149.tar.gz
upstream-17432443006057beef5f563438bef9eb38f06149.tar.bz2
upstream-17432443006057beef5f563438bef9eb38f06149.zip
ar71xx: fix phy_mask for the RB450
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21743 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c
index 00c99cea0e..dc3c2005df 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c
@@ -234,20 +234,22 @@ static void __init rb433u_setup(void)
MIPS_MACHINE(AR71XX_MACH_RB_433U, "433U", "MikroTik RouterBOARD 433UAH",
rb433u_setup);
+#define RB450_LAN_PHYMASK BIT(0)
+#define RB450_WAN_PHYMASK BIT(4)
+#define RB450_MDIO_PHYMASK (RB450_LAN_PHYMASK | RB450_WAN_PHYMASK)
+
static void __init rb450_generic_setup(int gige)
{
rb4xx_generic_setup();
rb4xx_add_device_spi();
- ar71xx_add_device_mdio(0xffffffe0);
+ ar71xx_add_device_mdio(~RB450_MDIO_PHYMASK);
ar71xx_eth0_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_MII;
- ar71xx_eth0_data.phy_mask = (gige) ? (1 << 0) : 0;
- ar71xx_eth0_data.speed = (gige) ? SPEED_1000 : SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
+ ar71xx_eth0_data.phy_mask = RB450_LAN_PHYMASK;
ar71xx_eth1_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.phy_mask = 0x00000010;
+ ar71xx_eth1_data.phy_mask = RB450_WAN_PHYMASK;
ar71xx_add_device_eth(1);
ar71xx_add_device_eth(0);