From patchwork Sat Aug 31 02:53:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 271322 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 21B722C00C5 for ; Sat, 31 Aug 2013 00:49:25 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VFQ0i-00012W-81; Fri, 30 Aug 2013 14:49:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VFQ0g-0001ce-Bn; Fri, 30 Aug 2013 14:49:14 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VFQ0d-0001cI-Ry for linux-mtd@lists.infradead.org; Fri, 30 Aug 2013 14:49:12 +0000 Received: by mail-pa0-f49.google.com with SMTP id ld10so2400855pab.8 for ; Fri, 30 Aug 2013 07:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=FoL5rXW3AvD4+TK85newYyFTSYCa86nkhJKtaNQ0sdA=; b=z/HDj5y3pPFcuHDs9IHkumkL1EDCnd6ttgfClJJGrsPP1YUFBZWooH4VPn9827Pkx3 tlX1IACX/vYSWfJBG9mOBnKw7AqhRclV9BMASqmPboTOBgYJ4rpNGY2jbYnm21+WrkWY FOpWjiRInhdp/J3FAgPhYkE0Ax/0iDNx7rc1qMcSEIAGepyH4lvv8Px8hxA4LLPLATFY ncOXKX5ydy0xPahNokNeqdMhzSUwJZUFvmKX3HgH+WLJBA5BGSThvy8u4UNvIXvkGfts G2FZtSSf8+w+0q7nW86QWfKzValH4BcrKBx4QnRTha3uxJBWcT3rUOpbDY9el7jGRDBs Xgqw== X-Received: by 10.66.149.98 with SMTP id tz2mr11257966pab.150.1377874127325; Fri, 30 Aug 2013 07:48:47 -0700 (PDT) Received: from gmail.com ([58.37.124.171]) by mx.google.com with ESMTPSA id oj6sm48297821pab.9.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 30 Aug 2013 07:48:46 -0700 (PDT) Date: Fri, 30 Aug 2013 22:53:46 -0400 From: Huang Shijie To: Hector Palacios Subject: Re: gpmi-nand driver and jffs2 support Message-ID: <20130831025344.GA9971@gmail.com> References: <522062B4.4080709@digi.com> <52206C05.8020701@freescale.com> <5220AB35.9080409@digi.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5220AB35.9080409@digi.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130830_104911_991507_CEA2B5BF X-CRM114-Status: GOOD ( 26.11 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shijie8[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 3.2 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (shijie8[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: "fabio.estevam@freescale.com" , Huang Shijie , Marek Vasut , "linux-mtd@lists.infradead.org" X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Fri, Aug 30, 2013 at 04:24:53PM +0200, Hector Palacios wrote: > Dear Huang, > > On 08/30/2013 11:55 AM, Huang Shijie wrote: > >于 2013年08月30日 17:15, Hector Palacios 写道: > >>Hello, > >> > >>Working on my custom platform based on i.MX28 (and also with the > >>MX28EVK) I checked that I cannot mount JFFS2 nand partitions because > >>I'm getting this error: > >> > >>jffs2: inconsistent device description > >> > >>which seems to have to do with the OOB area of the NAND. > >>I saw patchset [1] from Huang Shijie which seems to be related to the > >>issue. I just wanted to confirm if other people has the same problem > >>and if the patchset really aims to solve this, or mine is a different > >>issue. > >> > >yes, this patch set aims to solve this. > > > >You can try the SLC on the imx28. > > > >I only tested the SLC On the imx6q. > > I applied the patchset but I still get the same error when trying to > mount a JFFS2 filesystem. My nand is: > > [ 0.819654] ONFI param page 0 valid > [ 0.823179] ONFI flash detected > [ 0.826344] NAND device: Manufacturer ID: 0x2c,Chip ID: 0xaa (Micron MT29F2G08ABBEAH4) > [ 0.834455] NAND device: 256MiB, SLC, page size: 2048, OOB size: 64 > Could you print out the spare bytes of the oob area? --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index cc0306b..5461189 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -217,6 +217,7 @@ static bool set_geometry_by_ecc_info(struct gpmi_nand_data *this) if (geo->page_size < mtd->writesize + mtd->oobsize) { of->offset = geo->page_size - mtd->writesize; of->length = mtd->oobsize - of->offset; + printk("[ %s ] %d, %d\n", __func__, of->offset, of->length); } geo->payload_size = mtd->writesize;