forked from len0rd/rockbox
mmu-arm.S: disable MMU functions on CPUs which don't use them
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25629 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4205a508d7
commit
96e97987d9
1 changed files with 28 additions and 12 deletions
|
@ -24,16 +24,26 @@
|
||||||
/* Used by ARMv4 & ARMv5 CPUs with cp15 register and MMU */
|
/* Used by ARMv4 & ARMv5 CPUs with cp15 register and MMU */
|
||||||
/* WARNING : assume size of a data cache line == 32 bytes */
|
/* WARNING : assume size of a data cache line == 32 bytes */
|
||||||
|
|
||||||
#if CONFIG_CPU == TCC7801 || CONFIG_CPU == AT91SAM9260 \
|
#if CONFIG_CPU == TCC7801 || CONFIG_CPU == AT91SAM9260
|
||||||
|| CONFIG_CPU == DM320 || CONFIG_CPU == AS3525v2
|
/* MMU present but unused */
|
||||||
#define HAVE_TEST_AND_CLEAN_CACHE
|
#define HAVE_TEST_AND_CLEAN_CACHE
|
||||||
|
|
||||||
|
#elif CONFIG_CPU == DM320 || CONFIG_CPU == AS3525v2
|
||||||
|
#define USE_MMU
|
||||||
|
#define HAVE_TEST_AND_CLEAN_CACHE
|
||||||
|
|
||||||
#elif CONFIG_CPU == AS3525
|
#elif CONFIG_CPU == AS3525
|
||||||
|
#define USE_MMU
|
||||||
#define CACHE_SIZE 8
|
#define CACHE_SIZE 8
|
||||||
|
|
||||||
#elif CONFIG_CPU == S3C2440
|
#elif CONFIG_CPU == S3C2440
|
||||||
|
#define USE_MMU
|
||||||
#define CACHE_SIZE 16
|
#define CACHE_SIZE 16
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error Cache settings unknown for this CPU !
|
#error Cache settings unknown for this CPU !
|
||||||
#endif
|
|
||||||
|
#endif /* CPU specific configuration */
|
||||||
|
|
||||||
@ Index format: 31:26 = index, N:5 = segment, remainder = SBZ
|
@ Index format: 31:26 = index, N:5 = segment, remainder = SBZ
|
||||||
@ assume 64-way set associative separate I/D caches, 32B (2^5) cache line size
|
@ assume 64-way set associative separate I/D caches, 32B (2^5) cache line size
|
||||||
|
@ -45,6 +55,8 @@
|
||||||
#define INDEX_STEPS (CACHE_SIZE/2)
|
#define INDEX_STEPS (CACHE_SIZE/2)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_MMU
|
||||||
|
|
||||||
/** MMU setup **/
|
/** MMU setup **/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -134,6 +146,10 @@ enable_mmu:
|
||||||
.size enable_mmu, .-enable_mmu
|
.size enable_mmu, .-enable_mmu
|
||||||
.ltorg
|
.ltorg
|
||||||
|
|
||||||
|
#endif /* USE_MMU */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Cache coherency **/
|
/** Cache coherency **/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue