diff mbox

[U-Boot,2/2,v3] armv8: ls1012a: Add support of PPA

Message ID 1485490166-5237-1-git-send-email-prabhakar.kushwaha@nxp.com
State Accepted
Commit 5b404be671890e0ae4f84fb14f62bb5865e67a65
Delegated to: York Sun
Headers show

Commit Message

Prabhakar Kushwaha Jan. 27, 2017, 4:09 a.m. UTC
The PPA implements PSCI which requires for power managment.

Added support of PPA for LS1012AQDS, LS1012ARDB and LS1012AFRDM.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
---
Changes for v2: Enabled FSL_LS_PPA
Changes for v3: Rebased and updated as per latest PPA code

 board/freescale/ls1012afrdm/ls1012afrdm.c | 6 ++++++
 board/freescale/ls1012aqds/ls1012aqds.c   | 7 +++++++
 board/freescale/ls1012ardb/ls1012ardb.c   | 6 ++++++
 configs/ls1012afrdm_qspi_defconfig        | 1 +
 configs/ls1012aqds_qspi_defconfig         | 1 +
 configs/ls1012ardb_qspi_defconfig         | 1 +
 6 files changed, 22 insertions(+)

Comments

York Sun Jan. 27, 2017, 8:40 p.m. UTC | #1
On 01/26/2017 08:09 PM, Prabhakar Kushwaha wrote:
> The PPA implements PSCI which requires for power managment.
>
> Added support of PPA for LS1012AQDS, LS1012ARDB and LS1012AFRDM.
>
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
> ---
> Changes for v2: Enabled FSL_LS_PPA
> Changes for v3: Rebased and updated as per latest PPA code
>
>  board/freescale/ls1012afrdm/ls1012afrdm.c | 6 ++++++
>  board/freescale/ls1012aqds/ls1012aqds.c   | 7 +++++++
>  board/freescale/ls1012ardb/ls1012ardb.c   | 6 ++++++
>  configs/ls1012afrdm_qspi_defconfig        | 1 +
>  configs/ls1012aqds_qspi_defconfig         | 1 +
>  configs/ls1012ardb_qspi_defconfig         | 1 +
>  6 files changed, 22 insertions(+)
>
> diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
> index c2432c3..789cae2 100644
> --- a/board/freescale/ls1012afrdm/ls1012afrdm.c
> +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
> @@ -9,6 +9,9 @@
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> +#ifdef CONFIG_FSL_LS_PPA
> +#include <asm/arch/ppa.h>
> +#endif

Do you really need #ifdef here?

York
Prabhakar Kushwaha Jan. 30, 2017, 11:16 a.m. UTC | #2
> -----Original Message-----
> From: york sun
> Sent: Saturday, January 28, 2017 2:10 AM
> To: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; u-
> boot@lists.denx.de
> Cc: Z.Q. Hou <zhiqiang.hou@nxp.com>; Abhimanyu Saini
> <abhimanyu.saini@nxp.com>
> Subject: Re: [PATCH 2/2][v3] armv8: ls1012a: Add support of PPA
> 
> On 01/26/2017 08:09 PM, Prabhakar Kushwaha wrote:
> > The PPA implements PSCI which requires for power managment.
> >
> > Added support of PPA for LS1012AQDS, LS1012ARDB and LS1012AFRDM.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> > Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
> > ---
> > Changes for v2: Enabled FSL_LS_PPA
> > Changes for v3: Rebased and updated as per latest PPA code
> >
> >  board/freescale/ls1012afrdm/ls1012afrdm.c | 6 ++++++
> >  board/freescale/ls1012aqds/ls1012aqds.c   | 7 +++++++
> >  board/freescale/ls1012ardb/ls1012ardb.c   | 6 ++++++
> >  configs/ls1012afrdm_qspi_defconfig        | 1 +
> >  configs/ls1012aqds_qspi_defconfig         | 1 +
> >  configs/ls1012ardb_qspi_defconfig         | 1 +
> >  6 files changed, 22 insertions(+)
> >
> > diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c
> b/board/freescale/ls1012afrdm/ls1012afrdm.c
> > index c2432c3..789cae2 100644
> > --- a/board/freescale/ls1012afrdm/ls1012afrdm.c
> > +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
> > @@ -9,6 +9,9 @@
> >  #include <asm/io.h>
> >  #include <asm/arch/clock.h>
> >  #include <asm/arch/fsl_serdes.h>
> > +#ifdef CONFIG_FSL_LS_PPA
> > +#include <asm/arch/ppa.h>
> > +#endif
> 
> Do you really need #ifdef here?
> 

Yes, if CONFIG_FSL_LS_PPA is undefined then  ppa_init() should not be called. 
As ppa_init declaration is present in ppa.h. So need to remove inclusion of ppa.h also. 

--prabhakar
diff mbox

Patch

diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index c2432c3..789cae2 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -9,6 +9,9 @@ 
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
+#ifdef CONFIG_FSL_LS_PPA
+#include <asm/arch/ppa.h>
+#endif
 #include <asm/arch/soc.h>
 #include <hwconfig.h>
 #include <environment.h>
@@ -74,6 +77,9 @@  int board_init(void)
 	gd->env_addr = (ulong)&default_environment[0];
 #endif
 
+#ifdef CONFIG_FSL_LS_PPA
+	ppa_init();
+#endif
 	return 0;
 }
 
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 704019e..507bdaf 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -10,6 +10,9 @@ 
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
+#ifdef CONFIG_FSL_LS_PPA
+#include <asm/arch/ppa.h>
+#endif
 #include <asm/arch/fdt.h>
 #include <asm/arch/soc.h>
 #include <ahci.h>
@@ -114,6 +117,10 @@  int board_init(void)
 #ifdef CONFIG_ENV_IS_NOWHERE
 	gd->env_addr = (ulong)&default_environment[0];
 #endif
+
+#ifdef CONFIG_FSL_LS_PPA
+	ppa_init();
+#endif
 	return 0;
 }
 
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 2dece02..e3a8a76 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -9,6 +9,9 @@ 
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
+#ifdef CONFIG_FSL_LS_PPA
+#include <asm/arch/ppa.h>
+#endif
 #include <asm/arch/soc.h>
 #include <hwconfig.h>
 #include <ahci.h>
@@ -110,6 +113,9 @@  int board_init(void)
 	gd->env_addr = (ulong)&default_environment[0];
 #endif
 
+#ifdef CONFIG_FSL_LS_PPA
+	ppa_init();
+#endif
 	return 0;
 }
 
diff --git a/configs/ls1012afrdm_qspi_defconfig b/configs/ls1012afrdm_qspi_defconfig
index 8932650..8b42962 100644
--- a/configs/ls1012afrdm_qspi_defconfig
+++ b/configs/ls1012afrdm_qspi_defconfig
@@ -6,6 +6,7 @@  CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-frdm"
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
diff --git a/configs/ls1012aqds_qspi_defconfig b/configs/ls1012aqds_qspi_defconfig
index 0bb40d0..d400276 100644
--- a/configs/ls1012aqds_qspi_defconfig
+++ b/configs/ls1012aqds_qspi_defconfig
@@ -5,6 +5,7 @@  CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-qds"
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
diff --git a/configs/ls1012ardb_qspi_defconfig b/configs/ls1012ardb_qspi_defconfig
index 6fed6c7..06c4243 100644
--- a/configs/ls1012ardb_qspi_defconfig
+++ b/configs/ls1012ardb_qspi_defconfig
@@ -5,6 +5,7 @@  CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-rdb"
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"