[PATCH v3 06/10] mach-snapdragon: Add initial support for IPQ5210 SPL

Varadarajan Narayanan varadarajan.narayanan at oss.qualcomm.com
Thu May 7 06:56:09 CEST 2026


On Fri, Apr 17, 2026 at 08:53:54AM +1200, Simon Glass wrote:
> Hi Varadarajan,
>
> On 2026-04-16T05:39:18, Varadarajan Narayanan
> <varadarajan.narayanan at oss.qualcomm.com> wrote:
> > mach-snapdragon: Add initial support for IPQ5210 SPL
> >
> > Add basic SPL infrastructure for IPQ5210 SoC. This handles basic serial
> > console init, identifying the boot media, loading the additional
> > firmware binaries to setup DDR, TFA and eventually jump to U-Boot.
> >
> > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan at oss.qualcomm.com>
> >
> > arch/arm/Kconfig                  |   5 +-
> >  arch/arm/mach-snapdragon/Makefile |   3 +
> >  arch/arm/mach-snapdragon/spl.c    | 640 ++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 646 insertions(+), 2 deletions(-)
>
> > +static int spl_find_partition_info(enum uclass_id uclass_id, int device_num,
> > +                                const char *part_name,
> > +                                struct disk_partition *info)
>
> This function is defined unconditionally but only called within the
> CONFIG_IS_ENABLED(MMC) block - you could use __maybe_unused ?
>
> > +void *board_spl_fit_buffer_addr(ulong fit_size, int sectors, int bl_len)
> > +{
> > +     void *buffer = spl_get_load_buffer(0, sectors * bl_len);
> > +
> > +     if (!buffer) {
> > +             pr_err("Failed to get FIT load buffer\n");
> > +             qcom_spl_error_handler(NULL);
> > +     }
>
> spl_get_load_buffer() always returns a non-null address so this code
> is not needed
>
> > + * @entry_point:Pointer to store the retrieved entry point.
>
> nit: missing space after the colon
>
> > +     if (desc->part_type == PART_TYPE_UNKNOWN) {
> > +             printf("Initializing partition table\n");
> > +             /*
> > +              * Prefer EFI/GPT
> > +              */
> > +             desc->part_type = PART_TYPE_EFI;
> > +     }
>
> Simply setting part_type to PART_TYPE_EFI doesn't actually initialise
> the partition table - it just tells the partition code to assume GPT.
> If the device doesn't have GPT, it will fail - how about calling
> part_init() or letting part_driver_lookup_type() auto-detect?

Since this is on eMMC and GPT is kind of mandatory on eMMC, would prefer
to fail if GPT is not found. And, support for other partition types are
not enabled in the config.

Hope this is ok.

Thanks
Varada


More information about the U-Boot mailing list