Skip to content
  • Siarhei Siamashka's avatar
    sunxi: Support the FEL boot mode in the regular u-boot build · 840fe95c
    Siarhei Siamashka authored
    
    
    So that the CONFIG_SPL_FEL option is not needed anymore. And the regular
    SPL binary, generated by the default u-boot build, is now also bootable
    over USB in the FEL mode. The SPL still can boot from the SD card too.
    
    A bunch of system registers need to be saved/restored in order to ensure
    that the IRQ handler still works in the BROM FEL code after getting
    control back from the SPL. This is done in the sunxi code instead of
    abusing ifdefs in 'start.S'.
    
    The decision whether to load the main u-boot binary from the SD card or
    return to the FEL code in the BROM is done at runtime.
    
    Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
    [hdegoede@redhat.com: Since we now restore various regs before returning to
     the FEL BROM code we can drop the sunxi specific #ifdefs in start.S]
    Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    840fe95c