From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Wed, 11 Mar 2020 13:11:07 +0100 Subject: [PATCH] versal: watchdog: Add support for Xilinx window watchdog In-Reply-To: References: <2204261a8e80503d41bec1b0eb68e00080be5c4c.1583923701.git.michal.simek@xilinx.com> <66f1396f-bb10-90dd-6bbf-49615a1ac26a@xilinx.com> Message-ID: <2f57c132-cc77-2dc8-310c-62e623514b84@xilinx.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 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? > >> Origin driver had macros but I have asked Ashok to change it to >> structure based. > > Too bad. Not big deal to fix it - we still have the first version. Thanks, Michal