Index: devs/flash/intel/strata/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/strata/current/ChangeLog,v retrieving revision 1.20 diff -u -r1.20 ChangeLog --- devs/flash/intel/strata/current/ChangeLog 26 Jan 2004 23:59:10 -0000 1.20 +++ devs/flash/intel/strata/current/ChangeLog 21 Aug 2004 08:34:56 -0000 @@ -1,3 +1,10 @@ +2004-08-21 Andrew Lunn + + * src/flash_unlock_block.c (flash_unlock_block): + * cdl/flash_strata.cdl: CDL to control the maximum number of + blocks the driver supports. Some of the newer strata device has more + than the default maximum of 128. Problem pointed out by Kevin Zhang. + 2005-01-26 Scott Wilkinson * src/strata.h: * src/strata.c: Index: devs/flash/intel/strata/current/cdl/flash_strata.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/strata/current/cdl/flash_strata.cdl,v retrieving revision 1.6 diff -u -r1.6 flash_strata.cdl --- devs/flash/intel/strata/current/cdl/flash_strata.cdl 10 Sep 2003 20:52:53 -0000 1.6 +++ devs/flash/intel/strata/current/cdl/flash_strata.cdl 21 Aug 2004 08:34:57 -0000 @@ -69,12 +69,24 @@ puts $::cdl_header "#include CYGDAT_DEVS_FLASH_STRATA_CFG"; } - cdl_component CYGPKG_DEVS_FLASH_STRATA_LOCKING { display "Flash device implements locking" active_if 0 < CYGHWR_IO_FLASH_BLOCK_LOCKING calculated 1 compile flash_lock_block.c flash_unlock_block.c + + cdl_option CYGNUM_DEVS_FLASH_STRATA_MAX_BLOCKS { + display "Maximum number of blocks the driver supports" + flavor data + default_value 128 + description " + The strata devices do not support unlocking an + individual block. Instead it is necassary to unlock + all the blocks in one operation and then lock all those + blocks that should be blocked. To do this we need an array + containing the current status of the blocks. This controls the + size of that array." + } } } Index: devs/flash/intel/strata/current/src/flash_unlock_block.c =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/strata/current/src/flash_unlock_block.c,v retrieving revision 1.7 diff -u -r1.7 flash_unlock_block.c --- devs/flash/intel/strata/current/src/flash_unlock_block.c 29 Oct 2003 17:21:12 -0000 1.7 +++ devs/flash/intel/strata/current/src/flash_unlock_block.c 21 Aug 2004 08:34:57 -0000 @@ -61,7 +61,6 @@ // then reset the regions which are known to be locked. // -#define MAX_FLASH_BLOCKS 128 #define FLASH_LOCK_MASK 0x1 // which bit of the read query has the lock bit int @@ -76,7 +75,7 @@ #ifndef CYGOPT_FLASH_IS_SYNCHRONOUS int i; volatile flash_t *bp, *bpv; - unsigned char is_locked[MAX_FLASH_BLOCKS]; + unsigned char is_locked[CYGNUM_DEVS_FLASH_STRATA_MAX_BLOCKS]; #endif // Get base address and map addresses to virtual addresses