imx: ventana: display SPL boot device

Display what device the SPL will fetch uboot.img from

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
This commit is contained in:
Tim Harvey 2015-05-08 18:28:25 -07:00 committed by Stefano Babic
parent 560e8b3f33
commit 06c3564d5f
2 changed files with 23 additions and 0 deletions

View File

@ -570,6 +570,28 @@ void board_init_f(ulong dummy)
board_init_r(NULL, 0);
}
/* called from board_init_r after gd setup if CONFIG_SPL_BOARD_INIT defined */
/* its our chance to print info about boot device */
void spl_board_init(void)
{
/* determine boot device from SRC_SBMR1 (BOOT_CFG[4:1]) or SRC_GPR9 */
u32 boot_device = spl_boot_device();
switch (boot_device) {
case BOOT_DEVICE_MMC1:
puts("Booting from MMC\n");
break;
case BOOT_DEVICE_NAND:
puts("Booting from NAND\n");
break;
case BOOT_DEVICE_SATA:
puts("Booting from SATA\n");
break;
default:
puts("Unknown boot device\n");
}
}
void reset_cpu(ulong addr)
{
}

View File

@ -8,6 +8,7 @@
#define __CONFIG_H
/* SPL */
#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_NAND_SUPPORT
#define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SPL_FAT_SUPPORT