Hi Stefan,

On Tue, Nov 05, 2019 at 04:14:59PM +0100, Stefan Roese wrote:
> On 03.11.19 10:52, Baruch Siach 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 <bar...@tkos.co.il>
> > ---
> >   drivers/gpio/Kconfig | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index c1ad5d64a35c..9bac341c5ed5 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -14,6 +14,11 @@ config DM_GPIO
> >       particular GPIOs that they provide. The uclass interface
> >       is defined in include/asm-generic/gpio.h.
> > +config SPL_DM_GPIO
> > +   bool
> > +   depends on DM_GPIO
> > +   default y
> > +
> >   config GPIO_HOG
> >     bool "Enable GPIO hog support"
> >     depends on DM_GPIO
> 
> I think its preferred to disable such SPL configurations per default
> to not increase the code size here - which is pretty crucial on some
> boards. Better to enable this SPL_DM_GPIO on your target or if it
> makes sense on your platform (MVEBU perhaps with a select or imply
> via the MMC driver in Kconfig).
> 
> What do you think?

Makes sense to me.

Should SPL_DM_GPIO be a blind symbol, or user selectable?

Would it make sense to add

  select SPL_DM_GPIO if (SPL && DM_GPIO)

to CONFIG_MMC_SDHCI_MV?

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to