]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/arm/cpu/armv8/fsl-layerscape/spl.c
spl: eMMC/SD: Provide one __weak spl_boot_mode() function
[people/ms/u-boot.git] / arch / arm / cpu / armv8 / fsl-layerscape / spl.c
index 2534b4be5fe31e7dfebe057e76d83f13a40b6192..3a74040b9747f096057e9f7206c3dcebace0778d 100644 (file)
@@ -26,23 +26,6 @@ u32 spl_boot_device(void)
        return 0;
 }
 
-u32 spl_boot_mode(const u32 boot_device)
-{
-       switch (spl_boot_device()) {
-       case BOOT_DEVICE_MMC1:
-#ifdef CONFIG_SPL_FAT_SUPPORT
-               return MMCSD_MODE_FS;
-#else
-               return MMCSD_MODE_RAW;
-#endif
-       case BOOT_DEVICE_NAND:
-               return 0;
-       default:
-               puts("spl: error: unsupported device\n");
-               hang();
-       }
-}
-
 #ifdef CONFIG_SPL_BUILD
 
 void spl_board_init(void)
@@ -84,6 +67,9 @@ void board_init_f(ulong dummy)
 
 #ifdef CONFIG_SPL_I2C_SUPPORT
        i2c_init_all();
+#endif
+#ifdef CONFIG_VID
+       init_func_vid();
 #endif
        dram_init();
 #ifdef CONFIG_SPL_FSL_LS_PPA
@@ -117,4 +103,29 @@ void board_init_f(ulong dummy)
        gd->arch.tlb_allocated = gd->arch.tlb_addr;
 #endif /* CONFIG_SPL_FSL_LS_PPA */
 }
+
+#ifdef CONFIG_SPL_OS_BOOT
+/*
+ * Return
+ * 0 if booting into OS is selected
+ * 1 if booting into U-Boot is selected
+ */
+int spl_start_uboot(void)
+{
+       env_init();
+       if (env_get_yesno("boot_os") != 0)
+               return 0;
+
+       return 1;
+}
+#endif /* CONFIG_SPL_OS_BOOT */
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+       /* Just empty function now - can't decide what to choose */
+       debug("%s: %s\n", __func__, name);
+
+       return 0;
+}
+#endif
 #endif /* CONFIG_SPL_BUILD */