mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* i.mx21 ads nor flash
@ 2014-01-27 23:46 Cristiano De Alti
  2014-01-28 11:33 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Cristiano De Alti @ 2014-01-27 23:46 UTC (permalink / raw)
  To: barebox

Hi,
  I'm trying to revive an old i.mx21 ads board.
I've flashed barebox-2014.01.0 and the board boots.
Ethernet works and I'm able to boot Linux via tftp.
Adding CONFIG_NAND=y in the .config enables the 64MB NAND flash (why is it
not set in the board defconfig?) and I can erase it.
Nice work, Barebox!
My question is about the NOR flash. The board has two banks of 8Mx16bit NOR
flash paralleled. So the data bus width is 32 bit and the capacity is 32MB.
The NOR is detected by Barebox:

cfi_flash cfi_flash0: found cfi flash at c8000000, size 33554432

and I can see the /dev/nor0 device:

crw-------   33554432 /dev/nor0

I can erase it but only up to 16M. For example, this works:

erase /dev/nor0 10M+6M

Anyway if I try to erase an area above 16M, e.g.:

erase /dev/nor0 16M+1k

or the whole device, e.g.:

erase /dev/nor0

the command fails with:

erase: Invalid argument

I've added printouts and the area I want to delete is past the last eraseregion.

So I wonder how the units of the erase command are meant. If the unit is
byte, the command:

erase /dev/nor0 0+16M

should obviously mean "erase the first half of the whole flash".
But then the above commands shouldn't fail.

Alternatively, given that there are 2 16MB banks in parallel it could also
mean "erase 16MB in each bank" i.e. the whole flash.

I'm not sure what's happening.

Ciao,
  Cristiano


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

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

end of thread, other threads:[~2014-02-03  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-27 23:46 i.mx21 ads nor flash Cristiano De Alti
2014-01-28 11:33 ` Sascha Hauer
2014-02-02 16:17   ` Cristiano De Alti
2014-02-03  8:35     ` Sascha Hauer

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