]> git.sur5r.net Git - u-boot/commitdiff
imx: ventana: display SPL boot device
authorTim Harvey <tharvey@gateworks.com>
Sat, 9 May 2015 01:28:25 +0000 (18:28 -0700)
committerStefano Babic <sbabic@denx.de>
Fri, 15 May 2015 17:21:24 +0000 (19:21 +0200)
Display what device the SPL will fetch uboot.img from

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/gw_ventana/gw_ventana_spl.c
include/configs/gw_ventana.h

index 289a0b8d5db0a58a22b7411c1ca28b36cbf68c35..8fe0cae9f56030a51026a6277314f40262623abf 100644 (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)
 {
 }
index 9a146c204e9385edbb33df91857f95a77b1fe1e4..69c6202aadbdf2ee01d4a259cf6b7aaf850b62bd 100644 (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