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 canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PV0LO-0007Kk-JF for barebox@lists.infradead.org; Tue, 21 Dec 2010 11:25:28 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1PV0LM-0007gz-GR for barebox@lists.infradead.org; Tue, 21 Dec 2010 12:25:24 +0100 Received: from jbe by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1PV0LM-0000Qp-Eo for barebox@lists.infradead.org; Tue, 21 Dec 2010 12:25:24 +0100 From: Juergen Beisert Date: Tue, 21 Dec 2010 12:25:14 +0100 Message-Id: <1292930721-31734-3-git-send-email-jbe@pengutronix.de> In-Reply-To: <1292930721-31734-1-git-send-email-jbe@pengutronix.de> References: <1292930721-31734-1-git-send-email-jbe@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 2/9] ARM STM/i.MX: Fix register offset calculation for GPIO input pins To: barebox@lists.infradead.org Fix the forgotten register calculation for GPIO input pins. Signed-off-by: Juergen Beisert --- arch/arm/mach-stm/iomux-imx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-stm/iomux-imx.c b/arch/arm/mach-stm/iomux-imx.c index 2c68ebf..2c34d01 100644 --- a/arch/arm/mach-stm/iomux-imx.c +++ b/arch/arm/mach-stm/iomux-imx.c @@ -129,6 +129,8 @@ void imx_gpio_mode(unsigned m) writel(0x1 << (gpio_pin % 32), IMX_IOMUXC_BASE + reg_offset + BIT_SET); } else { + /* then the direction */ + reg_offset = calc_output_enable_reg(gpio_pin); writel(0x1 << (gpio_pin % 32), IMX_IOMUXC_BASE + reg_offset + BIT_CLR); } -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox