[PATCH 1/1] sandbox: make sandbox system reset configurable

Michal Suchánek msuchanek at suse.de
Sat Oct 15 14:04:22 CEST 2022


Hello,

On Sat, Oct 15, 2022 at 10:39:19AM +0200, Heinrich Schuchardt wrote:
> To test the watchdog system reset we need to disable the default sandbox
> system reset.
> 
> The following settings provide the reset command via watchdog on the
> sandbox:
> 
>     CONFIG_WDT_GPIO=n
>     CONFIG_WDT_SANDBOX=y
>     CONFIG_SYSRESET_SANDBOX=n
>     CONFIG_SYSRESET_WATCHDOG=y
>     CONFIG_SYSRESET_WATCHDOG_AUTO=y

Woudn't it be better to make this runtime configurable?

Thanks

Michal
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  drivers/sysreset/Kconfig  | 7 +++++++
>  drivers/sysreset/Makefile | 2 +-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
> index 03f7fdd597..3bd38fc585 100644
> --- a/drivers/sysreset/Kconfig
> +++ b/drivers/sysreset/Kconfig
> @@ -110,6 +110,13 @@ config SYSRESET_PSCI
>  	  Enable PSCI SYSTEM_RESET function call.  To use this, PSCI firmware
>  	  must be running on your system.
>  
> +config SYSRESET_SANDBOX
> +	bool "Enable support for Sandbox System Reset"
> +	depends on SANDBOX
> +	default y
> +	help
> +	  Enable sandbox system reset implementation.
> +
>  config SYSRESET_SBI
>  	bool "Enable support for SBI System Reset"
>  	depends on RISCV_SMODE && SBI_V02
> diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
> index 0ed3bbf356..d4b6e575be 100644
> --- a/drivers/sysreset/Makefile
> +++ b/drivers/sysreset/Makefile
> @@ -6,7 +6,7 @@ obj-$(CONFIG_$(SPL_TPL_)SYSRESET) += sysreset-uclass.o
>  obj-$(CONFIG_ARCH_ASPEED) += sysreset_ast.o
>  obj-$(CONFIG_ARCH_ROCKCHIP) += sysreset_rockchip.o
>  obj-$(CONFIG_ARCH_STI) += sysreset_sti.o
> -obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o
> +obj-$(CONFIG_SYSRESET_SANDBOX) += sysreset_sandbox.o
>  obj-$(CONFIG_POWEROFF_GPIO) += poweroff_gpio.o
>  obj-$(CONFIG_SYSRESET_GPIO) += sysreset_gpio.o
>  obj-$(CONFIG_SYSRESET_MPC83XX) += sysreset_mpc83xx.o
> -- 
> 2.37.2
> 


More information about the U-Boot mailing list