Skip to content
Snippets Groups Projects
Commit 7b9e980e authored by Nikita Kiryanov's avatar Nikita Kiryanov Committed by Tom Rini
Browse files

arm: mx6: cm-fx6: define fallback boot devices for spl


Use spl alternate boot device feature to define fallback to
the main boot device as it is defined by hardware.

Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarStefano Babic <sbabic@denx.de>
parent 310c8466
No related branches found
No related tags found
No related merge requests found
...@@ -337,16 +337,17 @@ void board_init_f(ulong dummy) ...@@ -337,16 +337,17 @@ void board_init_f(ulong dummy)
board_init_r(NULL, 0); board_init_r(NULL, 0);
} }
void spl_board_init(void) void board_boot_order(u32 *spl_boot_list)
{ {
u32 boot_device = spl_boot_device(); spl_boot_list[0] = spl_boot_device();
switch (spl_boot_list[0]) {
if (boot_device == BOOT_DEVICE_SPI) case BOOT_DEVICE_SPI:
puts("Booting from SPI flash\n"); spl_boot_list[1] = BOOT_DEVICE_MMC1;
else if (boot_device == BOOT_DEVICE_MMC1) break;
puts("Booting from MMC\n"); case BOOT_DEVICE_MMC1:
else spl_boot_list[1] = BOOT_DEVICE_SPI;
puts("Unknown boot device\n"); break;
}
} }
#ifdef CONFIG_SPL_MMC_SUPPORT #ifdef CONFIG_SPL_MMC_SUPPORT
......
...@@ -230,7 +230,6 @@ ...@@ -230,7 +230,6 @@
/* SPL */ /* SPL */
#include "imx6_spl.h" #include "imx6_spl.h"
#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_MMC_SUPPORT #define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */ #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */
#define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024) #define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment