public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/13][v4] drivers/fsl-mc: Make MC boot error messages more readable
@ 2015-07-02  5:58 Prabhakar Kushwaha
  2015-07-02  5:58 ` [U-Boot] [PATCH 02/13][v4] driver/ldpaa_eth:Flush buffer before seeding BMAN after TX_conf Prabhakar Kushwaha
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Prabhakar Kushwaha @ 2015-07-02  5:58 UTC (permalink / raw)
  To: u-boot

From: "J. German Rivera" <German.Rivera@freescale.com>

Make it easier for the user to notice when the MC firmware
had problems booting.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
Changes for v2: Sending as it is for patchset
Changes for v3: Sending as it is for patchset
Changes for v4: Sending as it is for patchset

 drivers/net/fsl-mc/mc.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index f4a050a..d02da9d 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -224,13 +224,13 @@ static int load_mc_dpc(u64 mc_ram_addr, size_t mc_ram_size)
 		 * Don't return with error here, since the MC firmware can
 		 * still boot without a DPC
 		 */
-		printf("fsl-mc: WARNING: No DPC image found\n");
+		printf("\nfsl-mc: WARNING: No DPC image found");
 		return 0;
 	}
 
 	dpc_size = fdt_totalsize(dpc_fdt_hdr);
 	if (dpc_size > CONFIG_SYS_LS_MC_DPC_MAX_LENGTH) {
-		printf("fsl-mc: ERROR: Bad DPC image (too large: %d)\n",
+		printf("\nfsl-mc: ERROR: Bad DPC image (too large: %d)\n",
 		       dpc_size);
 		return -EINVAL;
 	}
@@ -278,13 +278,13 @@ static int load_mc_dpl(u64 mc_ram_addr, size_t mc_ram_size)
 
 	error = fdt_check_header(dpl_fdt_hdr);
 	if (error != 0) {
-		printf("fsl-mc: ERROR: Bad DPL image (bad header)\n");
+		printf("\nfsl-mc: ERROR: Bad DPL image (bad header)\n");
 		return error;
 	}
 
 	dpl_size = fdt_totalsize(dpl_fdt_hdr);
 	if (dpl_size > CONFIG_SYS_LS_MC_DPL_MAX_LENGTH) {
-		printf("fsl-mc: ERROR: Bad DPL image (too large: %d)\n",
+		printf("\nfsl-mc: ERROR: Bad DPL image (too large: %d)\n",
 		       dpl_size);
 		return -EINVAL;
 	}
@@ -329,7 +329,6 @@ static int wait_for_mc(bool booting_mc, u32 *final_reg_gsr)
 	struct mc_ccsr_registers __iomem *mc_ccsr_regs = MC_CCSR_BASE_ADDR;
 
 	dmb();
-	debug("Polling mc_ccsr_regs->reg_gsr ...\n");
 	assert(timeout_ms > 0);
 	for (;;) {
 		udelay(1000);	/* throttle polling */
@@ -344,10 +343,7 @@ static int wait_for_mc(bool booting_mc, u32 *final_reg_gsr)
 	}
 
 	if (timeout_ms == 0) {
-		if (booting_mc)
-			printf("fsl-mc: timeout booting management complex firmware\n");
-		else
-			printf("fsl-mc: timeout deploying data path layout\n");
+		printf("ERROR: timeout\n");
 
 		/* TODO: Get an error status from an MC CCSR register */
 		return -ETIMEDOUT;
@@ -360,15 +356,13 @@ static int wait_for_mc(bool booting_mc, u32 *final_reg_gsr)
 		 * appropriate errno, so that the status property is set to
 		 * failure in the fsl,dprc device tree node.
 		 */
-		if (booting_mc) {
-			printf("fsl-mc: WARNING: Firmware booted with error (GSR: %#x)\n",
-			       reg_gsr);
-		} else {
-			printf("fsl-mc: WARNING: Data path layout deployed with error (GSR: %#x)\n",
-			       reg_gsr);
-		}
+		printf("WARNING: Firmware returned an error (GSR: %#x)\n",
+		       reg_gsr);
+	} else {
+		printf("SUCCESS\n");
 	}
 
+
 	*final_reg_gsr = reg_gsr;
 	return 0;
 }
@@ -464,7 +458,7 @@ int mc_init(void)
 	 */
 	out_le32(&mc_ccsr_regs->reg_gsr, 0xDD00);
 
-	printf("\nfsl-mc: Booting Management Complex ...\n");
+	printf("\nfsl-mc: Booting Management Complex ... ");
 
 	/*
 	 * Deassert reset and release MC core 0 to run
@@ -517,10 +511,11 @@ int mc_init(void)
 	 * Tell the MC to deploy the DPL:
 	 */
 	out_le32(&mc_ccsr_regs->reg_gsr, 0x0);
-	printf("\nfsl-mc: Deploying data path layout ...\n");
+	printf("fsl-mc: Deploying data path layout ... ");
 	error = wait_for_mc(false, &reg_gsr);
 	if (error != 0)
 		goto out;
+
 out:
 	if (error != 0)
 		mc_boot_status = -error;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-07-20 21:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02  5:58 [U-Boot] [PATCH 01/13][v4] drivers/fsl-mc: Make MC boot error messages more readable Prabhakar Kushwaha
2015-07-02  5:58 ` [U-Boot] [PATCH 02/13][v4] driver/ldpaa_eth:Flush buffer before seeding BMAN after TX_conf Prabhakar Kushwaha
2015-07-02  5:58 ` [U-Boot] [PATCH 03/13][v4] drivers/fsl-mc: Autoload AOIP image from NOR flash Prabhakar Kushwaha
2015-07-02  5:58 ` [U-Boot] [PATCH 04/13][v4] drivers: fsl-mc: Update flibs to mc-0.6.0.1 Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 05/13][v4] drivers: fsl-mc: Update qbman driver Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 06/13][v4] drivers: fsl-mc: Return error for major version mismatch Prabhakar Kushwaha
2015-07-08  4:18   ` Joe Hershberger
2015-07-02  5:59 ` [U-Boot] [PATCH 07/13][v4] armv8/fsl-lsch3: partition stream IDs Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 08/13][v4] drivers/fsl-mc: dynamically create ICID pool in DPC Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 09/13][v4] armv8/fsl-lsch3: device tree fixups for PCI stream IDs Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 10/13][v4] driver/ldpaa_eth: Retry enqueue if portal was busy Prabhakar Kushwaha
2015-07-08  4:22   ` Joe Hershberger
2015-07-02  5:59 ` [U-Boot] [PATCH 11/13][v4] driver/ldpaa_eth: Add timeout handling DQRR entry read Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 12/13][v4] driver/ldpaa_eth: Avoid TX conf frames Prabhakar Kushwaha
2015-07-02  5:59 ` [U-Boot] [PATCH 13/13][v4] driver/ldpaa_eth:Avoid infinite loop in ldpaa_eth_rx Prabhakar Kushwaha
2015-07-20 21:10 ` [U-Boot] [PATCH 01/13][v4] drivers/fsl-mc: Make MC boot error messages more readable York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox