aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2020-04-10 10:47:05 +0800
committerPetr Štetiar <ynezz@true.cz>2020-05-07 12:53:06 +0200
commitcddd4591404fb4c53dc0b3c0b15b942cdbed4356 (patch)
tree392c1179de46b0f804e3789edca19069b64e6b44 /target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch
parentd1d2c0b5579ea4f69a42246c9318539d61ba1999 (diff)
downloadupstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.tar.gz
upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.tar.bz2
upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.zip
layerscape: add patches-5.4
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release which was tagged LSDK-20.04-V5.4. https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in LSDK, port the dts patches from 4.14. The patches are sorted into the following categories: 301-arch-xxxx 302-dts-xxxx 303-core-xxxx 701-net-xxxx 801-audio-xxxx 802-can-xxxx 803-clock-xxxx 804-crypto-xxxx 805-display-xxxx 806-dma-xxxx 807-gpio-xxxx 808-i2c-xxxx 809-jailhouse-xxxx 810-keys-xxxx 811-kvm-xxxx 812-pcie-xxxx 813-pm-xxxx 814-qe-xxxx 815-sata-xxxx 816-sdhc-xxxx 817-spi-xxxx 818-thermal-xxxx 819-uart-xxxx 820-usb-xxxx 821-vfio-xxxx Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch')
-rw-r--r--target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch b/target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch
new file mode 100644
index 0000000000..dac3a93721
--- /dev/null
+++ b/target/linux/layerscape/patches-5.4/701-net-0293-staging-fsl_ppfe-eth-Enable-PFE-in-clause-45-mode.patch
@@ -0,0 +1,77 @@
+From 666f91f706c167b061ec29f45936a9f24e86e55c Mon Sep 17 00:00:00 2001
+From: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
+Date: Wed, 29 Nov 2017 12:08:00 +0530
+Subject: [PATCH] staging: fsl_ppfe/eth: Enable PFE in clause 45 mode
+
+when we opearate in clause 45 mode, we need to call
+the function get_phy_device() with its 3rd argument as
+"true" and then the resultant phy device needs to be
+register with phy layer via phy_device_register()
+
+Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
+---
+ drivers/staging/fsl_ppfe/pfe_eth.c | 32 +++++++++++++++++++++++++++++---
+ 1 file changed, 29 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/fsl_ppfe/pfe_eth.c
++++ b/drivers/staging/fsl_ppfe/pfe_eth.c
+@@ -923,7 +923,8 @@ static int pfe_eth_mdio_init(struct pfe_
+ struct ls1012a_mdio_platform_data *minfo)
+ {
+ struct mii_bus *bus;
+- int rc;
++ int rc, ii;
++ struct phy_device *phydev;
+
+ netif_info(priv, drv, priv->ndev, "%s\n", __func__);
+ pr_info("%s\n", __func__);
+@@ -962,6 +963,31 @@ static int pfe_eth_mdio_init(struct pfe_
+ }
+
+ priv->mii_bus = bus;
++
++ /* For clause 45 we need to call get_phy_device() with it's
++ * 3rd argument as true and then register the phy device
++ * via phy_device_register()
++ */
++
++ if (priv->einfo->mii_config == PHY_INTERFACE_MODE_2500SGMII) {
++ for (ii = 0; ii < NUM_GEMAC_SUPPORT; ii++) {
++ phydev = get_phy_device(priv->mii_bus,
++ priv->einfo->phy_id + ii, true);
++ if (!phydev || IS_ERR(phydev)) {
++ rc = -EIO;
++ netdev_err(priv->ndev, "fail to get device\n");
++ goto err1;
++ }
++ rc = phy_device_register(phydev);
++ if (rc) {
++ phy_device_free(phydev);
++ netdev_err(priv->ndev,
++ "phy_device_register() failed\n");
++ goto err1;
++ }
++ }
++ }
++
+ pfe_eth_mdio_reset(bus);
+
+ return 0;
+@@ -1149,7 +1175,7 @@ static void ls1012a_configure_serdes(str
+ int sgmii_2500 = 0;
+ struct mii_bus *bus = priv->mii_bus;
+
+- if (priv->einfo->mii_config == PHY_INTERFACE_MODE_SGMII_2500)
++ if (priv->einfo->mii_config == PHY_INTERFACE_MODE_2500SGMII)
+ sgmii_2500 = 1;
+
+ netif_info(priv, drv, ndev, "%s\n", __func__);
+@@ -1198,7 +1224,7 @@ static int pfe_phy_init(struct net_devic
+ netif_info(priv, drv, ndev, "%s: %s\n", __func__, phy_id);
+ interface = priv->einfo->mii_config;
+ if ((interface == PHY_INTERFACE_MODE_SGMII) ||
+- (interface == PHY_INTERFACE_MODE_SGMII_2500)) {
++ (interface == PHY_INTERFACE_MODE_2500SGMII)) {
+ /*Configure SGMII PCS */
+ if (pfe->scfg) {
+ /*Config MDIO from serdes */