This is the mail archive of the ecos-discuss@sources.redhat.com 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]

strata.h



In strata.h,

#elif 16 == CYGNUM_FLASH_WIDTH

# if 1 == CYGNUM_FLASH_DEVICES
#  define FLASHWORD( k ) (k)
typedef unsigned short flash_t;
# elif 2 == CYGNUM_FLASH_DEVICES
// 2 devices to make 32-bit
#  define FLASHWORD( k ) ((k)+((k)<<16))
typedef unsigned long flash_t;
# elif 2 == CYGNUM_FLASH_DEVICES
// 4 devices to make 64-bit - intermediate requires explicit widening
#  define FLASHWORD32( k ) ((flash_t)((k)+((k)<<16)))
#  define FLASHWORD( k ) (FLASHWORD32( k ) + (FLASHWORD32( k ) << 32));
typedef unsigned long long flash_t;
# else
#  error How many 16-bit flash devices?
# endif

Should this not be (note second #elif 2 should be #elif 4 ??)

#elif 16 == CYGNUM_FLASH_WIDTH

# if 1 == CYGNUM_FLASH_DEVICES
#  define FLASHWORD( k ) (k)
typedef unsigned short flash_t;
# elif 2 == CYGNUM_FLASH_DEVICES
// 2 devices to make 32-bit
#  define FLASHWORD( k ) ((k)+((k)<<16))
typedef unsigned long flash_t;
# elif 4 == CYGNUM_FLASH_DEVICES
// 4 devices to make 64-bit - intermediate requires explicit widening
#  define FLASHWORD32( k ) ((flash_t)((k)+((k)<<16)))
#  define FLASHWORD( k ) (FLASHWORD32( k ) + (FLASHWORD32( k ) << 32));
typedef unsigned long long flash_t;
# else
#  error How many 16-bit flash devices?
# endif



I am trying to get Flash support for a custom board using the SA1110 and 2
28F640J3A Flash
chips.  The file travis_flash.ini is as follows


// The travis system has two 16-bit devices.
// Doc says: a StrataFlash 28F320J3A. The 320 means 32Mbit, so 4Mbyte.
// Reality:  a StrataFlash 28F640J3A. The 640 means 64Mbit, so 8Mbyte.

#define CYGNUM_FLASH_DEVICES 	(2)
#define CYGNUM_FLASH_BASE 	(0x08000000u)
#define CYGNUM_FLASH_BASE_MASK  (0xFE000000u) // 32Mb devices
#define CYGNUM_FLASH_WIDTH 	(16)
#define CYGNUM_FLASH_BLANK      (1)

#endif  // CYGONCE_DEVS_FLASH_TRAVIS_STRATAFLASH_INL
// ------------------------------------------------------------------------
// EOF travis_strataflash.inl

In my redboot_ROM.ecm, when I enable flash, the last line

cdl_component CYGSEM_REDBOOT_FLASH_CONFIG{
  user_value 0
};

If I set it to one, redboot freezes, and nothing came up.  If I set it to 0,
redbood comes up.  
FLASH: 0x08000000 - 0x09000000, 64 blocks of 0x00040000 bytes each.

which I think is correct.

However, if I try

fis init -f
*** Initialize FLASH Image System
... Erase from 0x08080000-0x08fc0000:..............................

Then the whole thing freezes up.  I have tried other variations also.

Can someone shed some light on what is going on?

Thanks,

Warren


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