state: backend_circular: Read whole PEB
When the circular backend searches for the last page written in the
eraseblock, it iterates backwards pagewise from the end of the block.
This is ok for NAND flash, but on NOR flash, which does not have pages,
the code ends up iterating bytewise backwards, calling into mtd each
time. This is very time consuming, so optimize this by reading the whole
eraseblock once and just iterate over the buffer in memory.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent fa4ef25 commit eee08770763c327385650c8b7b343dcc590875d0
@Sascha Hauer Sascha Hauer authored on 22 Mar 2017
Showing 1 changed file
View
src/barebox-state/backend_bucket_circular.c