summaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-07-09 15:31:47 +0200
committerHans de Goede <hdegoede@redhat.com>2016-07-15 15:54:56 +0200
commitef36d9ae1646e5aee7c1425ee507d275699a072e (patch)
tree84c1533f635bcb50635799e6e6e75d9912b73d53 /board/sunxi
parent4a8c7c1f45a25687e08ff98ab27ba664c8fd7b74 (diff)
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 <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'board/sunxi')
-rw-r--r--board/sunxi/board.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 320958af28..f6e28b050d 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;