]> git.sur5r.net Git - u-boot/commit
sunxi: When we've both mmc0 and mmc2, detect from which one we're booting
authorHans de Goede <hdegoede@redhat.com>
Thu, 2 Oct 2014 19:13:54 +0000 (21:13 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 Oct 2014 07:35:38 +0000 (09:35 +0200)
commite79c7c881047ca99191cc79b6d83ec64b898cd9b
tree6b8a24be2edbbc0c0c4a6580a32459983060a8cb
parent2ccfac01fca3c58ee87db7bbe54c8243e3980d02
sunxi: When we've both mmc0 and mmc2, detect from which one we're booting

sunxi SOCs can boot from both mmc0 and mmc2, detect from which one we're
booting, and make that one "mmc dev 0" so that a single u-boot binary can
be used for both the onboard eMMC and for external sdcards.

When we're booting from mmc2, we make it dev 0 because that is where the SPL
will load the tertiary payload (the actual u-boot binary in our case) from,
see: common/spl/spl_mmc.c, which has dev 0 hardcoded everywhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/include/asm/arch-sunxi/mmc.h
board/sunxi/board.c
drivers/mmc/sunxi_mmc.c