From patchwork Tue Sep 2 08:23:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 385075 X-Patchwork-Delegate: andreas.biessmann@googlemail.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 ED4C11400B7 for ; Tue, 2 Sep 2014 21:28:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E42D5A75E2; Tue, 2 Sep 2014 13:28:11 +0200 (CEST) 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 ElDSFt3SQbCY; Tue, 2 Sep 2014 13:28:11 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 253BBA785D; Tue, 2 Sep 2014 13:28:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA019A75C9 for ; Tue, 2 Sep 2014 10:29:40 +0200 (CEST) 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 QTMczW0n6SKE for ; Tue, 2 Sep 2014 10:29:37 +0200 (CEST) X-Greylist: delayed 381 seconds by postgrey-1.27 at theia; Tue, 02 Sep 2014 10:29:33 CEST 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 mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by theia.denx.de (Postfix) with ESMTP id 7A457A75B6 for ; Tue, 2 Sep 2014 10:29:33 +0200 (CEST) Received: by mail.free-electrons.com (Postfix, from userid 106) id 98178799; Tue, 2 Sep 2014 10:23:17 +0200 (CEST) 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 F413E9C; Tue, 2 Sep 2014 10:23:16 +0200 (CEST) From: Boris BREZILLON To: u-boot@lists.denx.de, Scott Wood , =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Tue, 2 Sep 2014 10:23:09 +0200 Message-Id: <1409646189-14294-1-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Tue, 02 Sep 2014 13:28:05 +0200 Cc: Nicolas Ferre , info@free-electrons.com Subject: [U-Boot] [PATCH] mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Disable subpage write when using PMECC to prevent buggy partial page write. This fix has been taken from linux sources (see commit 90445ff6241e2a13445310803e2efa606c61f276) Signed-off-by: Boris BREZILLON Acked-by: Josh Wu --- Hi, Here is a link to the linux commit: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/mtd/nand/atmel_nand.c?id=90445ff6241e2a13445310803e2efa606c61f276 Best Regards, Boris drivers/mtd/nand/atmel_nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index e73834d..ee67662 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -881,6 +881,7 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, return -ENOMEM; } + nand->options |= NAND_NO_SUBPAGE_WRITE; nand->ecc.read_page = atmel_nand_pmecc_read_page; nand->ecc.write_page = atmel_nand_pmecc_write_page; nand->ecc.strength = cap;