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

2013-09-30 Thread Benoît Thébaudeau
Hi Fabio, On Monday, September 30, 2013 3:32:39 AM, Fabio Estevam wrote: > On Sun, Sep 29, 2013 at 7:24 PM, Otavio Salvador > wrote: > > > I sent the patch to fix this adding the flag to the GPIO pins. > > > > I tested it and it works fine indeed. The patch is awaiting for > > approval as it is

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

2013-09-29 Thread Fabio Estevam
On Sun, Sep 29, 2013 at 7:24 PM, Otavio Salvador wrote: > I sent the patch to fix this adding the flag to the GPIO pins. > > I tested it and it works fine indeed. The patch is awaiting for > approval as it is a little big. The commitlog is below for reference: > > mx6: Add IOMUX_CONFIG_SION f

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

2013-09-29 Thread Otavio Salvador
On Sun, Sep 29, 2013 at 4:49 PM, Otavio Salvador wrote: > On Sun, Sep 29, 2013 at 4:45 PM, Benoît Thébaudeau > wrote: >> On Sunday, September 29, 2013 9:42:44 PM, Otavio Salvador wrote: >>> On Sun, Sep 29, 2013 at 4:25 PM, Benoît Thébaudeau >>> wrote: >>> ... >>> > Hence, gpio_get_value() should

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

2013-09-29 Thread Otavio Salvador
On Sun, Sep 29, 2013 at 4:45 PM, Benoît Thébaudeau wrote: > On Sunday, September 29, 2013 9:42:44 PM, Otavio Salvador wrote: >> On Sun, Sep 29, 2013 at 4:25 PM, Benoît Thébaudeau >> wrote: >> ... >> > Hence, gpio_get_value() should be left unchanged (using PSR in all cases), >> > and >> > SION sh

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

2013-09-29 Thread Benoît Thébaudeau
Hi Otavio, On Sunday, September 29, 2013 9:42:44 PM, Otavio Salvador wrote: > On Sun, Sep 29, 2013 at 4:25 PM, Benoît Thébaudeau > wrote: > ... > > Hence, gpio_get_value() should be left unchanged (using PSR in all cases), > > and > > SION should be set for all GPIOs in the i.MX6 pin definition h

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

2013-09-29 Thread Otavio Salvador
On Sun, Sep 29, 2013 at 4:25 PM, Benoît Thébaudeau wrote: ... > Hence, gpio_get_value() should be left unchanged (using PSR in all cases), and > SION should be set for all GPIOs in the i.MX6 pin definition header files. I just does not follow why this preferred against Fabio's proposed patch to r

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

2013-09-29 Thread Benoît Thébaudeau
Hi Fabio, On Sunday, September 29, 2013 8:58:09 PM, Fabio Estevam wrote: > Hi Benoît, > > On Sun, Sep 29, 2013 at 3:50 PM, Benoît Thébaudeau > wrote: > > > Can you test again without any GPIO patch, but with SION set for this pin > > in the > > IOMUXC? According to the reference manual, SION no

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

2013-09-29 Thread Fabio Estevam
Hi Benoît, On Sun, Sep 29, 2013 at 3:50 PM, Benoît Thébaudeau wrote: > 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 pi

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

2013-09-29 Thread Benoît Thébaudeau
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 wrote: > > Hi Fabio, > > > > Le Sun, 29 Sep 2013 15:22:36 -0300, > > Fabio Estevam a écrit : > > > >> On Sun, Sep 29, 2013 at 3:19 PM, Eric Bénard wrote: > >> > >> > on which

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

2013-09-29 Thread Fabio Estevam
On Sun, Sep 29, 2013 at 3:26 PM, Eric Bénard wrote: > Hi Fabio, > > Le Sun, 29 Sep 2013 15:22:36 -0300, > Fabio Estevam a écrit : > >> On Sun, Sep 29, 2013 at 3:19 PM, Eric Bénard wrote: >> >> > on which CPU is that ? >> >> Otavio tested it on mx6. >> >> > It's strange reading PSR works in the k

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

2013-09-29 Thread Eric Bénard
Hi Fabio, Le Sun, 29 Sep 2013 15:22:36 -0300, Fabio Estevam a écrit : > On Sun, Sep 29, 2013 at 3:19 PM, Eric Bénard 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 ke

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

2013-09-29 Thread Fabio Estevam
On Sun, Sep 29, 2013 at 3:19 PM, Eric Bénard 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

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

2013-09-29 Thread Eric Bénard
Le Sun, 29 Sep 2013 14:48:32 -0300, Otavio Salvador a écrit : > On Sun, Sep 29, 2013 at 2:09 PM, Eric Bénard wrote: > > Hi Benoît, > > > > Le Sun, 29 Sep 2013 15:21:52 +0200 (CEST), > > Benoît Thébaudeau a écrit : > >> Why is this required? Is it because there is a different behavior of the >

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

2013-09-29 Thread Otavio Salvador
On Sun, Sep 29, 2013 at 2:09 PM, Eric Bénard wrote: > Hi Benoît, > > Le Sun, 29 Sep 2013 15:21:52 +0200 (CEST), > Benoît Thébaudeau a écrit : >> Why is this required? Is it because there is a different behavior of the PSR >> register on one of the i.MXs? >> >> See my commit message here: >> http:

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

2013-09-29 Thread Eric Bénard
Hi Benoît, Le Sun, 29 Sep 2013 15:21:52 +0200 (CEST), Benoît Thébaudeau a écrit : > Why is this required? Is it because there is a different behavior of the PSR > register on one of the i.MXs? > > See my commit message here: > http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=5da

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

2013-09-29 Thread Benoît Thébaudeau
Hi Fabio, On Saturday, September 28, 2013 7:22:44 PM, Fabio Estevam wrote: > From: Fabio Estevam > > When the GPIO is configured as an output, we should return the value from the > DR > register. > > This implements the same fix as in the following kernel commit from FSL BSP: > http://git.frees

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

2013-09-28 Thread Otavio Salvador
On Sat, Sep 28, 2013 at 2:22 PM, Fabio Estevam wrote: > From: Fabio Estevam > > When the GPIO is configured as an output, we should return the value from the > DR > register. > > This implements the same fix as in the following kernel commit from FSL BSP: > http://git.freescale.com/git/cgit.cgi/

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

2013-09-28 Thread Fabio Estevam
From: Fabio Estevam When the GPIO is configured as an output, we should return the value from the DR register. This implements the same fix as in the following kernel commit from FSL BSP: 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