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:
Piotr Esden-Tempski 2009-12-28 16:43:51 +01:00 committed by David Brownell
parent 3ace333663
commit cba1813d5c
1 changed files with 1 additions and 0 deletions

View File

@ -316,6 +316,7 @@ static int flash_iterate_address_range(struct target *target,
/** @todo: handle erasures that cross into adjacent banks */
addr -= c->base;
last_addr -= c->base;
for (i = 0; i < c->num_sectors; i++)
{