[PATCH] ARM i.MX gpio: fix of gpio base
Sascha Hauer
s.hauer at pengutronix.de
Sun Oct 7 06:57:34 EDT 2012
of_alias_get_id() returns the number of the gpio bank, so we have
to multiply with 32 to get the gpio base.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-imx/gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/gpio.c b/arch/arm/mach-imx/gpio.c
index 6c88948..cd7655a 100644
--- a/arch/arm/mach-imx/gpio.c
+++ b/arch/arm/mach-imx/gpio.c
@@ -137,6 +137,7 @@ static int imx_gpio_probe(struct device_d *dev)
imxgpio->chip.base = of_alias_get_id(dev->device_node, "gpio");
if (imxgpio->chip.base < 0)
return imxgpio->chip.base;
+ imxgpio->chip.base *= 32;
} else {
imxgpio->chip.base = dev->id * 32;
}
--
1.7.10.4
More information about the barebox
mailing list