NOR: last_addr also needs correction when checking alignment
Otherwise the new alignment checking algorithm thinks that the address is not aligned, because it is way beyond the last sector. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
parent
3ace333663
commit
cba1813d5c
|
@ -316,6 +316,7 @@ static int flash_iterate_address_range(struct target *target,
|
||||||
/** @todo: handle erasures that cross into adjacent banks */
|
/** @todo: handle erasures that cross into adjacent banks */
|
||||||
|
|
||||||
addr -= c->base;
|
addr -= c->base;
|
||||||
|
last_addr -= c->base;
|
||||||
|
|
||||||
for (i = 0; i < c->num_sectors; i++)
|
for (i = 0; i < c->num_sectors; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue