Return BOOT_DEVICE_UFS from spl_boot_device() when SPL is built with UFS
support, so that SPL can load the next stage from UFS. Check it after
MMC, like the other storage types, so that configurations which enable
SPL MMC keep booting from MMC.

Signed-off-by: David Lechner <[email protected]>
---
 arch/arm/mach-mediatek/spl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
index cd7841f1a87..b829f5e7450 100644
--- a/arch/arm/mach-mediatek/spl.c
+++ b/arch/arm/mach-mediatek/spl.c
@@ -71,6 +71,8 @@ u32 spl_boot_device(void)
                return BOOT_DEVICE_SPI;
        if (CONFIG_IS_ENABLED(MMC))
                return BOOT_DEVICE_MMC1;
+       if (CONFIG_IS_ENABLED(UFS))
+               return BOOT_DEVICE_UFS;
        if (CONFIG_IS_ENABLED(NAND_SUPPORT))
                return BOOT_DEVICE_NAND;
        if (CONFIG_IS_ENABLED(NOR_SUPPORT))

-- 
2.53.0

Reply via email to