From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Wed, 11 Mar 2020 13:52:47 +0200 Subject: [PATCH] versal: watchdog: Add support for Xilinx window watchdog In-Reply-To: <2204261a8e80503d41bec1b0eb68e00080be5c4c.1583923701.git.michal.simek@xilinx.com> References: <2204261a8e80503d41bec1b0eb68e00080be5c4c.1583923701.git.michal.simek@xilinx.com> Message-ID: <20200311115247.GG1922688@smile.fi.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Mar 11, 2020 at 11:48:23AM +0100, Michal Simek wrote: > From: Ashok Reddy Soma > > Add support for Xilinx window watchdog, which can be found on > Versal platforms. ... > +config WWDT_XILINX Even though I don't think extra W is a good idea. > + bool "Xilinx window watchdog timer support" > + depends on WDT && ARCH_VERSAL > + imply WATCHDOG > + help > + Select this to enable Xilinx window watchdog timer, which can be found on > + Xilinx Versal Platforms. > +struct wwdt_regs { > + u32 reserved0[1024]; These are not needed. Use regmap with register offsets. > + u32 refresh; /* Refresh Register [0x1000] */ > + u32 reserved1[1023]; Ditto. > + u32 csr; /* Control/Status Register [0x2000] */ > + u32 reserved2; > + u32 offset; /* Offset Register [0x2008] */ > + u32 reserved3; > + u32 cmp0; /* Compare Value Register0 [0x2010] */ > + u32 cmp1; /* Compare Value Register1 [0x2014] */ > + u32 reserved4[1006]; Ditto. > + u32 warmrst; /* Warm Reset Register [0x2FD0] */ > +}; > +static int xlnx_wwdt_reset(struct udevice *dev) > +{ > + struct xlnx_wwdt_priv *wdt = dev_get_priv(dev); > + > + dev_dbg(dev, "%s ", __func__); Usually this is noise. > + > + writel(XWT_WWREF_GWRR_MASK, &wdt->regs->refresh); > + > + return 0; And taking above into consideration, I don't see any value of this helper. writel() can be used in-place. > +} -- With Best Regards, Andy Shevchenko