From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 11 Mar 2020 10:28:41 -0400 Subject: [PATCH] versal: watchdog: Add support for Xilinx window watchdog In-Reply-To: <2f57c132-cc77-2dc8-310c-62e623514b84@xilinx.com> References: <2204261a8e80503d41bec1b0eb68e00080be5c4c.1583923701.git.michal.simek@xilinx.com> <66f1396f-bb10-90dd-6bbf-49615a1ac26a@xilinx.com> <2f57c132-cc77-2dc8-310c-62e623514b84@xilinx.com> Message-ID: <20200311142841.GL12423@bill-the-cat> 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 01:11:07PM +0100, Michal Simek wrote: > On 11. 03. 20 12:56, Stefan Roese wrote: > > Hi Michal, > > > > On 11.03.20 12:34, Michal Simek wrote: > > > > > > > >>>> +/* Generic Control/Status Register Masks */ > >>>> +#define XWT_WWCSR_GWEN_MASK??? BIT(0) /* Enable Bit */ > >>>> + > >>>> +struct wwdt_regs { > >>>> +??? u32 reserved0[1024]; > >>>> +??? u32 refresh;??????? /* Refresh Register [0x1000] */ > >>>> +??? u32 reserved1[1023]; > >>>> +??? 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]; > >>>> +??? u32 warmrst;??????? /* Warm Reset Register [0x2FD0] */ > >>>> +}; > >>> > >>> My understanding is, that we moved to using defines instead of structs > >>> for register definitions. So if you need to send a v2, then please > >>> consider using #defines here. > >> > >> When was that decision done? Any link to documentation/commit message? > > > > Frankly, I don't remember and unfortunately I don't have a link ready > > to share. I've seen discussions in the past, where the old U-Boot style > > using structs was not preferred any more. So newer code moves to using > > the more common #defines instead. Perhaps some else can share a link? > > Tom: Do you have any comment/link? Well, in general, we have regmap and that should be used. In cases like this where we have some huge reserved chunks it shows the worst-case of using a struct for this too. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: