]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: sunxi: Avoid using .bss for SPL
authorSamuel Holland <samuel@sholland.org>
Tue, 31 Oct 2023 04:57:40 +0000 (23:57 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 12 Nov 2023 16:46:46 +0000 (16:46 +0000)
sunxi platforms put .bss in DRAM, so .bss is not available in SPL before
DRAM controller initialization. Therefore, this buffer must be placed in
the .data section.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
drivers/pinctrl/sunxi/pinctrl-sunxi.c

index bdf6360f176449f8edd5c35bbae633990d20d0b9..37ea93715d1a42b5c8ce7d1d6c072bf3614f7390 100644 (file)
@@ -50,7 +50,7 @@ static const char *sunxi_pinctrl_get_pin_name(struct udevice *dev,
                                              uint pin_selector)
 {
        const struct sunxi_pinctrl_desc *desc = dev_get_priv(dev);
-       static char pin_name[sizeof("PN31")];
+       static char pin_name[sizeof("PN31")] __section(".data");
 
        snprintf(pin_name, sizeof(pin_name), "P%c%d",
                 pin_selector / SUNXI_GPIOS_PER_BANK + desc->first_bank + 'A',