All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] pinctrl: renesas: Fix linker error when PINCTRL_PFC=n
Date: Tue, 2 Apr 2019 17:28:43 +0200	[thread overview]
Message-ID: <2e9e3d57-2690-4c64-f4cf-c0832f3e74b4@gmail.com> (raw)
In-Reply-To: <47a77b99-711a-fde1-220f-057bdb08ca6a@gmail.com>

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@de.bosch.com>
>>> Signed-off-by: Eugeniu Rosca <erosca@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

  reply	other threads:[~2019-04-02 15:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 13:18 [U-Boot] [PATCH] pinctrl: renesas: Fix linker error when PINCTRL_PFC=n Eugeniu Rosca
2019-04-02 13:34 ` Marek Vasut
2019-04-02 15:17   ` Dirk Behme
2019-04-02 15:28     ` Marek Vasut [this message]
2019-04-02 15:40       ` Eugeniu Rosca
2019-04-02 16:02         ` Marek Vasut
2019-04-02 17:02           ` Eugeniu Rosca
2019-04-03 12:11             ` Marek Vasut
2019-04-03 12:30               ` Dirk Behme
2019-04-03 14:01                 ` Marek Vasut
2019-04-04  1:36                   ` Marek Vasut
2019-04-04 12:42                     ` Eugeniu Rosca
2019-04-21 22:23                       ` Marek Vasut
2019-04-02 17:58         ` Dirk Behme
2019-04-03 12:08           ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e9e3d57-2690-4c64-f4cf-c0832f3e74b4@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.