]> git.sur5r.net Git - u-boot/blobdiff - board/freescale/ls1043aqds/ls1043aqds.c
armv8: ls1043aqds: add IFC fixup in case QSPI is enabled
[u-boot] / board / freescale / ls1043aqds / ls1043aqds.c
index 9447c93319af05757bec962b4606b5d6bfbb7f58..941dfbc447ebe9f1b3ed29c1d8e7bc1710dee264 100644 (file)
@@ -230,6 +230,10 @@ int board_early_init_f(void)
 #ifdef CONFIG_LPUART
        u8 uart;
 #endif
+
+#ifdef CONFIG_SYS_I2C_EARLY_INIT
+       i2c_early_init_f();
+#endif
        fsl_lsch2_early_init_f();
 
 #ifdef CONFIG_HAS_FSL_XHCI_USB
@@ -323,6 +327,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        u64 base[CONFIG_NR_DRAM_BANKS];
        u64 size[CONFIG_NR_DRAM_BANKS];
+       u8 reg;
 
        /* fixup DT for the two DDR banks */
        base[0] = gd->bd->bi_dram[0].start;
@@ -337,6 +342,15 @@ int ft_board_setup(void *blob, bd_t *bd)
        fdt_fixup_fman_ethernet(blob);
        fdt_fixup_board_enet(blob);
 #endif
+
+       reg = QIXIS_READ(brdcfg[0]);
+       reg = (reg & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
+
+       /* Disable IFC if QSPI is enabled */
+       if (reg == 0xF)
+               do_fixup_by_compat(blob, "fsl,ifc",
+                                  "status", "disabled", 8 + 1, 1);
+
        return 0;
 }
 #endif