armv8: 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>
Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
Ashish Kumar 2017-11-09 11:14:24 +05:30 committed by York Sun
parent 2557c5a942
commit 6b6b7e8a6c

View File

@ -368,6 +368,33 @@ void fdt_fixup_board_enet(void *fdt)
#endif #endif
#ifdef CONFIG_OF_BOARD_SETUP #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 ft_board_setup(void *blob, bd_t *bd)
{ {
int err, i; int err, i;
@ -394,6 +421,8 @@ int ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_memory_banks(blob, base, size, CONFIG_NR_DRAM_BANKS); fdt_fixup_memory_banks(blob, base, size, CONFIG_NR_DRAM_BANKS);
fsl_fdt_fixup_flash(blob);
#ifdef CONFIG_FSL_MC_ENET #ifdef CONFIG_FSL_MC_ENET
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
err = fsl_mc_ldpaa_exit(bd); err = fsl_mc_ldpaa_exit(bd);