[U-Boot] [PATCH 1/5] common/Kconfig: remove NOR_BOOT's depends on NOR

From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Remove this dependency to make the NOR_BOOT available for other SoCs which do not have the config NOR, not only for am335x.
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com --- common/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig index c69c141..7fd6c49 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -101,7 +101,6 @@ menu "Boot media"
config NOR_BOOT bool "Support for booting from NOR flash" - depends on NOR help Enabling this will make a U-Boot binary that is capable of being booted via NOR. In this case we will enable certain pinmux early

From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Enable the config NOR_BOOT obviously for NOR boot defconfigs of ls1043a and ls1046a.
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com --- configs/ls1043aqds_defconfig | 1 + configs/ls1043aqds_lpuart_defconfig | 1 + configs/ls1043aqds_nor_ddr3_defconfig | 1 + configs/ls1043ardb_SECURE_BOOT_defconfig | 1 + configs/ls1043ardb_defconfig | 1 + configs/ls1046aqds_defconfig | 1 + 6 files changed, 6 insertions(+)
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig index 9352d82..3c8ae2e 100644 --- a/configs/ls1043aqds_defconfig +++ b/configs/ls1043aqds_defconfig @@ -5,6 +5,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_FSL_DDR4=y +CONFIG_NOR_BOOT=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/configs/ls1043aqds_lpuart_defconfig b/configs/ls1043aqds_lpuart_defconfig index d384985..8acf732 100644 --- a/configs/ls1043aqds_lpuart_defconfig +++ b/configs/ls1043aqds_lpuart_defconfig @@ -6,6 +6,7 @@ CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="LPUART" CONFIG_SYS_FSL_DDR4=y +CONFIG_NOR_BOOT=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/configs/ls1043aqds_nor_ddr3_defconfig b/configs/ls1043aqds_nor_ddr3_defconfig index 1103346..9be3b2c 100644 --- a/configs/ls1043aqds_nor_ddr3_defconfig +++ b/configs/ls1043aqds_nor_ddr3_defconfig @@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y +CONFIG_NOR_BOOT=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig index 262769d..0848d66 100644 --- a/configs/ls1043ardb_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_SECURE_BOOT_defconfig @@ -6,6 +6,7 @@ CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT" CONFIG_SYS_FSL_DDR4=y +CONFIG_NOR_BOOT=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y CONFIG_CMD_MMC=y diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig index e1b75ac..3b6de1d 100644 --- a/configs/ls1043ardb_defconfig +++ b/configs/ls1043ardb_defconfig @@ -5,6 +5,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_FSL_DDR4=y +CONFIG_NOR_BOOT=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y CONFIG_CMD_MMC=y diff --git a/configs/ls1046aqds_defconfig b/configs/ls1046aqds_defconfig index 71c3b95..d97ddd9 100644 --- a/configs/ls1046aqds_defconfig +++ b/configs/ls1046aqds_defconfig @@ -6,6 +6,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4" +CONFIG_NOR_BOOT=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y

-----Original Message----- From: Zhiqiang Hou [mailto:Zhiqiang.Hou@nxp.com] Sent: Wednesday, October 12, 2016 2:56 PM To: u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: [PATCH 2/5] configs/ls104xa: enable the config NOR_BOOT
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Enable the config NOR_BOOT obviously for NOR boot defconfigs of ls1043a and ls1046a.
Earlier, no CONFIG for NOR boot was required. Why new variable CONFIG_NOR_BOOT is even required?
--prabhakar

Hi Prabhakar,
Thanks for your comments!
-----Original Message----- From: Prabhakar Kushwaha Sent: 2016年10月17日 11:40 To: Z.Q. Hou zhiqiang.hou@nxp.com; u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: RE: [PATCH 2/5] configs/ls104xa: enable the config NOR_BOOT
-----Original Message----- From: Zhiqiang Hou [mailto:Zhiqiang.Hou@nxp.com] Sent: Wednesday, October 12, 2016 2:56 PM To: u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com;
hs@denx.de;
yamada.masahiro@socionext.com; Ruchika Gupta
eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: [PATCH 2/5] configs/ls104xa: enable the config NOR_BOOT
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Enable the config NOR_BOOT obviously for NOR boot defconfigs of ls1043a and ls1046a.
Earlier, no CONFIG for NOR boot was required. Why new variable CONFIG_NOR_BOOT is even required?
Now that the Boot Media configs has been introduced, it's reasonable to uniform all boot methods under this framework. And therefore the other config entry is able to be configured according to different Boot Media.
Thanks, Zhiqiang

