[U-Boot] [PATCH] gpio: mxc_gpio: Fix gpio_get_value() when the GPIO is an output

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Sun Sep 29 20:50:59 CEST 2013


Hi Fabio,

On Sunday, September 29, 2013 8:48:46 PM, Fabio Estevam wrote:
> On Sun, Sep 29, 2013 at 3:26 PM, Eric Bénard <eric at eukrea.com> wrote:
> > Hi Fabio,
> >
> > Le Sun, 29 Sep 2013 15:22:36 -0300,
> > Fabio Estevam <festevam at gmail.com> a écrit :
> >
> >> On Sun, Sep 29, 2013 at 3:19 PM, Eric Bénard <eric at eukrea.com> wrote:
> >>
> >> > on which CPU is that ?
> >>
> >> Otavio tested it on mx6.
> >>
> >> > It's strange reading PSR works in the kernel and not in u-boot.
> >>
> >> The patch I sent aligns with the kernel behaviour as well:
> >>
> >> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/arch/arm/plat-mxc/gpio.c?h=imx_3.0.35_4.1.0&id=d6f32393eaf455ce3c32d4e9bafd34d9091eaf45
> >>
> > mainline kernel doesn't seem to have this fix.
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpio-mxc.c
> 
> Yes, I saw that too. Maybe it will also need to be fixed.
> 
> First I want to run it on real hardware and understand the issue in more
> detail.

Can you test again without any GPIO patch, but with SION set for this pin in the
IOMUXC? According to the reference manual, SION not being set in the IOMUXC is
the only reason that would prevent PSR from reading the pin level in GPIO output
mode.

Best regards,
Benoît


More information about the U-Boot mailing list