diff mbox

[U-Boot,v2] board: freescale: ls2080a/ls2088a: Enable PPA

Message ID 1488865863-9772-1-git-send-email-santan.kumar@nxp.com
State Accepted
Delegated to: York Sun
Headers show

Commit Message

Santan Kumar March 7, 2017, 5:51 a.m. UTC
Enable PPA on LS2080A, LS2088A boards:
-LS2080ARDB, LS2080AQDS
-LS2088ARDB, LS2088AQDS

Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
---
Changes for v2:
 Changed the subject
 Made changes based on latest ppa config

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 +
 board/freescale/ls2080aqds/ls2080aqds.c   | 8 ++++++++
 board/freescale/ls2080ardb/ls2080ardb.c   | 7 +++++++
 configs/ls2080aqds_defconfig              | 1 +
 configs/ls2080ardb_defconfig              | 1 +
 5 files changed, 18 insertions(+)

Comments

York Sun March 25, 2017, 5:35 p.m. UTC | #1
On 03/06/2017 09:48 PM, Santan Kumar wrote:
> Enable PPA on LS2080A, LS2088A boards:
> -LS2080ARDB, LS2080AQDS
> -LS2088ARDB, LS2088AQDS
>
> Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
> Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
> ---
> Changes for v2:
>  Changed the subject
>  Made changes based on latest ppa config
>
>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 +
>  board/freescale/ls2080aqds/ls2080aqds.c   | 8 ++++++++
>  board/freescale/ls2080ardb/ls2080ardb.c   | 7 +++++++
>  configs/ls2080aqds_defconfig              | 1 +
>  configs/ls2080ardb_defconfig              | 1 +
>  5 files changed, 18 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> index adccdf1..bbbe2de 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> @@ -136,6 +136,7 @@ config SYS_LS_PPA_FW_ADDR
>  	hex "Address of PPA firmware loading from"
>  	depends on FSL_LS_PPA
>  	default 0x40500000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT
> +	default 0x580a00000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A
>  	default 0x60500000 if SYS_LS_PPA_FW_IN_XIP
>  	help
>  	  If the PPA firmware locate at XIP flash, such as NOR or
> diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
> index 73a61fd..894dc74 100644
> --- a/board/freescale/ls2080aqds/ls2080aqds.c
> +++ b/board/freescale/ls2080aqds/ls2080aqds.c
> @@ -19,6 +19,10 @@
>  #include <asm/arch/soc.h>
>  #include <hwconfig.h>
>  #include <fsl_sec.h>
> +#ifdef CONFIG_FSL_LS_PPA
> +#include <asm/arch/ppa.h>
> +#endif
> +
>
>  #include "../common/qixis.h"
>  #include "ls2080aqds_qixis.h"
> @@ -224,6 +228,10 @@ int board_init(void)
>  	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
>  	rtc_enable_32khz_output();
>
> +#ifdef CONFIG_FSL_LS_PPA
> +	ppa_init();
> +#endif
> +

Does it matter if ppa_init() runs first, or sec_init() runs first? I am 
trying to resolve a conflict.