On Mon, Oct 17, 2016 at 09:12:30AM +0000, Z.Q. Hou wrote:
Hi Prabhakar,
Thanks for your comments!
-----Original Message----- From: Prabhakar Kushwaha Sent: 2016年10月17日 11:40 To: Z.Q. Hou zhiqiang.hou@nxp.com; u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: RE: [PATCH 2/5] configs/ls104xa: enable the config NOR_BOOT
-----Original Message----- From: Zhiqiang Hou [mailto:Zhiqiang.Hou@nxp.com] Sent: Wednesday, October 12, 2016 2:56 PM To: u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com;
hs@denx.de;
yamada.masahiro@socionext.com; Ruchika Gupta
eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: [PATCH 2/5] configs/ls104xa: enable the config NOR_BOOT
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Enable the config NOR_BOOT obviously for NOR boot defconfigs of ls1043a and ls1046a.
Earlier, no CONFIG for NOR boot was required. Why new variable CONFIG_NOR_BOOT is even required?
Now that the Boot Media configs has been introduced, it's reasonable to uniform all boot methods under this framework. And therefore the other config entry is able to be configured according to different Boot Media.
But we also don't want to make this needlessly complicated. The general intention here is that we have some boot methods that are incompatible with others. For example, if a board lacks NOR and we try and run a binary that expects NOR, we panic today. So for beaglebone (where there is a NOR cape that you can boot from) we need a special build that does know about NOR.
At some level, once we have enough things in DM some of this special casing can go away I hope.

From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com --- arch/arm/cpu/armv8/Kconfig | 36 +++++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/Makefile | 2 +- arch/arm/cpu/armv8/sec_firmware_asm.S | 4 ++-- include/configs/ls1043ardb.h | 4 ---- include/configs/ls1046ardb.h | 4 ---- 5 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index 7e1fc4c..cb5a970 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -21,4 +21,40 @@ config ARMV8_SPIN_TABLE - Reserve the code for the spin-table and the release address via a /memreserve/ region in the Device Tree.
+menu "ARMv8 secure monitor firmware" +config ARMV8_SEC_FIRMWARE_SUPPORT + bool "Enable ARMv8 secure monitor firmware framework support" + select OF_LIBFDT + select FIT + help + This framework is aimed at making secure monitor firmware load + process brief. + Note: Only FIT format image is supported. + You should prepare and provide the below information: + - Address of secure firmware. + - Address to hold the return address from secure firmware. + - Secure firmware FIT image related information. + Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME + - The target exception level that secure monitor firmware will + return to. + +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT + bool "Enable ARMv8 secure monitor firmware framework support for SPL" + select SPL_OF_LIBFDT + select SPL_FIT + help + Say Y here to support this framework in SPL phase. + +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT + bool "ARMv8 secure monitor firmware ERET address byteorder swap" + depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT + help + Say Y here when the endianness of the register or memory holding the + Secure firmware exception return address is different with core's. + +endmenu + +config ARMV8_PSCI + bool "ARMv8 PSCI support" + endif diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index dea1465..9f65927 100644 --- a/arch/arm/cpu/armv8/Makefile +++ b/arch/arm/cpu/armv8/Makefile @@ -19,7 +19,7 @@ obj-y += cpu-dt.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o endif -obj-$(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o +obj-$(CONFIG_$(SPL_)ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o
obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ obj-$(CONFIG_S32V234) += s32v234/ diff --git a/arch/arm/cpu/armv8/sec_firmware_asm.S b/arch/arm/cpu/armv8/sec_firmware_asm.S index 0c6a462..15fbe0b 100644 --- a/arch/arm/cpu/armv8/sec_firmware_asm.S +++ b/arch/arm/cpu/armv8/sec_firmware_asm.S @@ -23,12 +23,12 @@ WEAK(_sec_firmware_entry) /* Set exception return address hold pointer */ adr x4, 1f mov x3, x4 -#ifdef SEC_FIRMWARE_ERET_ADDR_REVERT +#ifdef CONFIG_ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT rev w3, w3 #endif str w3, [x1] lsr x3, x4, #32 -#ifdef SEC_FIRMWARE_ERET_ADDR_REVERT +#ifdef CONFIG_ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT rev w3, w3 #endif str w3, [x2] diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h index 70ee046..4b4d090 100644 --- a/include/configs/ls1043ardb.h +++ b/include/configs/ls1043ardb.h @@ -10,10 +10,6 @@ #include "ls1043a_common.h"
#if defined(CONFIG_FSL_LS_PPA) -#define CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT -#define SEC_FIRMWARE_ERET_ADDR_REVERT -#define CONFIG_ARMV8_PSCI - #define CONFIG_SYS_LS_PPA_FW_IN_XIP #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP #define CONFIG_SYS_LS_PPA_FW_ADDR 0x60500000 diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 693cc8d..85a58b0 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -10,10 +10,6 @@ #include "ls1046a_common.h"
#if defined(CONFIG_FSL_LS_PPA) -#define CONFIG_ARMV8_PSCI -#define CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT -#define CONFIG_SYS_LS_PPA_DRAM_BLOCK_MIN_SIZE (1UL * 1024 * 1024) - #define CONFIG_SYS_LS_PPA_FW_IN_XIP #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP #define CONFIG_SYS_LS_PPA_FW_ADDR 0x40500000

