Revert "ar71xx: Allow to set the RXDV, RXD, TXD, TXE delays for QCA955x"
authorJohn Crispin <john@openwrt.org>
Wed, 23 Mar 2016 12:52:17 +0000 (12:52 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 23 Mar 2016 12:52:17 +0000 (12:52 +0000)
The default delays RXD 3. RDV 3, TXD 0, TXE 0 doesn't seem to work for some
boards. These boards depend on the preset values of u-boot which may
differ.

This reverts commit f2d4bb96b62512caa161dcc2867c91692fb16a38.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
SVN-Revision: 49071

17 files changed:
target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c
target/linux/ar71xx/files/arch/mips/ath79/mach-epg5000.c
target/linux/ar71xx/files/arch/mips/ath79/mach-esr1750.c
target/linux/ar71xx/files/arch/mips/ath79/mach-esr900.c
target/linux/ar71xx/files/arch/mips/ath79/mach-f9k1115v2.c
target/linux/ar71xx/files/arch/mips/ath79/mach-mr18.c
target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c
target/linux/ar71xx/files/arch/mips/ath79/mach-tew-823dru.c
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v2.c
target/linux/ar71xx/files/arch/mips/ath79/mach-wlr8100.c
target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-450hp2.c
target/linux/ar71xx/patches-4.1/609-MIPS-ath79-ap136-fixes.patch
target/linux/ar71xx/patches-4.4/609-MIPS-ath79-ap136-fixes.patch

index 6445023ec45d402b48a41566125d14aca16e7d58..2f2825f94507f450834355517ffdacf26e7e0f3b 100644 (file)
@@ -830,9 +830,7 @@ void __init ath79_setup_ar934x_eth_rx_delay(unsigned int rxd,
        iounmap(base);
 }
 
-void __init ath79_setup_qca955x_eth_cfg(u32 mask,
-                                       unsigned int rxd, unsigned int rxdv,
-                                       unsigned int txd, unsigned int txe)
+void __init ath79_setup_qca955x_eth_cfg(u32 mask)
 {
        void __iomem *base;
        u32 t, m;
@@ -847,10 +845,6 @@ void __init ath79_setup_qca955x_eth_cfg(u32 mask,
            QCA955X_ETH_CFG_RMII_GE0 |
            QCA955X_ETH_CFG_MII_CNTL_SPEED |
            QCA955X_ETH_CFG_RMII_GE0_MASTER;
-       m |= QCA955X_ETH_CFG_RXD_DELAY_MASK << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
-       m |= QCA955X_ETH_CFG_RDV_DELAY_MASK << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
-       m |= QCA955X_ETH_CFG_TXD_DELAY_MASK << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
-       m |= QCA955X_ETH_CFG_TXE_DELAY_MASK << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
 
        base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
 
@@ -858,10 +852,6 @@ void __init ath79_setup_qca955x_eth_cfg(u32 mask,
 
        t &= ~m;
        t |= mask;
-       t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
-       t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
-       t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
-       t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
 
        __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
 
index 3908750318a0562471dfa27139b154795d5ff887..5a226e40284b6853b59812ffc791e0612c91fa9b 100644 (file)
@@ -48,7 +48,6 @@ void ath79_register_mdio(unsigned int id, u32 phy_mask);
 void ath79_setup_ar933x_phy4_switch(bool mac, bool mdio);
 void ath79_setup_ar934x_eth_cfg(u32 mask);
 void ath79_setup_ar934x_eth_rx_delay(unsigned int rxd, unsigned int rxdv);
-void ath79_setup_qca955x_eth_cfg(u32 mask, unsigned int rxd, unsigned int rxdv,
-                                unsigned int txd, unsigned int txe);
+void ath79_setup_qca955x_eth_cfg(u32 mask);
 
 #endif /* _ATH79_DEV_ETH_H */
index ca882cd8309ddc58c8d01971ae2f525d10c9b042..fc1251303e3d202bf3c5d9d8ea58b9c178e5dd57 100644 (file)
@@ -211,7 +211,7 @@ static void __init common_setup(bool pcie_slot)
                                    ARRAY_SIZE(archer_c7_mdio0_info));
        ath79_register_mdio(0, 0x0);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        /* GMAC0 is connected to the RMGII interface */
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
index d89d4c474655ab512fcd53eac35df03f93417b46..3d60afc4083acc7c74a1102fb9346af4f43b0378 100644 (file)
@@ -149,7 +149,7 @@ static void __init epg5000_setup(void)
 
        ath79_register_usb();
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);
 
index ef8abb8da0e0c615d96752551a6b8e86eb3cc5b4..2a34b3a2e9ee966a0170aaa04f08e6bc971e2416 100644 (file)
@@ -148,7 +148,7 @@ static void __init esr1750_setup(void)
 
        ath79_register_usb();
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);
 
index dd07248f386aa0621bf222d99fab5bcabd32aafa..aa2e7f7f4e9e96bfbabc8e288f0189d5a8bb738c 100644 (file)
@@ -170,7 +170,7 @@ static void __init esr900_setup(void)
 
        ath79_register_wmac(art + ESR900_WMAC_CALDATA_OFFSET, wlan0_mac);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);
 
