imx: ahab: allow to bypass confirmation for ahab_close cmd
Subsystems (3)
PATCH 1/1 imx: ahab: allow to bypass confirmation for ahab_close cmd
Calling ahab_close cmd for the user to interact for confirmation.
This is not friendly usable 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 <[email protected]>
--- arch/arm/mach-imx/imx8/ahab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-imx/imx8/ahab.c +2 -1
@@ -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 );
Signature · 1 line
2.25.1