[U-Boot] [PATCH 2/4] imx: hab: Encase majority of header in __ASSEMBLY__ declaration

Bryan O'Donoghue bryan.odonoghue at linaro.org
Fri Mar 9 17:35:47 UTC 2018


Subsequent patches will want to include hab.h but in doing so include it on
an assembly compile path causing a range of compile errors. Fix the errors
pre-emptively by encasing the majority of the declarations in hab.h inside
an ifdef __ASSEMBLY__ block.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta at nxp.com>
Cc: Breno Lima <breno.lima at nxp.com>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
---
 arch/arm/include/asm/mach-imx/hab.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/mach-imx/hab.h b/arch/arm/include/asm/mach-imx/hab.h
index ce9a44d..1bebdbe 100644
--- a/arch/arm/include/asm/mach-imx/hab.h
+++ b/arch/arm/include/asm/mach-imx/hab.h
@@ -8,6 +8,7 @@
 #ifndef __SECURE_MX6Q_H__
 #define __SECURE_MX6Q_H__
 
+#ifndef __ASSEMBLY__
 #include <linux/types.h>
 #include <linux/compiler.h>
 
@@ -196,13 +197,14 @@ typedef void hapi_clock_init_t(void);
 #define HAB_CMD_SET          0xB1  /* Set command tag */
 #define HAB_PAR_MID          0x01  /* MID parameter value */
 
-#define IVT_SIZE			0x20
-#define CSF_PAD_SIZE			0x2000
-
 /* ----------- end of HAB API updates ------------*/
 
 int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size,
 			       uint32_t ivt_offset);
 bool imx_hab_is_enabled(void);
+#endif /* __ASSEMBLY__ */
+
+#define IVT_SIZE			0x20
+#define CSF_PAD_SIZE			0x2000
 
 #endif
-- 
2.7.4



More information about the U-Boot mailing list