From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 19 Nov 2008 13:27:55 +0100 Subject: [U-Boot] [PATCH] dataflash: fix a problem with the last partition In-Reply-To: <12251221122420-git-send-email-iliev@ronetix.at> References: <12251221122420-git-send-email-iliev@ronetix.at> Message-ID: <20081119122755.GE30468@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 16:41 Mon 27 Oct , Ilko Iliev wrote: > 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. please limit to 80 Chars > > Signed-off-by: Ilko Iliev > --- > drivers/mtd/dataflash.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c > index 201e518..43746e7 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; > > @@ -146,7 +146,7 @@ int AT91F_DataflashInit (void) > if(area_list[part].end == 0xffffffff) { > dataflash_info[i].Device.area_list[j].end = > dataflash_info[i].end_address + > - dataflash_info [i].logical_address; > + dataflash_info[i].logical_address; please spit in 2 one for coding style fix and one for modification and btw maybe fix all coding style violation? as space before and after '-' & co, etc... > last_part = 1; > } else { > dataflash_info[i].Device.area_list[j].end = Best Regards, J.