This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch fixes bad flash device length


Attached is a patch to

ecos/packages/io/flash/current/src/flashiodevlegacy.c

to fix bad flash device length when configured to use absolute addresses
for flash devices.

See line 130 in the same file to check how the 'end' member of the
device private info is computed and how this patch fixes it.

-- 
+---------------------------------------------
| Daniel Helgason <dhelgason@shaw.ca>
--- flashiodevlegacy.c	2009-11-20 14:47:57.000000000 -0800
+++ flashiodevlegacy_new.c	2010-01-15 16:42:09.000000000 -0800
@@ -337,7 +337,7 @@
 #ifdef CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_1 
 static struct flashiodev_priv_t priv1 = CYG_FLASHIODEV_DEV(
   CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_1,       // start
-  CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_1 + CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_1,
+  CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_1,      // end
   0,       // use_fis
   1,       // use_static
   0,       // use_offset
@@ -385,7 +385,7 @@
 #ifdef CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_2 
 static struct flashiodev_priv_t priv2 = CYG_FLASHIODEV_DEV(
   CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_2,       // start
-  CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_2 + CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_2,
+  CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_2,      // end
   0,       // use_fis
   1,       // use_static
   0,       // use_offset

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]