From: Andy Shevchenko Date: Tue, 03 Jul 2018 13:42:49 +0300 Subject: [U-Boot] [PATCH 4/4] x86: Switch to use DM sysreset driver In-Reply-To: <1530611322-20965-4-git-send-email-bmeng.cn@gmail.com> References: <1530611322-20965-1-git-send-email-bmeng.cn@gmail.com> <1530611322-20965-4-git-send-email-bmeng.cn@gmail.com> Message-ID: <18255ae55e4faa5733fb8e93dc8ebbc1559a3694.camel@linux.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 2018-07-03 at 02:48 -0700, Bin Meng 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); > - disable_interrupts(); > - reset_cpu(0); > -} > --- a/arch/x86/cpu/tangier/tangier.c > +++ b/arch/x86/cpu/tangier/tangier.c > @@ -25,7 +25,15 @@ int print_cpuinfo(void) > return default_print_cpuinfo(); > } > > +/* TODO: convert to DM sysreset */ > void reset_cpu(ulong addr) > { > scu_ipc_simple_command(IPCMSG_COLD_RESET, 0); > } > + > +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const > argv[]) > +{ > + reset_cpu(0); > + > + return 0; This is not equivalent to the above. First of all, in some cases would be good to have at least a debug message that we got into do_reset(). Second, I didn't test if udelay() + disable_interrupts() make any difference. So, I would leave them for now. > +} > diff --git a/arch/x86/dts/edison.dts b/arch/x86/dts/edison.dts > index 9033532..a1d3c90 100644 > --- a/arch/x86/dts/edison.dts > +++ b/arch/x86/dts/edison.dts > @@ -9,6 +9,7 @@ > #include > > /include/ "skeleton.dtsi" > +/include/ "reset.dtsi" If i read this right we are not using generic reset sequence. Why do we include this here? > /include/ "rtc.dtsi" > /include/ "tsc_timer.dtsi" > --- a/configs/edison_defconfig > +++ b/configs/edison_defconfig > +# CONFIG_SYSRESET is not set -- Andy Shevchenko Intel Finland Oy