* [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl
@ 2025-01-29 12:42 Quentin Schulz
2025-01-29 12:42 ` [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member Quentin Schulz
` (14 more replies)
0 siblings, 15 replies; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
While testing some WIP work done by Ilias Apalodimas on guaranteeing
read-only memory areas truly are handled as read-only[1], my RK3588
Tiger couldn't reach U-Boot CLI anymore because of the pinctrl driver
modifying a const struct rockchip_pin_ctrl, triggering a CPU abort.
Instead of going the lazy way and unconstify it, let's fix the actual
issue in play.
The member modified in the const is only ever used for setting a member
from another struct (not const that one). However this other member is
never read! Therefore we can simply afford to remove it which means the
sole reader of the member in the const is now gone, thus making it
possible to remove the member from the const struct as well.
This also means we should be able to constify the private data of the
controller device for all Rockchip devices, instead of having those only
for RK356x, RK3588 and RV1126. With the constify done on top of Ilias
branch[1], my PX30 Ringneck, RK3399 Puma and RK3588 Tiger all reach
U-Boot CLI. No further test (like booting into Linux userspace) was
done.
[1] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/tree/fix_memory_permissions
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (14):
pinctrl: rockchip: remove unused base_pin bank member
pinctrl: rockchip: remove unused nr_pins controller member
pinctrl: rockchip: constify rockchip_pin_ctrl for PX30
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399
pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108
drivers/pinctrl/rockchip/pinctrl-px30.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3036.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3066.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3128.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk322x.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3308.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3399.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3568.c | 1 -
drivers/pinctrl/rockchip/pinctrl-rk3588.c | 1 -
drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 2 --
drivers/pinctrl/rockchip/pinctrl-rockchip.h | 3 ---
drivers/pinctrl/rockchip/pinctrl-rv1108.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rv1126.c | 1 -
17 files changed, 12 insertions(+), 20 deletions(-)
---
base-commit: a2b489b170f8382f746202c36616eaf2bc38fe86
change-id: 20250129-rockchip-pinctrl-const-f4123019a584
Best regards,
--
Quentin Schulz <quentin.schulz@cherry.de>
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:26 ` Kever Yang
2025-01-29 12:42 ` [PATCH 02/14] pinctrl: rockchip: remove unused nr_pins controller member Quentin Schulz
` (13 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
Each bank has a base_pin member that is only set in the core and never
used, so it can be removed.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 1 -
drivers/pinctrl/rockchip/pinctrl-rockchip.h | 2 --
2 files changed, 3 deletions(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index d449d07d32e74d1dec1978b1405bec94887908a2..7369fe12b961290742f6ba24fb32b768531f56f9 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -543,7 +543,6 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(struct udevice *d
int bank_pins = 0;
bank->priv = priv;
- bank->pin_base = ctrl->nr_pins;
ctrl->nr_pins += bank->nr_pins;
/* calculate iomux and drv offsets */
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip.h b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
index df7bc684d29fae4ec650d1e14fe88b35b03244ac..ebd008eede24af32c123634a57f50c0294e76842 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
@@ -262,7 +262,6 @@ struct rockchip_drv {
/**
* @priv: common pinctrl private basedata
- * @pin_base: first pin number
* @nr_pins: number of pins in this bank
* @name: name of the bank
* @bank_num: number of the bank, to account for holes
@@ -274,7 +273,6 @@ struct rockchip_drv {
*/
struct rockchip_pin_bank {
struct rockchip_pinctrl_priv *priv;
- u32 pin_base;
u8 nr_pins;
char *name;
u8 bank_num;
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 02/14] pinctrl: rockchip: remove unused nr_pins controller member
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
2025-01-29 12:42 ` [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:26 ` Kever Yang
2025-01-29 12:42 ` [PATCH 03/14] pinctrl: rockchip: constify rockchip_pin_ctrl for PX30 Quentin Schulz
` (12 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
Each controller has an nr_pins member that is set either through the
rockchip_pin_ctrl struct or from the core (or both).
This is an issue because on RK3568, RK3588 and RV1126, the struct is
const, this means it shouldn't be modified at all. This will trigger a
CPU abort once we enforce the read-only at the MMU level in a few
releases, therefore let's remove this useless (and broken, and soon
breaking) code.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3568.c | 1 -
drivers/pinctrl/rockchip/pinctrl-rk3588.c | 1 -
drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 1 -
drivers/pinctrl/rockchip/pinctrl-rockchip.h | 1 -
drivers/pinctrl/rockchip/pinctrl-rv1126.c | 1 -
5 files changed, 5 deletions(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3568.c b/drivers/pinctrl/rockchip/pinctrl-rk3568.c
index 5deedc648a41950461b6a468e4852fa0a5384207..c8a91b8bb6e925e0f2e7d6cd09f8a06a58be60dd 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3568.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3568.c
@@ -345,7 +345,6 @@ static struct rockchip_pin_bank rk3568_pin_banks[] = {
static const struct rockchip_pin_ctrl rk3568_pin_ctrl = {
.pin_banks = rk3568_pin_banks,
.nr_banks = ARRAY_SIZE(rk3568_pin_banks),
- .nr_pins = 160,
.grf_mux_offset = 0x0,
.pmu_mux_offset = 0x0,
.iomux_routes = rk3568_mux_route_data,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3588.c b/drivers/pinctrl/rockchip/pinctrl-rk3588.c
index 98ababc7c90700c4b27359fc3625519f20437306..fd8e617b9108c7314b8fdd4bbe1dfae71f1b6449 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3588.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3588.c
@@ -324,7 +324,6 @@ static struct rockchip_pin_bank rk3588_pin_banks[] = {
static const struct rockchip_pin_ctrl rk3588_pin_ctrl = {
.pin_banks = rk3588_pin_banks,
.nr_banks = ARRAY_SIZE(rk3588_pin_banks),
- .nr_pins = 160,
.set_mux = rk3588_set_mux,
.set_pull = rk3588_set_pull,
.set_drive = rk3588_set_drive,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index 7369fe12b961290742f6ba24fb32b768531f56f9..b87aed709d62d1e85d0d199c2d6c92aeaec67487 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -543,7 +543,6 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(struct udevice *d
int bank_pins = 0;
bank->priv = priv;
- ctrl->nr_pins += bank->nr_pins;
/* calculate iomux and drv offsets */
for (j = 0; j < 4; j++) {
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip.h b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
index ebd008eede24af32c123634a57f50c0294e76842..2910bbb570d8736487b8cb6c9f87f3e164858b5b 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
@@ -498,7 +498,6 @@ struct rockchip_mux_route_data {
struct rockchip_pin_ctrl {
struct rockchip_pin_bank *pin_banks;
u32 nr_banks;
- u32 nr_pins;
int grf_mux_offset;
int pmu_mux_offset;
int grf_drv_offset;
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1126.c b/drivers/pinctrl/rockchip/pinctrl-rv1126.c
index efa2408b204b421ad1c5a36b039d8c07c5b7237e..3878a5420dcc98f591e4eefadd78a2fe98b61c7e 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1126.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1126.c
@@ -381,7 +381,6 @@ static struct rockchip_pin_bank rv1126_pin_banks[] = {
static const struct rockchip_pin_ctrl rv1126_pin_ctrl = {
.pin_banks = rv1126_pin_banks,
.nr_banks = ARRAY_SIZE(rv1126_pin_banks),
- .nr_pins = 130,
.grf_mux_offset = 0x10004, /* mux offset from GPIO0_D0 */
.pmu_mux_offset = 0x0,
.iomux_routes = rv1126_mux_route_data,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 03/14] pinctrl: rockchip: constify rockchip_pin_ctrl for PX30
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
2025-01-29 12:42 ` [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member Quentin Schulz
2025-01-29 12:42 ` [PATCH 02/14] pinctrl: rockchip: remove unused nr_pins controller member Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 04/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036 Quentin Schulz
` (11 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-px30.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index cc7885bae40802eccfc2cad377727da9ee899139..4595d8a4a23fbf1299ab382fb92eca32527ae637 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -324,7 +324,7 @@ static struct rockchip_pin_bank px30_pin_banks[] = {
),
};
-static struct rockchip_pin_ctrl px30_pin_ctrl = {
+static const struct rockchip_pin_ctrl px30_pin_ctrl = {
.pin_banks = px30_pin_banks,
.nr_banks = ARRAY_SIZE(px30_pin_banks),
.grf_mux_offset = 0x0,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 04/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (2 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 03/14] pinctrl: rockchip: constify rockchip_pin_ctrl for PX30 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 05/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066 Quentin Schulz
` (10 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3036.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
index b14386ccd937d2fcced72b6c9be6f7809194d3c1..8d0c0e0b6552a28e10758eff178e56e1dd0f865e 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
@@ -80,7 +80,7 @@ static struct rockchip_pin_bank rk3036_pin_banks[] = {
PIN_BANK(2, 32, "gpio2"),
};
-static struct rockchip_pin_ctrl rk3036_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3036_pin_ctrl = {
.pin_banks = rk3036_pin_banks,
.nr_banks = ARRAY_SIZE(rk3036_pin_banks),
.grf_mux_offset = 0xa8,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 05/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (3 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 04/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 06/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128 Quentin Schulz
` (9 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3066.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3066.c b/drivers/pinctrl/rockchip/pinctrl-rk3066.c
index 60e088a9a6f0d9133cd0822a9f4816cea18a524d..f773f2a3dab86dc866965cdcfd9b56da9e777acc 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3066.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3066.c
@@ -82,7 +82,7 @@ static struct rockchip_pin_bank rk3066_pin_banks[] = {
PIN_BANK(6, 16, "gpio6"),
};
-static struct rockchip_pin_ctrl rk3066_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3066_pin_ctrl = {
.pin_banks = rk3066_pin_banks,
.nr_banks = ARRAY_SIZE(rk3066_pin_banks),
.grf_mux_offset = 0xa8,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 06/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (4 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 05/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 07/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188 Quentin Schulz
` (8 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3128.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
index d00fc3da8b234667a86d0afea10e47b700cb1e00..9f9c358694ac615f78011b196c22e1b597771c97 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
@@ -171,7 +171,7 @@ static struct rockchip_pin_bank rk3128_pin_banks[] = {
PIN_BANK(3, 32, "gpio3"),
};
-static struct rockchip_pin_ctrl rk3128_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3128_pin_ctrl = {
.pin_banks = rk3128_pin_banks,
.nr_banks = ARRAY_SIZE(rk3128_pin_banks),
.grf_mux_offset = 0xa8,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 07/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (5 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 06/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 08/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228 Quentin Schulz
` (7 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 83db51f66ae43c713a3f80a5442d1f8467a918e9..3a93db5622d70b85dafeea54e064d6df3551f35d 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -105,7 +105,7 @@ static struct rockchip_pin_bank rk3188_pin_banks[] = {
PIN_BANK(3, 32, "gpio3"),
};
-static struct rockchip_pin_ctrl rk3188_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3188_pin_ctrl = {
.pin_banks = rk3188_pin_banks,
.nr_banks = ARRAY_SIZE(rk3188_pin_banks),
.grf_mux_offset = 0x60,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 08/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (6 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 07/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 09/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288 Quentin Schulz
` (6 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk322x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index b804597c048415f3875222b201442fc025b35658..a80978685d4c84edf4297e24958b52a147b3c1f7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -257,7 +257,7 @@ static struct rockchip_pin_bank rk3228_pin_banks[] = {
PIN_BANK(3, 32, "gpio3"),
};
-static struct rockchip_pin_ctrl rk3228_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3228_pin_ctrl = {
.pin_banks = rk3228_pin_banks,
.nr_banks = ARRAY_SIZE(rk3228_pin_banks),
.grf_mux_offset = 0x0,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 09/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (7 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 08/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 10/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308 Quentin Schulz
` (5 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index 3870c1b7a341f998cc0b3cfcaa3a0acbdd0daa39..d3ad1f70e5d60929fafff533c41bd66d1afb3401 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -212,7 +212,7 @@ static struct rockchip_pin_bank rk3288_pin_banks[] = {
PIN_BANK(8, 16, "gpio8"),
};
-static struct rockchip_pin_ctrl rk3288_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3288_pin_ctrl = {
.pin_banks = rk3288_pin_banks,
.nr_banks = ARRAY_SIZE(rk3288_pin_banks),
.grf_mux_offset = 0x0,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 10/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (8 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 09/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 3:16 ` Kever Yang
2025-01-29 12:42 ` [PATCH 11/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328 Quentin Schulz
` (4 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3308.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
index 2cd91b10a3bdbb55cf1e1a56a1b3a240a2899047..5c0e34a7baad835c54f6975017d7e183db5cd84d 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -421,7 +421,7 @@ static struct rockchip_pin_bank rk3308_pin_banks[] = {
IOMUX_8WIDTH_2BIT),
};
-static struct rockchip_pin_ctrl rk3308_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3308_pin_ctrl = {
.pin_banks = rk3308_pin_banks,
.nr_banks = ARRAY_SIZE(rk3308_pin_banks),
.grf_mux_offset = 0x0,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 11/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (9 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 10/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 12:42 ` [PATCH 12/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368 Quentin Schulz
` (3 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 47c2e923a1bb5292bdbe934a91fdb78404c37327..cc9f20a2e43e66d19375b5a112a4abddd81fa2ff 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -285,7 +285,7 @@ static struct rockchip_pin_bank rk3328_pin_banks[] = {
0),
};
-static struct rockchip_pin_ctrl rk3328_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3328_pin_ctrl = {
.pin_banks = rk3328_pin_banks,
.nr_banks = ARRAY_SIZE(rk3328_pin_banks),
.grf_mux_offset = 0x0,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 12/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (10 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 11/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 12:42 ` [PATCH 13/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399 Quentin Schulz
` (2 subsequent siblings)
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index 9ae06ed19e9cda76f6d466fce2e01f48520a668a..aaf24719a16e191478ea407846bd50fc4cd29210 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -152,7 +152,7 @@ static struct rockchip_pin_bank rk3368_pin_banks[] = {
PIN_BANK(3, 32, "gpio3"),
};
-static struct rockchip_pin_ctrl rk3368_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3368_pin_ctrl = {
.pin_banks = rk3368_pin_banks,
.nr_banks = ARRAY_SIZE(rk3368_pin_banks),
.grf_mux_offset = 0x0,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 13/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (11 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 12/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 12:42 ` [PATCH 14/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108 Quentin Schulz
2025-01-29 14:20 ` [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Jonas Karlman
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rk3399.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index b7a5092c032ba3bac0889921d9421bf0d3cd7277..928ed59aec6903fafa97ef6c3f95ad22422475fc 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -279,7 +279,7 @@ static struct rockchip_pin_bank rk3399_pin_banks[] = {
),
};
-static struct rockchip_pin_ctrl rk3399_pin_ctrl = {
+static const struct rockchip_pin_ctrl rk3399_pin_ctrl = {
.pin_banks = rk3399_pin_banks,
.nr_banks = ARRAY_SIZE(rk3399_pin_banks),
.grf_mux_offset = 0xe000,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH 14/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (12 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 13/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399 Quentin Schulz
@ 2025-01-29 12:42 ` Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 14:20 ` [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Jonas Karlman
14 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-29 12:42 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
There's no need to modify private data from the controller, so let's
make that struct const.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
drivers/pinctrl/rockchip/pinctrl-rv1108.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 3eff5f59598c0d9ea9393a1b5e1a82efa8449eb6..780da1e946ea6361fb4c3cad0299296051cee77a 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -263,7 +263,7 @@ static struct rockchip_pin_bank rv1108_pin_banks[] = {
PIN_BANK_IOMUX_FLAGS(3, 32, "gpio3", 0, 0, 0, 0),
};
-static struct rockchip_pin_ctrl rv1108_pin_ctrl = {
+static const struct rockchip_pin_ctrl rv1108_pin_ctrl = {
.pin_banks = rv1108_pin_banks,
.nr_banks = ARRAY_SIZE(rv1108_pin_banks),
.grf_mux_offset = 0x10,
--
2.48.1
^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
` (13 preceding siblings ...)
2025-01-29 12:42 ` [PATCH 14/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108 Quentin Schulz
@ 2025-01-29 14:20 ` Jonas Karlman
2025-01-30 14:16 ` Quentin Schulz
14 siblings, 1 reply; 33+ messages in thread
From: Jonas Karlman @ 2025-01-29 14:20 UTC (permalink / raw)
To: Quentin Schulz
Cc: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini,
Ilias Apalodimas, Jagan Teki, u-boot, Quentin Schulz
Hi Quentin,
On 2025-01-29 13:42, Quentin Schulz wrote:
> While testing some WIP work done by Ilias Apalodimas on guaranteeing
> read-only memory areas truly are handled as read-only[1], my RK3588
> Tiger couldn't reach U-Boot CLI anymore because of the pinctrl driver
> modifying a const struct rockchip_pin_ctrl, triggering a CPU abort.
>
> Instead of going the lazy way and unconstify it, let's fix the actual
> issue in play.
>
> The member modified in the const is only ever used for setting a member
> from another struct (not const that one). However this other member is
> never read! Therefore we can simply afford to remove it which means the
> sole reader of the member in the const is now gone, thus making it
> possible to remove the member from the const struct as well.
>
> This also means we should be able to constify the private data of the
> controller device for all Rockchip devices, instead of having those only
> for RK356x, RK3588 and RV1126. With the constify done on top of Ilias
> branch[1], my PX30 Ringneck, RK3399 Puma and RK3588 Tiger all reach
> U-Boot CLI. No further test (like booting into Linux userspace) was
> done.
>
> [1] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/tree/fix_memory_permissions
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
> Quentin Schulz (14):
> pinctrl: rockchip: remove unused base_pin bank member
> pinctrl: rockchip: remove unused nr_pins controller member
pin_base and nr_pins is used after my "rockchip: pinctrl: Add support
for pinmux status cmd" series [1].
The pin_base should probably be moved to udevice priv data or similar.
nr_pins can probably also be moved to udevice priv data or constify in
driver data.
Do you want me to re-work/re-store these fields in a different way once
I finally send a v3 of that series?
[1] https://patchwork.ozlabs.org/project/uboot/cover/20240802225705.2640999-1-jonas@kwiboo.se/
Regards,
Jonas
> pinctrl: rockchip: constify rockchip_pin_ctrl for PX30
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368
> pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399
> pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108
>
> drivers/pinctrl/rockchip/pinctrl-px30.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3036.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3066.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3128.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk322x.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3308.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3399.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rk3568.c | 1 -
> drivers/pinctrl/rockchip/pinctrl-rk3588.c | 1 -
> drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 2 --
> drivers/pinctrl/rockchip/pinctrl-rockchip.h | 3 ---
> drivers/pinctrl/rockchip/pinctrl-rv1108.c | 2 +-
> drivers/pinctrl/rockchip/pinctrl-rv1126.c | 1 -
> 17 files changed, 12 insertions(+), 20 deletions(-)
> ---
> base-commit: a2b489b170f8382f746202c36616eaf2bc38fe86
> change-id: 20250129-rockchip-pinctrl-const-f4123019a584
>
> Best regards,
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl
2025-01-29 14:20 ` [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Jonas Karlman
@ 2025-01-30 14:16 ` Quentin Schulz
2025-01-30 21:20 ` Jonas Karlman
0 siblings, 1 reply; 33+ messages in thread
From: Quentin Schulz @ 2025-01-30 14:16 UTC (permalink / raw)
To: Jonas Karlman, Quentin Schulz
Cc: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini,
Ilias Apalodimas, Jagan Teki, u-boot
Hi Jonas,
On 1/29/25 3:20 PM, Jonas Karlman wrote:
> Hi Quentin,
>
> On 2025-01-29 13:42, Quentin Schulz wrote:
>> While testing some WIP work done by Ilias Apalodimas on guaranteeing
>> read-only memory areas truly are handled as read-only[1], my RK3588
>> Tiger couldn't reach U-Boot CLI anymore because of the pinctrl driver
>> modifying a const struct rockchip_pin_ctrl, triggering a CPU abort.
>>
>> Instead of going the lazy way and unconstify it, let's fix the actual
>> issue in play.
>>
>> The member modified in the const is only ever used for setting a member
>> from another struct (not const that one). However this other member is
>> never read! Therefore we can simply afford to remove it which means the
>> sole reader of the member in the const is now gone, thus making it
>> possible to remove the member from the const struct as well.
>>
>> This also means we should be able to constify the private data of the
>> controller device for all Rockchip devices, instead of having those only
>> for RK356x, RK3588 and RV1126. With the constify done on top of Ilias
>> branch[1], my PX30 Ringneck, RK3399 Puma and RK3588 Tiger all reach
>> U-Boot CLI. No further test (like booting into Linux userspace) was
>> done.
>>
>> [1] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/tree/fix_memory_permissions
>>
>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>> ---
>> Quentin Schulz (14):
>> pinctrl: rockchip: remove unused base_pin bank member
>> pinctrl: rockchip: remove unused nr_pins controller member
>
> pin_base and nr_pins is used after my "rockchip: pinctrl: Add support
> for pinmux status cmd" series [1].
>
> The pin_base should probably be moved to udevice priv data or similar.
> nr_pins can probably also be moved to udevice priv data or constify in
> driver data.
>
> Do you want me to re-work/re-store these fields in a different way once
> I finally send a v3 of that series?
>
What I can suggest is to remove the setting of ctrl->nr_pins as I
believe we shouldn't be modifying it and we don't need to store it, even
in your patch series as we discussed on IRC, and keep pin_base from the
bank.
What I can offer instead is to use a local variable to replace the one
from the controller struct.
"""
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index d449d07d32e..14aba6f370b 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -531,20 +531,22 @@ static struct rockchip_pin_ctrl
*rockchip_pinctrl_get_soc_data(struct udevice *d
struct rockchip_pin_ctrl *ctrl =
(struct rockchip_pin_ctrl *)dev_get_driver_data(dev);
struct rockchip_pin_bank *bank;
- int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, i, j;
+ int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, ctrl_nr_pins, i, j;
grf_offs = ctrl->grf_mux_offset;
pmu_offs = ctrl->pmu_mux_offset;
drv_pmu_offs = ctrl->pmu_drv_offset;
drv_grf_offs = ctrl->grf_drv_offset;
bank = ctrl->pin_banks;
+ ctrl_nr_pins = 0;
+
for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
int bank_pins = 0;
bank->priv = priv;
- bank->pin_base = ctrl->nr_pins;
- ctrl->nr_pins += bank->nr_pins;
+ bank->pin_base = ctrl_nr_pins;
+ ctrl_nr_pins += bank->nr_pins;
/* calculate iomux and drv offsets */
for (j = 0; j < 4; j++) {
"""
Something like that to replace patches 1 and 2. This should allow you to
keep working on your other patch series without me making it too much
more difficult for you to rebase?
We need this patch series in before
https://lore.kernel.org/u-boot/20250130072100.27297-1-ilias.apalodimas@linaro.org/T/#t
gets is otherwise we don't be able to boot anymore on RK356x, RK3588 and
RV1126. I don't think there's going to be much bikeshedding or
controversy about my series here (in v2 if you agree with the above
diff), the pinctrl series from last August seems like it could be
opening many can of worms so better not rebase this series on top of
that series. Do you agree with that?
Cheers,
Quentin
^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl
2025-01-30 14:16 ` Quentin Schulz
@ 2025-01-30 21:20 ` Jonas Karlman
2025-01-31 13:54 ` Ilias Apalodimas
0 siblings, 1 reply; 33+ messages in thread
From: Jonas Karlman @ 2025-01-30 21:20 UTC (permalink / raw)
To: Quentin Schulz, Quentin Schulz
Cc: Simon Glass, Philipp Tomsich, Kever Yang, Tom Rini,
Ilias Apalodimas, Jagan Teki, u-boot
Hi Quentin,
On 2025-01-30 15:16, Quentin Schulz wrote:
> Hi Jonas,
>
> On 1/29/25 3:20 PM, Jonas Karlman wrote:
>> Hi Quentin,
>>
>> On 2025-01-29 13:42, Quentin Schulz wrote:
>>> While testing some WIP work done by Ilias Apalodimas on guaranteeing
>>> read-only memory areas truly are handled as read-only[1], my RK3588
>>> Tiger couldn't reach U-Boot CLI anymore because of the pinctrl driver
>>> modifying a const struct rockchip_pin_ctrl, triggering a CPU abort.
>>>
>>> Instead of going the lazy way and unconstify it, let's fix the actual
>>> issue in play.
>>>
>>> The member modified in the const is only ever used for setting a member
>>> from another struct (not const that one). However this other member is
>>> never read! Therefore we can simply afford to remove it which means the
>>> sole reader of the member in the const is now gone, thus making it
>>> possible to remove the member from the const struct as well.
>>>
>>> This also means we should be able to constify the private data of the
>>> controller device for all Rockchip devices, instead of having those only
>>> for RK356x, RK3588 and RV1126. With the constify done on top of Ilias
>>> branch[1], my PX30 Ringneck, RK3399 Puma and RK3588 Tiger all reach
>>> U-Boot CLI. No further test (like booting into Linux userspace) was
>>> done.
>>>
>>> [1] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/tree/fix_memory_permissions
>>>
>>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>>> ---
>>> Quentin Schulz (14):
>>> pinctrl: rockchip: remove unused base_pin bank member
>>> pinctrl: rockchip: remove unused nr_pins controller member
>>
>> pin_base and nr_pins is used after my "rockchip: pinctrl: Add support
>> for pinmux status cmd" series [1].
>>
>> The pin_base should probably be moved to udevice priv data or similar.
>> nr_pins can probably also be moved to udevice priv data or constify in
>> driver data.
>>
>> Do you want me to re-work/re-store these fields in a different way once
>> I finally send a v3 of that series?
>>
>
> What I can suggest is to remove the setting of ctrl->nr_pins as I
> believe we shouldn't be modifying it and we don't need to store it, even
> in your patch series as we discussed on IRC, and keep pin_base from the
> bank.
>
> What I can offer instead is to use a local variable to replace the one
> from the controller struct.
>
> """
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> index d449d07d32e..14aba6f370b 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> @@ -531,20 +531,22 @@ static struct rockchip_pin_ctrl
> *rockchip_pinctrl_get_soc_data(struct udevice *d
> struct rockchip_pin_ctrl *ctrl =
> (struct rockchip_pin_ctrl *)dev_get_driver_data(dev);
> struct rockchip_pin_bank *bank;
> - int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, i, j;
> + int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, ctrl_nr_pins, i, j;
>
> grf_offs = ctrl->grf_mux_offset;
> pmu_offs = ctrl->pmu_mux_offset;
> drv_pmu_offs = ctrl->pmu_drv_offset;
> drv_grf_offs = ctrl->grf_drv_offset;
> bank = ctrl->pin_banks;
> + ctrl_nr_pins = 0;
> +
>
> for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
> int bank_pins = 0;
>
> bank->priv = priv;
> - bank->pin_base = ctrl->nr_pins;
> - ctrl->nr_pins += bank->nr_pins;
> + bank->pin_base = ctrl_nr_pins;
> + ctrl_nr_pins += bank->nr_pins;
>
> /* calculate iomux and drv offsets */
> for (j = 0; j < 4; j++) {
> """
>
> Something like that to replace patches 1 and 2. This should allow you to
> keep working on your other patch series without me making it too much
> more difficult for you to rebase?
Thanks for taking a look, and I agree this should help when I pick up
and re-spin my series.
>
> We need this patch series in before
> https://lore.kernel.org/u-boot/20250130072100.27297-1-ilias.apalodimas@linaro.org/T/#t
> gets is otherwise we don't be able to boot anymore on RK356x, RK3588 and
> RV1126. I don't think there's going to be much bikeshedding or
> controversy about my series here (in v2 if you agree with the above
> diff), the pinctrl series from last August seems like it could be
> opening many can of worms so better not rebase this series on top of
> that series. Do you agree with that?
I fully agree, better to get this in first, I will try to re-spin my
series on top of this sometime later once this has landed.
Regards,
Jonas
>
> Cheers,
> Quentin
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl
2025-01-30 21:20 ` Jonas Karlman
@ 2025-01-31 13:54 ` Ilias Apalodimas
0 siblings, 0 replies; 33+ messages in thread
From: Ilias Apalodimas @ 2025-01-31 13:54 UTC (permalink / raw)
To: Jonas Karlman
Cc: Quentin Schulz, Quentin Schulz, Simon Glass, Philipp Tomsich,
Kever Yang, Tom Rini, Jagan Teki, u-boot
Hi Jonas,
On Thu, 30 Jan 2025 at 23:20, Jonas Karlman <jonas@kwiboo.se> wrote:
>
> Hi Quentin,
>
> On 2025-01-30 15:16, Quentin Schulz wrote:
> > Hi Jonas,
> >
> > On 1/29/25 3:20 PM, Jonas Karlman wrote:
> >> Hi Quentin,
> >>
> >> On 2025-01-29 13:42, Quentin Schulz wrote:
> >>> While testing some WIP work done by Ilias Apalodimas on guaranteeing
> >>> read-only memory areas truly are handled as read-only[1], my RK3588
> >>> Tiger couldn't reach U-Boot CLI anymore because of the pinctrl driver
> >>> modifying a const struct rockchip_pin_ctrl, triggering a CPU abort.
> >>>
> >>> Instead of going the lazy way and unconstify it, let's fix the actual
> >>> issue in play.
> >>>
> >>> The member modified in the const is only ever used for setting a member
> >>> from another struct (not const that one). However this other member is
> >>> never read! Therefore we can simply afford to remove it which means the
> >>> sole reader of the member in the const is now gone, thus making it
> >>> possible to remove the member from the const struct as well.
> >>>
> >>> This also means we should be able to constify the private data of the
> >>> controller device for all Rockchip devices, instead of having those only
> >>> for RK356x, RK3588 and RV1126. With the constify done on top of Ilias
> >>> branch[1], my PX30 Ringneck, RK3399 Puma and RK3588 Tiger all reach
> >>> U-Boot CLI. No further test (like booting into Linux userspace) was
> >>> done.
> >>>
> >>> [1] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/tree/fix_memory_permissions
> >>>
> >>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> >>> ---
> >>> Quentin Schulz (14):
> >>> pinctrl: rockchip: remove unused base_pin bank member
> >>> pinctrl: rockchip: remove unused nr_pins controller member
> >>
> >> pin_base and nr_pins is used after my "rockchip: pinctrl: Add support
> >> for pinmux status cmd" series [1].
> >>
> >> The pin_base should probably be moved to udevice priv data or similar.
> >> nr_pins can probably also be moved to udevice priv data or constify in
> >> driver data.
> >>
> >> Do you want me to re-work/re-store these fields in a different way once
> >> I finally send a v3 of that series?
> >>
> >
> > What I can suggest is to remove the setting of ctrl->nr_pins as I
> > believe we shouldn't be modifying it and we don't need to store it, even
> > in your patch series as we discussed on IRC, and keep pin_base from the
> > bank.
> >
> > What I can offer instead is to use a local variable to replace the one
> > from the controller struct.
> >
> > """
> > diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> > b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> > index d449d07d32e..14aba6f370b 100644
> > --- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> > +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> > @@ -531,20 +531,22 @@ static struct rockchip_pin_ctrl
> > *rockchip_pinctrl_get_soc_data(struct udevice *d
> > struct rockchip_pin_ctrl *ctrl =
> > (struct rockchip_pin_ctrl *)dev_get_driver_data(dev);
> > struct rockchip_pin_bank *bank;
> > - int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, i, j;
> > + int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, ctrl_nr_pins, i, j;
> >
> > grf_offs = ctrl->grf_mux_offset;
> > pmu_offs = ctrl->pmu_mux_offset;
> > drv_pmu_offs = ctrl->pmu_drv_offset;
> > drv_grf_offs = ctrl->grf_drv_offset;
> > bank = ctrl->pin_banks;
> > + ctrl_nr_pins = 0;
> > +
> >
> > for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
> > int bank_pins = 0;
> >
> > bank->priv = priv;
> > - bank->pin_base = ctrl->nr_pins;
> > - ctrl->nr_pins += bank->nr_pins;
> > + bank->pin_base = ctrl_nr_pins;
> > + ctrl_nr_pins += bank->nr_pins;
> >
> > /* calculate iomux and drv offsets */
> > for (j = 0; j < 4; j++) {
> > """
> >
> > Something like that to replace patches 1 and 2. This should allow you to
> > keep working on your other patch series without me making it too much
> > more difficult for you to rebase?
>
> Thanks for taking a look, and I agree this should help when I pick up
> and re-spin my series.
>
> >
> > We need this patch series in before
> > https://lore.kernel.org/u-boot/20250130072100.27297-1-ilias.apalodimas@linaro.org/T/#t
> > gets is otherwise we don't be able to boot anymore on RK356x, RK3588 and
> > RV1126. I don't think there's going to be much bikeshedding or
> > controversy about my series here (in v2 if you agree with the above
> > diff), the pinctrl series from last August seems like it could be
> > opening many can of worms so better not rebase this series on top of
> > that series. Do you agree with that?
>
> I fully agree, better to get this in first, I will try to re-spin my
> series on top of this sometime later once this has landed.
Ok, I'll post this after the weekend in case I get more review
comments. Keep in mind that i'll hide it behind a Kconfig option for
now, since we seem to have enough cases of code writing const
variables
Cheers
/Ilias
>
> Regards,
> Jonas
>
> >
> > Cheers,
> > Quentin
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member
2025-01-29 12:42 ` [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member Quentin Schulz
@ 2025-04-08 2:26 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:26 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> Each bank has a base_pin member that is only set in the core and never
> used, so it can be removed.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 1 -
> drivers/pinctrl/rockchip/pinctrl-rockchip.h | 2 --
> 2 files changed, 3 deletions(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> index d449d07d32e74d1dec1978b1405bec94887908a2..7369fe12b961290742f6ba24fb32b768531f56f9 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> @@ -543,7 +543,6 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(struct udevice *d
> int bank_pins = 0;
>
> bank->priv = priv;
> - bank->pin_base = ctrl->nr_pins;
> ctrl->nr_pins += bank->nr_pins;
>
> /* calculate iomux and drv offsets */
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip.h b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
> index df7bc684d29fae4ec650d1e14fe88b35b03244ac..ebd008eede24af32c123634a57f50c0294e76842 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
> +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
> @@ -262,7 +262,6 @@ struct rockchip_drv {
>
> /**
> * @priv: common pinctrl private basedata
> - * @pin_base: first pin number
> * @nr_pins: number of pins in this bank
> * @name: name of the bank
> * @bank_num: number of the bank, to account for holes
> @@ -274,7 +273,6 @@ struct rockchip_drv {
> */
> struct rockchip_pin_bank {
> struct rockchip_pinctrl_priv *priv;
> - u32 pin_base;
> u8 nr_pins;
> char *name;
> u8 bank_num;
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 02/14] pinctrl: rockchip: remove unused nr_pins controller member
2025-01-29 12:42 ` [PATCH 02/14] pinctrl: rockchip: remove unused nr_pins controller member Quentin Schulz
@ 2025-04-08 2:26 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:26 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> Each controller has an nr_pins member that is set either through the
> rockchip_pin_ctrl struct or from the core (or both).
>
> This is an issue because on RK3568, RK3588 and RV1126, the struct is
> const, this means it shouldn't be modified at all. This will trigger a
> CPU abort once we enforce the read-only at the MMU level in a few
> releases, therefore let's remove this useless (and broken, and soon
> breaking) code.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3568.c | 1 -
> drivers/pinctrl/rockchip/pinctrl-rk3588.c | 1 -
> drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 1 -
> drivers/pinctrl/rockchip/pinctrl-rockchip.h | 1 -
> drivers/pinctrl/rockchip/pinctrl-rv1126.c | 1 -
> 5 files changed, 5 deletions(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3568.c b/drivers/pinctrl/rockchip/pinctrl-rk3568.c
> index 5deedc648a41950461b6a468e4852fa0a5384207..c8a91b8bb6e925e0f2e7d6cd09f8a06a58be60dd 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3568.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3568.c
> @@ -345,7 +345,6 @@ static struct rockchip_pin_bank rk3568_pin_banks[] = {
> static const struct rockchip_pin_ctrl rk3568_pin_ctrl = {
> .pin_banks = rk3568_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3568_pin_banks),
> - .nr_pins = 160,
> .grf_mux_offset = 0x0,
> .pmu_mux_offset = 0x0,
> .iomux_routes = rk3568_mux_route_data,
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3588.c b/drivers/pinctrl/rockchip/pinctrl-rk3588.c
> index 98ababc7c90700c4b27359fc3625519f20437306..fd8e617b9108c7314b8fdd4bbe1dfae71f1b6449 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3588.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3588.c
> @@ -324,7 +324,6 @@ static struct rockchip_pin_bank rk3588_pin_banks[] = {
> static const struct rockchip_pin_ctrl rk3588_pin_ctrl = {
> .pin_banks = rk3588_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3588_pin_banks),
> - .nr_pins = 160,
> .set_mux = rk3588_set_mux,
> .set_pull = rk3588_set_pull,
> .set_drive = rk3588_set_drive,
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> index 7369fe12b961290742f6ba24fb32b768531f56f9..b87aed709d62d1e85d0d199c2d6c92aeaec67487 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
> @@ -543,7 +543,6 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(struct udevice *d
> int bank_pins = 0;
>
> bank->priv = priv;
> - ctrl->nr_pins += bank->nr_pins;
>
> /* calculate iomux and drv offsets */
> for (j = 0; j < 4; j++) {
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip.h b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
> index ebd008eede24af32c123634a57f50c0294e76842..2910bbb570d8736487b8cb6c9f87f3e164858b5b 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
> +++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
> @@ -498,7 +498,6 @@ struct rockchip_mux_route_data {
> struct rockchip_pin_ctrl {
> struct rockchip_pin_bank *pin_banks;
> u32 nr_banks;
> - u32 nr_pins;
> int grf_mux_offset;
> int pmu_mux_offset;
> int grf_drv_offset;
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1126.c b/drivers/pinctrl/rockchip/pinctrl-rv1126.c
> index efa2408b204b421ad1c5a36b039d8c07c5b7237e..3878a5420dcc98f591e4eefadd78a2fe98b61c7e 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rv1126.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rv1126.c
> @@ -381,7 +381,6 @@ static struct rockchip_pin_bank rv1126_pin_banks[] = {
> static const struct rockchip_pin_ctrl rv1126_pin_ctrl = {
> .pin_banks = rv1126_pin_banks,
> .nr_banks = ARRAY_SIZE(rv1126_pin_banks),
> - .nr_pins = 130,
> .grf_mux_offset = 0x10004, /* mux offset from GPIO0_D0 */
> .pmu_mux_offset = 0x0,
> .iomux_routes = rv1126_mux_route_data,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 03/14] pinctrl: rockchip: constify rockchip_pin_ctrl for PX30
2025-01-29 12:42 ` [PATCH 03/14] pinctrl: rockchip: constify rockchip_pin_ctrl for PX30 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-px30.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
> index cc7885bae40802eccfc2cad377727da9ee899139..4595d8a4a23fbf1299ab382fb92eca32527ae637 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-px30.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
> @@ -324,7 +324,7 @@ static struct rockchip_pin_bank px30_pin_banks[] = {
> ),
> };
>
> -static struct rockchip_pin_ctrl px30_pin_ctrl = {
> +static const struct rockchip_pin_ctrl px30_pin_ctrl = {
> .pin_banks = px30_pin_banks,
> .nr_banks = ARRAY_SIZE(px30_pin_banks),
> .grf_mux_offset = 0x0,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 04/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036
2025-01-29 12:42 ` [PATCH 04/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3036.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
> index b14386ccd937d2fcced72b6c9be6f7809194d3c1..8d0c0e0b6552a28e10758eff178e56e1dd0f865e 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
> @@ -80,7 +80,7 @@ static struct rockchip_pin_bank rk3036_pin_banks[] = {
> PIN_BANK(2, 32, "gpio2"),
> };
>
> -static struct rockchip_pin_ctrl rk3036_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3036_pin_ctrl = {
> .pin_banks = rk3036_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3036_pin_banks),
> .grf_mux_offset = 0xa8,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 05/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066
2025-01-29 12:42 ` [PATCH 05/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3066.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3066.c b/drivers/pinctrl/rockchip/pinctrl-rk3066.c
> index 60e088a9a6f0d9133cd0822a9f4816cea18a524d..f773f2a3dab86dc866965cdcfd9b56da9e777acc 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3066.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3066.c
> @@ -82,7 +82,7 @@ static struct rockchip_pin_bank rk3066_pin_banks[] = {
> PIN_BANK(6, 16, "gpio6"),
> };
>
> -static struct rockchip_pin_ctrl rk3066_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3066_pin_ctrl = {
> .pin_banks = rk3066_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3066_pin_banks),
> .grf_mux_offset = 0xa8,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 06/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128
2025-01-29 12:42 ` [PATCH 06/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3128.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
> index d00fc3da8b234667a86d0afea10e47b700cb1e00..9f9c358694ac615f78011b196c22e1b597771c97 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
> @@ -171,7 +171,7 @@ static struct rockchip_pin_bank rk3128_pin_banks[] = {
> PIN_BANK(3, 32, "gpio3"),
> };
>
> -static struct rockchip_pin_ctrl rk3128_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3128_pin_ctrl = {
> .pin_banks = rk3128_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3128_pin_banks),
> .grf_mux_offset = 0xa8,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 07/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188
2025-01-29 12:42 ` [PATCH 07/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
> index 83db51f66ae43c713a3f80a5442d1f8467a918e9..3a93db5622d70b85dafeea54e064d6df3551f35d 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
> @@ -105,7 +105,7 @@ static struct rockchip_pin_bank rk3188_pin_banks[] = {
> PIN_BANK(3, 32, "gpio3"),
> };
>
> -static struct rockchip_pin_ctrl rk3188_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3188_pin_ctrl = {
> .pin_banks = rk3188_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3188_pin_banks),
> .grf_mux_offset = 0x60,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 08/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228
2025-01-29 12:42 ` [PATCH 08/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk322x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
> index b804597c048415f3875222b201442fc025b35658..a80978685d4c84edf4297e24958b52a147b3c1f7 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
> @@ -257,7 +257,7 @@ static struct rockchip_pin_bank rk3228_pin_banks[] = {
> PIN_BANK(3, 32, "gpio3"),
> };
>
> -static struct rockchip_pin_ctrl rk3228_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3228_pin_ctrl = {
> .pin_banks = rk3228_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3228_pin_banks),
> .grf_mux_offset = 0x0,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 09/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288
2025-01-29 12:42 ` [PATCH 09/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288 Quentin Schulz
@ 2025-04-08 2:27 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 2:27 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
> index 3870c1b7a341f998cc0b3cfcaa3a0acbdd0daa39..d3ad1f70e5d60929fafff533c41bd66d1afb3401 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
> @@ -212,7 +212,7 @@ static struct rockchip_pin_bank rk3288_pin_banks[] = {
> PIN_BANK(8, 16, "gpio8"),
> };
>
> -static struct rockchip_pin_ctrl rk3288_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3288_pin_ctrl = {
> .pin_banks = rk3288_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3288_pin_banks),
> .grf_mux_offset = 0x0,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 10/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308
2025-01-29 12:42 ` [PATCH 10/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308 Quentin Schulz
@ 2025-04-08 3:16 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 3:16 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3308.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
> index 2cd91b10a3bdbb55cf1e1a56a1b3a240a2899047..5c0e34a7baad835c54f6975017d7e183db5cd84d 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
> @@ -421,7 +421,7 @@ static struct rockchip_pin_bank rk3308_pin_banks[] = {
> IOMUX_8WIDTH_2BIT),
> };
>
> -static struct rockchip_pin_ctrl rk3308_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3308_pin_ctrl = {
> .pin_banks = rk3308_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3308_pin_banks),
> .grf_mux_offset = 0x0,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 11/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328
2025-01-29 12:42 ` [PATCH 11/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328 Quentin Schulz
@ 2025-04-08 3:17 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 3:17 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
> index 47c2e923a1bb5292bdbe934a91fdb78404c37327..cc9f20a2e43e66d19375b5a112a4abddd81fa2ff 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
> @@ -285,7 +285,7 @@ static struct rockchip_pin_bank rk3328_pin_banks[] = {
> 0),
> };
>
> -static struct rockchip_pin_ctrl rk3328_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3328_pin_ctrl = {
> .pin_banks = rk3328_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3328_pin_banks),
> .grf_mux_offset = 0x0,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 12/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368
2025-01-29 12:42 ` [PATCH 12/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368 Quentin Schulz
@ 2025-04-08 3:17 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 3:17 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
> index 9ae06ed19e9cda76f6d466fce2e01f48520a668a..aaf24719a16e191478ea407846bd50fc4cd29210 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
> @@ -152,7 +152,7 @@ static struct rockchip_pin_bank rk3368_pin_banks[] = {
> PIN_BANK(3, 32, "gpio3"),
> };
>
> -static struct rockchip_pin_ctrl rk3368_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3368_pin_ctrl = {
> .pin_banks = rk3368_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3368_pin_banks),
> .grf_mux_offset = 0x0,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 13/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399
2025-01-29 12:42 ` [PATCH 13/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399 Quentin Schulz
@ 2025-04-08 3:17 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 3:17 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rk3399.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
> index b7a5092c032ba3bac0889921d9421bf0d3cd7277..928ed59aec6903fafa97ef6c3f95ad22422475fc 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
> @@ -279,7 +279,7 @@ static struct rockchip_pin_bank rk3399_pin_banks[] = {
> ),
> };
>
> -static struct rockchip_pin_ctrl rk3399_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rk3399_pin_ctrl = {
> .pin_banks = rk3399_pin_banks,
> .nr_banks = ARRAY_SIZE(rk3399_pin_banks),
> .grf_mux_offset = 0xe000,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [PATCH 14/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108
2025-01-29 12:42 ` [PATCH 14/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108 Quentin Schulz
@ 2025-04-08 3:17 ` Kever Yang
0 siblings, 0 replies; 33+ messages in thread
From: Kever Yang @ 2025-04-08 3:17 UTC (permalink / raw)
To: Quentin Schulz, Simon Glass, Philipp Tomsich, Tom Rini
Cc: Ilias Apalodimas, Jonas Karlman, Jagan Teki, u-boot,
Quentin Schulz
On 2025/1/29 20:42, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> There's no need to modify private data from the controller, so let's
> make that struct const.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/pinctrl/rockchip/pinctrl-rv1108.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
> index 3eff5f59598c0d9ea9393a1b5e1a82efa8449eb6..780da1e946ea6361fb4c3cad0299296051cee77a 100644
> --- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
> +++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
> @@ -263,7 +263,7 @@ static struct rockchip_pin_bank rv1108_pin_banks[] = {
> PIN_BANK_IOMUX_FLAGS(3, 32, "gpio3", 0, 0, 0, 0),
> };
>
> -static struct rockchip_pin_ctrl rv1108_pin_ctrl = {
> +static const struct rockchip_pin_ctrl rv1108_pin_ctrl = {
> .pin_banks = rv1108_pin_banks,
> .nr_banks = ARRAY_SIZE(rv1108_pin_banks),
> .grf_mux_offset = 0x10,
>
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2025-04-08 3:17 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29 12:42 [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Quentin Schulz
2025-01-29 12:42 ` [PATCH 01/14] pinctrl: rockchip: remove unused base_pin bank member Quentin Schulz
2025-04-08 2:26 ` Kever Yang
2025-01-29 12:42 ` [PATCH 02/14] pinctrl: rockchip: remove unused nr_pins controller member Quentin Schulz
2025-04-08 2:26 ` Kever Yang
2025-01-29 12:42 ` [PATCH 03/14] pinctrl: rockchip: constify rockchip_pin_ctrl for PX30 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 04/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 05/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 06/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 07/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 08/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 09/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288 Quentin Schulz
2025-04-08 2:27 ` Kever Yang
2025-01-29 12:42 ` [PATCH 10/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308 Quentin Schulz
2025-04-08 3:16 ` Kever Yang
2025-01-29 12:42 ` [PATCH 11/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328 Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 12:42 ` [PATCH 12/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368 Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 12:42 ` [PATCH 13/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399 Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 12:42 ` [PATCH 14/14] pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108 Quentin Schulz
2025-04-08 3:17 ` Kever Yang
2025-01-29 14:20 ` [PATCH 00/14] pinctrl: rockchip: fix editing const struct + constify rockchip_pin_ctrl Jonas Karlman
2025-01-30 14:16 ` Quentin Schulz
2025-01-30 21:20 ` Jonas Karlman
2025-01-31 13:54 ` Ilias Apalodimas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox