[PATCH 02/20] sysreset: Use a shorter error with SPL

Simon Glass sjg at chromium.org
Thu Dec 17 21:57:16 CET 2020


Use a minimal error message to save space. Sort the header files while we
are here.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/sysreset/sysreset-uclass.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 3f5414ed1f8..e69fb2255b6 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -9,12 +9,13 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
-#include <hang.h>
-#include <log.h>
-#include <sysreset.h>
 #include <dm.h>
 #include <errno.h>
+#include <hang.h>
+#include <log.h>
 #include <regmap.h>
+#include <spl.h>
+#include <sysreset.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/root.h>
@@ -101,7 +102,10 @@ void sysreset_walk_halt(enum sysreset_t type)
 		mdelay(100);
 
 	/* Still no reset? Give up */
-	log_err("System reset not supported on this platform\n");
+	if (spl_phase() <= PHASE_SPL)
+		log_err("no sysreset\n");
+	else
+		log_err("System reset not supported on this platform\n");
 	hang();
 }
 
-- 
2.29.2.684.gfbc64c5ab5-goog



More information about the U-Boot mailing list