From patchwork Thu Aug 4 15:06:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: david.wagner@free-electrons.com X-Patchwork-Id: 1036052 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p74F4DQh020405 for ; Thu, 4 Aug 2011 15:04:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869Ab1HDPEL (ORCPT ); Thu, 4 Aug 2011 11:04:11 -0400 Received: from mail.free-electrons.com ([88.190.12.23]:44772 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312Ab1HDPEK (ORCPT ); Thu, 4 Aug 2011 11:04:10 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 1D9E318D; Thu, 4 Aug 2011 17:04:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 Received: from localhost.localdomain (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id C4FAE199; Thu, 4 Aug 2011 17:04:00 +0200 (CEST) From: David Wagner To: Tony Lindgren Cc: David Wagner , LKML , linux-omap , Russell King Subject: [PATCH 2/2] Use existing GPMC macros instead of bit manipulation Date: Thu, 4 Aug 2011 17:06:35 +0200 Message-Id: <1312470395-19672-2-git-send-email-david.wagner@free-electrons.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1312470395-19672-1-git-send-email-david.wagner@free-electrons.com> References: <1312470395-19672-1-git-send-email-david.wagner@free-electrons.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 04 Aug 2011 15:04:13 +0000 (UTC) --- 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; }