]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc8xxx/fsl_ifc.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[u-boot] / arch / powerpc / cpu / mpc8xxx / fsl_ifc.c
index 39a455638ffc6c0c9d267212fe8cd2f8a1d3b26a..56b319f5d4bfe28ec7c10709d0b2a44bd1ffa432 100644 (file)
@@ -38,47 +38,60 @@ void print_ifc_regs(void)
 void init_early_memctl_regs(void)
 {
 #if defined(CONFIG_SYS_CSPR0) && defined(CONFIG_SYS_CSOR0)
-       set_ifc_cspr(IFC_CS0, CONFIG_SYS_CSPR0);
-       set_ifc_amask(IFC_CS0, CONFIG_SYS_AMASK0);
-       set_ifc_csor(IFC_CS0, CONFIG_SYS_CSOR0);
-
        set_ifc_ftim(IFC_CS0, IFC_FTIM0, CONFIG_SYS_CS0_FTIM0);
        set_ifc_ftim(IFC_CS0, IFC_FTIM1, CONFIG_SYS_CS0_FTIM1);
        set_ifc_ftim(IFC_CS0, IFC_FTIM2, CONFIG_SYS_CS0_FTIM2);
        set_ifc_ftim(IFC_CS0, IFC_FTIM3, CONFIG_SYS_CS0_FTIM3);
+
+#if !defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) || defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_SYS_CSPR0_EXT
+       set_ifc_cspr_ext(IFC_CS0, CONFIG_SYS_CSPR0_EXT);
+#endif
+       set_ifc_cspr(IFC_CS0, CONFIG_SYS_CSPR0);
+       set_ifc_amask(IFC_CS0, CONFIG_SYS_AMASK0);
+       set_ifc_csor(IFC_CS0, CONFIG_SYS_CSOR0);
+#endif
 #endif
 
+#ifdef CONFIG_SYS_CSPR1_EXT
+       set_ifc_cspr_ext(IFC_CS1, CONFIG_SYS_CSPR1_EXT);
+#endif
 #if defined(CONFIG_SYS_CSPR1) && defined(CONFIG_SYS_CSOR1)
-       set_ifc_csor(IFC_CS1, CONFIG_SYS_CSOR1);
-       set_ifc_amask(IFC_CS1, CONFIG_SYS_AMASK1);
-       set_ifc_cspr(IFC_CS1, CONFIG_SYS_CSPR1);
-
        set_ifc_ftim(IFC_CS1, IFC_FTIM0, CONFIG_SYS_CS1_FTIM0);
        set_ifc_ftim(IFC_CS1, IFC_FTIM1, CONFIG_SYS_CS1_FTIM1);
        set_ifc_ftim(IFC_CS1, IFC_FTIM2, CONFIG_SYS_CS1_FTIM2);
        set_ifc_ftim(IFC_CS1, IFC_FTIM3, CONFIG_SYS_CS1_FTIM3);
+
+       set_ifc_csor(IFC_CS1, CONFIG_SYS_CSOR1);
+       set_ifc_amask(IFC_CS1, CONFIG_SYS_AMASK1);
+       set_ifc_cspr(IFC_CS1, CONFIG_SYS_CSPR1);
 #endif
 
+#ifdef CONFIG_SYS_CSPR2_EXT
+       set_ifc_cspr_ext(IFC_CS2, CONFIG_SYS_CSPR2_EXT);
+#endif
 #if defined(CONFIG_SYS_CSPR2) && defined(CONFIG_SYS_CSOR2)
-       set_ifc_csor(IFC_CS2, CONFIG_SYS_CSOR2);
-       set_ifc_amask(IFC_CS2, CONFIG_SYS_AMASK2);
-       set_ifc_cspr(IFC_CS2, CONFIG_SYS_CSPR2);
-
        set_ifc_ftim(IFC_CS2, IFC_FTIM0, CONFIG_SYS_CS2_FTIM0);
        set_ifc_ftim(IFC_CS2, IFC_FTIM1, CONFIG_SYS_CS2_FTIM1);
        set_ifc_ftim(IFC_CS2, IFC_FTIM2, CONFIG_SYS_CS2_FTIM2);
        set_ifc_ftim(IFC_CS2, IFC_FTIM3, CONFIG_SYS_CS2_FTIM3);
 
+       set_ifc_csor(IFC_CS2, CONFIG_SYS_CSOR2);
+       set_ifc_amask(IFC_CS2, CONFIG_SYS_AMASK2);
+       set_ifc_cspr(IFC_CS2, CONFIG_SYS_CSPR2);
 #endif
 
+#ifdef CONFIG_SYS_CSPR3_EXT
+       set_ifc_cspr_ext(IFC_CS3, CONFIG_SYS_CSPR3_EXT);
+#endif
 #if defined(CONFIG_SYS_CSPR3) && defined(CONFIG_SYS_CSOR3)
-       set_ifc_cspr(IFC_CS3, CONFIG_SYS_CSPR3);
-       set_ifc_amask(IFC_CS3, CONFIG_SYS_AMASK3);
-       set_ifc_csor(IFC_CS3, CONFIG_SYS_CSOR3);
-
        set_ifc_ftim(IFC_CS3, IFC_FTIM0, CONFIG_SYS_CS3_FTIM0);
        set_ifc_ftim(IFC_CS3, IFC_FTIM1, CONFIG_SYS_CS3_FTIM1);
        set_ifc_ftim(IFC_CS3, IFC_FTIM2, CONFIG_SYS_CS3_FTIM2);
        set_ifc_ftim(IFC_CS3, IFC_FTIM3, CONFIG_SYS_CS3_FTIM3);
+
+       set_ifc_cspr(IFC_CS3, CONFIG_SYS_CSPR3);
+       set_ifc_amask(IFC_CS3, CONFIG_SYS_AMASK3);
+       set_ifc_csor(IFC_CS3, CONFIG_SYS_CSOR3);
 #endif
 }