[U-Boot] [PATCH] pinctrl: renesas: Fix linker error when PINCTRL_PFC=n
Marek Vasut
marek.vasut at gmail.com
Tue Apr 2 15:28:43 UTC 2019
On 4/2/19 5:17 PM, Dirk Behme wrote:
> On 02.04.19 15:34, Marek Vasut wrote:
>> On 4/2/19 3:18 PM, Eugeniu Rosca wrote:
>>> With CONFIG_PINCTRL_PFC=n, aarch64-linux-gnu-ld reports:
>>>
>>> -----8<-----
>>> LD u-boot
>>> drivers/gpio/built-in.o: In function `rcar_gpio_request':
>>> drivers/gpio/gpio-rcar.c:128: undefined reference to
>>> `sh_pfc_config_mux_for_gpio'
>>> -----8<-----
>>>
>>> Fix it in the least intrusive way and *avoid* ifdefs in the *.c code.
>>>
>>> Some recent Linux commits sharing the same approach:
>>> -
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=23222f8f8dce
>>>
>>> ("acpi, nfit: Add function to look up nvdimm device and provide
>>> SMBIOS handle")
>>> -
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f143af7501e
>>>
>>> ("spi: make OF helper available for others")
>>> -
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bccd06223f21
>>>
>>> ("IB/uverbs: Add UVERBS_ATTR_FLAGS_IN to the specs language")
>>>
>>> Fixes: f6e545a73f88 ("pfc: rmobile: Add hook to configure pin as GPIO")
>>> Reported-by: Dirk Behme <dirk.behme at de.bosch.com>
>>> Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
>>
>> Does CONFIG_PINCTRL_PFC=n produce a bootable binary ?
>
>
> Why not? Main memory, boot device and UART are configured before U-Boot,
> no?
It depends on what is running before U-Boot, so not necessarily.
And speaking of boot device, consider the case where the system runs
from eMMC and uses the HS200/HS400 modes, which need to switch bus mode
using the pinmux driver.
Is there a real-world use case where you would want to disable the
pinmux driver ? And what is the benefit of that, except that it would
cause all kinds of weird problems.
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list