* [PATCH] ARM i.MX gpio: fix of gpio base
@ 2012-10-07 10:57 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2012-10-07 10:57 UTC (permalink / raw)
To: barebox
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@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-07 10:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-07 10:57 [PATCH] ARM i.MX gpio: fix of gpio base Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox