aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWeijie Gao <weijie.gao@mediatek.com>2023-07-19 17:16:37 +0800
committerTom Rini <trini@konsulko.com>2023-08-03 09:40:50 -0400
commit7cb50cd477b7a28221614e28400fdfe1ba4e61c2 (patch)
tree689fe35e6c02f0fb9961b70c9c5e6b307720ea7f /Makefile
parentdf4c82f014a4f81905c599902572b5451197ca9e (diff)
downloadu-boot-7cb50cd477b7a28221614e28400fdfe1ba4e61c2.zip
u-boot-7cb50cd477b7a28221614e28400fdfe1ba4e61c2.tar.gz
u-boot-7cb50cd477b7a28221614e28400fdfe1ba4e61c2.tar.bz2
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>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions