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 | 991bc12eb083826ba593b076628ebe3492927d6f (patch) | |
tree | dd041a09f72acde344c11fb458af8deaa9ce751c /target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c | |
parent | 5e39bae8bdfaf0cf5ba3a40f8b343c699b502510 (diff) | |
download | upstream-991bc12eb083826ba593b076628ebe3492927d6f.tar.gz upstream-991bc12eb083826ba593b076628ebe3492927d6f.tar.bz2 upstream-991bc12eb083826ba593b076628ebe3492927d6f.zip |
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-rb2011.c')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c index ecdd7ea2e8..933a451309 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c @@ -123,23 +123,6 @@ static struct mdio_board_info rb2011_mdio0_info[] = { }, }; -static void __init rb2011_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 rb2011_wlan_init(void) { u8 *hard_cfg = (u8 *) KSEG1ADDR(0x1f000000 + RB_HARD_CFG_OFFSET); @@ -232,7 +215,8 @@ static void __init rb2011_setup(void) ath79_register_m25p80(&rb2011_spi_flash_data); rb2011_nand_init(); - rb2011_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); |