* [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd
@ 2020-12-21 17:31 Clément Péron
2020-12-22 1:55 ` Peng Fan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Clément Péron @ 2020-12-21 17:31 UTC (permalink / raw)
To: u-boot
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd
2020-12-21 17:31 [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd Clément Péron
@ 2020-12-22 1:55 ` Peng Fan
2020-12-23 13:18 ` Oliver Graute
2020-12-26 15:53 ` sbabic at denx.de
2 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2020-12-22 1:55 UTC (permalink / raw)
To: u-boot
> Subject: [PATCH v2] 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>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd
2020-12-21 17:31 [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd Clément Péron
2020-12-22 1:55 ` Peng Fan
@ 2020-12-23 13:18 ` Oliver Graute
2020-12-26 15:53 ` sbabic at denx.de
2 siblings, 0 replies; 4+ messages in thread
From: Oliver Graute @ 2020-12-23 13:18 UTC (permalink / raw)
To: u-boot
On 21/12/20, Cl?ment P?ron wrote:
> 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>
Acked-by: Oliver Graute <oliver.graute@kococonnector.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd
2020-12-21 17:31 [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd Clément Péron
2020-12-22 1:55 ` Peng Fan
2020-12-23 13:18 ` Oliver Graute
@ 2020-12-26 15:53 ` sbabic at denx.de
2 siblings, 0 replies; 4+ messages in thread
From: sbabic at denx.de @ 2020-12-26 15:53 UTC (permalink / raw)
To: u-boot
> 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>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-26 15:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 17:31 [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd Clément Péron
2020-12-22 1:55 ` Peng Fan
2020-12-23 13:18 ` Oliver Graute
2020-12-26 15:53 ` sbabic at denx.de
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.