How to get the Boot device in U-Boot

is there anyway to get the effective boot device/media in u-boot ? (MMC oe eMMC)

Reading the SYSBOOT Pin is not going to help since if the first media fails BOOT ROM Code will try the next one.

Cheers