]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/t104xrdb/spl.c
Merge branch 'master' of git://git.denx.de/u-boot-usb
[karo-tx-uboot.git] / board / freescale / t104xrdb / spl.c
index 3822a377384df220301b5c6ad224c46633090b3f..e394b121d281cb8e153cdbcba982c65c075274ca 100644 (file)
@@ -34,20 +34,26 @@ unsigned long get_board_ddr_clk(void)
 void board_init_f(ulong bootflag)
 {
        u32 plat_ratio, sys_clk, uart_clk;
-#ifdef CONFIG_SPL_NAND_BOOT
+#if defined(CONFIG_SPL_NAND_BOOT) && defined(CONFIG_A008044_WORKAROUND)
        u32 porsr1, pinctl;
+       u32 svr = get_svr();
 #endif
        ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
 
-#ifdef CONFIG_SPL_NAND_BOOT
-       /*
-        * There is T1040 SoC issue where NOR, FPGA are inaccessible during
-        * NAND boot because IFC signals > IFC_AD7 are not enabled.
-        * This workaround changes RCW source to make all signals enabled.
-        */
-       porsr1 = in_be32(&gur->porsr1);
-       pinctl = ((porsr1 & ~(FSL_CORENET_CCSR_PORSR1_RCW_MASK)) | 0x24800000);
-       out_be32((unsigned int *)(CONFIG_SYS_DCSRBAR + 0x20000), pinctl);
+#if defined(CONFIG_SPL_NAND_BOOT) && defined(CONFIG_A008044_WORKAROUND)
+       if (IS_SVR_REV(svr, 1, 0)) {
+               /*
+                * There is T1040 SoC issue where NOR, FPGA are inaccessible
+                * during NAND boot because IFC signals > IFC_AD7 are not
+                * enabled. This workaround changes RCW source to make all
+                * signals enabled.
+                */
+               porsr1 = in_be32(&gur->porsr1);
+               pinctl = ((porsr1 & ~(FSL_CORENET_CCSR_PORSR1_RCW_MASK))
+                         | 0x24800000);
+               out_be32((unsigned int *)(CONFIG_SYS_DCSRBAR + 0x20000),
+                        pinctl);
+       }
 #endif
 
        /* Memcpy existing GD at CONFIG_SPL_GD_ADDR */