[PATCH next 3/3] ARM: i.MX8M: align SIP_BUILDINFO with the tf-a define

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Oct 17 09:39:27 PDT 2022


On 17.10.22 18:18, Marco Felsch wrote:
> Align the define with the name used by the usptream and downstream tf-a.
> 
> While on change the pr_info behaviour to only print the version if a0
> contain something useful.
> 
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

> ---
>  arch/arm/mach-imx/imx8m.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
> index 8b275bd6f6..9758525b54 100644
> --- a/arch/arm/mach-imx/imx8m.c
> +++ b/arch/arm/mach-imx/imx8m.c
> @@ -18,8 +18,8 @@
>  #include <linux/iopoll.h>
>  #include <linux/arm-smccc.h>
>  
> -#define FSL_SIP_BUILDINFO			0xC2000003
> -#define FSL_SIP_BUILDINFO_GET_COMMITHASH	0x00
> +#define IMX_SIP_BUILDINFO			0xC2000003
> +#define IMX_SIP_BUILDINFO_GET_COMMITHASH	0x00
>  
>  void imx8m_clock_set_target_val(int clock_id, u32 val)
>  {
> @@ -62,10 +62,12 @@ static int imx8m_init(const char *cputypestr)
>  
>  	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
>  	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
> -		arm_smccc_smc(FSL_SIP_BUILDINFO,
> -			      FSL_SIP_BUILDINFO_GET_COMMITHASH,
> +		arm_smccc_smc(IMX_SIP_BUILDINFO,
> +			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
>  			      0, 0, 0, 0, 0, 0, &res);
> -		pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
> +
> +		if (res.a0 > 0)
> +			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
>  	}
>  
>  	return 0;


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list