u-boot/drivers/pinctrl
Weijie Gao 7cb50cd477 pinctrl: mediatek: convert most definitions to const
There exists a situation of the mediatek pinctrl driver that may return
wrong pin function value for the pinmux driver:
- All pin function arrays are defined without const
- Some pin function arrays contain all-zero value, e.g.:
  static int mt7622_spi_funcs[] = { 0, 0, 0, 0, 0, 0, };
- These arrays will be put into .bss section during compilation
- .bss section has no "a" attribute and does not exist in the final binary
  file after objcopy.
- FDT binary blob is appended to the u-boot binary, which occupies the
  .bss section.
- During board_f stage, .bss has not been initialized, and contains the
  data of FDT, which is not full-zero data.
- pinctrl driver is initialized in board_f stage, and it will get wrong
  data if another driver is going to set default pinctrl.

Since pinmux information and soc data are only meant to be read-only, thus
should be declared as const. This will force all pinctrl data being put
into .rodata section. Since .rodata has "a" attribute, even the all-zero
data will be allocated and filled with correct value in to u-boot binary.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-03 09:40:50 -04: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 exynos: fix header inclusion guard 2023-05-31 12:31:47 -04:00
intel doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mediatek pinctrl: mediatek: convert most definitions to const 2023-08-03 09:40:50 -04:00
meson pinctrl: meson: add pinctrl driver for Amlogic A1 2023-06-28 10:05:34 +02: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: fix reset reason error for poweron 2023-07-14 12:52:18 -04: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 arm64: zynqmp: Switch to amd.com emails 2023-07-21 09:00:38 +02: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