m68knommu: support version 2 ColdFire split cache
The newer version 2 ColdFire CPU cores support a configurable cache arrangement. The cache memory can be used as all instruction cache, all data cache, or split in half for both instruction and data caching. Support this setup via a Kconfig time menu that allows a kernel builder to choose the arrangement they want to use. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
parent
d475e3e473
commit
0ef6c9b8f7
2 changed files with 48 additions and 14 deletions
|
@ -53,23 +53,25 @@
|
||||||
#define ACR_WPROTECT 0x00000004 /* Write protect region */
|
#define ACR_WPROTECT 0x00000004 /* Write protect region */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the cache controller settings we will use. This code is set to
|
* Set the cache controller settings we will use. On the cores that support
|
||||||
* only use the instruction cache, even on the controllers that support
|
* a split cache configuration we allow all the combinations at Kconfig
|
||||||
* split cache. (This setup is trying to preserve the existing behavior
|
* time. For those cores that only have an instruction cache we just set
|
||||||
* for now, in the furture I hope to actually use the split cache mode).
|
* that as on.
|
||||||
*/
|
*/
|
||||||
#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
|
#if defined(CONFIG_CACHE_I)
|
||||||
defined(CONFIG_M5249) || defined(CONFIG_M5272)
|
#define CACHE_TYPE CACR_DISD
|
||||||
|
#elif defined(CONFIG_CACHE_D)
|
||||||
|
#define CACHE_TYPE CACR_DISI
|
||||||
|
#else
|
||||||
|
#define CACHE_TYPE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_HAVE_CACHE_SPLIT)
|
||||||
|
#define CACHE_INIT (CACR_CINV + CACHE_TYPE + CACR_EUSP)
|
||||||
|
#define CACHE_MODE (CACR_CENB + CACHE_TYPE + CACR_DCM + CACR_EUSP)
|
||||||
|
#else
|
||||||
#define CACHE_INIT (CACR_CINV)
|
#define CACHE_INIT (CACR_CINV)
|
||||||
#define CACHE_MODE (CACR_CENB + CACR_DCM)
|
#define CACHE_MODE (CACR_CENB + CACR_DCM)
|
||||||
#else
|
|
||||||
#ifdef CONFIG_COLDFIRE_SW_A7
|
|
||||||
#define CACHE_INIT (CACR_CINV + CACR_DISD)
|
|
||||||
#define CACHE_MODE (CACR_CENB + CACR_DISD + CACR_DCM)
|
|
||||||
#else
|
|
||||||
#define CACHE_INIT (CACR_CINV + CACR_DISD + CACR_EUSP)
|
|
||||||
#define CACHE_MODE (CACR_CENB + CACR_DISD + CACR_DCM + CACR_EUSP)
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CACHE_INVALIDATE (CACHE_MODE + CACR_CINV)
|
#define CACHE_INVALIDATE (CACHE_MODE + CACR_CINV)
|
||||||
|
|
|
@ -79,6 +79,9 @@ config COLDFIRE_SW_A7
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config HAVE_CACHE_SPLIT
|
||||||
|
bool
|
||||||
|
|
||||||
source "init/Kconfig"
|
source "init/Kconfig"
|
||||||
|
|
||||||
source "kernel/Kconfig.freezer"
|
source "kernel/Kconfig.freezer"
|
||||||
|
@ -124,12 +127,14 @@ config M5206e
|
||||||
config M520x
|
config M520x
|
||||||
bool "MCF520x"
|
bool "MCF520x"
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
|
select HAVE_CACHE_SPLIT
|
||||||
help
|
help
|
||||||
Freescale Coldfire 5207/5208 processor support.
|
Freescale Coldfire 5207/5208 processor support.
|
||||||
|
|
||||||
config M523x
|
config M523x
|
||||||
bool "MCF523x"
|
bool "MCF523x"
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
|
select HAVE_CACHE_SPLIT
|
||||||
help
|
help
|
||||||
Freescale Coldfire 5230/1/2/4/5 processor support
|
Freescale Coldfire 5230/1/2/4/5 processor support
|
||||||
|
|
||||||
|
@ -141,6 +146,7 @@ config M5249
|
||||||
|
|
||||||
config M5271
|
config M5271
|
||||||
bool "MCF5271"
|
bool "MCF5271"
|
||||||
|
select HAVE_CACHE_SPLIT
|
||||||
help
|
help
|
||||||
Freescale (Motorola) ColdFire 5270/5271 processor support.
|
Freescale (Motorola) ColdFire 5270/5271 processor support.
|
||||||
|
|
||||||
|
@ -152,12 +158,14 @@ config M5272
|
||||||
|
|
||||||
config M5275
|
config M5275
|
||||||
bool "MCF5275"
|
bool "MCF5275"
|
||||||
|
select HAVE_CACHE_SPLIT
|
||||||
help
|
help
|
||||||
Freescale (Motorola) ColdFire 5274/5275 processor support.
|
Freescale (Motorola) ColdFire 5274/5275 processor support.
|
||||||
|
|
||||||
config M528x
|
config M528x
|
||||||
bool "MCF528x"
|
bool "MCF528x"
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
|
select HAVE_CACHE_SPLIT
|
||||||
help
|
help
|
||||||
Motorola ColdFire 5280/5282 processor support.
|
Motorola ColdFire 5280/5282 processor support.
|
||||||
|
|
||||||
|
@ -250,6 +258,30 @@ config OLDMASK
|
||||||
Build support for the older revision ColdFire 5307 silicon.
|
Build support for the older revision ColdFire 5307 silicon.
|
||||||
Specifically this is the 1H55J mask revision.
|
Specifically this is the 1H55J mask revision.
|
||||||
|
|
||||||
|
if HAVE_CACHE_SPLIT
|
||||||
|
choice
|
||||||
|
prompt "Split Cache Configuration"
|
||||||
|
default CACHE_I
|
||||||
|
|
||||||
|
config CACHE_I
|
||||||
|
bool "Instruction"
|
||||||
|
help
|
||||||
|
Use all of the ColdFire CPU cache memory as an instruction cache.
|
||||||
|
|
||||||
|
config CACHE_D
|
||||||
|
bool "Data"
|
||||||
|
help
|
||||||
|
Use all of the ColdFire CPU cache memory as a data cache.
|
||||||
|
|
||||||
|
config CACHE_BOTH
|
||||||
|
bool "Both"
|
||||||
|
help
|
||||||
|
Split the ColdFire CPU cache, and use half as an instruction cache
|
||||||
|
and half as a data cache.
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
comment "Platform"
|
comment "Platform"
|
||||||
|
|
||||||
config PILOT3
|
config PILOT3
|
||||||
|
|
Loading…
Reference in a new issue