On 8/5/26 07:50, Sean Nyekjaer wrote:
> Oh, I accidentality dropped the CC to the list :/
> 
> 
> 
> On Tuesday, 4 August 2026 at 15:28, Patrice CHOTARD 
> <[email protected]> wrote:
> 
>>
>>
>> On 7/15/26 12:57, Sean Nyekjaer wrote:
>>> Hi Patrice,
>>>
>>>
>>>
>>> On Monday, 29 June 2026 at 08:50, Patrice CHOTARD 
>>> <[email protected]> wrote:
>>>
>>>>
>>>>
>>>> On 6/25/26 08:14, Patrice CHOTARD wrote:
>>>>>
>>>>>
>>>>> On 6/18/26 11:28, Sean Nyekjaer wrote:
>>>>>> When CONFIG_SUPPORT_EMMC_BOOT is enabled, make spl_mmc_boot_mode()
>>>>>> return MMCSD_MODE_EMMCBOOT instead of MMCSD_MODE_RAW.
>>>>>>
>>>>>> This allows the SPL MMC loader to honor the standard configuration
>>>>>> options CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION and
>>>>>> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR when locating U-Boot proper,
>>>>>> whether it is stored in a GPT partition or in an eMMC hardware boot
>>>>>> partition.
>>>>>>
>>>>>> As a result, both U-Boot SPL and U-Boot proper can be placed in the
>>>>>> eMMC hardware boot partitions.
>>>>>>
>>>>>> Signed-off-by: Sean Nyekjaer <[email protected]>
>>>>>> ---
>>>>>>  arch/arm/mach-stm32mp/stm32mp1/spl.c | 5 -----
>>>>>>  1 file changed, 5 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm/mach-stm32mp/stm32mp1/spl.c 
>>>>>> b/arch/arm/mach-stm32mp/stm32mp1/spl.c
>>>>>> index d2e41b8e65f..d2af705a5d1 100644
>>>>>> --- a/arch/arm/mach-stm32mp/stm32mp1/spl.c
>>>>>> +++ b/arch/arm/mach-stm32mp/stm32mp1/spl.c
>>>>>> @@ -56,11 +56,6 @@ u32 spl_boot_device(void)
>>>>>>          return BOOT_DEVICE_MMC1;
>>>>>>  }
>>>>>>
>>>>>> -u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
>>>>>> -{
>>>>>> -        return MMCSD_MODE_RAW;
>>>>>> -}
>>>>>> -
>>>>>>  #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
>>>>>>  int spl_mmc_boot_partition(const u32 boot_device)
>>>>>>  {
>>>>>
>>>>> Hi Sean
>>>>>
>>>>> Reviewed-by: Patrice Chotard <[email protected]>
>>>>>
>>>>> Thanks
>>>>> Patrice
>>>>
>>>> Hi Sean
>>>>
>>>> After a discussion with Patrick, it should be safer to keep 
>>>> spl_mmc_boot_mode()
>>>> implemented as following:
>>>>
>>>> u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
>>>> {
>>>>    return IS_SD(mmc) ? MMCSD_MODE_RAW : MMCSD_MODE_EMMCBOOT;
>>>> }
>>>
>>
>> Hi Sean
>>
>>> So like the arch/arm/mach-mvebu/spl.c ?
>>
>> Yes
>>
>>> But it's still a compile time option to choose where the U-boot proper is 
>>> located.
>>> When just removing the ST special here, we also gain support for loading 
>>> U-boot proper from a filesystem.
>>
>> In our defconfig, we always got MMCSD_MODE_EMMCBOOT enabled, but we support 
>> boot from eMMC or SD-card.
>> It allows to distinguish the boot device at runtime.
>>
> 
> You will still need to have:
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
> or
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
> 
> So still a compile time option.
> 
> /Sean
Applied to u-boot-stm32/next

Thanks
Patrice

Reply via email to