From patchwork Thu Jun 8 18:34:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francis Laniel X-Patchwork-Id: 1792486 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=MEA7LOS9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QcY4G33Hqz20Wn for ; Fri, 9 Jun 2023 04:42:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB1F3857D5; Thu, 8 Jun 2023 20:42:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="MEA7LOS9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E27E857D5; Thu, 8 Jun 2023 20:42:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FED986165 for ; Thu, 8 Jun 2023 20:35:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=francis.laniel@amarulasolutions.com Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f78a32266bso8819425e9.3 for ; Thu, 08 Jun 2023 11:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686249326; x=1688841326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FOl5N8lL7qm3Ps5Pqg3lmnZRqFPaGZfmqHrev3zbPco=; b=MEA7LOS9LFcptVVzGAzcW067hEYJoel46SQectSLqRINU33GXjgClX8EmZhciJqqYs DGrOhD26oxJw88mTzRPiJO9brlBaynGlz4AII62pXWN9MY8+1+1aQyQB7SVqVTnBt8hi AtDa7wrAQvTgisQvFTS/JG3gMWRMqI/sF0mlM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686249326; x=1688841326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FOl5N8lL7qm3Ps5Pqg3lmnZRqFPaGZfmqHrev3zbPco=; b=OhCF2M6IyaV2FXBInyeyZC6PFbsGwzbQxaTaBN1R99eSjy5YnLbwW7IJ/mJQrVDkTH U3IC5Xt3RvXDhriYRCHLY8OoajAkv094nb8kjiWrnyjJ9pswS9EKU8hme7NPOO0LcKWO pY13sNY/QqsYfMsO3EAltyAJxEGwVdHvR9hgZuw2uHr2VqyzV67/aV/2NqnTbrEQr2LP PTfYFOEap8ajWECs18EoSPCdGISke5E8Ut5gxxfxtNpP7f0cPrKTwUCtdTG4U5Dnq0Dc b9CpSwJJA7S3R6D1+wssDadRIgzNQYuEsv/ObCpK+tfL2nU0PqyVGAyBBL86+iUzbKzQ LZog== X-Gm-Message-State: AC+VfDznvSlzMa1xV9DyJzglXRsvkp7pO3N+ZbZpETOyXCFhWaVgjcSG Wkuk8tbCemkqexGOJJCsI663CeKNV/8UcJ+KptfnMg== X-Google-Smtp-Source: ACHHUZ7Wm/xlAU27SmDiyNEb3aK/6o97c/AMAhOcbIhJG2c54/WlvGg4SBEohMg8sSar3VCcjUMO5g== X-Received: by 2002:a7b:ce06:0:b0:3f7:b1df:26d with SMTP id m6-20020a7bce06000000b003f7b1df026dmr2359297wmc.38.1686249326741; Thu, 08 Jun 2023 11:35:26 -0700 (PDT) Received: from pwmachine.home (120.124.191.92.dynamic.jazztel.es. [92.191.124.120]) by smtp.gmail.com with ESMTPSA id t10-20020a1c770a000000b003f8009be6c0sm408783wmi.3.2023.06.08.11.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 11:35:26 -0700 (PDT) From: Francis Laniel To: u-boot@lists.denx.de Cc: Michael Nazzareno Trimarchi , Tom Rini , Simon Glass , Harald Seiler , Francis Laniel , Evgeny Bachinin , Hector Palacios , Marek Vasut , Stefan Roese , Rasmus Villemoes , Nikhil M Jain , Heinrich Schuchardt Subject: [RFC PATCH v9 10/23] global_data.h: add GD_FLG_HUSH_OLD_PARSER flag Date: Thu, 8 Jun 2023 19:34:25 +0100 Message-Id: <20230608183438.16748-11-francis.laniel@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230608183438.16748-1-francis.laniel@amarulasolutions.com> References: <20230608183438.16748-1-francis.laniel@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This flag is used to indicate we are using the hush parser. Reviewed-by: Simon Glass Signed-off-by: Francis Laniel --- 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 a1e1b9d640..120f1189ee 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -654,6 +654,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__ */