York
Santan Kumar March 27, 2017, 5:03 a.m. UTC | #2
> -----Original Message-----
> From: york sun
> Sent: Saturday, March 25, 2017 11:05 PM
> To: Santan Kumar <santan.kumar@nxp.com>; u-boot@lists.denx.de
> Cc: Abhimanyu Saini <abhimanyu.saini@nxp.com>; Priyanka Jain
> <priyanka.jain@nxp.com>
> Subject: Re: [PATCH][v2]board: freescale: ls2080a/ls2088a: Enable PPA
> 
> On 03/06/2017 09:48 PM, Santan Kumar wrote:
> > Enable PPA on LS2080A, LS2088A boards:
> > -LS2080ARDB, LS2080AQDS
> > -LS2088ARDB, LS2088AQDS
> >
> > Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
> > Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> > Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
> > ---
> > Changes for v2:
> >  Changed the subject
> >  Made changes based on latest ppa config
> >
> >  arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 +
> >  board/freescale/ls2080aqds/ls2080aqds.c   | 8 ++++++++
> >  board/freescale/ls2080ardb/ls2080ardb.c   | 7 +++++++
> >  configs/ls2080aqds_defconfig              | 1 +
> >  configs/ls2080ardb_defconfig              | 1 +
> >  5 files changed, 18 insertions(+)
> >
> > diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> > b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> > index adccdf1..bbbe2de 100644
> > --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> > +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> > @@ -136,6 +136,7 @@ config SYS_LS_PPA_FW_ADDR
> >  	hex "Address of PPA firmware loading from"
> >  	depends on FSL_LS_PPA
> >  	default 0x40500000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT
> > +	default 0x580a00000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A
> >  	default 0x60500000 if SYS_LS_PPA_FW_IN_XIP
> >  	help
> >  	  If the PPA firmware locate at XIP flash, such as NOR or diff --git
> > a/board/freescale/ls2080aqds/ls2080aqds.c
> > b/board/freescale/ls2080aqds/ls2080aqds.c
> > index 73a61fd..894dc74 100644
> > --- a/board/freescale/ls2080aqds/ls2080aqds.c
> > +++ b/board/freescale/ls2080aqds/ls2080aqds.c
> > @@ -19,6 +19,10 @@
> >  #include <asm/arch/soc.h>
> >  #include <hwconfig.h>
> >  #include <fsl_sec.h>
> > +#ifdef CONFIG_FSL_LS_PPA
> > +#include <asm/arch/ppa.h>
> > +#endif
> > +
> >
> >  #include "../common/qixis.h"
> >  #include "ls2080aqds_qixis.h"
> > @@ -224,6 +228,10 @@ int board_init(void)
> >  	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
> >  	rtc_enable_32khz_output();
> >
> > +#ifdef CONFIG_FSL_LS_PPA
> > +	ppa_init();
> > +#endif
> > +
> 
> Does it matter if ppa_init() runs first, or sec_init() runs first? I am trying to
> resolve a conflict.
> 
> York
[Santan Kumar] sec_init() needs to run first then ppa_init() will run.
York Sun March 28, 2017, 5:59 p.m. UTC | #3
On 03/06/2017 09:48 PM, Santan Kumar wrote:
> Enable PPA on LS2080A, LS2088A boards:
> -LS2080ARDB, LS2080AQDS
> -LS2088ARDB, LS2088AQDS
>
> Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
> Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
> ---
> Changes for v2:
>  Changed the subject
>  Made changes based on latest ppa config


Applied to fsl-qoriq master, awaiting upstream. Thanks.

York
diff mbox

Patch

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index adccdf1..bbbe2de 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -136,6 +136,7 @@  config SYS_LS_PPA_FW_ADDR
 	hex "Address of PPA firmware loading from"
 	depends on FSL_LS_PPA
 	default 0x40500000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT
+	default 0x580a00000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A
 	default 0x60500000 if SYS_LS_PPA_FW_IN_XIP
 	help
 	  If the PPA firmware locate at XIP flash, such as NOR or
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 73a61fd..894dc74 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -19,6 +19,10 @@ 
 #include <asm/arch/soc.h>
 #include <hwconfig.h>
 #include <fsl_sec.h>
+#ifdef CONFIG_FSL_LS_PPA
+#include <asm/arch/ppa.h>
+#endif
+
 
 #include "../common/qixis.h"
 #include "ls2080aqds_qixis.h"
@@ -224,6 +228,10 @@  int board_init(void)
 	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
 	rtc_enable_32khz_output();
 
+#ifdef CONFIG_FSL_LS_PPA
+	ppa_init();
+#endif
+
 	return 0;
 }
 
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 02954ef..917f214 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -19,6 +19,9 @@ 
 #include <i2c.h>
 #include <asm/arch/soc.h>
 #include <fsl_sec.h>
+#ifdef CONFIG_FSL_LS_PPA
+#include <asm/arch/ppa.h>
+#endif
 
 #include "../common/qixis.h"
 #include "ls2080ardb_qixis.h"
@@ -180,6 +183,10 @@  int board_init(void)
 
 	QIXIS_WRITE(rst_ctl, QIXIS_RST_CTL_RESET_EN);
 
+#ifdef CONFIG_FSL_LS_PPA
+	ppa_init();
+#endif
+
 #ifdef CONFIG_FSL_MC_ENET
 	/* invert AQR405 IRQ pins polarity */
 	out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR405_IRQ_MASK);
diff --git a/configs/ls2080aqds_defconfig b/configs/ls2080aqds_defconfig
index c889845..5a6b20d 100644
--- a/configs/ls2080aqds_defconfig
+++ b/configs/ls2080aqds_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_LS2080AQDS=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT=y
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig
index 2efb313..daa90ae 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2080ardb_defconfig
@@ -1,5 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_LS2080ARDB=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT=y