[PATCH 3/4 v5] watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup

Christophe Leroy christophe.leroy at c-s.fr
Wed Feb 19 20:15:28 CET 2020


Hi Stefan,

On 04/25/2019 07:17 AM, Stefan Roese wrote:
> With the generic watchdog driver now implemented, this patch removes
> some legacy stuff from the MPC8xx watchdog driver and its Kconfig
> integration. CONFIG_MPC8xx_WATCHDOG is completely removed and
> hw_watchdog_reset() is made static, as the watchdog will now get
> serviced via the DM infrastructure if enabled via CONFIG_WATCHDOG.
> 
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Christophe Leroy <christophe.leroy at c-s.fr>
> ---
> v5:
> - No change
> 
> v4:
> - New patch
> 
> arch/powerpc/Kconfig            | 2 +-
>   arch/powerpc/cpu/mpc8xx/Kconfig | 6 +++---
>   drivers/watchdog/Kconfig        | 1 -
>   drivers/watchdog/Makefile       | 2 +-
>   drivers/watchdog/mpc8xx_wdt.c   | 4 +---
>   5 files changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index c727d9162c..0b1629ba62 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -35,7 +35,7 @@ config MPC8xx
>   	bool "MPC8xx"
>   	select BOARD_EARLY_INIT_F
>   	imply CMD_REGINFO
> -	imply MPC8xx_WATCHDOG
> +	imply WDT_MPC8xx
>   
>   endchoice
>   
> diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
> index b0e90a0f20..3e8ea38529 100644
> --- a/arch/powerpc/cpu/mpc8xx/Kconfig
> +++ b/arch/powerpc/cpu/mpc8xx/Kconfig
> @@ -25,9 +25,9 @@ config MPC885
>   
>   endchoice
>   
> -config MPC8xx_WATCHDOG
> -	bool "Watchdog"
> -	select HW_WATCHDOG
> +#config MPC8xx_WATCHDOG
> +#	bool "Watchdog"
> +#	select HW_WATCHDOG

If HW_WATCHDOG is not selected, we have a problem in cpu_init_f() 
(arch/powerpc/cpu/mpc8xx/cpu_init.c) with the following line, and the 
board with restart every second.

#ifndef CONFIG_HW_WATCHDOG
	/* deactivate watchdog if not enabled in config */
	out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR & ~SYPCR_SWE);
#endif

Should this be changed to use CONFIG_WATCHDOG instead ?


>   
>   config 8xx_GCLK_FREQ
>   	int "CPU GCLK Frequency"
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index aa8e725573..3bce0aa0b8 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -151,7 +151,6 @@ config WDT_MT7621
>   config WDT_MPC8xx
>   	bool "MPC8xx watchdog timer support"
>   	depends on WDT && MPC8xx
> -	select CONFIG_MPC8xx_WATCHDOG

This is brought back by a later patch from Patrice. Unwanted I guess ?

Christophe


More information about the U-Boot mailing list