On Mon, Dec 01, 2025 at 08:32:46AM +0100, Jan Kiszka wrote: > From: Jan Kiszka <[email protected]> > > Add SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE as condition where so > far SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION was enough - though often > by chance as both options were enabled. > > Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") > Signed-off-by: Jan Kiszka <[email protected]> > --- > common/spl/spl_mmc.c | 17 +++++++++-------- > include/part.h | 3 ++- > 2 files changed, 11 insertions(+), 9 deletions(-) > > diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c > index d8ce3a84614..1942e417075 100644 > --- a/common/spl/spl_mmc.c > +++ b/common/spl/spl_mmc.c > @@ -106,7 +106,8 @@ static int spl_mmc_find_device(struct mmc **mmcp, int > mmc_dev) > return 0; > } > > -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION > +#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION) || \ > + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE) > static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, > struct spl_boot_device *bootdev, > struct mmc *mmc, int partition, > @@ -419,19 +420,19 @@ int spl_mmc_load(struct spl_image_info *spl_image, > > raw_sect = spl_mmc_get_uboot_raw_sector(mmc, raw_sect); > > -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION > - ret = mmc_load_image_raw_partition(spl_image, bootdev, > - mmc, raw_part, > - raw_sect); > - if (!ret) > - return 0; > -#endif > #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR > ret = mmc_load_image_raw_sector(spl_image, bootdev, mmc, > raw_sect + > spl_mmc_raw_uboot_offset(part)); > if (!ret) > return 0; > +#elif defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION) || \ > + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE) > + ret = mmc_load_image_raw_partition(spl_image, bootdev, > + mmc, raw_part, > + raw_sect); > + if (!ret) > + return 0; > #endif
Why do we change the order here? -- Tom
signature.asc
Description: PGP signature

