public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/2] watchdog/denali: Adding DesignWare watchdog driver support
Date: Thu, 27 Feb 2014 13:52:56 -0600	[thread overview]
Message-ID: <1393530776.1993.1.camel@clsee-VirtualBox.altera.com> (raw)
In-Reply-To: <530AF9E8.8080207@monstr.eu>

Hi Michal,

On Mon, 2014-02-24 at 08:51 +0100, Michal Simek wrote:
> On 02/21/2014 09:57 PM, Chin Liang See wrote:
> > To add the DesignWare watchdog driver support. It required
> > information such as register base address and clock info from
> > configuration header file  within include/configs folder.
> > 
> > Signed-off-by: Chin Liang See <clsee@altera.com>
> > Cc: Anatolij Gustschin <agust@denx.de>
> > Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> > Cc: Heiko Schocher <hs@denx.de>
> > Cc: Tom Rini <trini@ti.com>
> > ---
> > Changes for v3
> > - Split to 2 series patch
> > Changes for v2
> > - Enable this driver at socfpga_cyclone5 board
> > ---
> >  drivers/watchdog/Makefile         |    1 +
> >  drivers/watchdog/designware_wdt.c |   73 +++++++++++++++++++++++++++++++++++++
> >  2 files changed, 74 insertions(+)
> >  create mode 100644 drivers/watchdog/designware_wdt.c
> > 
> 
> Checkpatch.
> total: 0 errors, 1 warnings, 1 checks, 77 lines checked

Fixed

> 
> 
> > diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> > index 06ced10..0276a10 100644
> > --- a/drivers/watchdog/Makefile
> > +++ b/drivers/watchdog/Makefile
> > @@ -15,3 +15,4 @@ obj-$(CONFIG_S5P)               += s5p_wdt.o
> >  obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o
> >  obj-$(CONFIG_BFIN_WATCHDOG)  += bfin_wdt.o
> >  obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
> > +obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o
> > diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
> > new file mode 100644
> > index 0000000..cb88844
> > --- /dev/null
> > +++ b/drivers/watchdog/designware_wdt.c
> > @@ -0,0 +1,73 @@
> > +/*
> > + * Copyright (C) 2013 Altera Corporation <www.altera.com>
> 
> 2014?

Oops, good catch. Fixed

> 
> 
> > + *
> > + * SPDX-License-Identifier:	GPL-2.0+
> > + */
> > +
> > +#include <common.h>
> > +#include <watchdog.h>
> > +#include <asm/io.h>
> > +#include <asm/utils.h>
> > +
> > +#define DW_WDT_CR	0x00
> > +#define DW_WDT_TORR	0x04
> > +#define DW_WDT_CRR	0x0C
> > +
> > +#define DW_WDT_CR_EN_OFFSET	0x00
> > +#define DW_WDT_CR_RMOD_OFFSET	0x01
> > +#define DW_WDT_CR_RMOD_VAL	0x00
> > +#define DW_WDT_CRR_RESTART_VAL	0x76
> > +
> > +/*
> > + * Set the watchdog time interval.
> > + * Counter is 32 bit.
> > + */
> > +int designware_wdt_settimeout(unsigned int timeout)
> > +{
> > +	signed int i;
> 
> you should separate variables from code.

Actually I am trying to avoid to create a new header as its just few
simple defines.

Thanks
Chin Liang

> 
> Thanks,
> Michal
> 

  reply	other threads:[~2014-02-27 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 20:57 [U-Boot] [PATCH v3 1/2] watchdog/denali: Adding DesignWare watchdog driver support Chin Liang See
2014-02-24  7:51 ` Michal Simek
2014-02-27 19:52   ` Chin Liang See [this message]
2014-02-28 10:28     ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393530776.1993.1.camel@clsee-VirtualBox.altera.com \
    --to=clsee@altera.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox