This flag is used to indicate we are using the hush parser.

Reviewed-by: Simon Glass <s...@chromium.org>
Signed-off-by: Francis Laniel <francis.lan...@amarulasolutions.com>
---
 common/cli.c                      | 2 ++
 include/asm-generic/global_data.h | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/common/cli.c b/common/cli.c
index 3916a7b10a..e5fe1060d0 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -268,6 +268,8 @@ void cli_loop(void)
 void cli_init(void)
 {
 #ifdef CONFIG_HUSH_PARSER
+       if (!(gd->flags & GD_FLG_HUSH_OLD_PARSER))
+               gd->flags |= GD_FLG_HUSH_OLD_PARSER;
        u_boot_hush_start();
 #endif
 
diff --git a/include/asm-generic/global_data.h 
b/include/asm-generic/global_data.h
index 8fc205ded1..f21926aa23 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -667,6 +667,10 @@ enum gd_flags {
         * @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags
         */
        GD_FLG_OF_TAG_MIGRATE = 0x200000,
+       /**
+        * @GD_FLG_HUSH_OLD_PARSER: Use hush old parser.
+        */
+       GD_FLG_HUSH_OLD_PARSER = 0x400000,
 };
 
 #endif /* __ASSEMBLY__ */
-- 
2.34.1

Reply via email to