Commit bd876772 authored by Ilko Iliev's avatar Ilko Iliev Committed by Jean-Christophe PLAGNIOL-VILLARD
Browse files

mtd/dataflash.c: fix a problem with the last partition

This patch fix the problem that only the [NB_DATAFLASH_AREA - 1] dataflash
partition can be defined to use the area to the end of dataflash size.
Now it is possible to have only one dataflash partition from 0 to the end
of of dataflash size.
Signed-off-by: default avatarIlko Iliev <>
parent 03f79779
......@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)
/* set the last area end to the dataflash size*/
area_list[NB_DATAFLASH_AREA - 1].end =
dataflash_info[i].end_address =
(dataflash_info[i].Device.pages_number *
dataflash_info[i].Device.pages_size) - 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment