[U-Boot] [PATCH 4/9] powerpc: mpc85xx watchdog init added to init_func
Scott Wood
scottwood at freescale.com
Thu Aug 14 01:52:22 CEST 2014
On Tue, 2014-06-03 at 09:05 +0200, Rainer Boschung wrote:
> When CONFIG_WATCHDOG is defined the board initialization just performs
> a WATCHDOG_RESET, an initialization of the watchdog is not done.
> This has been modified fot the MPC85xx, the board initialization calls
> its watchdog initialitzation allowing for full watchdog configuration
> very early in the boot phase.
>
> Signed-off-by: Rainer Boschung <rainer.boschung at keymile.com>
> ---
> arch/powerpc/lib/board.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
> index 57b4a09..0ad2fdd 100644
> --- a/arch/powerpc/lib/board.c
> +++ b/arch/powerpc/lib/board.c
> @@ -226,6 +226,9 @@ static int init_func_spi(void)
> #if defined(CONFIG_WATCHDOG)
> int init_func_watchdog_init(void)
> {
> +#if defined(CONFIG_MPC85xx)
> + init_85xx_watchdog();
> +#endif
> puts(" Watchdog enabled\n");
> WATCHDOG_RESET();
> return 0;
arch/powerpc/lib/board.c is deprecated. You should be using the generic
board infrastructure (lib/board.c).
Plus, it would be better to find a way to have platform-specific
initialization that doesn't require platform-specific ifdefs in common
files.
-Scott
More information about the U-Boot
mailing list