From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Mon, 21 Dec 2020 18:31:28 +0100 Subject: [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd Message-ID: <20201221173128.354567-1-peron.clem@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Calling ahab_close cmd force the user to interact for confirmation. This is not user-friendly when using this cmd during factory process. Allow the user to pass '-y' option to bypass this confirmation. Signed-off-by: Cl?ment P?ron --- v2: - Fix commit log --- arch/arm/mach-imx/imx8/ahab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c index cf3c7d762a74..b0865c2330a2 100644 --- a/arch/arm/mach-imx/imx8/ahab.c +++ b/arch/arm/mach-imx/imx8/ahab.c @@ -301,10 +301,11 @@ static int confirm_close(void) static int do_ahab_close(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { + int confirmed = argc >= 2 && !strcmp(argv[1], "-y"); int err; u16 lc; - if (!confirm_close()) + if (!confirmed && !confirm_close()) return -EACCES; err = sc_seco_chip_info(-1, &lc, NULL, NULL, NULL); -- 2.25.1