Mercurial > ecos
changeset 904:ded614f6b946
* include/flash_am29xxxxx.inl:
Removed wrapper functions which enabled/disabled cache around query,
erase and program operations since the generic flash driver takes
care of the cache already.
| author | jlarmour |
|---|---|
| date | Fri, 04 Apr 2003 04:24:46 +0000 |
| parents | 59e96106029e |
| children | e606543201f1 |
| files | packages/devs/flash/amd/am29xxxxx/current/ChangeLog packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl |
| diffstat | 2 files changed, 13 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/flash/amd/am29xxxxx/current/ChangeLog +++ b/packages/devs/flash/amd/am29xxxxx/current/ChangeLog @@ -1,3 +1,10 @@ +2003-04-03 Jani Monoses <jani@iv.ro> + + * include/flash_am29xxxxx.inl: + Removed wrapper functions which enabled/disabled cache around query, + erase and program operations since the generic flash driver takes + care of the cache already. + 2003-02-11 Gary Thomas <gary@mlbassoc.com> * include/flash_am29xxxxx_parts.inl:
--- a/packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl +++ b/packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl @@ -168,11 +168,6 @@ int flash_erase_block(void* block, unsi __attribute__ ((section (".2ram.flash_erase_block"))); int flash_program_buf(void* addr, void* data, int len) __attribute__ ((section (".2ram.flash_program_buf"))); -static void _flash_query(void* data) __attribute__ ((section (".2ram._flash_query"))); -static int _flash_erase_block(void* block, unsigned int size) - __attribute__ ((section (".2ram._flash_erase_block"))); -static int _flash_program_buf(void* addr, void* data, int len) - __attribute__ ((section (".2ram._flash_program_buf"))); //---------------------------------------------------------------------------- // Flash Query @@ -181,8 +176,8 @@ static int _flash_program_buf(void* add // device(s) in series. It is assumed that any devices in series // will be of the same type. -static void -_flash_query(void* data) +void +flash_query(void* data) { volatile flash_data_t *ROM; volatile flash_data_t *f_s1, *f_s2; @@ -218,21 +213,6 @@ static void while ((--timeout != 0) && (w != *(FLASH_P2V(ROM)))) ; } -void -flash_query(void* data) -{ - int cache_on; - - HAL_DCACHE_IS_ENABLED(cache_on); - if (cache_on) { - HAL_DCACHE_SYNC(); - HAL_DCACHE_DISABLE(); - } - _flash_query(data); - if (cache_on) { - HAL_DCACHE_ENABLE(); - } -} //---------------------------------------------------------------------------- // Initialize driver details @@ -295,8 +275,8 @@ flash_code_overlaps(void *start, void *e //---------------------------------------------------------------------------- // Erase Block -static int -_flash_erase_block(void* block, unsigned int size) +int +flash_erase_block(void* block, unsigned int size) { volatile flash_data_t* ROM, *BANK; volatile flash_data_t* b_p = (flash_data_t*) block; @@ -430,26 +410,11 @@ static int return res; } -int -flash_erase_block(void* block, unsigned int size) -{ - int ret, cache_on; - HAL_DCACHE_IS_ENABLED(cache_on); - if (cache_on) { - HAL_DCACHE_SYNC(); - HAL_DCACHE_DISABLE(); - } - ret = _flash_erase_block(block, size); - if (cache_on) { - HAL_DCACHE_ENABLE(); - } - return ret; -} //---------------------------------------------------------------------------- // Program Buffer -static int -_flash_program_buf(void* addr, void* data, int len) +int +flash_program_buf(void* addr, void* data, int len) { volatile flash_data_t* ROM; volatile flash_data_t* BANK; @@ -529,19 +494,4 @@ static int return res; } -int -flash_program_buf(void* addr, void* data, int len) -{ - int ret, cache_on; - HAL_DCACHE_IS_ENABLED(cache_on); - if (cache_on) { - HAL_DCACHE_SYNC(); - HAL_DCACHE_DISABLE(); - } - ret = _flash_program_buf(addr, data, len); - if (cache_on) { - HAL_DCACHE_ENABLE(); - } - return ret; -} #endif // CYGONCE_DEVS_FLASH_AMD_AM29XXXXX_INL
