summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2019-01-09 12:28:14 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-14 12:14:25 +0100
commit9d0e9062cae80554112d8a6d94a0abc5aa446e8e (patch)
treef457b58158152fb457fc8eca0fdd81303db2f2f2 /commands
parenta550aaba61974fef8eeb25b8e91e05a0255a1516 (diff)
downloadbarebox-9d0e9062cae80554112d8a6d94a0abc5aa446e8e.tar.gz
barebox-9d0e9062cae80554112d8a6d94a0abc5aa446e8e.tar.xz
mtd: core: Fix erase area alignment for non power of 2 erasesize
Devices as AT45DB161 DataFlash uses non power of two page size (528) while present alignment algorithm relies on erasesize being power of 2. Fix that by introducing helper functions rounding to any multiply. Note that logic is sligthly changed to be consistent as ending address is moved forward to include also last byte meant to be erased while previous implementation moved it backward. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
0 files changed, 0 insertions, 0 deletions