diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-10-17 18:27:47 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-10-17 18:27:47 +0000 |
commit | 31387947c8633b056f17b23e58cf55379d8f35da (patch) | |
tree | bfb23ec3c634a64693be72b070997b0ba4564abf /target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c | |
parent | 5ffc08e3dc332cf5d51ba29d031367b88d226dbb (diff) | |
download | upstream-31387947c8633b056f17b23e58cf55379d8f35da.tar.gz upstream-31387947c8633b056f17b23e58cf55379d8f35da.tar.bz2 upstream-31387947c8633b056f17b23e58cf55379d8f35da.zip |
ar71xx: use the ath79_set_ar934x_eth_cfg helper in machine setup routines
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 33818
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c index ed5b2b0e63..163dc6fa63 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1041n-v2.c @@ -101,23 +101,6 @@ static struct mdio_board_info db120_mdio0_info[] = { }, }; -static void __init db120_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); - t |= AR934X_ETH_CFG_RGMII_GMAC0 | AR934X_ETH_CFG_SW_ONLY_MODE; - - __raw_writel(t, base + AR934X_GMAC_REG_ETH_CFG); - - iounmap(base); -} - static void __init tl_wr1041nv2_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); @@ -132,7 +115,8 @@ static void __init tl_wr1041nv2_setup(void) tl_wr1041nv2_gpio_keys); ath79_register_wmac(ee, mac); - db120_gmac_setup(); + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 | + AR934X_ETH_CFG_SW_ONLY_MODE); ath79_register_mdio(1, 0x0); ath79_register_mdio(0, 0x0); |