[U-Boot] [PATCH 1/2] gpio: fix CONFIG_IS_ENABLED(DM_GPIO) for SPL

Stefan Roese sr at denx.de
Wed Nov 6 05:51:52 UTC 2019


Hi Bin,

On 06.11.19 06:47, Bin Meng wrote:
> Hi Baruch,
> 
> On Sun, Nov 3, 2019 at 5:53 PM Baruch Siach <baruch at tkos.co.il> wrote:
>>
>> There is currently no CONFIG_SPL_DM_GPIO, so CONFIG_IS_ENABLED(DM_GPIO)
>> is always false. As a result the sdhci driver can not use the DM gpio
>> API to read the card-detect signal in SPL. This breaks boot from SD card
>> on the SolidRun Clearfog platform since commit da18c62b6e ("mmc: sdhci:
>> Implement SDHCI card detect") that added sdhci_get_cd().
>>
>> Add a blind CONFIG_SPL_DM_GPIO symbol that is enabled iff CONFIG_DM_GPIO
>> is. That makes CONFIG_IS_ENABLED(DM_GPIO) correct for SPL code.
>>
>> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
>> ---
>>   drivers/gpio/Kconfig | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
> 
> Simon has a patch already for this, see
> http://patchwork.ozlabs.org/patch/1180459/

Thanks for the link.

IIUTC, then the patch from Simon, which also takes care of the TPL GPIO
symbol, has the same potential problem that Baruch's patch has. Enabling
SPL/TPL_DM_GPIO per default might increase the SPL/TPL image size too
much. So it should probably default to 'n' and users / drivers should
enable (imply or select via Kconfig) those symbols when required.

What do you think?

Thanks,
Stefan


More information about the U-Boot mailing list