From: Ilko Iliev Date: Tue, 2 Dec 2008 17:27:54 +0100 Subject: [U-Boot] [PATCH] mtd/dataflash.c: fix a problem with the last partition In-Reply-To: 20081119122755.GE30468@game.jcrosoft.org References: 20081119122755.GE30468@game.jcrosoft.org Message-ID: <12282352741417-git-send-email-iliev@ronetix.at> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- drivers/mtd/dataflash.c | 2 +- 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; -- 1.5.2.2