On Mon, May 04, 2026 at 08:57:42PM +0200, Casey Connolly wrote:
> If available, otherwise fall back to cmdline.
>
> Signed-off-by: Casey Connolly <[email protected]>
> ---
> arch/arm/mach-snapdragon/board.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-snapdragon/board.c
> b/arch/arm/mach-snapdragon/board.c
> index 7610891191fd..63055a60af44 100644
> --- a/arch/arm/mach-snapdragon/board.c
> +++ b/arch/arm/mach-snapdragon/board.c
> @@ -31,8 +31,9 @@
> #include <fdt_support.h>
> #include <usb.h>
> #include <soc/qcom/smem.h>
> #include <sort.h>
> +#include <soc/qcom/smem.h>
> #include <time.h>
>
> #include "qcom-priv.h"
>
> @@ -251,11 +252,16 @@ static const char *get_cmdline(void)
> }
>
> void qcom_set_serialno(void)
> {
> - const char *cmdline = get_cmdline();
> + const char *cmdline;
> char serial[32];
>
> + if (!qcom_socinfo_init())
> + return;
> +
> + cmdline = get_cmdline();
I would suggest to merge this whole patch into patch#9 when the SMEM
based support is added.
> +
> if (!cmdline) {
> log_debug("Failed to get bootargs\n");
> return;
> }
> @@ -473,8 +479,11 @@ int board_late_init(void)
> else
> memcpy((void *)addr, (void *)gd->fdt_blob,
> fdt32_to_cpu(fdt_blob->totalsize));
>
> + /* Initialise SMEM if it wasn't done already and ensure it's memory is
> mapped */
> + qcom_smem_init();
It's rather better to move this SMEM init to where it's actually used as
part of qcom_socinfo_init(). That way it's easier to track dependency.
-Sumit
> +
> configure_env();
> qcom_late_init();
>
> qcom_show_boot_context();
>
> --
> 2.53.0
>