85xx: Add support for additional e500mc features
PATCH 1/1 85xx: Add support for additional e500mc features
* Enable backside L2
* e500mc no longer has timebase enable in HID (moved to CCSR register)
Signed-off-by Kumar Gala <[email protected]>
--- cpu/mpc85xx/cpu_init.c | 13 +++++++++ cpu/mpc85xx/fdt.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++- cpu/mpc85xx/release.S | 16 ++++++++++++ cpu/mpc85xx/start.S | 2 + 4 files changed, 94 insertions(+), 1 deletions(-)
cpu/mpc85xx/cpu_init.c +13 -0
@@ -345,6 +345,19 @@ int cpu_init_r(void) asm("msync;isync" ); puts("enabled\n"); } +#elif defined(CONFIG_BACKSIDE_L2_CACHE) +u32 l2cfg0 =mfspr (SPRN_L2CFG0 ); + +/* invalidate the L2 cache */ +mtspr (SPRN_L2CSR0 ,L2CSR0_L2FI ); +while (mfspr (SPRN_L2CSR0 ) &L2CSR0_L2FI ) + ; + +/* enable the cache */ +mtspr (SPRN_L2CSR0 ,CONFIG_SYS_INIT_L2CSR0 ); + +if (CONFIG_SYS_INIT_L2CSR0 &L2CSR0_L2E ) +printf ("%d KB enabled\n" , (l2cfg0 &0x3fff ) *64 );#else puts ("disabled\n" );#endif
cpu/mpc85xx/fdt.c +63 -1
76 lines not on this page · raw message
cpu/mpc85xx/release.S +16 -0
@@ -76,6 +76,22 @@ __secondary_start_page: slwi r8,r4,5 add r10,r3,r8 +#ifdef CONFIG_BACKSIDE_L2_CACHE + /* Enable/invalidate the L2 cache */ + msync + lis r3,L2CSR0_L2FI at h + mtspr SPRN_L2CSR0,r3 +1: + mfspr r3,SPRN_L2CSR0 + andis. r1,r3,L2CSR0_L2FI at h + bne 1b + + lis r3,CONFIG_SYS_INIT_L2CSR0 at h + ori r3,r3,CONFIG_SYS_INIT_L2CSR0 at l + mtspr SPRN_L2CSR0,r3 + isync +#endif + #define EPAPR_MAGIC (0x45504150) #define ENTRY_ADDR_UPPER 0 #define ENTRY_ADDR_LOWER 4
cpu/mpc85xx/start.S +2 -0
@@ -161,7 +161,9 @@ _start_e500: #if defined(CONFIG_ENABLE_36BIT_PHYS) ori r0,r0,HID0_ENMAS7 at l /* Enable MAS7 */ #endif +#ifndef CONFIG_E500MC ori r0,r0,HID0_TBEN@l /* Enable Timebase */ +#endif mtspr HID0,r0 #ifndef CONFIG_E500MC
Signature · 1 line
1.5.6.6