On Mon, Apr 19, 2010 at 10:28:13AM +0200, Wolfram Sang wrote: > From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> > > Newer i.MX-variants can route the content of the Sample Status Register to the > Data Register, but older ones can't. So, use the Sample Register to be generic. > As a drawback, the ability to read back the values of output GPIOs is lost. I never heard of this. Anyway, output gpios are not supposed to be able to read back in the GPIO API, so I suggest we use Uwes original commit message. Sascha > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> > Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx> > --- > arch/arm/mach-imx/gpio.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-imx/gpio.c b/arch/arm/mach-imx/gpio.c > index 6157bd1..c6a59a6 100644 > --- a/arch/arm/mach-imx/gpio.c > +++ b/arch/arm/mach-imx/gpio.c > @@ -121,7 +121,7 @@ int gpio_get_value(unsigned gpio) > if (!base) > return -EINVAL; > > - val = readl(base + GPIO_DR); > + val = readl(base + GPIO_PSR); > > return val & (1 << shift) ? 1 : 0; > } > -- > 1.7.0 > > > _______________________________________________ > barebox mailing list > barebox@xxxxxxxxxxxxxxxxxxx > http://lists.infradead.org/mailman/listinfo/barebox -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox