diff options
author | isiora <none@example.com> | 2018-04-13 14:06:26 +0000 |
---|---|---|
committer | isiora <none@example.com> | 2018-04-13 14:06:26 +0000 |
commit | f0bb318ecc6fe06eaadfed6f729eb9defb70a709 (patch) | |
tree | e3ed3542b2b2f2c94a51c526bce42ae5c6622191 /os | |
parent | bd9a89064099259f80a6aaebd84b79a251807e01 (diff) | |
download | ChibiOS-f0bb318ecc6fe06eaadfed6f729eb9defb70a709.tar.gz ChibiOS-f0bb318ecc6fe06eaadfed6f729eb9defb70a709.tar.bz2 ChibiOS-f0bb318ecc6fe06eaadfed6f729eb9defb70a709.zip |
Added L2CC support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11935 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/SAMA/SAMA5D2x/sama_cache.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/sama_cache.c b/os/hal/ports/SAMA/SAMA5D2x/sama_cache.c index 5c01ba359..ac08363ce 100644 --- a/os/hal/ports/SAMA/SAMA5D2x/sama_cache.c +++ b/os/hal/ports/SAMA/SAMA5D2x/sama_cache.c @@ -24,6 +24,14 @@ #include "hal.h"
+#if !defined(SAMA_L2CC_ASSUME_ENABLED)
+#define SAMA_L2CC_ASSUME_ENABLED 0
+#endif
+
+#if !defined(SAMA_L2CC_ENABLE)
+#define SAMA_L2CC_ENABLE 0
+#endif
+
/**
* @brief Invalidate D-Cache Region
*
@@ -40,8 +48,8 @@ void cacheInvalidateRegion(void *start, uint32_t length) { for (mva = start_addr & ~L1_CACHE_BYTES; mva < end_addr; mva += L1_CACHE_BYTES) {
L1C_InvalidateDCacheMVA((uint32_t *)mva);
}
-#if defined(ARM_ENABLE_L2CC)
-#if ARM_ENABLE_L2CC
+#if ARM_SUPPORTS_L2CC
+#if SAMA_L2CC_ASSUME_ENABLED || SAMA_L2CC_ENABLE
/* Invalidate L2 Cache */
for (mva = start_addr & ~L2_CACHE_BYTES; mva < end_addr; mva += L2_CACHE_BYTES) {
L2C_InvPa((uint32_t *)mva);
@@ -66,8 +74,8 @@ void cacheCleanRegion(void *start, uint32_t length) { for (mva = start_addr & ~L1_CACHE_BYTES; mva < end_addr; mva += L1_CACHE_BYTES) {
L1C_CleanDCacheMVA((uint32_t *)mva);
}
-#if defined(ARM_ENABLE_L2CC)
-#if ARM_ENABLE_L2CC
+#if ARM_SUPPORTS_L2CC
+#if SAMA_L2CC_ASSUME_ENABLED || SAMA_L2CC_ENABLE
/* Invalidate L2 Cache */
for (mva = start_addr & ~L2_CACHE_BYTES; mva < end_addr; mva += L2_CACHE_BYTES) {
L2C_CleanPa((uint32_t *)mva);
|