[U-Boot] [PATCH 2/6] armv8: fsl-layerscape: fix compile error with sec fw disabled

Horia Geanta horia.geanta at nxp.com
Fri Oct 18 06:32:00 UTC 2019


On 10/17/2019 12:21 PM, Laurentiu Tudor wrote:
> From: Laurentiu Tudor <laurentiu.tudor at nxp.com>
> 
> If SEC FW support is not enabled (ARMV8_SEC_FIRMWARE_SUPPORT=n) this
> compilation error happens:
> arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h:169:4: error:
> 'CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT' undeclared here (not in a function)
> 
> Fix it by adding an intermediate macro to handle the problem.
> 
> Signed-off-by: Laurentiu Tudor <laurentiu.tudor at nxp.com>
> ---
>  arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
> index 37e2fe4e66..398bb4eb86 100644
> --- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
> +++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
> @@ -164,9 +164,15 @@ extern int fman_icid_tbl_sz;
>  		QDMA_BASE_ADDR + QMAN_CQSIDR_REG + 4, \
>  		QDMA_BASE_ADDR, QDMA_IS_LE)
>  
> +#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
> +#define SEC_FW_SUPPORT CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
> +#else
> +#define SEC_FW_SUPPORT 0
> +#endif
> +
>  #define SET_SEC_JR_ICID_ENTRY(jr_num, streamid) \
>  	SET_ICID_ENTRY( \
> -		(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT && \
> +		(SEC_FW_SUPPORT && \
>  		(FSL_SEC_JR##jr_num##_OFFSET ==  \
>  			SEC_JR3_OFFSET + CONFIG_SYS_FSL_SEC_OFFSET) \
>  			? NULL \
> 
How about using CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) instead of
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT?

This would also account for CONFIG_SPL_ARMV8_SEC_FIRMWARE_SUPPORT.

Horia


More information about the U-Boot mailing list