mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-16 01:38:22 +00:00
7cb50cd477
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> |
||
---|---|---|
.. | ||
aspeed | ||
ath79 | ||
broadcom | ||
exynos | ||
intel | ||
mediatek | ||
meson | ||
mscc | ||
mtmips | ||
mvebu | ||
nexell | ||
nuvoton | ||
nxp | ||
renesas | ||
rockchip | ||
starfive | ||
sunxi | ||
uniphier | ||
Kconfig | ||
Makefile | ||
pinctrl-apple.c | ||
pinctrl-at91-pio4.c | ||
pinctrl-at91.c | ||
pinctrl-generic.c | ||
pinctrl-k210.c | ||
pinctrl-qe-io.c | ||
pinctrl-sandbox.c | ||
pinctrl-single.c | ||
pinctrl-sti.c | ||
pinctrl-stmfx.c | ||
pinctrl-uclass.c | ||
pinctrl-zynqmp.c | ||
pinctrl_pic32.c | ||
pinctrl_stm32.c |