]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc85xx/cpu_init.c
powerpc/mpc85xx: Workaround for A-005812
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc85xx / cpu_init.c
index 1774462a420d57676703653f95aa6ed5af1e7ba2..48b38263fde213424eab2b2dcfe062a15bbb3fc8 100644 (file)
@@ -399,6 +399,14 @@ int cpu_init_r(void)
                sync();
        }
 #endif
+#ifdef CONFIG_SYS_FSL_ERRATUM_A005812
+       /*
+        * A-005812 workaround sets bit 32 of SPR 976 for SoCs running
+        * in write shadow mode. Checking DCWS before setting SPR 976.
+        */
+       if (mfspr(L1CSR2) & L1CSR2_DCWS)
+               mtspr(SPRN_HDBCR0, (mfspr(SPRN_HDBCR0) | 0x80000000));
+#endif
 
 #if defined(CONFIG_PPC_SPINTABLE_COMPATIBLE) && defined(CONFIG_MP)
        spin = getenv("spin_table_compat");