[U-Boot] [PATCH] gpio: mxc_gpio: enable DM gpio before relocation

Simon Glass sjg at chromium.org
Wed Jun 17 17:04:25 CEST 2015


Hi Markus,

On 17 June 2015 at 00:18, Markus Niebel <list-09_u-boot at tqsc.de> wrote:
>
> Hello Simon,
>
> Am 16.06.2015 um 23:44 schrieb Simon Glass:
> > Hi Markus,
> >
> > On 16 June 2015 at 01:08, Markus Niebel <list-09_u-boot at tqsc.de> wrote:
> >> From: Markus Niebel <Markus.Niebel at tq-group.com>
> >>
> >> gpio often are needed to detect revision and variants.
> >> Therefore gpio should be available ASAP.
> >>
> >> Signed-off-by: Markus Niebel <Markus.Niebel at tq-group.com>
> >> ---
> >>  drivers/gpio/mxc_gpio.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
> >> index 2012f99..925758a 100644
> >> --- a/drivers/gpio/mxc_gpio.c
> >> +++ b/drivers/gpio/mxc_gpio.c
> >> @@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
> >>         .priv_auto_alloc_size = sizeof(struct mxc_bank_info),
> >>         .of_match = mxc_gpio_ids,
> >>         .bind   = mxc_gpio_bind,
> >> +       .flags  = DM_FLAG_PRE_RELOC,
> >>  };
> >>
> >>  #ifndef CONFIG_OF_CONTROL
> >> --
> >> 2.3.0
> >>
> >
> > This should really be done in the device tree with the
> > u-boot,dm-pre-reloc property for the particular GPIO banks you need. I
> > don't think this should be a global setting.
> >
>
> I totally agree for the longer run - but tegra gpio does it the same way.

That's because it currently doesn't use device tree in SPL. I'll take
a look at converting it over.

Is your GPIO driver used in SPL?

Regards,
Simon


More information about the U-Boot mailing list