aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuan Nguyen <qnguyen@apm.com>2017-09-05 14:16:31 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-05 17:58:25 -0400
commit5e338b36643210e0915a365892002af5211cc87b (patch)
treebd955809e2336b6e81bb817bfb875d328df39b9d
parent9d7e72c088e3b18b5f6d028ad499d38a210d1928 (diff)
drivers: net: xgene: Configure tx/rx delay for ACPI
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>
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_hw.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
index e45b587c2994..3188f553da35 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
@@ -468,7 +468,6 @@ static void xgene_enet_configure_clock(struct xgene_enet_pdata *pdata)
468 468
469static void xgene_gmac_set_speed(struct xgene_enet_pdata *pdata) 469static void xgene_gmac_set_speed(struct xgene_enet_pdata *pdata)
470{ 470{
471 struct device *dev = &pdata->pdev->dev;
472 u32 icm0, icm2, mc2; 471 u32 icm0, icm2, mc2;
473 u32 intf_ctl, rgmii, value; 472 u32 intf_ctl, rgmii, value;
474 473
@@ -500,10 +499,8 @@ static void xgene_gmac_set_speed(struct xgene_enet_pdata *pdata)
500 intf_ctl |= ENET_GHD_MODE; 499 intf_ctl |= ENET_GHD_MODE;
501 CFG_MACMODE_SET(&icm0, 2); 500 CFG_MACMODE_SET(&icm0, 2);
502 CFG_WAITASYNCRD_SET(&icm2, 0); 501 CFG_WAITASYNCRD_SET(&icm2, 0);
503 if (dev->of_node) { 502 CFG_TXCLK_MUXSEL0_SET(&rgmii, pdata->tx_delay);
504 CFG_TXCLK_MUXSEL0_SET(&rgmii, pdata->tx_delay); 503 CFG_RXCLK_MUXSEL0_SET(&rgmii, pdata->rx_delay);
505 CFG_RXCLK_MUXSEL0_SET(&rgmii, pdata->rx_delay);
506 }
507 rgmii |= CFG_SPEED_1250; 504 rgmii |= CFG_SPEED_1250;
508 505
509 xgene_enet_rd_csr(pdata, DEBUG_REG_ADDR, &value); 506 xgene_enet_rd_csr(pdata, DEBUG_REG_ADDR, &value);