From: Scott Wood Date: Wed, 13 Aug 2014 18:52:22 -0500 Subject: [U-Boot] [PATCH 4/9] powerpc: mpc85xx watchdog init added to init_func In-Reply-To: <1401779120-20306-5-git-send-email-rainer.boschung@keymile.com> References: <1401779120-20306-1-git-send-email-rainer.boschung@keymile.com> <1401779120-20306-5-git-send-email-rainer.boschung@keymile.com> Message-ID: <1407973942.7427.208.camel@snotra.buserror.net> 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, 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 > --- > 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