From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com --- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 29 +++++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl-layerscape/Makefile | 2 +- include/configs/ls1043ardb.h | 7 ------- include/configs/ls1046ardb.h | 7 ------- 4 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 94ec8d5..952db19 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -44,6 +44,35 @@ config FSL_LSCH3 menu "Layerscape architecture" depends on FSL_LSCH2 || FSL_LSCH3
+menu "Layerscape PPA" +config FSL_LS_PPA + bool "FSL Layerscape PPA firmware support" + depends on ARCH_LS1043A || ARCH_LS1046A + select ARMV8_PSCI + select ARMV8_SEC_FIRMWARE_SUPPORT + select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT + help + The FSL Primary Protected Application (PPA) is a software component + loaded during boot which runs in TrustZone and remains resident + after boot. +choice + prompt "FSL Layerscape PPA firmware storage select" + depends on FSL_LS_PPA + default SYS_LS_PPA_FW_IN_XIP + +config SYS_LS_PPA_FW_IN_XIP + bool "XIP" + +endchoice + +config SYS_LS_PPA_FW_ADDR + hex "Address of PPA firmware" + depends on FSL_LS_PPA + default 0x60500000 if SYS_LS_PPA_FW_IN_XIP && NOR_BOOT + default 0x40500000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT + +endmenu + config SYS_FSL_MMDC bool
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile b/arch/arm/cpu/armv8/fsl-layerscape/Makefile index 51c1cee..150eb7a 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile +++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile @@ -10,7 +10,7 @@ obj-y += soc.o obj-$(CONFIG_MP) += mp.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-$(CONFIG_SPL) += spl.o -obj-$(CONFIG_FSL_LS_PPA) += ppa.o +obj-$(CONFIG_$(SPL_)FSL_LS_PPA) += ppa.o
ifneq ($(CONFIG_FSL_LSCH3),) obj-y += fsl_lsch3_speed.o diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h index 4b4d090..3023c48 100644 --- a/include/configs/ls1043ardb.h +++ b/include/configs/ls1043ardb.h @@ -9,13 +9,6 @@
#include "ls1043a_common.h"
-#if defined(CONFIG_FSL_LS_PPA) -#define CONFIG_SYS_LS_PPA_FW_IN_XIP -#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP -#define CONFIG_SYS_LS_PPA_FW_ADDR 0x60500000 -#endif -#endif - #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 85a58b0..3ea02f0 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -9,13 +9,6 @@
#include "ls1046a_common.h"
-#if defined(CONFIG_FSL_LS_PPA) -#define CONFIG_SYS_LS_PPA_FW_IN_XIP -#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP -#define CONFIG_SYS_LS_PPA_FW_ADDR 0x40500000 -#endif -#endif - #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO

