diff mbox

[U-Boot,2/2] LS2080A: Move sec_init to board_init

Message ID 1486142618-22450-2-git-send-email-udit.agarwal@nxp.com
State Accepted
Delegated to: York Sun
Headers show

Commit Message

Udit Agarwal Feb. 3, 2017, 5:23 p.m. UTC
Moves sec_init to board_init rather than in misc_init function beacuse
PPA will be initialised in board_init function and for PPA validation
sec_init has to be done prior to PPA init.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
---
 board/freescale/ls2080aqds/ls2080aqds.c | 6 +++---
 board/freescale/ls2080ardb/ls2080ardb.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

York Sun March 26, 2017, 6:31 p.m. UTC | #1
On 02/03/2017 03:26 AM, Udit Agarwal wrote:
> Moves sec_init to board_init rather than in misc_init function beacuse
> PPA will be initialised in board_init function and for PPA validation
> sec_init has to be done prior to PPA init.
>
> Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
> Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
> ---
>  board/freescale/ls2080aqds/ls2080aqds.c | 6 +++---
>  board/freescale/ls2080ardb/ls2080ardb.c | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
> index 73a61fd..d9d0bea 100644
> --- a/board/freescale/ls2080aqds/ls2080aqds.c
> +++ b/board/freescale/ls2080aqds/ls2080aqds.c
> @@ -223,6 +223,9 @@ int board_init(void)
>  #endif
>  	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
>  	rtc_enable_32khz_output();
> +#ifdef CONFIG_FSL_CAAM
> +        sec_init();
> +#endif

Use tab instead of space in the future. I will fix this one for you.

>
>  	return 0;
>  }
> @@ -264,9 +267,6 @@ int dram_init(void)
>  #if defined(CONFIG_ARCH_MISC_INIT)
>  int arch_misc_init(void)
>  {
> -#ifdef CONFIG_FSL_CAAM
> -	sec_init();
> -#endif
>  	return 0;
>  }
>  #endif
> diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
> index 02954ef..b0024d3 100644
> --- a/board/freescale/ls2080ardb/ls2080ardb.c
> +++ b/board/freescale/ls2080ardb/ls2080ardb.c
> @@ -184,6 +184,9 @@ int board_init(void)
>  	/* invert AQR405 IRQ pins polarity */
>  	out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR405_IRQ_MASK);
>  #endif
> +#ifdef CONFIG_FSL_CAAM
> +        sec_init();
> +#endif

Same here.

York
York Sun March 28, 2017, 5:58 p.m. UTC | #2
On 02/03/2017 03:26 AM, Udit Agarwal wrote:
> Moves sec_init to board_init rather than in misc_init function beacuse
> PPA will be initialised in board_init function and for PPA validation
> sec_init has to be done prior to PPA init.
>
> Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
> Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
> ---

Applied to fsl-qoriq master, awaiting upstream.

Thanks.

York
diff mbox

Patch

diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 73a61fd..d9d0bea 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -223,6 +223,9 @@  int board_init(void)
 #endif
 	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
 	rtc_enable_32khz_output();
+#ifdef CONFIG_FSL_CAAM
+        sec_init();
+#endif
 
 	return 0;
 }
@@ -264,9 +267,6 @@  int dram_init(void)
 #if defined(CONFIG_ARCH_MISC_INIT)
 int arch_misc_init(void)
 {
-#ifdef CONFIG_FSL_CAAM
-	sec_init();
-#endif
 	return 0;
 }
 #endif
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 02954ef..b0024d3 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -184,6 +184,9 @@  int board_init(void)
 	/* invert AQR405 IRQ pins polarity */
 	out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR405_IRQ_MASK);
 #endif
+#ifdef CONFIG_FSL_CAAM
+        sec_init();
+#endif
 
 	return 0;
 }
@@ -237,9 +240,6 @@  int dram_init(void)
 #if defined(CONFIG_ARCH_MISC_INIT)
 int arch_misc_init(void)
 {
-#ifdef CONFIG_FSL_CAAM
-	sec_init();
-#endif
 	return 0;
 }
 #endif