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

Andy Shevchenko andriy.shevchenko at linux.intel.com
Tue Jul 3 10:42:49 UTC 2018


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 <dt-bindings/interrupt-router/intel-irq.h>
>  
>  /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 <andriy.shevchenko at linux.intel.com>
Intel Finland Oy


More information about the U-Boot mailing list