microblaze: Unify Linux bootm process
authorMichal Simek <michal.simek@xilinx.com>
Thu, 17 Oct 2019 11:16:56 +0000 (13:16 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 24 Oct 2019 11:37:03 +0000 (13:37 +0200)
Record two bootstages and add "Starting kernel" message to have standard
handoff message between U-Boot and OS.
Also use debug() instead of #ifdef DEBUG to clean the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/lib/bootm.c

index 5650109d631313621df062cdb8975296fad834ca..01c5d57bc5b07e0da0d71768143ed3a6ea7969cb 100644 (file)
@@ -66,12 +66,15 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 
        thekernel = (void (*)(char *, ulong, ulong))images->ep;
 
-#ifdef DEBUG
-       printf("## Transferring control to Linux (at address 0x%08lx) ",
-              (ulong)thekernel);
-       printf("cmdline 0x%08lx, ramdisk 0x%08lx, FDT 0x%08lx...\n",
-              cmdline, rd_start, dt);
-#endif
+       debug("## Transferring control to Linux (at address 0x%08lx) ",
+             (ulong)thekernel);
+       debug("cmdline 0x%08lx, ramdisk 0x%08lx, FDT 0x%08lx...\n",
+             cmdline, rd_start, dt);
+       bootstage_mark(BOOTSTAGE_ID_RUN_OS);
+
+       printf("\nStarting kernel ...%s\n\n", fake ?
+              "(fake run for tracing)" : "");
+       bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
 
 #ifdef XILINX_USE_DCACHE
        flush_cache(0, XILINX_DCACHE_BYTE_SIZE);