[PATCH] mach-snapdragon: Update fdtfile logic to work for RB1 and RB2
neil.armstrong at linaro.org
neil.armstrong at linaro.org
Mon May 5 09:23:29 CEST 2025
Hi,
On 23/04/2025 07:11, Sumit Garg wrote:
> From: Sumit Garg <sumit.garg at oss.qualcomm.com>
>
> RB1 and RB2 have three root compatibles where the last one can't be used
> to decode fdtfile name (qcm* vs qrb*). So rather just rely on the first
> compatible to retrieve the SoC name.
OK, so "soc" would be qcm2290 instead of qrb2210, what's the problem since
you have "board" with "qrb2210-rb1" ?
What is the difference between qcm2290 & qrb2210 that affects U-boot ?
Same for qrb4210 vs sm4250.
If you have a custom board code, you can still match on the root compatible.
Neil
>
> Signed-off-by: Sumit Garg <sumit.garg at oss.qualcomm.com>
> ---
> arch/arm/mach-snapdragon/board.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
> index deae4d32378..dc8220e89b4 100644
> --- a/arch/arm/mach-snapdragon/board.c
> +++ b/arch/arm/mach-snapdragon/board.c
> @@ -437,16 +437,24 @@ static void configure_env(void)
>
> /* The Qualcomm reference boards (RBx, HDK, etc) */
> if (!strncmp("qcom", buf, strlen("qcom"))) {
> + char *soc;
> +
> /*
> * They all have the first compatible as "qcom,<soc>-<board>"
> * (e.g. "qcom,qrb5165-rb5"). We extract just the part after
> * the dash.
> */
> - if (!strsep(&tmp, "-")) {
> + if (!strsep(&tmp, ",")) {
> + log_warning("compatible '%s' has no ','\n", buf);
> + return;
> + }
> + soc = strsep(&tmp, "-");
> + if (!soc) {
> log_warning("compatible '%s' has no '-'\n", buf);
> return;
> }
> - /* tmp is now "rb5" */
> +
> + env_set("soc", soc);
> env_set("board", tmp);
> } else {
> if (!strsep(&tmp, ",")) {
More information about the U-Boot
mailing list