summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:02:01 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:02:01 +0200
commit36a60cf92b09d94ac0a38d1e441dca791624e9e2 (patch)
treee01bdf6d7084c5e95f900bc4fc16da5dd5275801 /arch/ppc
parentf1b8cfbd1d0c0a5254435f882cd4eaa5eac23ead (diff)
downloadbarebox-36a60cf92b09d94ac0a38d1e441dca791624e9e2.tar.gz
barebox-36a60cf92b09d94ac0a38d1e441dca791624e9e2.tar.xz
svn_rev_526
CFG_CACHELINESIZE -> CONFIG_CACHELINE_SIZE
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/Kconfig4
-rw-r--r--arch/ppc/lib/cache.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index ef7fc3afbe..e3bdb779ac 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -9,6 +9,10 @@ config ARCH_MPC5200
config MPC5200
bool
+config CACHELINE_SIZE
+ int
+ default 32 if MPC5200
+
choice
prompt "Select your board"
diff --git a/arch/ppc/lib/cache.c b/arch/ppc/lib/cache.c
index a81ab5e363..3d863b327b 100644
--- a/arch/ppc/lib/cache.c
+++ b/arch/ppc/lib/cache.c
@@ -29,18 +29,18 @@ void flush_cache (ulong start_addr, ulong size)
#ifndef CONFIG_5xx
ulong addr, end_addr = start_addr + size;
- if (CFG_CACHELINE_SIZE) {
- addr = start_addr & (CFG_CACHELINE_SIZE - 1);
+ if (CONFIG_CACHELINE_SIZE) {
+ addr = start_addr & (CONFIG_CACHELINE_SIZE - 1);
for (addr = start_addr;
addr < end_addr;
- addr += CFG_CACHELINE_SIZE) {
+ addr += CONFIG_CACHELINE_SIZE) {
asm ("dcbst 0,%0": :"r" (addr));
}
asm ("sync"); /* Wait for all dcbst to complete on bus */
for (addr = start_addr;
addr < end_addr;
- addr += CFG_CACHELINE_SIZE) {
+ addr += CONFIG_CACHELINE_SIZE) {
asm ("icbi 0,%0": :"r" (addr));
}
}