public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: sin.hui.kho@intel.com
To: u-boot@lists.denx.de
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>,
	Marek Vasut <marex@denx.de>,
	Tien Fong Chee <tien.fong.chee@intel.com>,
	Kok Kiang Hea <kok.kiang.hea@intel.com>,
	Westergteen Dalon <dalon.westergreen@intel.com>,
	Cozart Sue <sue.cozart@intel.com>,
	Sin Hui Kho <sin.hui.kho@intel.com>
Subject: [PATCH 1/3] arm: socfpga: arria10: Setting image magic value to romcode initswstate reg
Date: Sun,  7 Nov 2021 23:08:54 +0800	[thread overview]
Message-ID: <20211107150856.19256-1-sin.hui.kho@intel.com> (raw)

From: Tien Fong Chee <tien.fong.chee@intel.com>

The romcode_initswstate register need to be set with FSBL_IMAGE_IS_VALID
value if the current FSBL image is found valid, otherwise BootROM will
look for next subsequent valid FSBL image when warm reset is triggered.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Sin Hui Kho <sin.hui.kho@intel.com>
---
 .../mach-socfpga/include/mach/system_manager_arria10.h |  3 ++-
 arch/arm/mach-socfpga/spl_a10.c                        | 10 +++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-socfpga/include/mach/system_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/system_manager_arria10.h
index e4fc6d2e55..75e1fcd80f 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager_arria10.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Copyright (C) 2016-2017 Intel Corporation <www.intel.com>
+ * Copyright (C) 2016-2021 Intel Corporation <www.intel.com>
  */
 
 #ifndef _SYSTEM_MANAGER_ARRIA10_H_
@@ -31,6 +31,7 @@
 #define SYSMGR_A10_NOC_IDLEACK			0xd0
 #define SYSMGR_A10_NOC_IDLESTATUS		0xd4
 #define SYSMGR_A10_FPGA2SOC_CTRL		0xd8
+#define SYSMGR_A10_ROMCODE_INITSWSTATE	0x20C
 
 #define SYSMGR_SDMMC				SYSMGR_A10_SDMMC
 
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index ecb656e4de..f6c4b5708d 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- *  Copyright (C) 2012-2019 Altera Corporation <www.altera.com>
+ *  Copyright (C) 2012-2021 Altera Corporation <www.altera.com>
  */
 
 #include <common.h>
@@ -32,6 +32,7 @@
 #include <memalign.h>
 
 #define FPGA_BUFSIZ	16 * 1024
+#define FSBL_IMAGE_IS_VALID	0x49535756
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -169,3 +170,10 @@ void board_init_f(ulong dummy)
 	config_dedicated_pins(gd->fdt_blob);
 	WATCHDOG_RESET();
 }
+
+/* board specific function prior loading SSBL / U-Boot proper */
+void spl_board_prepare_for_boot(void)
+{
+	writel(FSBL_IMAGE_IS_VALID, socfpga_get_sysmgr_addr() +
+	       SYSMGR_A10_ROMCODE_INITSWSTATE);
+}
-- 
2.25.1


             reply	other threads:[~2021-11-07 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 15:08 sin.hui.kho [this message]
2021-11-07 15:08 ` [PATCH 2/3] arm: socfpga: arria10: Reset MPFE NoC after program periph / combined RBF sin.hui.kho
2021-11-25  2:12   ` Chee, Tien Fong
2021-11-07 15:08 ` [PATCH 3/3] arm: socfpga: arria10: Enable double peripheral RBF configuration sin.hui.kho
2021-11-25  2:13   ` Chee, Tien Fong
2021-11-25  2:09 ` [PATCH 1/3] arm: socfpga: arria10: Setting image magic value to romcode initswstate reg Chee, Tien Fong

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=20211107150856.19256-1-sin.hui.kho@intel.com \
    --to=sin.hui.kho@intel.com \
    --cc=dalon.westergreen@intel.com \
    --cc=kok.kiang.hea@intel.com \
    --cc=marex@denx.de \
    --cc=simon.k.r.goldschmidt@gmail.com \
    --cc=sue.cozart@intel.com \
    --cc=tien.fong.chee@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox