diff packages/devs/flash/arm/ebsa285/current/src/flash_program_buf.c @ 937:249dd9889974

* 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 Sat, 12 Apr 2003 02:40:30 +0000
parents d2c90368aeef
children 52985887e49e
line wrap: on
line diff
--- a/packages/devs/flash/arm/ebsa285/current/src/flash_program_buf.c
+++ b/packages/devs/flash/arm/ebsa285/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;
     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;
 }