sunxi: Remove redundant check from `board_mmc_init` for signature
PATCH v3 3/3 sunxi: Remove redundant check from `board_mmc_init` for signature
Removes checking for signature on mmc devices, because it is done on spl_boot_device. This is follow-up patch to V3.
--- board/sunxi/board.c | 13 ------------- 1 file changed, 13 deletions(-)
board/sunxi/board.c +0 -13
@@ -297,19 +297,6 @@ int board_mmc_init(bd_t *bis)return -1 ;#endif -#if CONFIG_MMC_SUNXI_SLOT ==0 &&CONFIG_MMC_SUNXI_SLOT_EXTRA ==2 -/* -* Both mmc0 and mmc2 are bootable, figure out where we're booting -* from. Try mmc0 first, just like the brom does. -*/ -if (sunxi_mmc_has_egon_boot_signature (mmc0)) -return 0 ; - -/* no bootable card in mmc0, so we must be booting from mmc2, swap */ - mmc0->block_dev.dev =1 ; - mmc1->block_dev.dev =0 ; -#endif - return 0; }#endif
Signature · 1 line
2.4.1
PATCH v3 3/3 sunxi: Remove redundant check from `board_mmc_init` for signature
Hi,
Quoted 2 lines · Daniel Kochma?ski
Removes checking for signature on mmc devices, because it is done on
spl_boot_device. This is follow-up patch to V3.
We actually still need the swapping in this code-path in u-boot proper, so as to make sure that when booting from an emmc we make the emmc "mmc dev 0" and thus search there first for things like boot.scr and extlinux.conf.
So I've merged this patch in a modified form adding a
"#if !defined(CONFIG_SPL_BUILD" around the code block in question, rather then completely removing it, and updating the comments to match.
Regards,
Hans
Quoted 34 lines
Signed-off-by Daniel Kochma?ski <[email protected]>CC Roy Spliet <[email protected]>Cc Ian Campbell <[email protected]>Cc Hans De Goede <[email protected]>--- board/sunxi/board.c | 13 ------------- 1 file changed, 13 deletions(-)board/sunxi/board.c +0
-13@@ -297,19 +297,6 @@ int board_mmc_init(bd_t *bis)return -1 ;#endif -#if CONFIG_MMC_SUNXI_SLOT ==0 &&CONFIG_MMC_SUNXI_SLOT_EXTRA ==2 -/* -* Both mmc0 and mmc2 are bootable, figure out where we're booting -* from. Try mmc0 first, just like the brom does. -*/ -if (sunxi_mmc_has_egon_boot_signature (mmc0)) -return 0 ; - -/* no bootable card in mmc0, so we must be booting from mmc2, swap */ - mmc0->block_dev.dev =1 ; - mmc1->block_dev.dev =0 ; -#endif - return 0; }#endif