public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: "Estevam Fabio-R49496" <r49496@freescale.com>,
	"Lambrecht Jürgen" <J.Lambrecht@TELEVIC.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"dedekind1@gmail.com" <dedekind1@gmail.com>
Subject: Re: [PATCH] Add 'config IMX_NFC_V1_BISWAP' to swap the Bad block Indicator, and use for imx27pdk nand support.
Date: Wed, 6 Jul 2011 18:29:35 +0200	[thread overview]
Message-ID: <20110706162935.GV6069@pengutronix.de> (raw)
In-Reply-To: <19988.26817.208939.223896@ipc1.ka-ro>

On Wed, Jul 06, 2011 at 03:53:05PM +0200, Lothar Waßmann wrote:
> Hi,
> 
> Lambrecht Jürgen writes:
> > On 07/06/2011 01:48 PM, Lothar Waßmann wrote:
> > > > Am I correct that all nfc-v1's have that bug, so only imx27 and imx51?
> > > > The application note we finally got from freescale only mentions "FSL
> > > > IMX NFC".
> > > >
> > > It's not exactly a bug (which would be possible to get fixed), but an
> > > inherent feature of the controller which handles NAND flash with a
> > > page size larger than 512 byte like it has n pages of 512 byte.
> > >
> > OK, a "hardware bug" then (can be fixed with a re-write of the 
> > VHDL/Verilog code of the NFC, giving v2). It seems to me Freescale tried 
> > to enhance their 512B-page controller with to possibility to also handle 
> > 2kB pages, but they forgot about the Factory Bad Block byte (n=4 only).
> > So to reply to your next mail: only the imx27 and imx31 (thanks sascha, 
> > it was a typo to mention 51) have the NFC v1, I believe all the others 
> > have NFC v2, which are fixed.
> > 
> How do you come to that conclusion?

I remember fsl code which does this only for the v1 controller, but I
can't find this anymore, so maybe my mind fooled me.
Have you checked this somehow that it is indeed swapped for all
controllers or do you believe the fsl code?

> All the controllers share the same
> flash buffer layout and map it to the actual flash data in the same
> way. Thus the problem exists for all of them.
> And the original Freescale code for i.MX5 et al. handles the bad block
> markers in the same way as for i.MX2 or i.MX3.

Indeed :(

>From what I've seen neither barebox nor the kernel nor u-boot handle
this in Mainline versions. I think we have to do something.

Maybe we can handle this in a way that when no bad block table is
present we create one with the correct values? This way we could
eliminate the problem at least on boards with virgin flashes.

This whole topic totally sucks. Whatever we do now we end up with
corrupted flashes in one way or the other.

BTW the Bootrom code expects non swapped flash layout, so applying
a swap patch makes it impossible to update the bootloader in NAND.
Maybe that's the reason the FSL code has this disable_bi_swap sysfs
attribute in it.

Not calling this a bug makes me think you work for the Freescale
marketing department ;)

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2011-07-06 16:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 13:33 [PATCH] Add 'config IMX_NFC_V1_BISWAP' to swap the Bad block Indicator, and use for imx27pdk nand support Jürgen Lambrecht
2011-07-05 15:52 ` Baruch Siach
2011-07-06  7:06 ` Artem Bityutskiy
2011-07-06  8:09 ` Sascha Hauer
2011-07-06  8:55   ` Lambrecht Jürgen
2011-07-06  9:30   ` Lambrecht Jürgen
2011-07-06 11:48     ` Lothar Waßmann
2011-07-06 11:56       ` Artem Bityutskiy
2011-07-06 12:39       ` Lambrecht Jürgen
2011-07-06 13:53         ` Lothar Waßmann
2011-07-06 16:29           ` Sascha Hauer [this message]
2011-07-06 16:48             ` Lothar Waßmann
2011-07-06 12:05     ` Sascha Hauer
2011-07-06 12:25       ` Lothar Waßmann
2011-07-06  9:06 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110706162935.GV6069@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=J.Lambrecht@TELEVIC.com \
    --cc=LW@KARO-electronics.de \
    --cc=dedekind1@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=r49496@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox