]> git.sur5r.net Git - u-boot/commitdiff
mtd/dataflash.c: fix a problem with the last partition
authorIlko Iliev <iliev@ronetix.at>
Tue, 2 Dec 2008 16:27:54 +0000 (17:27 +0100)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 2 Dec 2008 20:53:24 +0000 (21:53 +0100)
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>
drivers/mtd/dataflash.c

index 58be18255478777169b76994e052f66ee9091ce2..96cd395e71a7ad30ab230cc1b56f040e3bcc0e7c 100644 (file)
@@ -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;