/* * All varients of the ColdFire using version 3 cores have a similar * cache setup. They have a unified instruction and data cache, with * configurable write-through or copy-back operation.
*/
/* * Define the cache type and arrangement (needed for pushes).
*/ #ifdefined(CONFIG_M5307) #define CACHE_SIZE 0x2000 /* 8k of unified cache */ #define ICACHE_SIZE CACHE_SIZE #define DCACHE_SIZE CACHE_SIZE #elifdefined(CONFIG_M53xx) #define CACHE_SIZE 0x4000 /* 16k of unified cache */ #define ICACHE_SIZE CACHE_SIZE #define DCACHE_SIZE CACHE_SIZE #endif
#define CACHE_LINE_SIZE 16 /* 16 byte line size */ #define CACHE_WAYS 4 /* 4 ways - set associative */
/* * Set the cache controller settings we will use. This default in the * CACR is cache inhibited, we use the ACR register to set cacheing * enabled on the regions we want (eg RAM).
*/ #ifdefined(CONFIG_CACHE_COPYBACK) #define CACHE_TYPE ACR_CM_CB #define CACHE_PUSH #else #define CACHE_TYPE ACR_CM_WT #endif
/* * Unified cache means we will never need to flush for coherency of * instruction fetch. We will need to flush to maintain memory/DMA * coherency though in all cases. And for copyback caches we will need * to push cached data as well.
*/ #define CACHE_INIT (CACHE_MODE + CACR_CINVA - CACR_EC) #define CACHE_INVALIDATE (CACHE_MODE + CACR_CINVA) #define CACHE_INVALIDATED (CACHE_MODE + CACR_CINVA)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.