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

Simon Glass sjg at chromium.org
Thu Apr 16 22:53:54 CEST 2026


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?

Regards,
Simon


More information about the U-Boot mailing list