u-boot/drivers/pinctrl
Jonas Karlman 63348d61a8 pinctrl: rockchip: Fix Data Abort exception in SPL
Using CONFIG_ARMV8_SPL_EXCEPTION_VECTORS=y and CONFIG_OF_LIVE=y triggers
a Data Abort exception from unaligned memory access when the pinctrl
driver iterate node properties, e.g. for UART2 on RK3568.

  setting mux of GPIO0-24 to 1
  setting mux of GPIO0-24 to 1
  "Synchronous Abort" handler, esr 0x96000021
  elr: 000000000000e554 lr : 000000000000e54c
  x 0: 0000000000000a5c x 1: 0000000000000a5c
  x 2: 0000000000000007 x 3: 0000000000000065
  x 4: 0000000000000007 x 5: 0000000000022d4e
  x 6: 0000000000000a7c x 7: 00000000000227a4
  x 8: 0000000000021cf0 x 9: 0000000000000a7c
  x10: 0000000000021cf0 x11: 0000000000021cf0
  x12: 00000000003fda1c x13: 0000000000000007
  x14: 00000000003fd9ec x15: 000000000001c0ff
  x16: 0000000007000000 x17: 00000000fdccd028
  x18: 00000000003fde20 x19: 0000000000000018
  x20: 0000000000020670 x21: 0000000000000000
  x22: 00000000003fdb00 x23: 00000000003fef90
  x24: 0000000000020688 x25: 0000000000000000
  x26: 0000000000000001 x27: 00000000003ffc50
  x28: 0000000000000000 x29: 00000000003fda60

  Code: b94083e1 97ffd508 93407c01 37f81260 (f9401038)
  Resetting CPU ...

Fix this by replacing the loop to access node properties with use of
ofnode_for_each_prop instead of the current ifdef.

Also continue to next prop instead of aborting at first sign of an
unknown property.

This fixes the Data Abort exception and also pinconf of e.g. pull and
drive in SPL, e.g. for UART2 on RK3568.

  setting mux of GPIO0-24 to 1
  setting mux of GPIO0-24 to 1
  setting pull of GPIO0-24 to 5
  setting mux of GPIO0-25 to 1
  setting mux of GPIO0-25 to 1
  setting pull of GPIO0-25 to 5

Fixes: e7ae4cf27a ("pinctrl: rockchip: Add common rockchip pinctrl driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-06-29 18:42:58 +08:00
..
aspeed pinctrl: aspeed: FWSPICS1 and SPI1CS1 pin support 2022-09-13 12:08:40 -04:00
ath79 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
broadcom Correct SPL uses of OF_BOARD 2023-02-10 07:41:41 -05:00
exynos exynos78x0: pinctrl: set const to structs 2021-11-09 14:07:46 +09:00
intel doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mediatek pinctrl: mediatek: set R1/R0 in case pullen/pullsel succeeded 2023-05-03 09:05:24 -04:00
meson pinctrl: meson: Correct the driver GPIO declaration 2021-11-19 18:15:26 +01:00
mscc pinctrl: mscc: Fix multiple definition error 2021-07-07 10:17:54 -04:00
mtmips pinctrl: mtmips: add support for MediaTek MT7621 SoC 2022-07-13 23:03:37 +02:00
mvebu arm64: a37xx: pinctrl: probe after binding 2023-03-01 11:22:27 -07:00
nexell global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
nuvoton pinctrl: nuvoton: add NPCM7xx/NPCM8xx reset type detect 2023-01-10 15:39:06 -05:00
nxp imx: move imx8 sci header file to include/firmware/imx 2023-05-21 16:54:32 +02:00
renesas pinctrl: renesas: r8a779a0: Remove incorrect AVB[01] pinmux configuration 2023-06-08 22:22:38 +02:00
rockchip pinctrl: rockchip: Fix Data Abort exception in SPL 2023-06-29 18:42:58 +08:00
starfive pinctrl: starfive: Add StarFive JH7110 driver 2023-04-20 16:08:44 +08:00
sunxi pinctrl: sunxi: Add NAND pinmuxes 2023-04-28 01:06:57 +01:00
uniphier pinctrl: uniphier: add ethernet TX pin data for PXs3 2023-01-02 14:10:23 -05:00
Kconfig pinctrl: starfive: Add StarFive JH7110 driver 2023-04-20 16:08:44 +08:00
Makefile pinctrl: renesas: add R906G032 driver 2023-05-13 04:01:30 +02:00
pinctrl-apple.c pinctrl: Add Apple pinctrl driver 2021-11-17 17:04:58 -05:00
pinctrl-at91-pio4.c Correct SPL use of ATMEL_PIO4 2023-02-10 08:22:52 -05:00
pinctrl-at91.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pinctrl-generic.c pinctrl: fix buffer size for pinctrl_generic_set_state_prefix() 2022-10-11 15:40:48 -04:00
pinctrl-k210.c pinctrl: k210: Fix bias-pull-up 2022-03-15 17:43:11 +08:00
pinctrl-qe-io.c treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
pinctrl-sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pinctrl-single.c Correct SPL use of SANDBOX 2023-02-10 07:41:40 -05:00
pinctrl-sti.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pinctrl-stmfx.c pinctrl: stmfx: define LOG_CATEGORY 2021-11-30 11:20:34 +01:00
pinctrl-uclass.c pinctrl: fix pinctrl_gpio_get_pinctrl_and_offset for gpio-ranges array 2023-04-03 06:53:53 +12:00
pinctrl-zynqmp.c global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
pinctrl_pic32.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pinctrl_stm32.c pinctrl: pinctrl_stm32: Add slew rate support for stm32_pinctrl_get_pin_muxing() 2023-04-19 09:50:32 +02:00