xilinx: zynqmp: Change multi_boot() to return value
authorMichal Simek <michal.simek@xilinx.com>
Tue, 27 Jul 2021 12:05:27 +0000 (14:05 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 6 Aug 2021 07:32:02 +0000 (09:32 +0200)
Change multi_boot() to return multiboot value and move print out of this
function and let this function to be used by other functions without
duplicating message.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/zynqmp.c

index 2cb97f4..eb67116 100644 (file)
@@ -350,9 +350,7 @@ static int multi_boot(void)
 
        multiboot = readl(&csu_base->multi_boot);
 
-       printf("Multiboot:\t%d\n", multiboot);
-
-       return 0;
+       return multiboot;
 }
 
 #define PS_SYSMON_ANALOG_BUS_VAL       0x3210
@@ -392,7 +390,7 @@ int board_init(void)
 #endif
 
        if (current_el() == 3)
-               multi_boot();
+               printf("Multiboot:\t%d\n", multi_boot());
 
        return 0;
 }