ar71xx: use ath79_setup_qca955x_eth_cfg helper for QCA955x based boards
[openwrt/openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / mach-wlr8100.c
index 8eecc0e..88022e7 100644 (file)
@@ -136,23 +136,6 @@ static struct mdio_board_info wlr8100_mdio0_info[] = {
        },
 };
 
-static void __init wlr8100_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 wlr8100_common_setup(void)
 {
        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
@@ -169,7 +152,7 @@ static void __init wlr8100_common_setup(void)
 
        ath79_register_wmac(art + WLR8100_WMAC_CALDATA_OFFSET, NULL);
 
-       wlr8100_gmac_setup();
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);