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-0007Kr-JU for barebox@lists.infradead.org; Tue, 21 Dec 2010 11:25:30 +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-0007h9-LX 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-0000R7-IC for barebox@lists.infradead.org; Tue, 21 Dec 2010 12:25:24 +0100 From: Juergen Beisert Date: Tue, 21 Dec 2010 12:25:20 +0100 Message-Id: <1292930721-31734-9-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 8/9] ARM STM/i.MX: Replace cryptic numbers To: barebox@lists.infradead.org Try to make the source more understandable. Signed-off-by: Juergen Beisert --- arch/arm/mach-stm/iomux-imx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-stm/iomux-imx.c b/arch/arm/mach-stm/iomux-imx.c index c59f0ac..bf6165f 100644 --- a/arch/arm/mach-stm/iomux-imx.c +++ b/arch/arm/mach-stm/iomux-imx.c @@ -125,7 +125,7 @@ void imx_gpio_mode(uint32_t m) if (PE_PRESENT(m)) { reg_offset = calc_pullup_reg(gpio_pin); writel(0x1 << (gpio_pin % 32), IMX_IOMUXC_BASE + reg_offset + - (GET_PULLUP(m) == 1 ? 4 : 8)); + (GET_PULLUP(m) == 1 ? BIT_SET : BIT_CLR)); } if (GET_FUNC(m) == IS_GPIO) { @@ -133,7 +133,7 @@ void imx_gpio_mode(uint32_t m) /* first set the output value */ reg_offset = calc_output_reg(gpio_pin); writel(0x1 << (gpio_pin % 32), IMX_IOMUXC_BASE + - reg_offset + (GET_GPIOVAL(m) == 1 ? 4 : 8)); + reg_offset + (GET_GPIOVAL(m) == 1 ? BIT_SET : BIT_CLR)); /* then the direction */ reg_offset = calc_output_enable_reg(gpio_pin); writel(0x1 << (gpio_pin % 32), -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox