summaryrefslogtreecommitdiff
path: root/board/freescale/ls2080ardb/ls2080ardb.c
diff options
context:
space:
mode:
authorSantan Kumar <santan.kumar@nxp.com>2017-07-05 12:35:08 (GMT)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>2017-08-16 05:56:36 (GMT)
commit31e5329d700ead996d334f5ab1e982523b1cfcb1 (patch)
tree0bd7a80fad26a67a904e739724876cf6dfb98af4 /board/freescale/ls2080ardb/ls2080ardb.c
parentb9039bab587bf993213b09ab8855d136a00ea553 (diff)
downloadu-boot-31e5329d700ead996d334f5ab1e982523b1cfcb1.tar.xz
board: ls2080ardb: Add fsl_fdt_fixup_flash
IFC and QSPI are muxed on board. Add fsl_fdt_fixup_flash() -To disable IFC node in dts if QSPI is enabled. -Or disable QSPI node in dts if IFC is enabled. Signed-off-by: Santan Kumar <santan.kumar@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'board/freescale/ls2080ardb/ls2080ardb.c')
-rw-r--r--board/freescale/ls2080ardb/ls2080ardb.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 00d905f..376f02d 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -329,6 +329,32 @@ void board_quiesce_devices(void)
#endif
#ifdef CONFIG_OF_BOARD_SETUP
+void fsl_fdt_fixup_flash(void *fdt)
+{
+ int offset;
+
+/*
+ * IFC and QSPI are muxed on board.
+ * So disable IFC node in dts if QSPI is enabled or
+ * disable QSPI node in dts in case QSPI is not enabled.
+ */
+#ifdef CONFIG_FSL_QSPI
+ offset = fdt_path_offset(fdt, "/soc/ifc");
+
+ if (offset < 0)
+ offset = fdt_path_offset(fdt, "/ifc");
+#else
+ offset = fdt_path_offset(fdt, "/soc/quadspi");
+
+ if (offset < 0)
+ offset = fdt_path_offset(fdt, "/quadspi");
+#endif
+ if (offset < 0)
+ return;
+
+ fdt_status_disabled(fdt, offset);
+}
+
int ft_board_setup(void *blob, bd_t *bd)
{
u64 base[CONFIG_NR_DRAM_BANKS];
@@ -356,6 +382,8 @@ int ft_board_setup(void *blob, bd_t *bd)
fsl_fdt_fixup_dr_usb(blob, bd);
+ fsl_fdt_fixup_flash(blob);
+
#ifdef CONFIG_FSL_MC_ENET
fdt_fixup_board_enet(blob);
#endif