summaryrefslogtreecommitdiff
path: root/src/flash/nor/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nor/core.c')
-rw-r--r--src/flash/nor/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index aedaa866..277da38c 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -324,14 +324,20 @@ static int flash_iterate_address_range(struct target *target,
{
/* special case, erase whole bank when length is zero */
if (addr != c->base)
+ {
+ LOG_ERROR("Whole bank access must start at beginning of bank.");
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
+ }
return callback(c, 0, c->num_sectors - 1);
}
/* check whether it all fits in this bank */
if (addr + length - 1 > c->base + c->size - 1)
+ {
+ LOG_ERROR("Flash access does not fit into bank.");
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
+ }
/** @todo: handle erasures that cross into adjacent banks */