This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
sa1100mm flash and cache
- From: Jani Monoses <jani at iv dot ro>
- To: ecos-patches at sources dot redhat dot com
- Date: Thu, 3 Apr 2003 19:34:17 +0300
- Subject: sa1100mm flash and cache
and this is for the sa1100mm
Index: devs/flash/arm/sa1100mm//current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/arm/sa1100mm/current/ChangeLog,v
retrieving revision 1.7
diff -u -r1.7 ChangeLog
--- devs/flash/arm/sa1100mm//current/ChangeLog 23 May 2002 23:00:59 -0000 1.7
+++ devs/flash/arm/sa1100mm//current/ChangeLog 3 Apr 2003 16:24:40 -0000
@@ -1,3 +1,10 @@
+2002-04-03 Jani Monoses <jani at iv dot 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 at redhat dot com>
* src/sa1100mm_flash.c (flash_hwr_init): Only re-enable icache if it
Index: devs/flash/arm/sa1100mm//current/src/flash_erase_block.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/arm/sa1100mm/current/src/flash_erase_block.c,v
retrieving revision 1.3
diff -u -r1.3 flash_erase_block.c
--- devs/flash/arm/sa1100mm//current/src/flash_erase_block.c 23 May 2002 23:01:00 -0000 1.3
+++ devs/flash/arm/sa1100mm//current/src/flash_erase_block.c 3 Apr 2003 16:24:40 -0000
@@ -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 @@
{
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;
@@ -86,10 +78,6 @@
// Restore ROM to "normal" mode
*block = FLASH_Reset;
-
- if (cache_on) {
- HAL_DCACHE_ENABLE();
- }
return stat;
}
Index: devs/flash/arm/sa1100mm//current/src/flash_program_buf.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/arm/sa1100mm/current/src/flash_program_buf.c,v
retrieving revision 1.3
diff -u -r1.3 flash_program_buf.c
--- devs/flash/arm/sa1100mm//current/src/flash_program_buf.c 23 May 2002 23:01:00 -0000 1.3
+++ devs/flash/arm/sa1100mm//current/src/flash_program_buf.c 3 Apr 2003 16:24:40 -0000
@@ -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 @@
{
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;
@@ -94,10 +86,6 @@
// Restore ROM to "normal" mode
bad:
*orig_addr = FLASH_Reset;
-
- if (cache_on) {
- HAL_DCACHE_ENABLE();
- }
return stat;
}
Index: devs/flash/arm/sa1100mm//current/src/flash_query.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/arm/sa1100mm/current/src/flash_query.c,v
retrieving revision 1.3
diff -u -r1.3 flash_query.c
--- devs/flash/arm/sa1100mm//current/src/flash_query.c 23 May 2002 23:01:00 -0000 1.3
+++ devs/flash/arm/sa1100mm//current/src/flash_query.c 3 Apr 2003 16:24:41 -0000
@@ -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 @@
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;
@@ -86,10 +78,6 @@
*data++ = cROM[i];
}
lROM[0] = FLASH_Reset;
-
- if (cache_on) {
- HAL_DCACHE_ENABLE();
- }
return 0;
}