-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Zhiqiang Hou Sent: Wednesday, October 12, 2016 2:56 PM To: u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: [U-Boot] [PATCH 4/5] kconfig: fsl PPA: move CONFIG_* to Kconfig
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 29 +++++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl- layerscape/Makefile | 2 +- include/configs/ls1043ardb.h | 7 ------- include/configs/ls1046ardb.h | 7 ------- 4 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 94ec8d5..952db19 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -44,6 +44,35 @@ config FSL_LSCH3 menu "Layerscape architecture" depends on FSL_LSCH2 || FSL_LSCH3
+menu "Layerscape PPA" +config FSL_LS_PPA
- bool "FSL Layerscape PPA firmware support"
- depends on ARCH_LS1043A || ARCH_LS1046A
- select ARMV8_PSCI
- select ARMV8_SEC_FIRMWARE_SUPPORT
- select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
' ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT' macro is not required for chassis 3 platforms like LS2088A. So there should be separate CONFIG_.. option for this.
- help
The FSL Primary Protected Application (PPA) is a software
component
loaded during boot which runs in TrustZone and remains resident
after boot.
+choice
- prompt "FSL Layerscape PPA firmware storage select"
- depends on FSL_LS_PPA
- default SYS_LS_PPA_FW_IN_XIP
+config SYS_LS_PPA_FW_IN_XIP
- bool "XIP"
+endchoice
+config SYS_LS_PPA_FW_ADDR
- hex "Address of PPA firmware"
- depends on FSL_LS_PPA
- default 0x60500000 if SYS_LS_PPA_FW_IN_XIP && NOR_BOOT
- default 0x40500000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT
+endmenu
config SYS_FSL_MMDC bool
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile b/arch/arm/cpu/armv8/fsl-layerscape/Makefile index 51c1cee..150eb7a 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile +++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile @@ -10,7 +10,7 @@ obj-y += soc.o obj-$(CONFIG_MP) += mp.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-$(CONFIG_SPL) += spl.o -obj-$(CONFIG_FSL_LS_PPA) += ppa.o +obj-$(CONFIG_$(SPL_)FSL_LS_PPA) += ppa.o
ifneq ($(CONFIG_FSL_LSCH3),) obj-y += fsl_lsch3_speed.o diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h index 4b4d090..3023c48 100644 --- a/include/configs/ls1043ardb.h +++ b/include/configs/ls1043ardb.h @@ -9,13 +9,6 @@
#include "ls1043a_common.h"
-#if defined(CONFIG_FSL_LS_PPA) -#define CONFIG_SYS_LS_PPA_FW_IN_XIP -#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP -#define CONFIG_SYS_LS_PPA_FW_ADDR 0x60500000 -#endif -#endif
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 85a58b0..3ea02f0 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -9,13 +9,6 @@
#include "ls1046a_common.h"
-#if defined(CONFIG_FSL_LS_PPA) -#define CONFIG_SYS_LS_PPA_FW_IN_XIP -#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP -#define CONFIG_SYS_LS_PPA_FW_ADDR 0x40500000 -#endif -#endif
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO
-- 2.1.0.27.g96db324
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On 10/24/2016 12:40 AM, Priyanka Jain wrote:
-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Zhiqiang Hou Sent: Wednesday, October 12, 2016 2:56 PM To: u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: [U-Boot] [PATCH 4/5] kconfig: fsl PPA: move CONFIG_* to Kconfig
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 29 +++++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl- layerscape/Makefile | 2 +- include/configs/ls1043ardb.h | 7 ------- include/configs/ls1046ardb.h | 7 ------- 4 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 94ec8d5..952db19 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -44,6 +44,35 @@ config FSL_LSCH3 menu "Layerscape architecture" depends on FSL_LSCH2 || FSL_LSCH3
+menu "Layerscape PPA" +config FSL_LS_PPA
- bool "FSL Layerscape PPA firmware support"
- depends on ARCH_LS1043A || ARCH_LS1046A
- select ARMV8_PSCI
- select ARMV8_SEC_FIRMWARE_SUPPORT
- select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
' ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT' macro is not required for chassis 3 platforms like LS2088A. So there should be separate CONFIG_.. option for this.
Zhiqiang,
How will you handle lsch3?
York

