diff options
author | Robert Marko <robimarko@gmail.com> | 2022-08-20 12:30:50 +0200 |
---|---|---|
committer | Robert Marko <robimarko@gmail.com> | 2023-01-16 12:42:23 +0100 |
commit | c608f7032576296943f6d0914f226ebcfa1cbe4f (patch) | |
tree | f0c047d6ab1233d3515c14e8b88accd548bd701e /package/kernel/qca-ssdk/patches/0004-SSDK-dts-fix-of_get_mac_address.patch | |
parent | d092dee9edf2b0703a12258c88d2e3dbc09c9f2a (diff) | |
download | upstream-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/0004-SSDK-dts-fix-of_get_mac_address.patch')
-rw-r--r-- | package/kernel/qca-ssdk/patches/0004-SSDK-dts-fix-of_get_mac_address.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/package/kernel/qca-ssdk/patches/0004-SSDK-dts-fix-of_get_mac_address.patch b/package/kernel/qca-ssdk/patches/0004-SSDK-dts-fix-of_get_mac_address.patch new file mode 100644 index 0000000000..1dd948643f --- /dev/null +++ b/package/kernel/qca-ssdk/patches/0004-SSDK-dts-fix-of_get_mac_address.patch @@ -0,0 +1,42 @@ +From 079c20aa182c6b623d49e1f375e022dedac7373c Mon Sep 17 00:00:00 2001 +From: Robert Marko <robimarko@gmail.com> +Date: Fri, 13 Aug 2021 20:03:21 +0200 +Subject: [PATCH 04/11] SSDK: dts: fix of_get_mac_address() + +Recently OpenWrt backported the updated of_get_mac_address() +function which returns and error code instead. + +So, patch the SSDK to use it and fix the compilation error. + +Signed-off-by: Robert Marko <robimarko@gmail.com> +--- + src/init/ssdk_dts.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/src/init/ssdk_dts.c ++++ b/src/init/ssdk_dts.c +@@ -921,8 +921,9 @@ static void ssdk_dt_parse_intf_mac(void) + { + struct device_node *dp_node = NULL; + a_uint32_t dp = 0; +- a_uint8_t *maddr = NULL; ++ u8 maddr[ETH_ALEN]; + char dp_name[8] = {0}; ++ int ret; + + for (dp = 1; dp <= SSDK_MAX_NR_ETH; dp++) { + snprintf(dp_name, sizeof(dp_name), "dp%d", dp); +@@ -930,11 +931,11 @@ static void ssdk_dt_parse_intf_mac(void) + if (!dp_node) { + continue; + } +- maddr = (a_uint8_t *)of_get_mac_address(dp_node); ++ ret = of_get_mac_address(dp_node, maddr); + #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) + if (maddr && is_valid_ether_addr(maddr)) { + #else +- if (!IS_ERR(maddr) && is_valid_ether_addr(maddr)) { ++ if (!ret && is_valid_ether_addr(maddr)) { + #endif + ssdk_dt_global.num_intf_mac++; + ether_addr_copy(ssdk_dt_global.intf_mac[dp-1].uc, maddr); |