[U-Boot] [PATCH 4/4] x86: Switch to use DM sysreset driver

Wolfgang Denk wd at denx.de
Tue Jul 3 11:14:10 UTC 2018


Dear Andy,

In message <18255ae55e4faa5733fb8e93dc8ebbc1559a3694.camel at linux.intel.com> you wrote:
...
> > This converts all x86 boards over to DM sysreset.
> 
> > -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const
> > argv[])
> > -{
> > -	printf("resetting ...\n");
> > -
> > -	/* wait 50 ms */
> > -	udelay(50000);

I am willing to bet that the delay here is a dirty surrogate for
flushing/closing the standard output channel, i. e. we wait until
the characters have actually been set over the serial console.

Don't we have a way to close() the device in DM (remove ?) ?


> First of all, in some cases would be good to have at least a debug
> message that we got into do_reset().

This should not only be a debug message, but a standard message;
actually even something that goes to STDERR.

> Second, I didn't test if udelay() + disable_interrupts() make any
> difference. So, I would leave them for now.

See above... I think the delay should be replaced by the proper way
to close the device in DM (remove?).


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
But the only way of discovering the limits  of  the  possible  is  to
venture a little way past them into the impossible.
                         - _Profiles of the Future_ (1962; rev. 1973)
                  ``Hazards of Prophecy: The Failure of Imagination''


More information about the U-Boot mailing list