ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0232-enetc-Handle-USXGMII-protocol.patch
1 From bb700603e66a1294049aa479ad560443496c893b Mon Sep 17 00:00:00 2001
2 From: Alex Marginean <alexandru.marginean@nxp.com>
3 Date: Fri, 20 Sep 2019 19:41:10 +0300
4 Subject: [PATCH] enetc: Handle USXGMII protocol
5
6 Adds USXGMII protocol which is now supported in Linux.  XGMII is kept for
7 compatibility although there is no plain XGMII support in ENETC.
8
9 Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
10 ---
11  drivers/net/ethernet/freescale/enetc/enetc_pf.c | 9 ++++++---
12  1 file changed, 6 insertions(+), 3 deletions(-)
13
14 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
15 +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
16 @@ -528,7 +528,8 @@ static void enetc_configure_port_mac(str
17             phy_mode == PHY_INTERFACE_MODE_RGMII)
18                 enetc_port_wr(hw, ENETC_PM0_IF_MODE, ENETC_PM0_IFM_RGAUTO);
19  
20 -       if (phy_mode == PHY_INTERFACE_MODE_XGMII)
21 +       if (phy_mode == PHY_INTERFACE_MODE_XGMII ||
22 +           phy_mode == PHY_INTERFACE_MODE_USXGMII)
23                 enetc_port_wr(hw, ENETC_PM0_IF_MODE, ENETC_PM0_IFM_XGMII);
24  }
25  
26 @@ -844,7 +845,8 @@ static int enetc_configure_serdes(struct
27         int err;
28  
29         if (priv->if_mode != PHY_INTERFACE_MODE_SGMII &&
30 -           priv->if_mode != PHY_INTERFACE_MODE_XGMII)
31 +           priv->if_mode != PHY_INTERFACE_MODE_XGMII &&
32 +           priv->if_mode != PHY_INTERFACE_MODE_USXGMII)
33                 return 0;
34  
35         err = enetc_imdio_init(pf);
36 @@ -854,7 +856,8 @@ static int enetc_configure_serdes(struct
37         if (priv->if_mode == PHY_INTERFACE_MODE_SGMII)
38                 enetc_configure_sgmii(pf->imdio);
39  
40 -       if (priv->if_mode == PHY_INTERFACE_MODE_XGMII)
41 +       if (priv->if_mode == PHY_INTERFACE_MODE_XGMII ||
42 +           priv->if_mode == PHY_INTERFACE_MODE_USXGMII)
43                 enetc_configure_sxgmii(pf->imdio);
44  
45         return 0;