From patchwork Fri Jul 17 19:32:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brownell X-Patchwork-Id: 36049 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6HJZiI3015480 for ; Fri, 17 Jul 2009 19:35:45 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6HJX54v031442; Fri, 17 Jul 2009 14:33:10 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id n6HJX4kK001525; Fri, 17 Jul 2009 14:33:04 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E595A80627; Fri, 17 Jul 2009 14:33:03 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 0E1AA80626 for ; Fri, 17 Jul 2009 14:33:02 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id n6HJX1FZ017815 for ; Fri, 17 Jul 2009 14:33:01 -0500 (CDT) Received: from mail29-va3-R.bigfish.com (mail-va3.bigfish.com [216.32.180.111]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6HJWuff027701 for ; Fri, 17 Jul 2009 14:33:01 -0500 Received: from mail29-va3 (localhost.localdomain [127.0.0.1]) by mail29-va3-R.bigfish.com (Postfix) with ESMTP id 5A2D814A023C for ; Fri, 17 Jul 2009 19:32:56 +0000 (UTC) X-SpamScore: -9 X-BigFish: vps-9(zz9370K98dNzz1202hzzz2dh5eh6bh61h) X-Spam-TCS-SCL: 0:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 69.147.64.96; Service: EHS Received: by mail29-va3 (MessageSwitch) id 1247859174787035_14080; Fri, 17 Jul 2009 19:32:54 +0000 (UCT) Received: from smtp123.sbc.mail.sp1.yahoo.com (smtp123.sbc.mail.sp1.yahoo.com [69.147.64.96]) by mail29-va3.bigfish.com (Postfix) with SMTP id 89EB01C9804F for ; Fri, 17 Jul 2009 19:32:54 +0000 (UTC) Received: (qmail 55709 invoked from network); 17 Jul 2009 19:32:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=IpsLXXQ2GU0wR4treXsZVEceBVU9dCRgZq1ervXkdKpBWwRWkSHRxcD6T5G7DQfZ8jShH22T6VosDHhVci+Pd+JTB5+Tt3qhjf/y5Adm/yeCKzwjrVo3hzGiq8x/3WGFWTHOkmcFbJezFRwQUcmpWN4akA4RQ4YwJBXr2wPOSsE= ; Received: from unknown (HELO albert) (david-b@69.226.209.118 with plain) by smtp123.sbc.mail.sp1.yahoo.com with SMTP; 17 Jul 2009 19:32:54 -0000 X-YMail-OSG: c0JsdpsVM1nhv8IjQ67e8LTsbS0zx9dJMPJ3H.xEpkuQh5dJh2NzqeQ_HKSyVuc11gpSADEdK3L.DxTDqwpu.c5D6isbSH8ISCuOj_VK6jHcImNASGM3F7CkPk80XDSXsHXav0IoZ7dWDnI9Pjzrvmtx7b5CPXlbfcHIAM5k7OanWDCyD57XJyo_3Pu7e0w9WUfipbwnLJR0wx4osNYYex3KghjjvfHxNkeWzapHaFaHL7j_J9vm_YLJRVx1BseO67igJqTUrjwK5cSe8S3bGOeUwPMtxFRW_FxQHEwO1YBN1g-- X-Yahoo-Newman-Property: ymail-3 From: David Brownell To: davinci-linux-open-source@linux.davincidsp.com Date: Fri, 17 Jul 2009 12:32:53 -0700 User-Agent: KMail/1.9.10 References: <1247781590-11323-1-git-send-email-nsnehaprabha@ti.com> In-Reply-To: <1247781590-11323-1-git-send-email-nsnehaprabha@ti.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907171232.53725.david-b@pacbell.net> Cc: linux-mtd@lists.infradead.org, tglx@linutronix.de, dwmw2@infradead.org, akpm@linux-foundation.org Subject: Re: [PATCH v3 3/3] mtd-nand: DaVinci: Add 4-bit ECC support for large page NAND chips X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com On Thursday 16 July 2009, nsnehaprabha@ti.com wrote: > It also fixes a bug in the ECC correction handler. > When we introduce 5 bit-errors in chunk, error correction stops working. When > errors are detected the 4BITECC_START bit was left high, which should be > cleared. Agreed that needs to be fixed, but there should be a comment about this being an *undocumented* behavior in the hardware. The reason that the bug exists at all is because this step has never been documented. So, please roll in this update. - Dave --- drivers/mtd/nand/davinci_nand.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -350,13 +350,16 @@ compare: /* * Clear any previous address calculation by doing a dummy read of an - * error address register. + * error address register. UNDOCUMENTED that the ECC engine won't + * recover after 5-bit ECC errors without this step. */ davinci_nand_readl(info, NAND_ERR_ADD1_OFFSET); /* Start address calculation, and wait for it to complete. * We _could_ start reading more data while this is working, - * to speed up the overall page read. + * to speed up the overall page read. UNDOCUMENTED that + * reading some ERRVAL register is needed in all cases, not + * just when an error must be corrected. */ davinci_nand_writel(info, NANDFCR_OFFSET, davinci_nand_readl(info, NANDFCR_OFFSET) | BIT(13));