[PATCH 8/8] ARM: imx6: Adapt device tree selection in DH board file
Fabio Estevam
festevam at denx.de
Thu May 19 14:48:11 CEST 2022
On 19/05/2022 08:08, Philip Oberfichtner wrote:
return 0;
> - }
> + /* Determine carrier board at compile time and SoM at runtime */
> + const size_t size = 32;
> + char *car, *som, dt[size];
> +
> + car = strchr(CONFIG_DEFAULT_DEVICE_TREE, '-'); /* i.e. -dhcom-drc02
> */
> +
> + som = is_mx6dq() ? "imx6q" :
> + is_mx6dl() ? "imx6dl" :
> + is_mx6solo() ? "imx6s" : NULL;
> +
> + if (!(car && som))
> + return -1;
Nit: can you return -EINVAL instead of -1?
More information about the U-Boot
mailing list