From: Wolfgang Denk Date: Tue, 03 Jul 2018 13:14:10 +0200 Subject: [U-Boot] [PATCH 4/4] x86: Switch to use DM sysreset driver In-Reply-To: <18255ae55e4faa5733fb8e93dc8ebbc1559a3694.camel@linux.intel.com> References: <1530611322-20965-1-git-send-email-bmeng.cn@gmail.com> <1530611322-20965-4-git-send-email-bmeng.cn@gmail.com> <18255ae55e4faa5733fb8e93dc8ebbc1559a3694.camel@linux.intel.com> Message-ID: <20180703111410.6CBBB240042@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Andy, In message <18255ae55e4faa5733fb8e93dc8ebbc1559a3694.camel@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''