From patchwork Tue Mar 15 07:16:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: michael X-Patchwork-Id: 86887 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 AA242B7080 for ; Tue, 15 Mar 2011 18:15:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0D13F28080; Tue, 15 Mar 2011 08:15: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 KOxSrsBPSUzm; Tue, 15 Mar 2011 08:15:03 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 66B7028088; Tue, 15 Mar 2011 08:15:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F20EB28080 for ; Tue, 15 Mar 2011 08:14:58 +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 TsJ0h13a6c0B for ; Tue, 15 Mar 2011 08:14:58 +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 sssup.it (ms01.sssup.it [193.205.80.99]) by theia.denx.de (Postfix) with ESMTP id 3BE652807F for ; Tue, 15 Mar 2011 08:14:55 +0100 (CET) Received: from [10.30.3.72] (HELO smaug.retis) by sssup.it (CommuniGate Pro SMTP 5.3.10) with ESMTP id 67688896; Tue, 15 Mar 2011 08:14:55 +0100 Received: by smaug.retis (Postfix, from userid 1006) id 90BBA538C3; Tue, 15 Mar 2011 08:16:38 +0100 (CET) Date: Tue, 15 Mar 2011 08:16:38 +0100 From: Michael Trimarchi To: u-boot@lists.denx.de Message-ID: <20110315071638.GA16254@gandalf.sssup.it> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: scottwood@freescale.com Subject: [U-Boot] [PATCH v3] This patch fix the usage of the "CE don't care"-type NAND chips X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 atmel_nand: don't require CONFIG_SYS_NAND_ENABLE_PIN If NCE is hooked up to NCS3, we don't need to (and can't) explicitly set the state of the NCE pin. Instead, the controller asserts it automatically as part of a command/data access. Only "CE don't care"-type NAND chips can be used in this manner. Signed-off-by: Michael Trimarchi Cc: Scott Wood Cc: Reinhard Meyer --- Change since V1 - add a better description Change since V2: - change commit message diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index ab8bbb3..818d362 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -249,8 +249,10 @@ static void at91_nand_hwcontrol(struct mtd_info *mtd, if (ctrl & NAND_ALE) IO_ADDR_W |= CONFIG_SYS_NAND_MASK_ALE; +#ifdef CONFIG_SYS_NAND_ENABLE_PIN at91_set_gpio_value(CONFIG_SYS_NAND_ENABLE_PIN, !(ctrl & NAND_NCE)); +#endif this->IO_ADDR_W = (void *) IO_ADDR_W; }