mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH/Master] ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic
@ 2012-07-11  9:15 Juergen Beisert
  2012-07-16 21:31 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Beisert @ 2012-07-11  9:15 UTC (permalink / raw)
  To: barebox

While a set bit enables the pullup (if exists) it disables the bitkeeper (if
exists). Both features are using the same register bit and only one of this
feature is present on a per pin base.
    
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

diff --git a/arch/arm/mach-mxs/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
index 9203588..784c506 100644
--- a/arch/arm/mach-mxs/iomux-imx.c
+++ b/arch/arm/mach-mxs/iomux-imx.c
@@ -125,7 +125,7 @@ void imx_gpio_mode(uint32_t m)
 	if (BK_PRESENT(m)) {
 		reg_offset = calc_pullup_reg(gpio_pin);
 		writel(0x1 << (gpio_pin % 32), IMX_IOMUXC_BASE + reg_offset +
-				(GET_BITKEEPER(m) == 1 ? BIT_SET : BIT_CLR));
+				(GET_BITKEEPER(m) == 1 ? BIT_CLR : BIT_SET));
 	}
 
 	if (GET_FUNC(m) == IS_GPIO) {

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH/Master] ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic
  2012-07-11  9:15 [PATCH/Master] ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic Juergen Beisert
@ 2012-07-16 21:31 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-07-16 21:31 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

On Wed, Jul 11, 2012 at 11:15:58AM +0200, Juergen Beisert wrote:
> While a set bit enables the pullup (if exists) it disables the bitkeeper (if
> exists). Both features are using the same register bit and only one of this
> feature is present on a per pin base.
>     
> Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-mxs/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
> index 9203588..784c506 100644
> --- a/arch/arm/mach-mxs/iomux-imx.c
> +++ b/arch/arm/mach-mxs/iomux-imx.c
> @@ -125,7 +125,7 @@ void imx_gpio_mode(uint32_t m)
>  	if (BK_PRESENT(m)) {
>  		reg_offset = calc_pullup_reg(gpio_pin);
>  		writel(0x1 << (gpio_pin % 32), IMX_IOMUXC_BASE + reg_offset +
> -				(GET_BITKEEPER(m) == 1 ? BIT_SET : BIT_CLR));
> +				(GET_BITKEEPER(m) == 1 ? BIT_CLR : BIT_SET));
>  	}
>  
>  	if (GET_FUNC(m) == IS_GPIO) {
> 
> -- 
> Pengutronix e.K.                              | Juergen Beisert             |
> Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-16 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11  9:15 [PATCH/Master] ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic Juergen Beisert
2012-07-16 21:31 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox