All of lore.kernel.org
 help / color / mirror / Atom feed
From: richard.gong at linux.intel.com <richard.gong@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RESEND PATCHv1 3/5] arm: socfpga: stratix10: add environment variables for RSU support
Date: Thu, 24 Oct 2019 09:48:28 -0500	[thread overview]
Message-ID: <1571928510-3184-4-git-send-email-richard.gong@linux.intel.com> (raw)
In-Reply-To: <1571928510-3184-1-git-send-email-richard.gong@linux.intel.com>

From: Richard Gong <richard.gong@intel.com>

Add two RSU environment variables:
1. rsu_log_level
	the variable is unsigned integer and its default value is
	RSU_DEBUG (7), which only show log with RSU_INFO,RSU_WARNING and
	RSU_ERR.

	To enable all logs (RSU_ERR, RSU_WARNING, RSU_INFO and RSU_DEBUG),
	you need set log level to 8 or above via “setenv rsu_log_level 8”.

	To disable all logs, you need set log level to 3 or below.

2. rsu_protected_slot
	by default there is no protected RSU slot, you need run
	"setenv rsu_protected_slot <slot_num>” to set a slot protected,
	and “setenv rsu_protected_slot <a space>” to unset a protected
	slot.

Signed-off-by: Richard Gong <richard.gong@intel.com>
---
 arch/arm/mach-socfpga/misc_s10.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index 0a5fab1..c9a6f00 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -21,6 +21,8 @@
 
 #include <dt-bindings/reset/altr,rst-mgr-s10.h>
 
+#define RSU_DEFAULT_LOG_LEVEL  7
+
 DECLARE_GLOBAL_DATA_PTR;
 
 static struct socfpga_system_manager *sysmgr_regs =
@@ -136,10 +138,17 @@ int print_cpuinfo(void)
 int arch_misc_init(void)
 {
 	char qspi_string[13];
+	char level[4];
+
+	snprintf(level, sizeof(level), "%u", RSU_DEFAULT_LOG_LEVEL);
 
 	sprintf(qspi_string, "<0x%08x>", cm_get_qspi_controller_clk_hz());
 	env_set("qspi_clock", qspi_string);
 
+	/* setup for RSU */
+	env_set("rsu_protected_slot", "");
+	env_set("rsu_log_level", level);
+
 	socfpga_set_phymode();
 	return 0;
 }
-- 
2.7.4

  parent reply	other threads:[~2019-10-24 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 14:48 [U-Boot] [RESEND PATCHv1 0/5] support remote system update on Intel Stratix10 SoC richard.gong at linux.intel.com
2019-10-24 14:48 ` [U-Boot] [RESEND PATCHv1 1/5] arm: socfpga: stratix10: add RSU mailbox support richard.gong at linux.intel.com
2019-10-24 14:48 ` [U-Boot] [RESEND PATCHv1 2/5] arm: socfpga: stratix10: add RSU support for Stratix10 SoC richard.gong at linux.intel.com
2019-10-24 14:48 ` richard.gong at linux.intel.com [this message]
2019-10-24 14:48 ` [U-Boot] [RESEND PATCHv1 4/5] arm: socfpga: stratix10: add console commands for RSU support richard.gong at linux.intel.com
2019-10-24 14:48 ` [U-Boot] [RESEND PATCHv1 5/5] arm: socfpga: enable RSU build richard.gong at linux.intel.com
2019-10-24 15:00 ` [U-Boot] [RESEND PATCHv1 0/5] support remote system update on Intel Stratix10 SoC Simon Goldschmidt
2019-10-28 14:12   ` Richard Gong
2019-10-28 14:05     ` Simon Goldschmidt
2019-10-28 16:00       ` Richard Gong

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=1571928510-3184-4-git-send-email-richard.gong@linux.intel.com \
    --to=richard.gong@linux.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.