All of lore.kernel.org
 help / color / mirror / Atom feed
From: Siew Chin Lim <elly.siew.chin.lim@intel.com>
To: u-boot@lists.denx.de
Subject: [v2 01/17] arm: socfpga: Move linux_qspi_enable from bootcommand to board_prep_linux function
Date: Fri, 30 Apr 2021 15:37:58 +0800	[thread overview]
Message-ID: <20210430073814.193576-2-elly.siew.chin.lim@intel.com> (raw)
In-Reply-To: <20210430073814.193576-1-elly.siew.chin.lim@intel.com>

Move 'linux_qspi_enable' from bootcommand to board_prep_linux function when
OS booted from FIT image for Stratix 10 and Agilex. This flow is common for
all Intel SOC64 devices.

U-Boot will update 'fdt_addr' environment value based on FIT image in
board_prep_linux function, and 'linux_qspi_enable' will refer to 'fdt_addr'
environment value to retrieve the device tree node.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>

---
v2:
- New patch in n5x series, the change is needed to execute
  'linux_qspi_enable' correctly in ATF boot flow
---
 arch/arm/mach-socfpga/board.c           | 17 +++++++++--------
 configs/socfpga_agilex_atf_defconfig    |  2 +-
 configs/socfpga_stratix10_atf_defconfig |  2 +-
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 650122fcd4..f5a3f2ad62 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -115,17 +115,18 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
 #if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_FIT)
 void board_prep_linux(bootm_headers_t *images)
 {
-	if (IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH) &&
-	    !IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) {
-		/*
-		 * Ensure the OS is always booted from FIT and with
-		 * VAB signed certificate
-		 */
-		if (!images->fit_uname_cfg) {
+	if (!images->fit_uname_cfg) {
+		if (IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH) &&
+		    !IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) {
+			/*
+			 * Ensure the OS is always booted from FIT and with
+			 * VAB signed certificate
+			 */
 			printf("Please use FIT with VAB signed images!\n");
 			hang();
 		}
-
+	} else {
+		/* Update fdt_addr in enviroment variable */
 		env_set_hex("fdt_addr", (ulong)images->ft_addr);
 		debug("images->ft_addr = 0x%08lx\n", (ulong)images->ft_addr);
 	}
diff --git a/configs/socfpga_agilex_atf_defconfig b/configs/socfpga_agilex_atf_defconfig
index 0de65a22a0..e0a8714e3d 100644
--- a/configs/socfpga_agilex_atf_defconfig
+++ b/configs/socfpga_agilex_atf_defconfig
@@ -22,7 +22,7 @@ CONFIG_BOOTDELAY=5
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="earlycon"
 CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run linux_qspi_enable; run mmcfitboot"
+CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run mmcfitboot"
 CONFIG_SPL_CRC32_SUPPORT=y
 CONFIG_SPL_CACHE=y
 CONFIG_SPL_SPI_LOAD=y
diff --git a/configs/socfpga_stratix10_atf_defconfig b/configs/socfpga_stratix10_atf_defconfig
index c187987dd8..d0bc5e7909 100644
--- a/configs/socfpga_stratix10_atf_defconfig
+++ b/configs/socfpga_stratix10_atf_defconfig
@@ -22,7 +22,7 @@ CONFIG_BOOTDELAY=5
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="earlycon"
 CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run linux_qspi_enable; run mmcfitboot"
+CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run mmcfitboot"
 CONFIG_SPL_CRC32_SUPPORT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SPL_ATF=y
-- 
2.19.0

  reply	other threads:[~2021-04-30  7:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30  7:37 [v2 00/17] Add Intel N5X SoC support Siew Chin Lim
2021-04-30  7:37 ` Siew Chin Lim [this message]
2021-05-14  8:53   ` [v2 01/17] arm: socfpga: Move linux_qspi_enable from bootcommand to board_prep_linux function Ley Foon Tan
2021-04-30  7:37 ` [v2 02/17] arm: socfpga: Changed base_addr_s10.h to base_addr_soc64.h Siew Chin Lim
2021-04-30  7:38 ` [v2 03/17] arm: socfpga: Add base address for Intel N5X device Siew Chin Lim
2021-04-30  7:38 ` [v2 04/17] arm: socfpga: Add handoff data support " Siew Chin Lim
2021-05-14  9:12   ` Ley Foon Tan
2021-05-31 11:39     ` Chee, Tien Fong
2021-06-22 13:31       ` Simon Glass
2021-06-25  8:24         ` Chee, Tien Fong
2021-04-30  7:38 ` [v2 05/17] drivers: clk: Add clock driver " Siew Chin Lim
2021-05-14  9:22   ` Ley Foon Tan
2021-04-30  7:38 ` [v2 06/17] arm: socfpga: Get clock manager base address " Siew Chin Lim
2021-04-30  7:38 ` [v2 07/17] drivers: clk: Add memory clock driver " Siew Chin Lim
2021-05-14  9:26   ` Ley Foon Tan
2021-04-30  7:38 ` [v2 08/17] arm: socfpga: Move cm_get_mpu_clk_hz function declaration to clock_manager.h Siew Chin Lim
2021-04-30  7:38 ` [v2 09/17] arm: socfpga: Add clock manager for Intel N5X device Siew Chin Lim
2021-04-30  7:38 ` [v2 10/17] arm: socfpga: Changed misc_s10.c to misc_soc64.c Siew Chin Lim
2021-04-30  7:38 ` [v2 11/17] ddr: socfpga: Enable memory test on memory size less than 1GB Siew Chin Lim
2021-05-14  9:32   ` Ley Foon Tan
2021-04-30  7:38 ` [v2 12/17] ddr: altera: Add SDRAM driver for Intel N5X device Siew Chin Lim
2021-05-28  9:41   ` Ley Foon Tan
2021-06-04  4:03     ` Chee, Tien Fong
2021-06-10  6:54       ` Chee, Tien Fong
2021-04-30  7:38 ` [v2 13/17] arm: socfpga: Add SPL " Siew Chin Lim
2021-05-28  8:22   ` Ley Foon Tan
2021-04-30  7:38 ` [v2 14/17] board: intel: Add socdk board support " Siew Chin Lim
2021-04-30  7:38 ` [v2 15/17] arm: dts: Add base dtsi and devkit dts " Siew Chin Lim
2021-05-28  8:34   ` Ley Foon Tan
2021-05-28  8:37     ` Ley Foon Tan
2021-05-28  9:55       ` Lim, Elly Siew Chin
2021-05-28  9:54     ` Lim, Elly Siew Chin
2021-04-30  7:38 ` [v2 16/17] include: configs: Add Intel N5X device CONFIGs Siew Chin Lim
2021-04-30  7:38 ` [v2 17/17] arm: socfpga: Enable Intel N5X device build Siew Chin Lim
2021-05-28  8:39   ` Ley Foon Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210430073814.193576-2-elly.siew.chin.lim@intel.com \
    --to=elly.siew.chin.lim@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.