Hi York,
Thanks for your comments!
-----Original Message----- From: york sun Sent: 2016年11月8日 2:33 To: Priyanka Jain priyanka.jain@nxp.com; Z.Q. Hou zhiqiang.hou@nxp.com; u-boot@lists.denx.de; albert.u.boot@aribaud.net; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Subject: Re: [U-Boot] [PATCH 4/5] kconfig: fsl PPA: move CONFIG_* to Kconfig
On 10/24/2016 12:40 AM, Priyanka Jain wrote:
-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Zhiqiang Hou Sent: Wednesday, October 12, 2016 2:56 PM To: u-boot@lists.denx.de; albert.u.boot@aribaud.net; york sun york.sun@nxp.com; sjg@chromium.org; bmeng.cn@gmail.com;
hs@denx.de;
yamada.masahiro@socionext.com; Ruchika Gupta
eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar
Kushwaha
prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Cc: Z.Q. Hou zhiqiang.hou@nxp.com Subject: [U-Boot] [PATCH 4/5] kconfig: fsl PPA: move CONFIG_* to Kconfig
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 29 +++++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl- layerscape/Makefile | 2 +- include/configs/ls1043ardb.h | 7 ------- include/configs/ls1046ardb.h | 7 ------- 4 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 94ec8d5..952db19 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -44,6 +44,35 @@ config FSL_LSCH3 menu "Layerscape architecture" depends on FSL_LSCH2 || FSL_LSCH3
+menu "Layerscape PPA" +config FSL_LS_PPA
- bool "FSL Layerscape PPA firmware support"
- depends on ARCH_LS1043A || ARCH_LS1046A
- select ARMV8_PSCI
- select ARMV8_SEC_FIRMWARE_SUPPORT
- select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
' ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT' macro is not required for
chassis 3 platforms like LS2088A.
So there should be separate CONFIG_.. option for this.
Zhiqiang,
How will you handle lsch3?
Will change it to 'select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if FSL_LSCH2', since SCFG is big-endian on FSL_LSCH2 but little-endian on FSL_LSCH3.
Thanks, Zhiqiang

On 11/07/2016 06:39 PM, Z.Q. Hou wrote:
Zhiqiang,
How will you handle lsch3?
Will change it to 'select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if FSL_LSCH2', since SCFG is big-endian on FSL_LSCH2 but little-endian on FSL_LSCH3.
Zhiqiang,
Have you sent out an update? If not, please rebase your code before sending it.
York

Hi York,
Thanks for your comments!
-----Original Message----- From: york sun Sent: 2017年1月5日 2:49 To: Z.Q. Hou zhiqiang.hou@nxp.com; Priyanka Jain priyanka.jain@nxp.com; u-boot@lists.denx.de; albert.u.boot@aribaud.net; sjg@chromium.org; bmeng.cn@gmail.com; hs@denx.de; yamada.masahiro@socionext.com; Ruchika Gupta ruchika.gupta@nxp.com; eddy.petrisor@gmail.com; s.temerkhanov@gmail.com; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; sr@denx.de; van.freenix@gmail.com; fgretief@spaceteq.co.za; rpjday@crashcourse.ca; trini@konsulko.com; Mingkai Hu mingkai.hu@nxp.com Subject: Re: [U-Boot] [PATCH 4/5] kconfig: fsl PPA: move CONFIG_* to Kconfig
On 11/07/2016 06:39 PM, Z.Q. Hou wrote:
Zhiqiang,
How will you handle lsch3?
Will change it to 'select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if
FSL_LSCH2', since SCFG is big-endian on FSL_LSCH2 but little-endian on FSL_LSCH3.
Zhiqiang,
Have you sent out an update? If not, please rebase your code before sending it.
No, I haven't. This task has not been arranged to this sprint, will add it to next sprint.
Thanks, Zhiqiang

From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Enable PPA for ls1043ardb NOR boot and ls1046ardb QSPI boot.
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com --- configs/ls1043ardb_defconfig | 1 + configs/ls1046ardb_qspi_defconfig | 1 + 2 files changed, 2 insertions(+)
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig index 3b6de1d..70e0c36 100644 --- a/configs/ls1043ardb_defconfig +++ b/configs/ls1043ardb_defconfig @@ -3,6 +3,7 @@ CONFIG_TARGET_LS1043ARDB=y CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-rdb" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y +CONFIG_FSL_LS_PPA=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_FSL_DDR4=y CONFIG_NOR_BOOT=y diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig index 67ef3ce..56b39c5 100644 --- a/configs/ls1046ardb_qspi_defconfig +++ b/configs/ls1046ardb_qspi_defconfig @@ -4,6 +4,7 @@ CONFIG_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y +CONFIG_FSL_LS_PPA=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4" CONFIG_QSPI_BOOT=y

On Wed, Oct 12, 2016 at 05:26:09PM +0800, Zhiqiang Hou wrote:
From: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Remove this dependency to make the NOR_BOOT available for other SoCs which do not have the config NOR, not only for am335x.
Signed-off-by: Hou Zhiqiang Zhiqiang.Hou@nxp.com
Reviewed-by: Tom Rini trini@konsulko.com
participants (6)
-
Prabhakar Kushwaha
-
Priyanka Jain
-
Tom Rini
-
york sun
-
Z.Q. Hou
-
Zhiqiang Hou