]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: armsr: backport renesas rz-sysc bitfield change
authorMathew McBride <matt@traverse.com.au>
Sat, 25 Apr 2026 01:03:59 +0000 (11:03 +1000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 25 May 2026 20:12:02 +0000 (22:12 +0200)
In target/linux/generic/backport-6.18/ we have backported
bitfield changes from 6.19.

This change to drivers/soc/renesas/rz-sysc.c was part
of the same patch series and is needed to resolve
a duplicate definition compile error.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/armsr/patches-6.18/802-v6.19-soc-renesas-rz-sysc-Convert-to-common-field_get-help.patch [new file with mode: 0644]

diff --git a/target/linux/armsr/patches-6.18/802-v6.19-soc-renesas-rz-sysc-Convert-to-common-field_get-help.patch b/target/linux/armsr/patches-6.18/802-v6.19-soc-renesas-rz-sysc-Convert-to-common-field_get-help.patch
new file mode 100644 (file)
index 0000000..6ab36ad
--- /dev/null
@@ -0,0 +1,35 @@
+From 4f63bc1c083886ce0d15322391c4a9f375c1fabb Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Thu, 6 Nov 2025 14:34:09 +0100
+Subject: [PATCH] soc: renesas: rz-sysc: Convert to common field_get() helper
+
+Drop the driver-specific field_get() macro, in favor of the globally
+available variant from <linux/bitfield.h>.
+
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
+Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
+(cherry picked from commit 610c4408a2f7a09a00f656459e762ee1e21bbd7b)
+---
+ drivers/soc/renesas/rz-sysc.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/soc/renesas/rz-sysc.c
++++ b/drivers/soc/renesas/rz-sysc.c
+@@ -5,6 +5,7 @@
+  * Copyright (C) 2024 Renesas Electronics Corp.
+  */
++#include <linux/bitfield.h>
+ #include <linux/cleanup.h>
+ #include <linux/io.h>
+ #include <linux/mfd/syscon.h>
+@@ -16,8 +17,6 @@
+ #include "rz-sysc.h"
+-#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
+-
+ /**
+  * struct rz_sysc - RZ SYSC private data structure
+  * @base: SYSC base address