diff options
author | Santan Kumar <santan.kumar@nxp.com> | 2017-07-05 18:05:08 +0530 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-08-09 09:57:32 -0700 |
commit | 7794d9ab29be14ec5d298e0bac0560ea50c04c02 (patch) | |
tree | 73d628282af300850489d60389c389bfc303b2c8 | |
parent | a8ecb39e9e67ddf86cbf859175873684b8afc1d3 (diff) | |
download | u-boot-7794d9ab29be14ec5d298e0bac0560ea50c04c02.tar.gz u-boot-7794d9ab29be14ec5d298e0bac0560ea50c04c02.tar.bz2 u-boot-7794d9ab29be14ec5d298e0bac0560ea50c04c02.zip |
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
otherwise.
Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
[YS: Revise commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
-rw-r--r-- | board/freescale/ls2080ardb/ls2080ardb.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index f332b6ff5b..d7122b3dfc 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -328,6 +328,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]; @@ -355,6 +381,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 |