From patchwork Tue Feb 26 18:17:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 223364 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CDEE32C0079 for ; Wed, 27 Feb 2013 05:18:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9583C4A027; Tue, 26 Feb 2013 19:18:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FDQ3lwJwrsW4; Tue, 26 Feb 2013 19:18:04 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B41524A03B; Tue, 26 Feb 2013 19:18:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 48CC54A027 for ; Tue, 26 Feb 2013 19:17:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tnu6bmtpzWSE for ; Tue, 26 Feb 2013 19:17:49 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe001.messaging.microsoft.com [216.32.180.184]) by theia.denx.de (Postfix) with ESMTPS id 94C4C4A096 for ; Tue, 26 Feb 2013 19:17:43 +0100 (CET) Received: from mail198-co1-R.bigfish.com (10.243.78.215) by CO1EHSOBE003.bigfish.com (10.243.66.66) with Microsoft SMTP Server id 14.1.225.23; Tue, 26 Feb 2013 18:17:41 +0000 Received: from mail198-co1 (localhost [127.0.0.1]) by mail198-co1-R.bigfish.com (Postfix) with ESMTP id 11878D0022C; Tue, 26 Feb 2013 18:17:41 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1155h) Received: from mail198-co1 (localhost.localdomain [127.0.0.1]) by mail198-co1 (MessageSwitch) id 1361902633240557_17782; Tue, 26 Feb 2013 18:17:13 +0000 (UTC) Received: from CO1EHSMHS010.bigfish.com (unknown [10.243.78.213]) by mail198-co1.bigfish.com (Postfix) with ESMTP id 37C7F1C0111; Tue, 26 Feb 2013 18:17:13 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS010.bigfish.com (10.243.66.20) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 26 Feb 2013 18:17:10 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.328.11; Tue, 26 Feb 2013 18:16:59 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r1QIH4pr007585; Tue, 26 Feb 2013 11:17:05 -0700 From: Fabio Estevam To: Date: Tue, 26 Feb 2013 15:17:01 -0300 Message-ID: <1361902622-26774-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: marex@denx.de, u-boot@lists.denx.de, Fabio Estevam Subject: [U-Boot] [PATCH 1/2] mtd: nand: Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that any NAND controller driver could use it when a 16-bit NAND is deployed. drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that other NAND drivers could reuse the same symbol. Signed-off-by: Fabio Estevam --- README | 6 +++--- drivers/mtd/nand/ndfc.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index d8cb394..1e265c9 100644 --- a/README +++ b/README @@ -3713,9 +3713,9 @@ Low Level (hardware related) configuration options: - CONFIG_SYS_SRIOn_MEM_SIZE: Size of SRIO port 'n' memory region -- CONFIG_SYS_NDFC_16 - Defined to tell the NDFC that the NAND chip is using a - 16 bit bus. +- CONFIG_SYS_NAND_BUSWIDTH_16BIT + Defined to tell the NAND controller that the NAND chip is using + a 16 bit bus. - CONFIG_SYS_NDFC_EBC0_CFG Sets the EBC0_CFG register for the NDFC. If not defined diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 6ebbb5e..213d2c9 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -156,7 +156,7 @@ static uint8_t ndfc_read_byte(struct mtd_info *mtd) struct nand_chip *chip = mtd->priv; -#ifdef CONFIG_SYS_NDFC_16BIT +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT return (uint8_t) readw(chip->IO_ADDR_R); #else return readb(chip->IO_ADDR_R); @@ -218,7 +218,7 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.bytes = 3; nand->select_chip = ndfc_select_chip; -#ifdef CONFIG_SYS_NDFC_16BIT +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT nand->options |= NAND_BUSWIDTH_16; #endif