[U-Boot] [PATCH 5/6] cmd_nvedit.c: allow board-specific code before/after saving the environment

Mike Frysinger vapier at gentoo.org
Fri May 18 04:46:48 CEST 2012


On Thursday 17 May 2012 18:35:25 Timur Tabi wrote:
> Well, I already have code in U-boot that does this.  If you look at
> board/freescale/p1022ds/diu.c, you'll see that I override each of the NOR
> flash accessors.  This is horribly inefficient, but it works.
> Unfortunately, it only covers NOR flash.  The new design covers NOR and
> NAND.

oh, i see what you're on about now.  we do a similar thing, but to support 
some address lines being controlled via GPIOs.  you can see what we did here:
	board/cm-bf537e/gpio_cfi_flash.c

unfortunately, we run up to the same issue you describe where doing saveenv 
doesn't go through the normal flash API, so the lines don't get set right, so 
we end up writing to the wrong part of flash.

when i brought this up before, the suggestion was to extend the existing mtd 
framework to support this because the existing nor flash framework is supposed 
to make the assumption that the entire thing is directly addressable.  but i 
never found time or inclination, and i'm much less likely to do so today :).

the thread was titled:
	flread: new command for reading indirect mapped flashes
and dates June 2009 :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120517/3f8c7f57/attachment.pgp>


More information about the U-Boot mailing list