aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@open-mesh.com>2016-05-19 20:20:53 +0200
committerSven Eckelmann <sven@narfation.org>2016-09-21 18:16:54 +0200
commitd1031861922dd20fb217c4add5c46be9947cda31 (patch)
treed5d0a31021729e2b91359345c2b64aee9fb60e5c /target/linux/ar71xx/files
parent4bddce1be0be6dd3473a89739c50a11a931ca231 (diff)
downloadupstream-d1031861922dd20fb217c4add5c46be9947cda31.tar.gz
upstream-d1031861922dd20fb217c4add5c46be9947cda31.tar.bz2
upstream-d1031861922dd20fb217c4add5c46be9947cda31.zip
ar71xx: Use *_eth_cfg helper for Open Mesh MR900 boards
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> Backport of r46241
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
index fe3e1fad51..9c3164d05e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
@@ -94,24 +94,6 @@ static struct gpio_keys_button mr900_gpio_keys[] __initdata = {
},
};
-
-static void __init mr900_gmac_setup(void)
-{
- void __iomem *base;
- u32 t;
-
- base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
-
- t = __raw_readl(base + QCA955X_GMAC_REG_ETH_CFG);
-
- t &= ~(QCA955X_ETH_CFG_RGMII_EN | QCA955X_ETH_CFG_GE0_SGMII);
- t |= QCA955X_ETH_CFG_RGMII_EN;
-
- __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
-
- iounmap(base);
-}
-
static void __init mr900_setup(void)
{
u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
@@ -141,8 +123,7 @@ static void __init mr900_setup(void)
}
pdata->use_eeprom = true;
- mr900_gmac_setup();
-
+ ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
ath79_register_mdio(0, 0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, art + MR900_MAC0_OFFSET, 0);