diff options
author | Ashish Kumar <Ashish.Kumar@nxp.com> | 2017-09-12 05:15:45 (GMT) |
---|---|---|
committer | Alison Wang <b18965@freescale.com> | 2017-09-13 05:39:28 (GMT) |
commit | 25cd7053e10c7569dc8394acfbdfd754794b84a9 (patch) | |
tree | d5d1c6adc48944fe492acfa102f3005f430ab922 | |
parent | 85bfc58954f4a2aeed300524ad15ffe63d371b5d (diff) | |
download | u-boot-25cd7053e10c7569dc8394acfbdfd754794b84a9.tar.xz |
board/ls1088: Add fsl_fdt_fixup_flash
IFC-NOR and QSPI-NOR signals are muxed on SoC to save pins
Add fsl_fdt_fixup_flash()
-To disable IFC-NOR node in dts if QSPI is enabled and vice-versa
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
-rw-r--r-- | board/freescale/ls1088a/ls1088a.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 8b1e592..f087799 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -491,6 +491,33 @@ void fdt_fixup_board_enet(void *fdt) #endif #ifdef CONFIG_OF_BOARD_SETUP +void fsl_fdt_fixup_flash(void *fdt) +{ + int offset; + +/* + * IFC-NOR and QSPI are muxed on SoC. + * 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/nor"); + + if (offset < 0) + offset = fdt_path_offset(fdt, "/ifc/nor"); +#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) { int err, i; @@ -517,6 +544,8 @@ int ft_board_setup(void *blob, bd_t *bd) fdt_fixup_memory_banks(blob, base, size, CONFIG_NR_DRAM_BANKS); + fsl_fdt_fixup_flash(blob); + #ifdef CONFIG_FSL_MC_ENET fdt_fixup_board_enet(blob); err = fsl_mc_ldpaa_exit(bd); |