Commit dc052012 authored by Ye Li's avatar Ye Li Committed by Jason Liu
Browse files

MLK-14991-2 imx8qm_arm2/imx8qxp_arm2: Add print for boot device



Add a print for current boot device to u-boot console.
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
parent 718dc344
......@@ -621,3 +621,48 @@ enum boot_device get_boot_device(void)
return boot_dev;
}
int print_bootinfo(void)
{
enum boot_device bt_dev;
bt_dev = get_boot_device();
puts("Boot: ");
switch (bt_dev) {
case SD1_BOOT:
puts("SD0\n");
break;
case SD2_BOOT:
puts("SD1\n");
break;
case SD3_BOOT:
puts("SD2\n");
break;
case MMC1_BOOT:
puts("MMC0\n");
break;
case MMC2_BOOT:
puts("MMC1\n");
break;
case MMC3_BOOT:
puts("MMC2\n");
break;
case FLEXSPI_BOOT:
puts("FLEXSPI\n");
break;
case SATA_BOOT:
puts("SATA\n");
break;
case NAND_BOOT:
puts("NAND\n");
break;
case USB_BOOT:
puts("USB\n");
break;
default:
printf("Unknown device %u\n", bt_dev);
break;
}
return 0;
}
......@@ -38,6 +38,7 @@ struct rom_sw_info_t {
uint32_t rsvd[3];
};
int print_bootinfo(void);
int init_qspi_power(void);
int init_usb_power(void);
int init_i2c_power(unsigned i2c_num);
......@@ -24,6 +24,7 @@
#include <imx8_hsio.h>
#include <usb.h>
#include <asm/arch/iomux.h>
#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
......@@ -571,6 +572,8 @@ int checkboard(void)
puts("Board: iMX8QM DDR4 ARM2\n");
#endif
print_bootinfo();
/* Note: After reloc, ipcHndl will no longer be valid. If handle
* returned by sc_ipc_open matches SC_IPC_CH, use this
* macro (valid after reloc) for subsequent SCI calls.
......
......@@ -24,6 +24,7 @@
#include <imx8_hsio.h>
#include <usb.h>
#include <asm/arch/iomux.h>
#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
......@@ -500,6 +501,8 @@ int checkboard(void)
{
puts("Board: iMX8QXP LPDDR4 ARM2\n");
print_bootinfo();
/* Note: After reloc, ipcHndl will no longer be valid. If handle
* returned by sc_ipc_open matches SC_IPC_CH, use this
* macro (valid after reloc) for subsequent SCI calls.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment