diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-17 18:27:47 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-17 18:27:47 +0000 |
commit | f2b2ff444e98f8099787347e98df7473576b3ef2 (patch) | |
tree | dd041a09f72acde344c11fb458af8deaa9ce751c /target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c | |
parent | 83c1f2e1efbcb0472445ddeb759252a6b9feced4 (diff) |
ar71xx: use the ath79_set_ar934x_eth_cfg helper in machine setup routines
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33818 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c index db4d1052a..ffaf8d155 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c @@ -99,26 +99,6 @@ static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = { } }; -static void __init tl_wr841n_v8_gmac_setup(void) -{ - void __iomem *base; - u32 t; - - base = ioremap(AR934X_GMAC_BASE, AR934X_GMAC_SIZE); - - t = __raw_readl(base + AR934X_GMAC_REG_ETH_CFG); - - t &= ~(AR934X_ETH_CFG_RGMII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0 | - AR934X_ETH_CFG_GMII_GMAC0 | AR934X_ETH_CFG_SW_ONLY_MODE | - AR934X_ETH_CFG_SW_PHY_SWAP); - - t |= AR934X_ETH_CFG_SW_PHY_SWAP; - __raw_writel(t, base + AR934X_GMAC_REG_ETH_CFG); - t = __raw_readl(base + AR934X_GMAC_REG_ETH_CFG); - - iounmap(base); -} - static void __init tl_wr841n_v8_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); @@ -133,7 +113,7 @@ static void __init tl_wr841n_v8_setup(void) ath79_register_m25p80(&tl_wr841n_v8_flash_data); - tl_wr841n_v8_gmac_setup(); + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP); ath79_register_mdio(1, 0x0); |