summaryrefslogtreecommitdiffstats
path: root/bsps/m68k/shared/cache/cache.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bsps/m68k/shared/cache/cache.h (renamed from c/src/lib/libcpu/m68k/shared/cache/cache.c)33
1 files changed, 29 insertions, 4 deletions
diff --git a/c/src/lib/libcpu/m68k/shared/cache/cache.c b/bsps/m68k/shared/cache/cache.h
index 5039ea59ed..2fa78b651d 100644
--- a/c/src/lib/libcpu/m68k/shared/cache/cache.c
+++ b/bsps/m68k/shared/cache/cache.h
@@ -1,9 +1,35 @@
/*
- * Cache Management Support Routines for the MC68040
+ * M68K Cache Manager Support
*/
-#include <rtems.h>
-#include "cache_.h"
+#if (defined(__mc68020__) && !defined(__mcpu32__))
+# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
+#elif defined(__mc68030__)
+# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
+# define M68K_DATA_CACHE_ALIGNMENT 16
+#elif ( defined(__mc68040__) || defined (__mc68060__) )
+# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
+# define M68K_DATA_CACHE_ALIGNMENT 16
+#elif ( defined(__mcf5200__) )
+# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
+# if ( defined(__mcf528x__) )
+# define M68K_DATA_CACHE_ALIGNMENT 16
+# endif
+#elif ( defined(__mcf5300__) )
+# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
+# define M68K_DATA_CACHE_ALIGNMENT 16
+#elif defined(__mcfv4e__)
+# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
+# define M68K_DATA_CACHE_ALIGNMENT 16
+#endif
+
+#if defined(M68K_DATA_CACHE_ALIGNMENT)
+#define CPU_DATA_CACHE_ALIGNMENT M68K_DATA_CACHE_ALIGNMENT
+#endif
+
+#if defined(M68K_INSTRUCTION_CACHE_ALIGNMENT)
+#define CPU_INSTRUCTION_CACHE_ALIGNMENT M68K_INSTRUCTION_CACHE_ALIGNMENT
+#endif
/*
* Since the cacr is common to all mc680x0, provide macros
@@ -187,4 +213,3 @@ void _CPU_cache_disable_instruction ( void )
_CPU_CACR_AND( 0xFFFF7FFF );
}
#endif
-/* end of file */