mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 8/9] ARM STM/i.MX: Replace cryptic numbers
Date: Tue, 21 Dec 2010 12:25:20 +0100	[thread overview]
Message-ID: <1292930721-31734-9-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1292930721-31734-1-git-send-email-jbe@pengutronix.de>

Try to make the source more understandable.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 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

  parent reply	other threads:[~2010-12-21 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 11:25 [PATCH] Add gpio command support to STM/i.MX arch Juergen Beisert
2010-12-21 11:25 ` [PATCH 1/9] Fix a typo in the GPIO doc Juergen Beisert
2010-12-21 11:25 ` [PATCH 2/9] ARM STM/i.MX: Fix register offset calculation for GPIO input pins Juergen Beisert
2010-12-21 11:25 ` [PATCH 3/9] ARM STM/i.MX: Remove variable size restrictions in iomux managing routines Juergen Beisert
2010-12-21 11:25 ` [PATCH 4/9] ARM STM/i.MX: Setting the iomux needs at least 32 bit Juergen Beisert
2010-12-21 11:25 ` [PATCH 5/9] ARM STM/i.MX: Just fix the docs Juergen Beisert
2010-12-21 11:25 ` [PATCH 6/9] ARM STM/i.MX: Add support for the gpio commands Juergen Beisert
2010-12-21 11:25 ` [PATCH 7/9] ARM STM/i.MX: Avoid very long lines Juergen Beisert
2010-12-21 11:25 ` Juergen Beisert [this message]
2010-12-21 11:25 ` [PATCH 9/9] ARM Chumby: Add list of available GPIOs and their meaning Juergen Beisert
2010-12-23 11:30 ` [PATCH] Add gpio command support to STM/i.MX arch Gregory CLEMENT
2010-12-23 11:50   ` Juergen Beisert
2010-12-23 11:58     ` Gregory CLEMENT
2010-12-23 14:36     ` Uwe Kleine-König
2010-12-23 11:53   ` Eric Bénard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292930721-31734-9-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox