[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1576768881-24971-6-git-send-email-madalin.bucur@oss.nxp.com>
Date: Thu, 19 Dec 2019 17:21:20 +0200
From: Madalin Bucur <madalin.bucur@....nxp.com>
To: davem@...emloft.net, netdev@...r.kernel.org
Cc: linux@...linux.org.uk, andrew@...n.ch, f.fainelli@...il.com,
hkallweit1@...il.com, shawnguo@...nel.org,
devicetree@...r.kernel.org,
Madalin Bucur <madalin.bucur@....nxp.com>
Subject: [PATCH 5/6] net: fsl/fman: add support for PHY_INTERFACE_MODE_SFI
Add support for the SFI PHY interface mode.
Signed-off-by: Madalin Bucur <madalin.bucur@....nxp.com>
---
drivers/net/ethernet/freescale/fman/fman_memac.c | 2 ++
drivers/net/ethernet/freescale/fman/mac.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index d0b12efadd6c..09fdec935bf2 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -440,6 +440,7 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg,
tmp = 0;
switch (phy_if) {
case PHY_INTERFACE_MODE_XFI:
+ case PHY_INTERFACE_MODE_SFI:
case PHY_INTERFACE_MODE_XGMII:
tmp |= IF_MODE_10G;
break;
@@ -456,6 +457,7 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg,
/* TX_FIFO_SECTIONS */
tmp = 0;
if (phy_if == PHY_INTERFACE_MODE_XFI ||
+ phy_if == PHY_INTERFACE_MODE_SFI ||
phy_if == PHY_INTERFACE_MODE_XGMII) {
if (slow_10g_if) {
tmp |= (TX_FIFO_SECTIONS_TX_AVAIL_SLOW_10G |
diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 2944188c19b3..5e6317742c38 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -542,6 +542,7 @@ static const u16 phy2speed[] = {
[PHY_INTERFACE_MODE_QSGMII] = SPEED_1000,
[PHY_INTERFACE_MODE_XGMII] = SPEED_10000,
[PHY_INTERFACE_MODE_XFI] = SPEED_10000,
+ [PHY_INTERFACE_MODE_SFI] = SPEED_10000,
};
static struct platform_device *dpaa_eth_add_device(int fman_id,
@@ -800,6 +801,7 @@ static int mac_probe(struct platform_device *_of_dev)
/* The 10G interface only supports one mode */
if (mac_dev->phy_if == PHY_INTERFACE_MODE_XFI ||
+ mac_dev->phy_if == PHY_INTERFACE_MODE_SFI ||
mac_dev->phy_if == PHY_INTERFACE_MODE_XGMII)
mac_dev->if_support = SUPPORTED_10000baseT_Full;
--
2.1.0
Powered by blists - more mailing lists