diff mbox series

[U-Boot,v2] spl: Introduce SPL_DM_GPIO Kconfig define

Message ID 20190929155441.24324-1-lukma@denx.de
State Superseded
Delegated to: Tom Rini
Headers show
Series [U-Boot,v2] spl: Introduce SPL_DM_GPIO Kconfig define | expand

Commit Message

Lukasz Majewski Sept. 29, 2019, 3:54 p.m. UTC
This define indicates if DM_GPIO shall be supported in SPL. This allows
proper operation of DM converted GPIO drivers in SPL, which use
boards.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

Changes in v2:
- Add dependency on DM_GPIO

 common/spl/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Lukasz Majewski Oct. 9, 2019, 9:02 a.m. UTC | #1
Dear Tom,

> This define indicates if DM_GPIO shall be supported in SPL. This
> allows proper operation of DM converted GPIO drivers in SPL, which use
> boards.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
> 
> Changes in v2:
> - Add dependency on DM_GPIO
> 

Tom, are there any issues preventing this patch from being applied to
-master?

>  common/spl/Kconfig | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index f467eca2be..e3df8efa7e 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -452,6 +452,12 @@ config SPL_DMA_SUPPORT
>  	  the CPU moving the data. Enable this option to build the
> drivers in drivers/dma as part of an SPL build.
>  
> +config SPL_DM_GPIO
> +	bool "Support Driver Model GPIO drivers"
> +	depends on SPL_GPIO_SUPPORT && DM_GPIO
> +	help
> +	  Enable support for Driver Model based GPIO drivers in SPL.
> +
>  config SPL_DRIVERS_MISC_SUPPORT
>  	bool "Support misc drivers"
>  	help




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Simon Glass Oct. 11, 2019, 11:01 p.m. UTC | #2
Hi Lukasz,

On Wed, 9 Oct 2019 at 03:02, Lukasz Majewski <lukma@denx.de> wrote:
>
> Dear Tom,
>
> > This define indicates if DM_GPIO shall be supported in SPL. This
> > allows proper operation of DM converted GPIO drivers in SPL, which use
> > boards.
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >
> > Changes in v2:
> > - Add dependency on DM_GPIO
> >
>
> Tom, are there any issues preventing this patch from being applied to
> -master?

This does not actually define DM_GPIO anywhere though, so this is unused.

As it happens I sent a similar patch[1], but it doesn't work. I'll try again.

>
> >  common/spl/Kconfig | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > index f467eca2be..e3df8efa7e 100644
> > --- a/common/spl/Kconfig
> > +++ b/common/spl/Kconfig
> > @@ -452,6 +452,12 @@ config SPL_DMA_SUPPORT
> >         the CPU moving the data. Enable this option to build the
> > drivers in drivers/dma as part of an SPL build.
> >
> > +config SPL_DM_GPIO
> > +     bool "Support Driver Model GPIO drivers"
> > +     depends on SPL_GPIO_SUPPORT && DM_GPIO
> > +     help
> > +       Enable support for Driver Model based GPIO drivers in SPL.
> > +
> >  config SPL_DRIVERS_MISC_SUPPORT
> >       bool "Support misc drivers"
> >       help
>

Regards,
SImon

[1] http://patchwork.ozlabs.org/patch/1167276/
Lukasz Majewski Oct. 14, 2019, 12:41 p.m. UTC | #3
Hi Simon,

> Hi Lukasz,
> 
> On Wed, 9 Oct 2019 at 03:02, Lukasz Majewski <lukma@denx.de> wrote:
> >
> > Dear Tom,
> >  
> > > This define indicates if DM_GPIO shall be supported in SPL. This
> > > allows proper operation of DM converted GPIO drivers in SPL,
> > > which use boards.
> > >
> > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > ---
> > >
> > > Changes in v2:
> > > - Add dependency on DM_GPIO
> > >  
> >
> > Tom, are there any issues preventing this patch from being applied
> > to -master?  
> 
> This does not actually define DM_GPIO anywhere though, so this is
> unused.

The goal of this patch is to introduce in Kconfig a CONFIG_SPL_DM_GPIO.
This define would be needed anyway, no matter if you perform the
changes from [1].

