From patchwork Wed May 20 15:19:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 27458 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id C05CAB7043 for ; Thu, 21 May 2009 01:22:57 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1M6naO-00088F-Pp; Wed, 20 May 2009 15:20:04 +0000 Received: from mail.atmel.fr ([81.80.104.162] helo=atmel-es2.atmel.fr) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1M6naF-0007f9-3s for linux-mtd@lists.infradead.org; Wed, 20 May 2009 15:20:02 +0000 Received: from fwat.rfo.atmel.com (gateway [192.168.1.1]) by atmel-es2.atmel.fr (8.11.6+Sun/8.11.6) with SMTP id n4KFF3612219; Wed, 20 May 2009 17:15:03 +0200 (MEST) Received: from meyreuil ([10.159.254.132]) by fwat; Wed, 20 May 2009 17:10:35 +0200 (MEST) Received: from [127.0.0.1] (pc245_112.atmel.fr [10.159.245.112]) by meyreuil.atmel.fr (8.11.7p1+Sun/8.11.7) with ESMTP id n4KFJXg09443; Wed, 20 May 2009 17:19:33 +0200 (MEST) Message-ID: <4A141F81.8070104@atmel.com> Date: Wed, 20 May 2009 17:19:29 +0200 From: Nicolas Ferre Organization: atmel User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: David Brownell , Troy Kisky , linux-mtd@lists.infradead.org Subject: Re: [PATCH 3/5] mtd: nand: atmel: use default ecc layout References: <> <1242270008-1552-2-git-send-email-troy.kisky@boundarydevices.com> <1242270008-1552-3-git-send-email-troy.kisky@boundarydevices.com> <200905132212.11923.david-b@pacbell.net> In-Reply-To: <200905132212.11923.david-b@pacbell.net> X-Spam-Score: 0.0 (/) Cc: Richard Genoud , Haavard Skinnemoen X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi, I would like to bring my 2cents to the discussion so, let me comment simultaneously on: [PATCH 1/5] mtd: nand: move layout structure into nand_ecc_ctrl [PATCH 3/5] mtd: nand: atmel: use default ecc layout First of all I did not manage to compile without this additional line in atmel_nand.c (which is not in original patch): Here is the log that I have running with this patch: " NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit) AT91 NAND: 8-bit, Software ECC nand_scan_tail ecc.total = 24, ecc.steps = 8, ecc.bytes = 3, ecc.size = 256, writesize = 2048 nand_scan_tail oobfree[0].offset=2, .length=38 Scanning device for bad blocks Bad eraseblock 881 at 0x06e20000 Creating 3 MTD partitions on "atmel_nand": 0x00000000-0x00400000 : "Bootstrap" 0x00400000-0x04000000 : "Partition 1" 0x04000000-0x10000000 : "Partition 2" " All seems ok. So, with the above line replaced, I would like to add to both patches: [nicolas.ferre@atmel.com: tested on large page nand sw ECC] Tested-by: Nicolas Ferre Regards, --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -329,7 +303,7 @@ static int atmel_nand_calculate(struct m { struct nand_chip *nand_chip = mtd->priv; struct atmel_nand_host *host = nand_chip->priv; - uint32_t *eccpos = nand_chip->ecc.layout->eccpos; + uint32_t *eccpos = nand_chip->ecc.layout.eccpos; unsigned int ecc_value; /* get the first 2 ECC bytes */