drivers: net: xgene: Configure tx/rx delay for ACPI
authorQuan Nguyen <qnguyen@apm.com>
Tue, 5 Sep 2017 18:16:31 +0000 (11:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Sep 2017 21:58:25 +0000 (14:58 -0700)
This patch fixes configuring tx/rx delay values for ACPI.

Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c

index e45b587c29946e2bb1282f948b48454468822db7..3188f553da35f7e4aeebcba2cdaffcc64ba6a3e1 100644 (file)
@@ -468,7 +468,6 @@ static void xgene_enet_configure_clock(struct xgene_enet_pdata *pdata)
 
 static void xgene_gmac_set_speed(struct xgene_enet_pdata *pdata)
 {
-       struct device *dev = &pdata->pdev->dev;
        u32 icm0, icm2, mc2;
        u32 intf_ctl, rgmii, value;
 
@@ -500,10 +499,8 @@ static void xgene_gmac_set_speed(struct xgene_enet_pdata *pdata)
                intf_ctl |= ENET_GHD_MODE;
                CFG_MACMODE_SET(&icm0, 2);
                CFG_WAITASYNCRD_SET(&icm2, 0);
-               if (dev->of_node) {
-                       CFG_TXCLK_MUXSEL0_SET(&rgmii, pdata->tx_delay);
-                       CFG_RXCLK_MUXSEL0_SET(&rgmii, pdata->rx_delay);
-               }
+               CFG_TXCLK_MUXSEL0_SET(&rgmii, pdata->tx_delay);
+               CFG_RXCLK_MUXSEL0_SET(&rgmii, pdata->rx_delay);
                rgmii |= CFG_SPEED_1250;
 
                xgene_enet_rd_csr(pdata, DEBUG_REG_ADDR, &value);