[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1556126241-2774-7-git-send-email-weifeng.voon@intel.com>
Date: Thu, 25 Apr 2019 01:17:20 +0800
From: Weifeng Voon <weifeng.voon@...el.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Ong Boon Leong <boon.leong.ong@...el.com>,
Kweh Hock Leong <hock.leong.kweh@...el.com>,
Weifeng Voon <weifeng.voon@...el.com>
Subject: [PATCH 6/7] net: stmmac: add xPCS platform data for EHL
Enable xPCS capability inside EHL platform data.
Signed-off-by: Weifeng Voon <weifeng.voon@...el.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index b454a97..daac2eb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -23,6 +23,7 @@
#include <linux/dmi.h>
#include "stmmac.h"
+#include "dw_xpcs.h"
/*
* This struct is used to associate PCI Function of MAC controller on a board,
@@ -128,6 +129,8 @@ static int ehl_common_data(struct pci_dev *pdev,
plat->clk_csr = 5;
plat->has_gmac = 0;
plat->has_gmac4 = 1;
+ plat->xpcs_phy_addr = 0x16;
+ plat->pcs_mode = AN_CTRL_PCS_MD_C37_SGMII;
plat->force_sf_dma_mode = 0;
plat->tso_en = 1;
@@ -211,6 +214,7 @@ static int ehl_sgmii1g_data(struct pci_dev *pdev,
return ret;
plat->interface = PHY_INTERFACE_MODE_SGMII;
+ plat->has_xpcs = 1;
return 0;
}
@@ -387,6 +391,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
res.addr = pcim_iomap_table(pdev)[i];
res.wol_irq = pdev->irq;
res.irq = pdev->irq;
+ res.xpcs_irq = 0;
return stmmac_dvr_probe(&pdev->dev, plat, &res);
}
--
1.9.1
Powered by blists - more mailing lists