From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TKoYC-0004mW-EX for barebox@lists.infradead.org; Sun, 07 Oct 2012 10:57:36 +0000 From: Sascha Hauer Date: Sun, 7 Oct 2012 12:57:34 +0200 Message-Id: <1349607454-7024-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] ARM i.MX gpio: fix of gpio base To: barebox@lists.infradead.org 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 --- 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