提交 7e968049 编写于 作者: M Mian Yousaf Kaukab 提交者: York Sun

fsl-layerscape: dpaa: fix fsl-mc status in fdt with bootefi

fsl-mc lazyapply command applies dpl from efi_exit_boot_services().
Status of fsl-mc node in working fdt is updated at this stage.
However, an efi application like grub may already have copied the fdt.
So the updates to fdt done at efi_exit_boot_services() may not be
visible to the OS. Fix it by updating fdt earlier if fsl-mc lazyapply
command is used.

Fixes: b7b8410a (ls2080: Exit dpaa only right before exiting U-Boot)
Signed-off-by: NMian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: NYork Sun <york.sun@nxp.com>
上级 5b994e85
...@@ -658,7 +658,8 @@ void fdt_fixup_board_enet(void *fdt) ...@@ -658,7 +658,8 @@ void fdt_fixup_board_enet(void *fdt)
return; return;
} }
if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) if (get_mc_boot_status() == 0 &&
(is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0))
fdt_status_okay(fdt, offset); fdt_status_okay(fdt, offset);
else else
fdt_status_fail(fdt, offset); fdt_status_fail(fdt, offset);
......
...@@ -89,7 +89,8 @@ void fdt_fixup_board_enet(void *fdt) ...@@ -89,7 +89,8 @@ void fdt_fixup_board_enet(void *fdt)
return; return;
} }
if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) if (get_mc_boot_status() == 0 &&
(is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0))
fdt_status_okay(fdt, offset); fdt_status_okay(fdt, offset);
else else
fdt_status_fail(fdt, offset); fdt_status_fail(fdt, offset);
......
...@@ -294,7 +294,8 @@ void fdt_fixup_board_enet(void *fdt) ...@@ -294,7 +294,8 @@ void fdt_fixup_board_enet(void *fdt)
return; return;
} }
if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) if (get_mc_boot_status() == 0 &&
(is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0))
fdt_status_okay(fdt, offset); fdt_status_okay(fdt, offset);
else else
fdt_status_fail(fdt, offset); fdt_status_fail(fdt, offset);
......
...@@ -330,7 +330,8 @@ void fdt_fixup_board_enet(void *fdt) ...@@ -330,7 +330,8 @@ void fdt_fixup_board_enet(void *fdt)
return; return;
} }
if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) if (get_mc_boot_status() == 0 &&
(is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0))
fdt_status_okay(fdt, offset); fdt_status_okay(fdt, offset);
else else
fdt_status_fail(fdt, offset); fdt_status_fail(fdt, offset);
......
...@@ -834,6 +834,11 @@ int get_dpl_apply_status(void) ...@@ -834,6 +834,11 @@ int get_dpl_apply_status(void)
return mc_dpl_applied; return mc_dpl_applied;
} }
int is_lazy_dpl_addr_valid(void)
{
return !!mc_lazy_dpl_addr;
}
/* /*
* Return the MC address of private DRAM block. * Return the MC address of private DRAM block.
* As per MC design document, MC initial base address * As per MC design document, MC initial base address
......
...@@ -54,6 +54,7 @@ struct mc_ccsr_registers { ...@@ -54,6 +54,7 @@ struct mc_ccsr_registers {
void fdt_fsl_mc_fixup_iommu_map_entry(void *blob); void fdt_fsl_mc_fixup_iommu_map_entry(void *blob);
int get_mc_boot_status(void); int get_mc_boot_status(void);
int get_dpl_apply_status(void); int get_dpl_apply_status(void);
int is_lazy_dpl_addr_valid(void);
#ifdef CONFIG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET #ifdef CONFIG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET
int get_aiop_apply_status(void); int get_aiop_apply_status(void);
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册