diff options
author | Clément Péron <peron.clem@gmail.com> | 2020-12-21 18:31:28 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-12-26 14:56:09 +0100 |
commit | 7d6a36a48d8226d363f8a4fab618e04b2a65e2cb (patch) | |
tree | a197aaf84567ab31e6848f37625537ecc319533d | |
parent | 717bf50f4b362c1f4fac5ac9f030fab5bed9cf65 (diff) | |
download | u-boot-7d6a36a48d8226d363f8a4fab618e04b2a65e2cb.tar.gz |
imx: ahab: allow to bypass confirmation for ahab_close cmd
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 <peron.clem@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Oliver Graute <oliver.graute@kococonnector.com>
-rw-r--r-- | arch/arm/mach-imx/imx8/ahab.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c index 4bb7c46921..600a1108ce 100644 --- a/arch/arm/mach-imx/imx8/ahab.c +++ b/arch/arm/mach-imx/imx8/ahab.c @@ -303,10 +303,11 @@ static int confirm_close(void) static int do_ahab_close(struct cmd_tbl *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); |