Browse Source

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>
tags/v0.4.0-rc2
Piotr Esden-Tempski 14 years ago
committed by David Brownell
parent
commit
cba1813d5c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/flash/nor/core.c

+ 1
- 0
src/flash/nor/core.c 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++)
{


Loading…
Cancel
Save