linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: linux-mtd@lists.infradead.org
Cc: J.Lambrecht@televic.com, "Artem Bityutskiy" <dedekind1@gmail.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	"Gaëtan Carlier" <gcembed@gmail.com>
Subject: Re: [PATCH 1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1.
Date: Thu, 6 Sep 2012 15:03:09 +0200	[thread overview]
Message-ID: <201209061503.09923.jbe@pengutronix.de> (raw)
In-Reply-To: <1345825064-9147-1-git-send-email-gcembed@gmail.com>

Gaëtan Carlier wrote:
> Swap the BI-byte on position 0x7D0 with a data byte at 0x835.  To fix a bug
> in Freescale imx NFC v1 SoC's for 2K page NAND flashes: imx27 and imx31.
> Warning: The same solution needs to be applied to the boot loader and the
> flash programmer.
>
> This is a modified version of patch sent by Jürgen Lambrecht :
> [PATCH] Add 'config IMX_NFC_V1_BISWAP' to swap the Bad block Indicator,
> and use for imx27pdk nand support.
>
>  v3: - use accessor function for I/O memory accesses as suggested by Artem
>        Bityutskiy
>      - rename function name as suggested by Artem Bityutskiy
>
>  v2: - Use a flag in a mxc_nand_platform structure instead of adding option
>        in Kconfig
>
>  v1: - Original patch "Add 'config IMX_NFC_V1_BISWAP'" by Jürgen Lambrecht
>
> Signed-off-by: Gaëtan Carlier <gcembed@gmail.com>

One additional note: If a user intend to boot from NAND (aka "external boot") 
there is one drawback with this patch: the very first page of the NAND will 
be read in hardware to load the bootstrap code. But the hardware doesn't know 
anything about swapping bytes!
So, when writing the very first page of the NAND the swap *must* be omitted 
(which also means the factory bad block marker of the first block in the NAND 
has to be interpreted differently).

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

      parent reply	other threads:[~2012-09-06 13:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 13:04 [PATCH v2] mxc_nand : allow swapping the Bad block Indicator for NFC v1 Gaëtan Carlier
2012-08-24 12:28 ` Artem Bityutskiy
2012-08-24 16:17   ` [PATCH 1/1] " Gaëtan Carlier
2012-08-28 10:33     ` Gaëtan Carlier
2012-08-29  7:56     ` Artem Bityutskiy
2012-09-06  8:56     ` Juergen Beisert
2012-09-10 14:31       ` Gaëtan Carlier
2012-09-11  7:17         ` Sascha Hauer
2012-09-11  8:03           ` Gaëtan Carlier
2012-09-11  8:47             ` Sascha Hauer
2012-09-23 13:00           ` Artem Bityutskiy
2014-03-26 13:53           ` Gaëtan Carlier
2014-03-28  9:11             ` Sascha Hauer
2014-03-28  9:52               ` Gaëtan Carlier
2012-09-06 13:03     ` Juergen Beisert [this message]

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=201209061503.09923.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=J.Lambrecht@televic.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gcembed@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).