changeset 1735:e308039f4579

* src/legacy_dev.c (legacy_flash_init): The end is the size plus the start.
author asl
date Wed, 06 Oct 2004 10:59:03 +0000
parents 6aedf0a683e4
children 748b23626cb1
files packages/io/flash/current/ChangeLog packages/io/flash/current/src/legacy_dev.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/flash/current/ChangeLog
+++ b/packages/io/flash/current/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-06  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/legacy_dev.c (legacy_flash_init): The end is the size plus
+	the start.
+
 2004-09-30  Savin Zlobec <savin@elatec.si>
 
 	* src/flash.c: Offset into the block is not calculated correctly
--- a/packages/io/flash/current/src/legacy_dev.c
+++ b/packages/io/flash/current/src/legacy_dev.c
@@ -92,7 +92,7 @@ legacy_flash_init (struct cyg_flash_dev 
 
   if (!err) {
     dev->start = (cyg_flashaddr_t)flash_info.start;
-    dev->end = flash_info.block_size * flash_info.blocks - 1; 
+    dev->end = dev->start + flash_info.block_size * flash_info.blocks - 1; 
     dev->num_block_infos = 1;
     dev->block_info = block_info;
     block_info[0].block_size = flash_info.block_size;