[U-Boot] [PATCH] driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl

For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked before DPL being deployed. This leads to an issue that fsl-mc fdt fixup status marked as fail and dprc driver didn't get registered in linux boot.
Fixes this issue by calling fdt_fixup_board_enet() for case when DPL is deployed successfully in lazyapply method.
Signed-off-by: Yogesh Gaur yogeshnarayan.gaur@nxp.com --- drivers/net/fsl-mc/mc.c | 6 +++++- include/fdt_support.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index f36fe06..ab2cce1 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -1415,7 +1415,11 @@ int fsl_mc_ldpaa_exit(bd_t *bd) bool mc_boot_status = false;
if (bd && mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) { - mc_apply_dpl(mc_lazy_dpl_addr); + err = mc_apply_dpl(mc_lazy_dpl_addr); +#ifdef CONFIG_FSL_MC_ENET + if (!err) + fdt_fixup_board_enet(working_fdt); +#endif mc_lazy_dpl_addr = 0; }
diff --git a/include/fdt_support.h b/include/fdt_support.h index 1e1f8f7..097d9d0 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -275,4 +275,7 @@ int fdtdec_get_int(const void *blob, int node, const char *prop_name, #ifdef CONFIG_FMAN_ENET int fdt_update_ethernet_dt(void *blob); #endif +#ifdef CONFIG_FSL_MC_ENET +void fdt_fixup_board_enet(void *blob); +#endif #endif /* ifndef __FDT_SUPPORT_H */

On 01/11/2018 09:19 PM, Yogesh Gaur wrote:
For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked before DPL being deployed. This leads to an issue that fsl-mc fdt fixup status marked as fail and dprc driver didn't get registered in linux boot.
Fixes this issue by calling fdt_fixup_board_enet() for case when DPL is deployed successfully in lazyapply method.
Signed-off-by: Yogesh Gaur yogeshnarayan.gaur@nxp.com
drivers/net/fsl-mc/mc.c | 6 +++++- include/fdt_support.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index f36fe06..ab2cce1 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -1415,7 +1415,11 @@ int fsl_mc_ldpaa_exit(bd_t *bd) bool mc_boot_status = false;
if (bd && mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) {
mc_apply_dpl(mc_lazy_dpl_addr);
err = mc_apply_dpl(mc_lazy_dpl_addr);
+#ifdef CONFIG_FSL_MC_ENET
Is this really needed? We have this in Makefile drivers/net/Makefile:72:obj-$(CONFIG_FSL_MC_ENET) += fsl-mc/
York

-----Original Message----- From: York Sun Sent: Monday, January 15, 2018 10:49 PM To: Yogesh Narayan Gaur yogeshnarayan.gaur@nxp.com; u- boot@lists.denx.de Subject: Re: [PATCH] driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl
On 01/11/2018 09:19 PM, Yogesh Gaur wrote:
For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked before DPL being deployed. This leads to an issue that fsl-mc fdt fixup status marked as fail and dprc driver didn't get registered in linux boot.
Fixes this issue by calling fdt_fixup_board_enet() for case when DPL is deployed successfully in lazyapply method.
Signed-off-by: Yogesh Gaur yogeshnarayan.gaur@nxp.com
drivers/net/fsl-mc/mc.c | 6 +++++- include/fdt_support.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index f36fe06..ab2cce1 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -1415,7 +1415,11 @@ int fsl_mc_ldpaa_exit(bd_t *bd) bool mc_boot_status = false;
if (bd && mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) {
mc_apply_dpl(mc_lazy_dpl_addr);
err = mc_apply_dpl(mc_lazy_dpl_addr); #ifdef
CONFIG_FSL_MC_ENET
Is this really needed? We have this in Makefile drivers/net/Makefile:72:obj-$(CONFIG_FSL_MC_ENET) += fsl-mc/
+#ifdef CONFIG_FSL_MC_ENET Is not required, would send next version of this patch after removing #ifdef CONFIG_FSL_MC_ENET -- Regards Yogesh Gaur
York
participants (3)
-
Yogesh Gaur
-
Yogesh Narayan Gaur
-
York Sun