MTD with non-power-of-2 page size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux