
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; }