Added L2CC support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11935 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
bd9a890640
commit
f0bb318ecc
|
@ -24,6 +24,14 @@
|
||||||
|
|
||||||
#include "hal.h"
|
#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
|
* @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) {
|
for (mva = start_addr & ~L1_CACHE_BYTES; mva < end_addr; mva += L1_CACHE_BYTES) {
|
||||||
L1C_InvalidateDCacheMVA((uint32_t *)mva);
|
L1C_InvalidateDCacheMVA((uint32_t *)mva);
|
||||||
}
|
}
|
||||||
#if defined(ARM_ENABLE_L2CC)
|
#if ARM_SUPPORTS_L2CC
|
||||||
#if ARM_ENABLE_L2CC
|
#if SAMA_L2CC_ASSUME_ENABLED || SAMA_L2CC_ENABLE
|
||||||
/* Invalidate L2 Cache */
|
/* Invalidate L2 Cache */
|
||||||
for (mva = start_addr & ~L2_CACHE_BYTES; mva < end_addr; mva += L2_CACHE_BYTES) {
|
for (mva = start_addr & ~L2_CACHE_BYTES; mva < end_addr; mva += L2_CACHE_BYTES) {
|
||||||
L2C_InvPa((uint32_t *)mva);
|
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) {
|
for (mva = start_addr & ~L1_CACHE_BYTES; mva < end_addr; mva += L1_CACHE_BYTES) {
|
||||||
L1C_CleanDCacheMVA((uint32_t *)mva);
|
L1C_CleanDCacheMVA((uint32_t *)mva);
|
||||||
}
|
}
|
||||||
#if defined(ARM_ENABLE_L2CC)
|
#if ARM_SUPPORTS_L2CC
|
||||||
#if ARM_ENABLE_L2CC
|
#if SAMA_L2CC_ASSUME_ENABLED || SAMA_L2CC_ENABLE
|
||||||
/* Invalidate L2 Cache */
|
/* Invalidate L2 Cache */
|
||||||
for (mva = start_addr & ~L2_CACHE_BYTES; mva < end_addr; mva += L2_CACHE_BYTES) {
|
for (mva = start_addr & ~L2_CACHE_BYTES; mva < end_addr; mva += L2_CACHE_BYTES) {
|
||||||
L2C_CleanPa((uint32_t *)mva);
|
L2C_CleanPa((uint32_t *)mva);
|
||||||
|
|
Loading…
Reference in New Issue