# HG changeset patch # User asl # Date 1095177806 0 # Node ID 41dd4286cbbd4ea6877f8a2e58110cf6dd5a57ce # Parent d2486ee206e469546e7f749942aa78c2d6bb2401 * include/flash_sst_39vfxxx.inl: Set the end address to the last valid address in flash, not the first invalid address. diff --git a/packages/devs/flash/sst/39vfxxx/current/ChangeLog b/packages/devs/flash/sst/39vfxxx/current/ChangeLog --- a/packages/devs/flash/sst/39vfxxx/current/ChangeLog +++ b/packages/devs/flash/sst/39vfxxx/current/ChangeLog @@ -1,3 +1,8 @@ +2004-09-14 Andrew Lunn + + * include/flash_sst_39vfxxx.inl: Set the end address to the last + valid address in flash, not the first invalid address. + 2004-08-06 Andrew Lunn * include/flash_sst_39vfxxx.inl: The structure declared by diff --git a/packages/devs/flash/sst/39vfxxx/current/include/flash_sst_39vfxxx.inl b/packages/devs/flash/sst/39vfxxx/current/include/flash_sst_39vfxxx.inl --- a/packages/devs/flash/sst/39vfxxx/current/include/flash_sst_39vfxxx.inl +++ b/packages/devs/flash/sst/39vfxxx/current/include/flash_sst_39vfxxx.inl @@ -64,7 +64,6 @@ #define _FLASH_PRIVATE_ #include - //---------------------------------------------------------------------------- // Common device details. #define FLASH_Read_ID FLASHWORD( 0x90 ) @@ -170,7 +169,7 @@ sst_init(struct cyg_flash_dev *dev) // Hard wired for now dev->end = dev->start + - (FLASH_NUM_REGIONS * FLASH_BLOCK_SIZE * CYGNUM_FLASH_SERIES); + (FLASH_NUM_REGIONS * FLASH_BLOCK_SIZE * CYGNUM_FLASH_SERIES) -1; dev->num_block_infos = 1; priv->block_info[0].blocks = FLASH_NUM_REGIONS * CYGNUM_FLASH_SERIES; priv->block_info[0].block_size = FLASH_BLOCK_SIZE; @@ -266,7 +265,6 @@ sst_erase_block(struct cyg_flash_dev *de } prev_state = state; } - // Verify loaded data bytes while (len > 0) { if (*addr_ptr != FLASH_BlankValue) { @@ -278,7 +276,6 @@ sst_erase_block(struct cyg_flash_dev *de len -= sizeof(*addr_ptr); } } - return CYG_FLASH_ERR_OK; }