mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC] MTD m25p80 3-byte addressing and boot problem
@ 2014-09-01  9:43 Matteo Fortini
  2014-09-01 10:13 ` Geert Uytterhoeven
  2014-09-01 11:48 ` Mark Marshall
  0 siblings, 2 replies; 3+ messages in thread
From: Matteo Fortini @ 2014-09-01  9:43 UTC (permalink / raw)
  To: linux-mtd; +Cc: barebox, mike

If a Linux/Barebox system is using an SPI flash of size >= 16 MB, the 
driver is switching to 3-byte addressing to be able to use linear access 
to the whole memory.

This leads to the impossibility to boot a board after a warm reset, 
because all bootloaders use the standard 2-byte addressing (if the board 
doesn't physically reset the flash or do something similar).

Some documentation in the following links:
http://www.at91.com/discussions/viewtopic.php/f,30/t,22849.html
https://community.freescale.com/docs/DOC-93632

The solution proposed on freescale forums is not final: it involves 
switching back to 2-byte addressing after every access, which still 
leaves a small window in which a warm reset would be fatal.

One solution would be to use the bank command in the flash, using each 
16MB bank linearly, and changing bank depending on the address. This 
would be messy for accesses which are crossing the boundary, but it is 
doable.

I'm asking here for comments before I start patching the code. Right now 
I resorted to stick to 2-byte addressing and leave half of my NOR (32MB) 
unused.

TIA,
M

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-01 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01  9:43 [RFC] MTD m25p80 3-byte addressing and boot problem Matteo Fortini
2014-09-01 10:13 ` Geert Uytterhoeven
2014-09-01 11:48 ` Mark Marshall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox