changeset 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 c77314a3f0fd
children 0e713ca5bb8b
files packages/devs/flash/arm/ebsa285/current/ChangeLog packages/devs/flash/arm/ebsa285/current/src/flash_erase_block.c packages/devs/flash/arm/ebsa285/current/src/flash_program_buf.c packages/devs/flash/arm/ebsa285/current/src/flash_query.c
diffstat 4 files changed, 7 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/flash/arm/ebsa285/current/ChangeLog
+++ b/packages/devs/flash/arm/ebsa285/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/ebsa285_flash.c (flash_hwr_init): Only re-enable icache if it
--- a/packages/devs/flash/arm/ebsa285/current/src/flash_erase_block.c
+++ b/packages/devs/flash/arm/ebsa285/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/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;
 }
--- a/packages/devs/flash/arm/ebsa285/current/src/flash_query.c
+++ b/packages/devs/flash/arm/ebsa285/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 = 0x41000000;
     cROM = 0x41000000;
@@ -87,9 +79,5 @@ flash_query(unsigned char *data)
     }
     lROM[0] = FLASH_Reset;
 
-    if (cache_on) {
-        HAL_DCACHE_ENABLE();
-    }
-
     return 0;
 }