kernel: armsr: backport renesas rz-sysc bitfield change

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>
This commit is contained in:
Mathew McBride
2026-05-25 22:12:02 +02:00
committed by Jonas Jelonek
parent fa7c148350
commit 0998624522
@@ -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