All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Wagner <david.wagner@free-electrons.com>
To: Tony Lindgren <tony@atomide.com>
Cc: David Wagner <david.wagner@free-electrons.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	Russell King <linux@arm.linux.org.uk>
Subject: [PATCH 2/2] Use existing GPMC macros instead of bit manipulation
Date: Thu,  4 Aug 2011 17:15:14 +0200	[thread overview]
Message-ID: <1312470914-20053-1-git-send-email-david.wagner@free-electrons.com> (raw)
In-Reply-To: <1312470395-19672-2-git-send-email-david.wagner@free-electrons.com>

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
---

erratum: added the missing s-o-b

 arch/arm/mach-omap2/board-igep0020.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 35be778..f89573a 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -175,12 +175,12 @@ static void __init igep_flash_init(void)
 		ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
 
 		/* Check if NAND/oneNAND is configured */
-		if ((ret & 0xC00) == 0x800)
+		if (GPMC_CONFIG1_DEVICETYPE(ret) == GPMC_DEVICETYPE_NAND)
 			/* NAND found */
 			pr_err("IGEP: Unsupported NAND found\n");
 		else {
 			ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
-			if ((ret & 0x3F) == (ONENAND_MAP >> 24))
+			if (GPMC_CONFIG7_BASEADDRESS(ret) == (ONENAND_MAP >> 24))
 				/* ONENAND found */
 				onenandcs = cs;
 		}
-- 
1.7.0.4


  reply	other threads:[~2011-08-04 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 15:06 [PATCH 1/2] Macro for getting the BASEADDRESS field in omap's gpmc configuration David Wagner
2011-08-04 15:06 ` [PATCH 2/2] Use existing GPMC macros instead of bit manipulation David Wagner
2011-08-04 15:15   ` David Wagner [this message]
2011-08-11 15:00 ` [PATCH 1/2] Macro for getting the BASEADDRESS field in omap's gpmc configuration David Wagner

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=1312470914-20053-1-git-send-email-david.wagner@free-electrons.com \
    --to=david.wagner@free-electrons.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.