diff mbox series

[v3,1/2] imximage: Encase majority of header in __ASSEMBLY__ declaration

Message ID 1522075006-19858-2-git-send-email-bryan.odonoghue@linaro.org
State Accepted
Commit f4d8fccd3884ea8f76503966b14d0c25129e23eb
Headers show
Series imx: hab: Add helper functions for scripted HAB auth | expand

Commit Message

Bryan O'Donoghue March 26, 2018, 2:36 p.m. UTC
Subsequent patches will want to include imageimage.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 imximage.h inside an ifdef __ASSEMBLY__ block.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
---
 include/imximage.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Breno Lima March 28, 2018, 12:56 a.m. UTC | #1
Hi All,

-----Original Message-----
From: Bryan O'Donoghue [mailto:bryan.odonoghue@linaro.org] 
Sent: segunda-feira, 26 de março de 2018 11:37
To: u-boot@lists.denx.de; Fabio Estevam <fabio.estevam@nxp.com>
Cc: rui.silva@linaro.org; sbabic@denx.de; Bryan O'Donoghue <bryan.odonoghue@linaro.org>; Utkarsh Gupta <utkarsh.gupta@nxp.com>; Breno Matheus Lima <breno.lima@nxp.com>
Subject: [PATCH v3 1/2] imximage: Encase majority of header in __ASSEMBLY__ declaration

Subsequent patches will want to include imageimage.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 imximage.h inside an ifdef __ASSEMBLY__ block.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>

Tested-by: Breno Lima <breno.lima@nxp.com>

Thanks,
Breno
Stefano Babic April 15, 2018, 10:17 a.m. UTC | #2
On 26/03/2018 16:36, Bryan O'Donoghue wrote:
> Subsequent patches will want to include imageimage.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 imximage.h inside an ifdef __ASSEMBLY__ block.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
> Cc: Breno Lima <breno.lima@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  include/imximage.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/imximage.h b/include/imximage.h
> index de1ea8f..553b852 100644
> --- a/include/imximage.h
> +++ b/include/imximage.h
> @@ -56,6 +56,7 @@
>  #define DCD_CHECK_BITS_SET_PARAM	0x14
>  #define DCD_CHECK_BITS_CLR_PARAM	0x04
>  
> +#ifndef __ASSEMBLY__
>  enum imximage_cmd {
>  	CMD_INVALID,
>  	CMD_IMAGE_VERSION,
> @@ -197,4 +198,5 @@ typedef void (*set_dcd_rst_t)(struct imx_header *imxhdr,
>  typedef void (*set_imx_hdr_t)(struct imx_header *imxhdr, uint32_t dcd_len,
>  		uint32_t entry_point, uint32_t flash_offset);
>  
> +#endif /* __ASSEMBLY__ */
>  #endif /* _IMXIMAGE_H_ */
> 
Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/include/imximage.h b/include/imximage.h
index de1ea8f..553b852 100644
--- a/include/imximage.h
+++ b/include/imximage.h
@@ -56,6 +56,7 @@ 
 #define DCD_CHECK_BITS_SET_PARAM	0x14
 #define DCD_CHECK_BITS_CLR_PARAM	0x04
 
+#ifndef __ASSEMBLY__
 enum imximage_cmd {
 	CMD_INVALID,
 	CMD_IMAGE_VERSION,
@@ -197,4 +198,5 @@  typedef void (*set_dcd_rst_t)(struct imx_header *imxhdr,
 typedef void (*set_imx_hdr_t)(struct imx_header *imxhdr, uint32_t dcd_len,
 		uint32_t entry_point, uint32_t flash_offset);
 
+#endif /* __ASSEMBLY__ */
 #endif /* _IMXIMAGE_H_ */