This Kconfig define is necessary for the XEA board (i.MX28 based one),
which uses OF_PLATDATA in SPL excessively to fit into size constraints.

To be more precise the mxs_gpio.c driver uses 
#if CONFIG_IS_ENABLED(DM_GPIO) to provide DM GPIO support in SPL with
OF_PLATDATA.


> 
> As it happens I sent a similar patch[1], but it doesn't work. I'll
> try again.

It would be great if we could have [1] not causing build breaks.
However, for my used case it would be enough to have the Kconfig
definition of CONFIG_SPL_DM_GPIO (as I'm using OF_PLATDATA) with it.

Simon, if you don't have time to do the fix for [1] I would opt for
pulling this patch (to just add proper Kconfig define).

> 
> >  
> > >  common/spl/Kconfig | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > >
> > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > > index f467eca2be..e3df8efa7e 100644
> > > --- a/common/spl/Kconfig
> > > +++ b/common/spl/Kconfig
> > > @@ -452,6 +452,12 @@ config SPL_DMA_SUPPORT
> > >         the CPU moving the data. Enable this option to build the
> > > drivers in drivers/dma as part of an SPL build.
> > >
> > > +config SPL_DM_GPIO
> > > +     bool "Support Driver Model GPIO drivers"
> > > +     depends on SPL_GPIO_SUPPORT && DM_GPIO
> > > +     help
> > > +       Enable support for Driver Model based GPIO drivers in SPL.
> > > +
> > >  config SPL_DRIVERS_MISC_SUPPORT
> > >       bool "Support misc drivers"
> > >       help  
> >  
> 
> Regards,
> SImon
> 
> [1] http://patchwork.ozlabs.org/patch/1167276/




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Simon Glass Oct. 16, 2019, 3:40 a.m. UTC | #4
Hi Lukasz,

On Mon, 14 Oct 2019 at 06:41, Lukasz Majewski <lukma@denx.de> wrote:
>
> Hi Simon,
>
> > Hi Lukasz,
> >
> > On Wed, 9 Oct 2019 at 03:02, Lukasz Majewski <lukma@denx.de> wrote:
> > >
> > > Dear Tom,
> > >
> > > > This define indicates if DM_GPIO shall be supported in SPL. This
> > > > allows proper operation of DM converted GPIO drivers in SPL,
> > > > which use boards.
> > > >
> > > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > > ---
> > > >
> > > > Changes in v2:
> > > > - Add dependency on DM_GPIO
> > > >
> > >
> > > Tom, are there any issues preventing this patch from being applied
> > > to -master?
> >
> > This does not actually define DM_GPIO anywhere though, so this is
> > unused.
>
> The goal of this patch is to introduce in Kconfig a CONFIG_SPL_DM_GPIO.
> This define would be needed anyway, no matter if you perform the
> changes from [1].
>
> This Kconfig define is necessary for the XEA board (i.MX28 based one),
> which uses OF_PLATDATA in SPL excessively to fit into size constraints.
>
> To be more precise the mxs_gpio.c driver uses
> #if CONFIG_IS_ENABLED(DM_GPIO) to provide DM GPIO support in SPL with
> OF_PLATDATA.
>
>
> >
> > As it happens I sent a similar patch[1], but it doesn't work. I'll
> > try again.
>
> It would be great if we could have [1] not causing build breaks.
> However, for my used case it would be enough to have the Kconfig
> definition of CONFIG_SPL_DM_GPIO (as I'm using OF_PLATDATA) with it.
>
> Simon, if you don't have time to do the fix for [1] I would opt for
> pulling this patch (to just add proper Kconfig define).

I have had a crack at this here:

https://gitlab.denx.de/u-boot/custodians/u-boot-dm/commit/a6d15bbd9e4e7684dd47d21817df85915f28cbab

I expect to send this series along with this patch at the end of this week.

>
> >
> > >
> > > >  common/spl/Kconfig | 6 ++++++
> > > >  1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > > > index f467eca2be..e3df8efa7e 100644
> > > > --- a/common/spl/Kconfig
> > > > +++ b/common/spl/Kconfig
> > > > @@ -452,6 +452,12 @@ config SPL_DMA_SUPPORT
> > > >         the CPU moving the data. Enable this option to build the
> > > > drivers in drivers/dma as part of an SPL build.
> > > >
> > > > +config SPL_DM_GPIO
> > > > +     bool "Support Driver Model GPIO drivers"
> > > > +     depends on SPL_GPIO_SUPPORT && DM_GPIO
> > > > +     help
> > > > +       Enable support for Driver Model based GPIO drivers in SPL.
> > > > +
> > > >  config SPL_DRIVERS_MISC_SUPPORT
> > > >       bool "Support misc drivers"
> > > >       help
> > >
> >
> > Regards,
> > SImon
> >
> > [1] http://patchwork.ozlabs.org/patch/1167276/
>

Regards,
Simon
Lukasz Majewski Nov. 17, 2019, 8:37 p.m. UTC | #5
Hi Simon,

> Hi Lukasz,
> 
> On Mon, 14 Oct 2019 at 06:41, Lukasz Majewski <lukma@denx.de> wrote:
> >
> > Hi Simon,
> >  
> > > Hi Lukasz,
> > >
> > > On Wed, 9 Oct 2019 at 03:02, Lukasz Majewski <lukma@denx.de>
> > > wrote:  
> > > >
> > > > Dear Tom,
> > > >  
> > > > > This define indicates if DM_GPIO shall be supported in SPL.
> > > > > This allows proper operation of DM converted GPIO drivers in
> > > > > SPL, which use boards.
> > > > >
> > > > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > > > ---
> > > > >
> > > > > Changes in v2:
> > > > > - Add dependency on DM_GPIO
> > > > >  
> > > >
> > > > Tom, are there any issues preventing this patch from being
> > > > applied to -master?  
> > >
> > > This does not actually define DM_GPIO anywhere though, so this is
> > > unused.  
> >
> > The goal of this patch is to introduce in Kconfig a
> > CONFIG_SPL_DM_GPIO. This define would be needed anyway, no matter
> > if you perform the changes from [1].
> >
> > This Kconfig define is necessary for the XEA board (i.MX28 based
> > one), which uses OF_PLATDATA in SPL excessively to fit into size
> > constraints.
> >
> > To be more precise the mxs_gpio.c driver uses
> > #if CONFIG_IS_ENABLED(DM_GPIO) to provide DM GPIO support in SPL
> > with OF_PLATDATA.
> >
> >  
> > >
> > > As it happens I sent a similar patch[1], but it doesn't work. I'll
> > > try again.  
> >
> > It would be great if we could have [1] not causing build breaks.
> > However, for my used case it would be enough to have the Kconfig
> > definition of CONFIG_SPL_DM_GPIO (as I'm using OF_PLATDATA) with it.
> >
> > Simon, if you don't have time to do the fix for [1] I would opt for
> > pulling this patch (to just add proper Kconfig define).  
> 
> I have had a crack at this here:
> 
> https://gitlab.denx.de/u-boot/custodians/u-boot-dm/commit/a6d15bbd9e4e7684dd47d21817df85915f28cbab
> 
> I expect to send this series along with this patch at the end of this
> week.

If I may ask - have you made any progress on this?

> 
> >  
> > >  
> > > >  
> > > > >  common/spl/Kconfig | 6 ++++++
> > > > >  1 file changed, 6 insertions(+)
> > > > >
> > > > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > > > > index f467eca2be..e3df8efa7e 100644
> > > > > --- a/common/spl/Kconfig
> > > > > +++ b/common/spl/Kconfig
> > > > > @@ -452,6 +452,12 @@ config SPL_DMA_SUPPORT
> > > > >         the CPU moving the data. Enable this option to build
> > > > > the drivers in drivers/dma as part of an SPL build.
> > > > >
> > > > > +config SPL_DM_GPIO
> > > > > +     bool "Support Driver Model GPIO drivers"
> > > > > +     depends on SPL_GPIO_SUPPORT && DM_GPIO
> > > > > +     help
> > > > > +       Enable support for Driver Model based GPIO drivers in
> > > > > SPL. +
> > > > >  config SPL_DRIVERS_MISC_SUPPORT
> > > > >       bool "Support misc drivers"
> > > > >       help  
> > > >  
> > >
> > > Regards,
> > > SImon
> > >
> > > [1] http://patchwork.ozlabs.org/patch/1167276/  
> >  
> 
> Regards,
> Simon

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Lukasz Majewski Nov. 17, 2019, 8:54 p.m. UTC | #6
Hi Simon,

> Hi Simon,
> 
> > Hi Lukasz,
> > 
> > On Mon, 14 Oct 2019 at 06:41, Lukasz Majewski <lukma@denx.de>
> > wrote:  
> > >
> > > Hi Simon,
> > >    
> > > > Hi Lukasz,
> > > >
> > > > On Wed, 9 Oct 2019 at 03:02, Lukasz Majewski <lukma@denx.de>
> > > > wrote:    
> > > > >
> > > > > Dear Tom,
> > > > >    
> > > > > > This define indicates if DM_GPIO shall be supported in SPL.
> > > > > > This allows proper operation of DM converted GPIO drivers in
> > > > > > SPL, which use boards.
> > > > > >
> > > > > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > > > > ---
> > > > > >
> > > > > > Changes in v2:
> > > > > > - Add dependency on DM_GPIO
> > > > > >    
> > > > >
> > > > > Tom, are there any issues preventing this patch from being
> > > > > applied to -master?    
> > > >
> > > > This does not actually define DM_GPIO anywhere though, so this
> > > > is unused.    
> > >
> > > The goal of this patch is to introduce in Kconfig a
> > > CONFIG_SPL_DM_GPIO. This define would be needed anyway, no matter
> > > if you perform the changes from [1].
> > >
> > > This Kconfig define is necessary for the XEA board (i.MX28 based
> > > one), which uses OF_PLATDATA in SPL excessively to fit into size
> > > constraints.
> > >
> > > To be more precise the mxs_gpio.c driver uses
> > > #if CONFIG_IS_ENABLED(DM_GPIO) to provide DM GPIO support in SPL
> > > with OF_PLATDATA.
> > >
> > >    
> > > >
> > > > As it happens I sent a similar patch[1], but it doesn't work.
> > > > I'll try again.    
> > >
> > > It would be great if we could have [1] not causing build breaks.
> > > However, for my used case it would be enough to have the Kconfig
> > > definition of CONFIG_SPL_DM_GPIO (as I'm using OF_PLATDATA) with
> > > it.
> > >
> > > Simon, if you don't have time to do the fix for [1] I would opt
> > > for pulling this patch (to just add proper Kconfig define).    
> > 
> > I have had a crack at this here:
> > 
> > https://gitlab.denx.de/u-boot/custodians/u-boot-dm/commit/a6d15bbd9e4e7684dd47d21817df85915f28cbab
> > 
> > I expect to send this series along with this patch at the end of
> > this week.  
> 
> If I may ask - have you made any progress on this?

In fact it blocks some i.MX28 related code (board to be precise) from
sending it upstream as converted drivers expect SPL_DM_GPIO to be
defined in Kconfig.

In fact I do just need following code:
https://patchwork.ozlabs.org/patch/1169013/

If you have some difficulties to solve (on e.g. other archs) then maybe
it would be enough to pull the above patch?

> 
> >   
> > >    
> > > >    
> > > > >    
> > > > > >  common/spl/Kconfig | 6 ++++++
> > > > > >  1 file changed, 6 insertions(+)
> > > > > >
> > > > > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > > > > > index f467eca2be..e3df8efa7e 100644
> > > > > > --- a/common/spl/Kconfig
> > > > > > +++ b/common/spl/Kconfig
> > > > > > @@ -452,6 +452,12 @@ config SPL_DMA_SUPPORT
> > > > > >         the CPU moving the data. Enable this option to build
> > > > > > the drivers in drivers/dma as part of an SPL build.
> > > > > >
> > > > > > +config SPL_DM_GPIO
> > > > > > +     bool "Support Driver Model GPIO drivers"
> > > > > > +     depends on SPL_GPIO_SUPPORT && DM_GPIO
> > > > > > +     help
> > > > > > +       Enable support for Driver Model based GPIO drivers
> > > > > > in SPL. +
> > > > > >  config SPL_DRIVERS_MISC_SUPPORT
> > > > > >       bool "Support misc drivers"
> > > > > >       help    
> > > > >    
> > > >
> > > > Regards,
> > > > SImon
> > > >
> > > > [1] http://patchwork.ozlabs.org/patch/1167276/    
> > >    
> > 
> > Regards,
> > Simon  
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Simon Glass Dec. 27, 2019, 4:42 p.m. UTC | #7
Hi Lukasz,

On Sun, 17 Nov 2019 at 13:54, Lukasz Majewski <lukma@denx.de> wrote:
>
> Hi Simon,
>
> > Hi Simon,
> >
> > > Hi Lukasz,
> > >
> > > On Mon, 14 Oct 2019 at 06:41, Lukasz Majewski <lukma@denx.de>
> > > wrote:
> > > >
> > > > Hi Simon,
> > > >
> > > > > Hi Lukasz,
> > > > >
> > > > > On Wed, 9 Oct 2019 at 03:02, Lukasz Majewski <lukma@denx.de>
> > > > > wrote:
> > > > > >
> > > > > > Dear Tom,
> > > > > >
> > > > > > > This define indicates if DM_GPIO shall be supported in SPL.
> > > > > > > This allows proper operation of DM converted GPIO drivers in
> > > > > > > SPL, which use boards.
> > > > > > >
> > > > > > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > > > > > ---
> > > > > > >
> > > > > > > Changes in v2:
> > > > > > > - Add dependency on DM_GPIO
> > > > > > >
> > > > > >
> > > > > > Tom, are there any issues preventing this patch from being
> > > > > > applied to -master?
> > > > >
> > > > > This does not actually define DM_GPIO anywhere though, so this
> > > > > is unused.
> > > >
> > > > The goal of this patch is to introduce in Kconfig a
> > > > CONFIG_SPL_DM_GPIO. This define would be needed anyway, no matter
> > > > if you perform the changes from [1].
> > > >
> > > > This Kconfig define is necessary for the XEA board (i.MX28 based
> > > > one), which uses OF_PLATDATA in SPL excessively to fit into size
> > > > constraints.
> > > >
> > > > To be more precise the mxs_gpio.c driver uses
> > > > #if CONFIG_IS_ENABLED(DM_GPIO) to provide DM GPIO support in SPL
> > > > with OF_PLATDATA.
> > > >
> > > >
> > > > >
> > > > > As it happens I sent a similar patch[1], but it doesn't work.
> > > > > I'll try again.
> > > >
> > > > It would be great if we could have [1] not causing build breaks.
> > > > However, for my used case it would be enough to have the Kconfig
> > > > definition of CONFIG_SPL_DM_GPIO (as I'm using OF_PLATDATA) with
> > > > it.
> > > >
> > > > Simon, if you don't have time to do the fix for [1] I would opt
> > > > for pulling this patch (to just add proper Kconfig define).
> > >
> > > I have had a crack at this here:
> > >
> > > https://gitlab.denx.de/u-boot/custodians/u-boot-dm/commit/a6d15bbd9e4e7684dd47d21817df85915f28cbab
> > >
> > > I expect to send this series along with this patch at the end of
> > > this week.
> >
> > If I may ask - have you made any progress on this?
>
> In fact it blocks some i.MX28 related code (board to be precise) from
> sending it upstream as converted drivers expect SPL_DM_GPIO to be
> defined in Kconfig.
>
> In fact I do just need following code:
> https://patchwork.ozlabs.org/patch/1169013/
>
> If you have some difficulties to solve (on e.g. other archs) then maybe
> it would be enough to pull the above patch?

Just getting back to this, but see U-Boot next which has the full patch now.

Regards,
Simon
diff mbox series

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index f467eca2be..e3df8efa7e 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -452,6 +452,12 @@  config SPL_DMA_SUPPORT
 	  the CPU moving the data. Enable this option to build the drivers
 	  in drivers/dma as part of an SPL build.
 
+config SPL_DM_GPIO
+	bool "Support Driver Model GPIO drivers"
+	depends on SPL_GPIO_SUPPORT && DM_GPIO
+	help
+	  Enable support for Driver Model based GPIO drivers in SPL.
+
 config SPL_DRIVERS_MISC_SUPPORT
 	bool "Support misc drivers"
 	help