aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2022-08-20 12:30:50 +0200
committerRobert Marko <robimarko@gmail.com>2023-01-16 12:42:23 +0100
commitc608f7032576296943f6d0914f226ebcfa1cbe4f (patch)
treef0c047d6ab1233d3515c14e8b88accd548bd701e /package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch
parentd092dee9edf2b0703a12258c88d2e3dbc09c9f2a (diff)
downloadupstream-c608f7032576296943f6d0914f226ebcfa1cbe4f.tar.gz
upstream-c608f7032576296943f6d0914f226ebcfa1cbe4f.tar.bz2
upstream-c608f7032576296943f6d0914f226ebcfa1cbe4f.zip
kernel: add Qualcomm SSDK driver
Qualcomm SSDK is driver for Qualcomm Atheros switches and PHY-s. It is quite complicated and used by rest of the Qualcomm SDK stack for anything switch or PHY related. It is required for IPQ807x support as currently, there is no better driver for the built-in switch or UNIPHY. So, lets add the fixed-up version that supports kernel 5.15 for use on ipq807x target until a better driver is available. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com>
Diffstat (limited to 'package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch')
-rw-r--r--package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch b/package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch
new file mode 100644
index 0000000000..f9535fb387
--- /dev/null
+++ b/package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch
@@ -0,0 +1,40 @@
+From 85f988dbc15559a5a2fee606e6ef400aa39fe444 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Wed, 12 May 2021 17:15:46 +0200
+Subject: [PATCH 03/11] SSDK: platform: use of_mdio_find_bus() to get MDIO bus
+
+Kernel has a generic of_mdio_find_bus() which can get the appropriate
+MDIO bus based on the DT node.
+So, drop the getting MDIO from platform data, which no longer works
+in 5.4 and later and use of_mdio_find_bus().
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+---
+ src/init/ssdk_plat.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+--- a/src/init/ssdk_plat.c
++++ b/src/init/ssdk_plat.c
+@@ -753,7 +753,6 @@ static int miibus_get(a_uint32_t dev_id)
+ struct device_node *mdio_node = NULL;
+ struct device_node *switch_node = NULL;
+ struct platform_device *mdio_plat = NULL;
+- struct qca_mdio_data *mdio_data = NULL;
+ struct qca_phy_priv *priv;
+ hsl_reg_mode reg_mode = HSL_REG_LOCAL_BUS;
+ priv = qca_phy_priv_global[dev_id];
+@@ -788,12 +787,7 @@ static int miibus_get(a_uint32_t dev_id)
+
+ if(reg_mode == HSL_REG_LOCAL_BUS)
+ {
+- mdio_data = dev_get_drvdata(&mdio_plat->dev);
+- if (!mdio_data) {
+- SSDK_ERROR("cannot get mdio_data reference from device data\n");
+- return 1;
+- }
+- priv->miibus = mdio_data->mii_bus;
++ priv->miibus = of_mdio_find_bus(mdio_node);
+ }
+ else
+ priv->miibus = dev_get_drvdata(&mdio_plat->dev);