diff mbox series

[4/6] dm: sysreset: wait after reset message

Message ID 20200729154235.90766-5-xypron.glpk@gmx.de
State Accepted, archived
Commit e20a6e44796a9389464b766b18942e6121f60bf0
Delegated to: Heinrich Schuchardt
Headers show
Series efi_selftest: allow UEFI testing on MAIX | expand

Commit Message

Heinrich Schuchardt July 29, 2020, 3:42 p.m. UTC
In our Python tests we expect to see the word "resetting". It may be
truncated if we reset before the serial console buffer is transferred.

Wait for 100 ms between the "resetting ..." message and the actual reset
like we do when powering off.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/sysreset/sysreset-uclass.c | 1 +
 1 file changed, 1 insertion(+)

--
2.27.0

Comments

Simon Glass Aug. 4, 2020, 2 a.m. UTC | #1
Hi Heinrich,

On Wed, 29 Jul 2020 at 09:43, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> In our Python tests we expect to see the word "resetting". It may be
> truncated if we reset before the serial console buffer is transferred.
>
> Wait for 100 ms between the "resetting ..." message and the actual reset
> like we do when powering off.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/sysreset/sysreset-uclass.c | 1 +
>  1 file changed, 1 insertion(+)

Please add a comment as to the reason for the delay. and how you chose
the value.

Reviewed-by: Simon Glass <sjg@chromium.org>


>
> diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
> index 995240f0cb..3f5414ed1f 100644
> --- a/drivers/sysreset/sysreset-uclass.c
> +++ b/drivers/sysreset/sysreset-uclass.c
> @@ -117,6 +117,7 @@ void reset_cpu(ulong addr)
>  int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
>  {
>         printf("resetting ...\n");
> +       mdelay(100);
>
>         sysreset_walk_halt(SYSRESET_COLD);
>
> --
> 2.27.0
>
diff mbox series

Patch

diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 995240f0cb..3f5414ed1f 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -117,6 +117,7 @@  void reset_cpu(ulong addr)
 int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	printf("resetting ...\n");
+	mdelay(100);

 	sysreset_walk_halt(SYSRESET_COLD);