[openwrt/openwrt] ath79: skip reset control for syscon devices
LEDE Commits
lede-commits at lists.infradead.org
Thu May 9 14:58:51 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/26390b536165205d10d0583b8b52c33c225433c4
commit 26390b536165205d10d0583b8b52c33c225433c4
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800
ath79: skip reset control for syscon devices
Fix the issue of exclusive reset controller acquisition failure on
kernel 6.6.
Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
target/linux/ath79/dts/ath79.dtsi | 2 ++
...ort-skip-reset-control-for-syscon-devices.patch | 37 ++++++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/target/linux/ath79/dts/ath79.dtsi b/target/linux/ath79/dts/ath79.dtsi
index 89d9058414..8849d729ac 100644
--- a/target/linux/ath79/dts/ath79.dtsi
+++ b/target/linux/ath79/dts/ath79.dtsi
@@ -52,6 +52,7 @@
interrupts = <4>;
phy-mode = "mii";
+ syscon-no-reset;
mdio0: mdio {
status = "disabled";
@@ -75,6 +76,7 @@
interrupts = <5>;
phy-mode = "mii";
+ syscon-no-reset;
mdio1: mdio {
status = "disabled";
diff --git a/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch b/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch
new file mode 100644
index 0000000000..c73c8443b9
--- /dev/null
+++ b/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch
@@ -0,0 +1,37 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Wed, 13 Mar 2024 22:36:31 +0800
+Subject: [PATCH] mfd: syscon: support skip reset control for syscon devices
+
+Some platform device drivers(e.g. ag71xx) expect exclusive reset
+control. Fetching reset controller for syscon[1] will break these
+drivers. This patch introduces a new property 'syscon-no-reset'
+to skip it.
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=7d1e3bd94828ad9fc86f55253cd6fec8edd65394
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ drivers/mfd/syscon.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/mfd/syscon.c
++++ b/drivers/mfd/syscon.c
+@@ -52,7 +52,7 @@ static struct syscon *of_syscon_register
+ int ret;
+ struct regmap_config syscon_config = syscon_regmap_config;
+ struct resource res;
+- struct reset_control *reset;
++ struct reset_control *reset = NULL;
+
+ syscon = kzalloc(sizeof(*syscon), GFP_KERNEL);
+ if (!syscon)
+@@ -134,7 +134,8 @@ static struct syscon *of_syscon_register
+ goto err_attach_clk;
+ }
+
+- reset = of_reset_control_get_optional_exclusive(np, NULL);
++ if (!of_property_read_bool(np, "syscon-no-reset"))
++ reset = of_reset_control_get_optional_exclusive(np, NULL);
+ if (IS_ERR(reset)) {
+ ret = PTR_ERR(reset);
+ goto err_attach_clk;
More information about the lede-commits
mailing list