On Sat, Jun 06, 2026 at 03:48:35PM +0530, Balaji Selvanathan wrote: > Add a new SPL_UFS_FS Kconfig option to enable filesystem-based boot > from UFS (FAT or EXT4). When selected, a UFS_MODE_FS case is added > to the boot-mode switch in spl_ufs_load() raw mode on failure. > > The filesystem path is currently a stub that > returns -ENOSYS, serving as a placeholder for future implementation.
Is this really needed? Can't this be added along with the actual support. -Varada > > Signed-off-by: Balaji Selvanathan <[email protected]> > --- > Changes in v2: > - Added the filesystem support in SPL UFS as a seperate patch > --- > --- > common/spl/Kconfig | 10 ++++++++++ > common/spl/spl_ufs.c | 9 +++++++++ > 2 files changed, 19 insertions(+) > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig > index 82b757d1efa..8609f08413b 100644 > --- a/common/spl/Kconfig > +++ b/common/spl/Kconfig > @@ -1682,6 +1682,16 @@ config SPL_UFS_RAW_U_BOOT_PARTITION_NUM > with partition support. This is used if partition name is not > specified or not found. > > +config SPL_UFS_FS > + bool "Enable UFS filesystem boot mode" > + depends on SPL_UFS > + help > + Enable filesystem-based boot from UFS. This allows loading > + U-Boot from FAT or EXT4 filesystems on UFS partitions. > + This is tried as a fallback if raw mode loading fails. > + > + Note: Filesystem support is not yet fully implemented. > + > config SPL_WATCHDOG > bool "Support watchdog drivers" > imply SPL_WDT if !HW_WATCHDOG > diff --git a/common/spl/spl_ufs.c b/common/spl/spl_ufs.c > index 0590b796267..8a60948a304 100644 > --- a/common/spl/spl_ufs.c > +++ b/common/spl/spl_ufs.c > @@ -142,6 +142,15 @@ int spl_ufs_load(struct spl_image_info *spl_image, > return 0; > #endif > break; > +#ifdef CONFIG_SPL_UFS_FS > + case UFS_MODE_FS: > + debug("spl: ufs: boot mode: fs\n"); > + > + /* TODO: Implement filesystem support */ > + printf("spl: ufs: filesystem boot not implemented\n"); > + ret = -ENOSYS; > + break; > +#endif > default: > puts("spl: ufs: wrong boot mode\n"); > } > > -- > 2.34.1 >

