From ef36d9ae1646e5aee7c1425ee507d275699a072e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 9 Jul 2016 15:31:47 +0200 Subject: sunxi: Use BROM stored boot_media value to determine our boot-source Now that we know that the BROM stores a value indicating the boot-source at the beginning of SRAM, use that instead of trying to recreate the BROM's boot probing. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- board/sunxi/board.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'board/sunxi') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 320958a..f6e28b0 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -369,8 +369,7 @@ int board_mmc_init(bd_t *bis) * are searched there first. Note we only do this for u-boot proper, * not for the SPL, see spl_boot_device(). */ - if (!sunxi_mmc_has_egon_boot_signature(mmc0) && - sunxi_mmc_has_egon_boot_signature(mmc1)) { + if (readb(SPL_ADDR + 0x28) == SUNXI_BOOTED_FROM_MMC2) { /* Booting from emmc / mmc2, swap */ mmc0->block_dev.devnum = 1; mmc1->block_dev.devnum = 0; -- cgit v1.1