summaryrefslogtreecommitdiff
path: root/cpu/mpc85xx/cpu_init.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-03-19 02:53:01 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-01-05 13:49:02 -0600
commit82fd1f8da9add2d74532cf78d224485f0042d00d (patch)
tree40c31ab6b1538c54882294ad7f2752ca60097910 /cpu/mpc85xx/cpu_init.c
parent6ca9da4d42aeb43df5ef29f7d0518009df583b2f (diff)
85xx: Add support for e500mc cache stashing
The e500mc core supports the ability to stash into the L1 or L2 cache, however we need to uniquely identify the caches with an id. We use the following equation to set the various stash-ids: 32 + coreID*2 + 0(L1) or 1(L2) The 0 (for L1) or 1 (for L2) matches the CT field used be various cache control instructions. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu/mpc85xx/cpu_init.c')
-rw-r--r--cpu/mpc85xx/cpu_init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c
index 0041a60df..16ce82c99 100644
--- a/cpu/mpc85xx/cpu_init.c
+++ b/cpu/mpc85xx/cpu_init.c
@@ -357,6 +357,11 @@ int cpu_init_r(void)
while (mfspr(SPRN_L2CSR0) & (L2CSR0_L2FI|L2CSR0_L2LFC))
;
+#ifdef CONFIG_SYS_CACHE_STASHING
+ /* set stash id to (coreID) * 2 + 32 + L2 (1) */
+ mtspr(SPRN_L2CSR1, (32 + 1));
+#endif
+
/* enable the cache */
mtspr(SPRN_L2CSR0, CONFIG_SYS_INIT_L2CSR0);