From patchwork Thu Aug 4 15:15:14 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: 1036092 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p74FCmvF000833 for ; Thu, 4 Aug 2011 15:12:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754355Ab1HDPMr (ORCPT ); Thu, 4 Aug 2011 11:12:47 -0400 Received: from mail.free-electrons.com ([88.190.12.23]:33142 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753870Ab1HDPMr (ORCPT ); Thu, 4 Aug 2011 11:12:47 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 9D6821C1; Thu, 4 Aug 2011 17:12:45 +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 A88B1143; Thu, 4 Aug 2011 17:12:38 +0200 (CEST) From: David Wagner To: Tony Lindgren Cc: David Wagner , linux-omap , Russell King Subject: [PATCH 2/2] Use existing GPMC macros instead of bit manipulation Date: Thu, 4 Aug 2011 17:15:14 +0200 Message-Id: <1312470914-20053-1-git-send-email-david.wagner@free-electrons.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1312470395-19672-2-git-send-email-david.wagner@free-electrons.com> References: <1312470395-19672-2-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 (demeter1.kernel.org [140.211.167.41]); Thu, 04 Aug 2011 15:12:48 +0000 (UTC) Signed-off-by: David Wagner --- 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; }