I was looking through the TRM and couldn't figure out how to determine this. Is there a way to determine what bootsource was actually used by the ROM loader? I know you can read the SYSBOOT pins out of the CONTROL_STATUS register, but this doesn't tell me which one actually succeeded just the order.
I want to use my uSD as a fallback so my boot order is NAND then uSD and i want to use U-Boot to detect if we booted from uSD and if so then restore the NAND. Currently i generate 2 different U-Boot images, one for NAND and one for SD, but I'd like to make just one image which would be really easy if there was a way to determine what we booted from.