public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] dataflash: fix a problem with the last partition
@ 2008-10-27 15:41 Ilko Iliev
  2008-10-28  6:40 ` Jean-Christophe PLAGNIOL-VILLARD
  2008-11-19 12:27 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 11+ messages in thread
From: Ilko Iliev @ 2008-10-27 15:41 UTC (permalink / raw)
  To: u-boot

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 |    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;
 					last_part = 1;
 				} else {
 					dataflash_info[i].Device.area_list[j].end =
-- 
1.5.2.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-11-19 12:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 15:41 [U-Boot] [PATCH] dataflash: fix a problem with the last partition Ilko Iliev
2008-10-28  6:40 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-31  8:53   ` Stefan Roese
2008-10-31 11:18     ` Wolfgang Denk
2008-10-31 16:00       ` Scott Wood
2008-10-31 16:05         ` Wolfgang Denk
2008-10-31 16:19           ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-02 15:19             ` Wolfgang Denk
2008-11-18 23:22   ` Wolfgang Denk
2008-11-19 12:19     ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-19 12:27 ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox