[U-Boot] [PATCH 10/35] arm: socfpga: Add watchdog disable for socfpga

Marek Vasut marex at denx.de
Tue Sep 16 15:58:39 CEST 2014


On Monday, September 15, 2014 at 06:28:20 PM, Dinh Nguyen wrote:
> On 09/15/2014 06:06 AM, Marek Vasut wrote:
> > From: Pavel Machek <pavel at denx.de>
> > 
> > This adds watchdog disable. It is neccessary for running Linux kernel.
> > 
> > Signed-off-by: Pavel Machek <pavel at denx.de>
> > Signed-off-by: Marek Vasut <marex at denx.de>
> > Cc: Chin Liang See <clsee at altera.com>
> > Cc: Dinh Nguyen <dinguyen at altera.com>
> > Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> > Cc: Tom Rini <trini at ti.com>
> > Cc: Wolfgang Denk <wd at denx.de>
> > Cc: Pavel Machek <pavel at denx.de>
> > ---
> > 
> >  arch/arm/cpu/armv7/socfpga/misc.c                 |  4 ++++
> >  arch/arm/cpu/armv7/socfpga/reset_manager.c        | 13 +++++++++++++
> >  arch/arm/include/asm/arch-socfpga/reset_manager.h |  2 ++
> >  3 files changed, 19 insertions(+)
> > 
> > diff --git a/arch/arm/cpu/armv7/socfpga/misc.c
> > b/arch/arm/cpu/armv7/socfpga/misc.c index ecae393..15cd8c2 100644
> > --- a/arch/arm/cpu/armv7/socfpga/misc.c
> > +++ b/arch/arm/cpu/armv7/socfpga/misc.c
> > @@ -8,6 +8,7 @@
> > 
> >  #include <asm/io.h>
> >  #include <miiphy.h>
> >  #include <netdev.h>
> > 
> > +#include <asm/arch/reset_manager.h>
> > 
> >  DECLARE_GLOBAL_DATA_PTR;
> > 
> > @@ -38,6 +39,9 @@ int overwrite_console(void)
> > 
> >  int misc_init_r(void)
> >  {
> > 
> > +	/* This is needed, otherwise kernel is rebooted by watchdog. */
> > +	watchdog_disable();
> > +
> > 
> >  	return 0;
> >  
> >  }
> > 
> > diff --git a/arch/arm/cpu/armv7/socfpga/reset_manager.c
> > b/arch/arm/cpu/armv7/socfpga/reset_manager.c index e320c01..07b8c4f
> > 100644
> > --- a/arch/arm/cpu/armv7/socfpga/reset_manager.c
> > +++ b/arch/arm/cpu/armv7/socfpga/reset_manager.c
> > @@ -14,6 +14,19 @@ DECLARE_GLOBAL_DATA_PTR;
> > 
> >  static const struct socfpga_reset_manager *reset_manager_base =
> >  
> >  		(void *)SOCFPGA_RSTMGR_ADDRESS;
> > 
> > +#define RSTMGR_PERMODRST_L4WD0_LSB 6
> 
> Should this define go into -> arch-socfpga/reset_manager.h ?

Yeah, done. And fixed this for the EMAC reset patch as well. Thanks!


More information about the U-Boot mailing list