
On 07.06.16 03:28, Prabhakar Kushwaha wrote:
Hi Alex,
-----Original Message----- From: Alexander Graf [mailto:agraf@suse.de] Sent: Friday, May 27, 2016 7:58 PM To: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; u- boot@lists.denx.de Cc: york sun york.sun@nxp.com Subject: Re: [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before exiting U-Boot
On 05/18/2016 02:29 PM, Prabhakar Kushwaha wrote:
-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Alexander Graf Sent: Friday, May 13, 2016 5:52 PM To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before exiting U- Boot
On ls2080 we have a separate network fabric component which we need to shut down before we enter Linux (or any other OS). Along with that also comes configuration of the fabric using a description file.
Today we always stop and configure the fabric in the boot script and (again) exit it on device tree generation. This works ok for the normal booti case, but with bootefi the payload we're running may still want to access the network.
So let's add a new fsl_mc command that defers configuration and stopping the hardware to when we actually exit U-Boot, so that we can still use the fabric from an EFI payload.
For existing boot scripts, nothing should change with this patch.
Signed-off-by: Alexander Graf agraf@suse.de
With this patch.
If I does not apply MC, I am getting following crash:-
Starting kernel ...
"Synchronous Abort" handler, esr 0x96000044
So should we consider it a bug fix or regression then? :)
Are you planning to fix it?
If not let me know I will try to work on it.
Sorry, wrong fix. Please try this one instead.
Alex
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 95037c1..c5e6bbd 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -91,7 +91,7 @@ static void announce_and_cleanup(int fake) #endif
#ifdef CONFIG_FSL_MC_ENET - if (!fsl_mc_ldpaa_exit(NULL)) + if (mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) mc_apply_dpl(0); #endif
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index d0f5e02..4d2d8a7 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -40,7 +40,7 @@ int child_dprc_id; struct fsl_dpbp_obj *dflt_dpbp = NULL; struct fsl_dpio_obj *dflt_dpio = NULL; struct fsl_dpni_obj *dflt_dpni = NULL; -static u64 mc_lazy_dpl_addr; +u64 mc_lazy_dpl_addr;
#ifdef DEBUG void dump_ram_words(const char *title, void *addr) diff --git a/include/fsl-mc/fsl_mc.h b/include/fsl-mc/fsl_mc.h index ffe6da5..16d7af8 100644 --- a/include/fsl-mc/fsl_mc.h +++ b/include/fsl-mc/fsl_mc.h @@ -61,4 +61,6 @@ u64 mc_get_dram_addr(void); unsigned long mc_get_dram_block_size(void); int fsl_mc_ldpaa_init(bd_t *bis); int fsl_mc_ldpaa_exit(bd_t *bd); + +extern u64 mc_lazy_dpl_addr; #endif diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 8d3943f..bda2a84 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -529,7 +529,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(void *image_handle, EFI_ENTRY("%p, %ld", image_handle, map_key);
#ifdef CONFIG_FSL_MC_ENET - if (!fsl_mc_ldpaa_exit(NULL)) + if (mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) mc_apply_dpl(0); #endif