[PATCH 1/4] mxs: Fix support for BITKEEPER() macro

esben.haabendal at gmail.com esben.haabendal at gmail.com
Mon Mar 26 13:29:04 EDT 2012


From: Esben Haabendal <esben.haabendal at gmail.com>

There was no check for BE, so any BITKEEPER(1) iomux configurations
were not being applied.

Signed-off-by: Esben Haabendal <esben.haabendal at prevas.dk>
---
 arch/arm/mach-mxs/iomux-imx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mxs/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
index 3161a5d..6bcde03 100644
--- a/arch/arm/mach-mxs/iomux-imx.c
+++ b/arch/arm/mach-mxs/iomux-imx.c
@@ -128,6 +128,12 @@ void imx_gpio_mode(uint32_t m)
 				(GET_PULLUP(m) == 1 ? BIT_SET : BIT_CLR));
 	}
 
+	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));
+	}
+
 	if (GET_FUNC(m) == IS_GPIO) {
 		if (GET_GPIODIR(m) == 1) {
 			/* first set the output value */
-- 
1.7.5.4




More information about the barebox mailing list