driver/fsl_ifc: Add a function to finalize CS0 address binding
authorYork Sun <yorksun@freescale.com>
Wed, 19 Mar 2014 20:52:34 +0000 (13:52 -0700)
committerYork Sun <yorksun@freescale.com>
Wed, 23 Apr 2014 00:58:47 +0000 (17:58 -0700)
For fsl-lsch3 NOR flash boot, IFC CS0 needs to be binded with address
within 32-bit at fist. After u-boot relocates to DDR, CS0 can be binded
to higher address to support large space.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Prabhakar Kushwaha <prabhakar@freescale.com>
drivers/misc/fsl_ifc.c
include/fsl_ifc.h

index be619736674dc42bb198b1e61ef7cce8d73c3e8b..3902e9ff53dc86e77b2ec42dcf8fc97af29423e3 100644 (file)
@@ -162,3 +162,10 @@ void init_early_memctl_regs(void)
        set_ifc_csor(IFC_CS7, CONFIG_SYS_CSOR7);
 #endif
 }
+
+void init_final_memctl_regs(void)
+{
+#ifdef CONFIG_SYS_CSPR0_FINAL
+       set_ifc_cspr(IFC_CS0, CONFIG_SYS_CSPR0_FINAL);
+#endif
+}
index 58a6efdfe058dca0dc5cfd915366e9c3c094e8c2..630e4b4999b1ea1458b0de06d6c858718622c178 100644 (file)
@@ -784,6 +784,7 @@ enum ifc_nand_fir_opcodes {
 
 extern void print_ifc_regs(void);
 extern void init_early_memctl_regs(void);
+void init_final_memctl_regs(void);
 
 #define IFC_BASE_ADDR ((struct fsl_ifc *)CONFIG_SYS_IFC_ADDR)