index c1f56790b92f730c6d3ff5d7e9886d3cfa25ac0b..69d005d795a43ae18a1bb68736f84c7898d51b1e 100644 (file)
@@ -152,7 +152,7 @@ static void __init f9k1115v2_setup(void)
        mdiobus_register_board_info(f9k1115v2_mdio0_info,
                                    ARRAY_SIZE(f9k1115v2_mdio0_info));
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_init_mac(ath79_eth0_data.mac_addr,
                       art + F9K1115V2_WAN_MAC_OFFSET, 0);
index 215dd55d39295ef99996f8ef213dd8856be157d2..a24cb3fce68e9e8242cf1bf5e205d3ee437f0b95 100644 (file)
@@ -253,8 +253,9 @@ static void __init mr18_setup(void)
        res = mr18_extract_sgmii_res_cal();
        if (res >= 0) {
                /* Setup SoC Eth Config */
-               ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0,
-                                           0);
+               ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN |
+                       (3 << QCA955X_ETH_CFG_RXD_DELAY_SHIFT) |
+                       (3 << QCA955X_ETH_CFG_RDV_DELAY_SHIFT));
 
                /* MDIO Interface */
                ath79_register_mdio(0, 0x0);
index 3555c9b6d26adf6cb56b766c39a511209f45cc1d..c28a8a511875a51a3bac1914f8ec39007e4e4311 100644 (file)
@@ -287,7 +287,7 @@ static void __init nbg6716_common_setup(u32 leds_num, struct gpio_led* leds,
 
        ath79_register_wmac(art + NBG6716_WMAC_CALDATA_OFFSET, tmpmac);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);
 
index 986bfd274efeb0935a64a2bf28bb973114f2a4ad..c88c522b802d2cc0e8776e2b87a3c6dc76665c6e 100644 (file)
@@ -203,7 +203,7 @@ static void __init rb922gs_setup(void)
 
        rb922gs_nand_init();
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);
 
index 05a344f23e8187197ee173aff75b555affa549a8..cf863ac66668507d1a31e43ba874699283eebefd 100644 (file)
@@ -155,7 +155,7 @@ static void __init tew_823dru_setup(void)
                        ARRAY_SIZE(tew_823dru_mdio0_info));
        ath79_register_mdio(0, 0x0);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        /* GMAC0 is connected to the RMGII interface */
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
index 73808aba2b0b2863a203ec90d72e20577b09027d..abdbde08d29576e41d4f71e2184053efef9f77bb 100644 (file)
@@ -183,7 +183,7 @@ static void __init tl_wr1043nd_v2_setup(void)
                                    ARRAY_SIZE(wr1043nd_v2_mdio0_info));
        ath79_register_mdio(0, 0x0);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        /* GMAC0 is connected to the RMGII interface */
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
index a4e4872e5c710093867dd36be583a3f0b742f3c4..88022e7533f12e89c05d0db0f4cafef78a700947 100644 (file)
@@ -152,7 +152,7 @@ static void __init wlr8100_common_setup(void)
 
        ath79_register_wmac(art + WLR8100_WMAC_CALDATA_OFFSET, NULL);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        ath79_register_mdio(0, 0x0);
 
index 954976e23eba3841f9271da615a674112e72f4e3..c7b120dc2e1d44dbe6ae67722009e6f066c534a4 100644 (file)
@@ -156,7 +156,7 @@ static void __init wpj558_setup(void)
        ath79_init_mac(ath79_eth0_data.mac_addr, art + WPJ558_MAC_OFFSET, 0);
        ath79_init_mac(ath79_eth1_data.mac_addr, art + WPJ558_MAC_OFFSET, 0);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        /* GMAC0 is connected to an AR8327 switch */
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
index 77c7cecae63ca8936bf6dd796e8ce904230f56f6..428876fccb0ace63f3af105bdb7fddc01e5f5970 100644 (file)
@@ -193,7 +193,7 @@ static void __init wzr_450hp2_setup(void)
                                    ARRAY_SIZE(wzr_450hp2_mdio0_info));
        ath79_register_mdio(0, 0x0);
 
-       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+       ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
 
        /* GMAC0 is connected to the RMGII interface */
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
index f13cd9eb47a6fb1cb0de6322397b531acbbe0804..4d7902e166648dd1c3c90fc8c77fd1206e49f631 100644 (file)
 +
 +      ath79_register_wmac(art + AP136_WMAC_CALDATA_OFFSET, NULL);
 +
-+      ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
++      ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
  
 -static int ap136_pci_plat_dev_init(struct pci_dev *dev)
 +      ath79_register_mdio(0, 0x0);
index f13cd9eb47a6fb1cb0de6322397b531acbbe0804..4d7902e166648dd1c3c90fc8c77fd1206e49f631 100644 (file)
 +
 +      ath79_register_wmac(art + AP136_WMAC_CALDATA_OFFSET, NULL);
 +
-+      ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
++      ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
  
 -static int ap136_pci_plat_dev_init(struct pci_dev *dev)
 +      ath79_register_mdio(0, 0x0);