Mercurial > nand-ecoscentric
changeset 902:5ede1532afc0
* src/flash_erase_block.c (flash_erase_block):
* src/flash_query.c (flash_query):
* src/flash_program_buf.c (flash_program_buf):
Cache enabling and disabling are already handled by generic flash
| author | jlarmour |
|---|---|
| date | Fri, 04 Apr 2003 04:20:08 +0000 |
| parents | b7a9c0130fa1 |
| children | 59e96106029e |
| files | packages/devs/flash/arm/sa1100mm/current/ChangeLog packages/devs/flash/arm/sa1100mm/current/src/flash_erase_block.c packages/devs/flash/arm/sa1100mm/current/src/flash_program_buf.c packages/devs/flash/arm/sa1100mm/current/src/flash_query.c |
| diffstat | 4 files changed, 7 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/flash/arm/sa1100mm/current/ChangeLog +++ b/packages/devs/flash/arm/sa1100mm/current/ChangeLog @@ -1,3 +1,10 @@ +2002-04-03 Jani Monoses <jani@iv.ro> + + * src/flash_erase_block.c (flash_erase_block): + * src/flash_query.c (flash_query): + * src/flash_program_buf.c (flash_program_buf): + Cache enabling and disabling are already handled by generic flash + 2001-09-28 Jonathan Larmour <jlarmour@redhat.com> * src/sa1100mm_flash.c (flash_hwr_init): Only re-enable icache if it
--- a/packages/devs/flash/arm/sa1100mm/current/src/flash_erase_block.c +++ b/packages/devs/flash/arm/sa1100mm/current/src/flash_erase_block.c @@ -54,7 +54,6 @@ #include <pkgconf/hal.h> #include <cyg/hal/hal_arch.h> -#include <cyg/hal/hal_cache.h> // // CAUTION! This code must be copied to RAM before execution. Therefore, @@ -66,13 +65,6 @@ flash_erase_block(volatile unsigned long { unsigned long stat; int timeout = 5000000; - int cache_on; - - HAL_DCACHE_IS_ENABLED(cache_on); - if (cache_on) { - HAL_DCACHE_SYNC(); - HAL_DCACHE_DISABLE(); - } // Clear any error conditions *block = FLASH_Clear_Status; @@ -87,9 +79,5 @@ flash_erase_block(volatile unsigned long // Restore ROM to "normal" mode *block = FLASH_Reset; - if (cache_on) { - HAL_DCACHE_ENABLE(); - } - return stat; }
--- a/packages/devs/flash/arm/sa1100mm/current/src/flash_program_buf.c +++ b/packages/devs/flash/arm/sa1100mm/current/src/flash_program_buf.c @@ -54,7 +54,6 @@ #include <pkgconf/hal.h> #include <cyg/hal/hal_arch.h> -#include <cyg/hal/hal_cache.h> // // CAUTION! This code must be copied to RAM before execution. Therefore, @@ -66,15 +65,8 @@ flash_program_buf(volatile unsigned long { unsigned long stat = 0; int timeout = 5000000; - int cache_on; volatile unsigned long *orig_addr = addr; - HAL_DCACHE_IS_ENABLED(cache_on); - if (cache_on) { - HAL_DCACHE_SYNC(); - HAL_DCACHE_DISABLE(); - } - // Clear any error conditions *addr = FLASH_Clear_Status; @@ -95,9 +87,5 @@ flash_program_buf(volatile unsigned long bad: *orig_addr = FLASH_Reset; - if (cache_on) { - HAL_DCACHE_ENABLE(); - } - return stat; }
--- a/packages/devs/flash/arm/sa1100mm/current/src/flash_query.c +++ b/packages/devs/flash/arm/sa1100mm/current/src/flash_query.c @@ -54,7 +54,6 @@ #include <pkgconf/hal.h> #include <cyg/hal/hal_arch.h> -#include <cyg/hal/hal_cache.h> // // CAUTION! This code must be copied to RAM before execution. Therefore, @@ -69,13 +68,6 @@ flash_query(unsigned char *data) volatile unsigned long *lROM; volatile unsigned char *cROM; int i, cnt; - int cache_on; - - HAL_DCACHE_IS_ENABLED(cache_on); - if (cache_on) { - HAL_DCACHE_SYNC(); - HAL_DCACHE_DISABLE(); - } lROM = (unsigned long *)0x08000000; cROM = (unsigned char *)0x08000000; @@ -87,9 +79,5 @@ flash_query(unsigned char *data) } lROM[0] = FLASH_Reset; - if (cache_on) { - HAL_DCACHE_ENABLE(); - } - return 0; }
