From cba1813d5c017e2d20969bb419a856fe15c5ceef Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Mon, 28 Dec 2009 16:43:51 +0100 Subject: 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 --- src/flash/nor/core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/flash/nor') diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 5eb51cd2..01088f3c 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -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++) { -- cgit v1.2.3