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.

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
patch series[1], my PX30 Ringneck, RK3399 Puma and RK3588 Tiger all
reach U-Boot CLI. No further testing (like booting into Linux userspace)
was done.

[1] 
https://lore.kernel.org/u-boot/20250130072100.27297-1-ilias.apalodi...@linaro.org/

Signed-off-by: Quentin Schulz <quentin.sch...@cherry.de>
---
Changes in v2:
- remove removal of bank's pin_base because Jonas said he'll need it for
  a new version of 
https://lore.kernel.org/u-boot/20240802225705.2640999-1-jo...@kwiboo.se/
- fix pin_base computing by init'ing the controller nr_pins to 0,
- make controller nr_pins local to the probe function instead of keeping
  it in rockchip_pin_ctrl struct,
- Link to v1: 
https://lore.kernel.org/r/20250129-rockchip-pinctrl-const-v1-0-450ccdadf...@cherry.de

---
Quentin Schulz (13):
      pinctrl: rockchip: fix bank's pin_base computing
      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 | 5 +++--
 drivers/pinctrl/rockchip/pinctrl-rockchip.h      | 1 -
 drivers/pinctrl/rockchip/pinctrl-rv1108.c        | 2 +-
 drivers/pinctrl/rockchip/pinctrl-rv1126.c        | 1 -
 17 files changed, 15 insertions(+), 18 deletions(-)
---
base-commit: 021baf7b08cceb58bb850859dba1614424e16a83
change-id: 20250129-rockchip-pinctrl-const-f4123019a584

Best regards,
-- 
Quentin Schulz <quentin.sch...@cherry.de>

Reply via email to