common/spl/spl_ufs.c uses BOOT_DEVICE_UFS, which RISC-V does not define, so enabling CONFIG_SPL_UFS_SUPPORT fails to build:
common/spl/spl_ufs.c:49:33: error: 'BOOT_DEVICE_UFS' undeclared here (not in a function); did you mean 'BOOT_DEVICE_DFU'? Add it before BOOT_DEVICE_NONE, which must stay last as the list terminator, and note this in a comment. The BOOT_DEVICE_* values are SPL-internal and not passed to the next stage, so this is not an ABI change. Signed-off-by: Urvashi Sharma <[email protected]> Cc: Rick Chen <[email protected]> Cc: Leo <[email protected]> Cc: Tom Rini <[email protected]> --- Changes for v2: - Add a comment documenting that BOOT_DEVICE_NONE must stay last - Update the commit message Tested: qemu-riscv64_spl_defconfig with SPL_UFS_SUPPORT=y builds arch/riscv/include/asm/spl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/include/asm/spl.h b/arch/riscv/include/asm/spl.h index 9c0bf9755c9..b3a7ee47bf7 100644 --- a/arch/riscv/include/asm/spl.h +++ b/arch/riscv/include/asm/spl.h @@ -8,6 +8,10 @@ #ifndef _ASM_RISCV_SPL_H_ #define _ASM_RISCV_SPL_H_ +/* + * SPL boot device IDs. + * Add new entries before BOOT_DEVICE_NONE, which must stay last + */ enum { BOOT_DEVICE_RAM, BOOT_DEVICE_MMC1, @@ -27,6 +31,7 @@ enum { BOOT_DEVICE_XIP, BOOT_DEVICE_BOOTROM, BOOT_DEVICE_SMH, + BOOT_DEVICE_UFS, BOOT_DEVICE_NONE }; -- 2.34.1
