mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* MTD with non-power-of-2 page size
@ 2015-08-12 11:21 Dave Kitchen
  2015-08-12 12:13 ` Simon Aittamaa
  2015-08-19 14:20 ` Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Kitchen @ 2015-08-12 11:21 UTC (permalink / raw)
  To: barebox


I have just started to work with barebox on an Atmel at91sam9g45 processor.
The board has an Atmel AT45DB161 dataflash configured as 528-byte page size.
I find that eg saveenv command does not run as the page erase fails with 
EINVAL. On tracing this is fired from the page size and offset 
correction code [mtd/core,c mtd_erase_align()] which uses bit masking to 
align the size and offset. Unfortunately bit-masking does not work with 
non-power-of-2 pages. Has anyone else addressed this problem?

The 'trivial' exercise of replacing the bit masks by modulo [%] operator 
does not succeed as the compiler I am using (gcc!) does not support 
long-long divmod.

Regards
Dave Kitchen
InSync technology Ltd


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

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

end of thread, other threads:[~2015-08-19 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 11:21 MTD with non-power-of-2 page size Dave Kitchen
2015-08-12 12:13 ` Simon Aittamaa
2015-08-19 14:20 ` Sascha Hauer
2015-08-19 14:29   ` Dave Kitchen
2015-08-19 14:45     ` Sascha Hauer

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