From patchwork Thu Jan 9 16:33:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodolfo Giometti X-Patchwork-Id: 3462131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D9492C02DC for ; Thu, 9 Jan 2014 16:35:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADBD72011D for ; Thu, 9 Jan 2014 16:35:24 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D1FC20120 for ; Thu, 9 Jan 2014 16:35:19 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1IYv-0001f5-RP; Thu, 09 Jan 2014 16:34:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1IYb-0002OJ-8b; Thu, 09 Jan 2014 16:34:09 +0000 Received: from ip-196-116.sn1.eutelia.it ([62.94.196.116] helo=goldrake.enneenne.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1IYW-0002La-UH; Thu, 09 Jan 2014 16:34:06 +0000 Received: from demo.enneenne.com ([192.168.32.10] helo=enneenne.com) by goldrake.enneenne.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1W1IXw-0002f7-Pw; Thu, 09 Jan 2014 17:33:34 +0100 Date: Thu, 9 Jan 2014 17:33:26 +0100 From: Rodolfo Giometti To: Ezequiel Garcia Message-ID: <20140109163326.GD17831@enneenne.com> References: <20140102124407.GF10251@enneenne.com> <20140102144236.270c4a6a@skate> <20140103112926.GP10251@enneenne.com> <20140103145336.GA9618@localhost> <20140106153438.GX10251@enneenne.com> <20140108233603.GB2595@localhost> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140108233603.GB2595@localhost> Organization: GNU/Linux Device Drivers, Embedded Systems and Courses X-PGP-Key: gpg --keyserver keyserver.linux.it --recv-keys D25A5633 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 192.168.32.10 X-SA-Exim-Mail-From: giometti@enneenne.com X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Subject: Re: NAND support for Armada 370 X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:51:10 +0000) X-SA-Exim-Scanned: Yes (on goldrake.enneenne.com) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140109_113405_258315_404C0F3F X-CRM114-Status: GOOD ( 15.76 ) X-Spam-Score: -1.9 (-) Cc: Thomas Petazzoni , Michele Dionisio , linux-mtd@lists.infradead.org, Gregory =?iso-8859-15?Q?Cl=E9ment?= , Brian Norris , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jan 08, 2014 at 08:36:03PM -0300, Ezequiel Garcia wrote: > Hi Rodolfo, > > Sorry for being so unresponsive these days, I've been on vacation. > I'll review your patch on Monday. Ok. > In fact, already took a quick look and it looks good. I have a few > doubts: > > 1. Do we need the ECC layout? (MTD already provides defaults) Ok, I did some testes and we can safely remove it! :) > 2. Is this compatible with Marvell's U-Boot? (can you write from U-Boot, > and read from Linux, and viceversa?) Till now all our tests are ok! :) Attached is the new patch release. Ciao, Rodolfo From 4463f70a77f6aaea216b53e620171c37fb1d4eb3 Mon Sep 17 00:00:00 2001 From: Rodolfo Giometti Date: Mon, 6 Jan 2014 16:18:49 +0100 Subject: [PATCH] mtd pxa3xx_nand.c: add support for 2048 bytes page size layout Tested-by: Michele Dionisio Signed-off-by: Rodolfo Giometti --- drivers/mtd/nand/pxa3xx_nand.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 31aae53..fdc179c 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -1360,6 +1360,16 @@ static int pxa_ecc_init(struct pxa3xx_nand_info *info, * Required ECC: 4-bit correction per 512 bytes * Select: 16-bit correction per 2048 bytes */ + } else if (strength == 4 && ecc_stepsize == 512 && page_size == 2048) { + info->ecc_bch = 1; + info->chunk_size = 2048; + info->spare_size = 32; + info->ecc_size = 32; + ecc->mode = NAND_ECC_HW; + ecc->size = info->chunk_size; + ecc->strength = 16; + return 1; + } else if (strength == 4 && ecc_stepsize == 512 && page_size == 4096) { info->ecc_bch = 1; info->chunk_size = 2048; -- 1.8.1.2