summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlko Iliev <iliev@ronetix.at>2008-12-02 17:27:54 +0100
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-12-02 21:53:24 +0100
commitbd876772ee04095e5dd943d97515a1f14bad4b1c (patch)
tree538dd2f488cd5d0e018c280885ebbfd59f79e3c6
parent03f797793b124dccaae145b977d15d6cb9e74504 (diff)
downloadu-boot-imx-bd876772ee04095e5dd943d97515a1f14bad4b1c.zip
u-boot-imx-bd876772ee04095e5dd943d97515a1f14bad4b1c.tar.gz
u-boot-imx-bd876772ee04095e5dd943d97515a1f14bad4b1c.tar.bz2
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: Ilko Iliev <iliev@ronetix.at>
-rw-r--r--drivers/mtd/dataflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 58be182..96cd395 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)
break;
}
/* 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;