Skip to contentSkip to conversation

ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic

PATCH/Master Applied Juergen Beisert 2 participants 2 messages Jul 11, 2012 – Jul 16, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

arch/arm/mach-mxs/iomux-imx.c +1 -1
index 9203588..784c506 100644
@@ -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) {
Signature · 7 lines
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#1 lore raw
Quoted 5 lines · Juergen Beisert

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.

Applied, thanks

Sascha

Quoted 24 lines
arch/arm/mach-mxs/iomux-imx.c +1 -1
index 9203588..784c506 100644
@@ -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) {
Signature · 8 lines
-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox