diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-07-21 12:58:30 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-07-21 14:08:21 +0200 |
commit | d2a4b8774376f7612e8cca096879edb2c520ac35 (patch) | |
tree | e34a08fec8c72294d2fe0638a8cc4e8afd9a1637 /target | |
parent | 4ad4419490dd56a4cb18fb9ffb95661d5640a3cd (diff) | |
download | openwrt-d2a4b8774376f7612e8cca096879edb2c520ac35.tar.gz openwrt-d2a4b8774376f7612e8cca096879edb2c520ac35.tar.bz2 openwrt-d2a4b8774376f7612e8cca096879edb2c520ac35.zip |
ipq806x: 6.1: backport patch fixing broken hwspinlock
Backport merged patch fixing broken hwspinlock due to missing regmap
config for SFPB MMIO implementation.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch b/target/linux/ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch new file mode 100644 index 0000000000..faa9044d33 --- /dev/null +++ b/target/linux/ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch @@ -0,0 +1,49 @@ +From 23316be8a9d450f33a21f1efe7d89570becbec58 Mon Sep 17 00:00:00 2001 +From: Christian Marangi <ansuelsmth@gmail.com> +Date: Sun, 16 Jul 2023 04:28:04 +0200 +Subject: [PATCH] hwspinlock: qcom: add missing regmap config for SFPB MMIO + implementation + +Commit 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older +SoCs") introduced and made regmap_config mandatory in the of_data struct +but didn't add the regmap_config for sfpb based devices. + +SFPB based devices can both use the legacy syscon way to probe or the +new MMIO way and currently device that use the MMIO way are broken as +they lack the definition of the now required regmap_config and always +return -EINVAL (and indirectly makes fail probing everything that +depends on it, smem, nandc with smem-parser...) + +Fix this by correctly adding the missing regmap_config and restore +function of hwspinlock on SFPB based devices with MMIO implementation. + +Cc: stable@vger.kernel.org +Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs") +Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> +Link: https://lore.kernel.org/r/20230716022804.21239-1-ansuelsmth@gmail.com +Signed-off-by: Bjorn Andersson <andersson@kernel.org> +--- + drivers/hwspinlock/qcom_hwspinlock.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/hwspinlock/qcom_hwspinlock.c ++++ b/drivers/hwspinlock/qcom_hwspinlock.c +@@ -69,9 +69,18 @@ static const struct hwspinlock_ops qcom_ + .unlock = qcom_hwspinlock_unlock, + }; + ++static const struct regmap_config sfpb_mutex_config = { ++ .reg_bits = 32, ++ .reg_stride = 4, ++ .val_bits = 32, ++ .max_register = 0x100, ++ .fast_io = true, ++}; ++ + static const struct qcom_hwspinlock_of_data of_sfpb_mutex = { + .offset = 0x4, + .stride = 0x4, ++ .regmap_config = &sfpb_mutex_config, + }; + + static const struct regmap_config tcsr_msm8226_mutex_config = { |