Skip to contentSkip to conversation

bootstage: fix fdt stashing and reporting

PATCH New Rommel G Custodio 3 participants 5 messages Feb 19, 2014 – Apr 7, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover bootstage: fix fdt stashing and reporting

In arm, it seems there is a discrepancy in the code. The fdt stashing code uses an undefined variable.

In powerpc, implement fdt stashing and pre-boot reporting of bootstage timing data.

Fixed a typo in the commit log.

Rommel G Custodio (2):
bootstage: arm: fix fdt stashing code
bootstage: powerpc: support fdt stash and reporting

 arch/arm/lib/bootm.c     | 3 +--
 arch/powerpc/lib/bootm.c | 7 +++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.0
#1 lore raw

PATCH v2 1/2 bootstage: arm: fix fdt stashing code

The conditional is using a variable that is not defined.

---
 arch/arm/lib/bootm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/lib/bootm.c +1 -2
index a8295bf..7f1b2e0 100644
@@ -71,8 +71,7 @@ static void announce_and_cleanup(int fake)
 		"(fake run for tracing)" : "");
 	bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
 #ifdef CONFIG_BOOTSTAGE_FDT
-	if (flag == BOOTM_STATE_OS_FAKE_GO)
-		bootstage_fdt_add_report();
+	bootstage_fdt_add_report();
 #endif
 #ifdef CONFIG_BOOTSTAGE_REPORT
 	bootstage_report();
Signature · 1 line
1.9.0
#2 lore raw

PATCH v2 1/2 bootstage: arm: fix fdt stashing code

Hi Rommel,

Quoted 12 lines · Rommel G Custodio

The conditional is using a variable that is not defined.

---
 arch/arm/lib/bootm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/lib/bootm.c +0 -0
index a8295bf..7f1b2e0 100644

arch/arm/lib/bootm.c static void announce_and_cleanup(int fake) · line 77

Quoted 9 lines
arch/arm/lib/bootm.c +1 -2
@@ -71,8 +71,7 @@ static void announce_and_cleanup(int fake)
 		"(fake run for tracing)" : "");
 	bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
 #ifdef CONFIG_BOOTSTAGE_FDT
-	if (flag == BOOTM_STATE_OS_FAKE_GO)
-		bootstage_fdt_add_report();
+	bootstage_fdt_add_report();
 #endif
 #ifdef CONFIG_BOOTSTAGE_REPORT
 	bootstage_report();

Applied to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.
#3 lore raw

PATCH v2 2/2 bootstage: powerpc: support fdt stash and reporting

In reply to Rommel G Custodio

This implements stashing of bootstage timing data to FDT and automatic timing reporting. To enable define CONFIG_BOOTSTAGE_FDT and CONFIG_BOOTSTAGE_REPORT respectively.

---
 arch/powerpc/lib/bootm.c | 7 +++++++
 1 file changed, 7 insertions(+)
arch/powerpc/lib/bootm.c +7 -0
index 41fc8f7..1e36bec 100644
@@ -54,6 +54,13 @@ static void boot_jump_linux(bootm_headers_t *images)
 
 	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 
+#ifdef CONFIG_BOOTSTAGE_FDT
+	bootstage_fdt_add_report();
+#endif
+#ifdef CONFIG_BOOTSTAGE_REPORT
+	bootstage_report();
+#endif
+
 #if defined(CONFIG_SYS_INIT_RAM_LOCK) && !defined(CONFIG_E500)
 	unlock_ram_in_cache();
 #endif
Signature · 1 line
1.9.0
#4 lore raw

PATCH v2 2/2 bootstage: powerpc: support fdt stash and reporting

Quoted 6 lines · Rommel G Custodio

This implements stashing of bootstage timing data to FDT and automatic timing reporting. To enable define CONFIG_BOOTSTAGE_FDT and CONFIG_BOOTSTAGE_REPORT respectively.

---

Applied to u-boot-mpc85xx/master. Thanks.

York