From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Wed, 11 Mar 2020 15:30:11 +0100 Subject: [PATCH] versal: watchdog: Add support for Xilinx window watchdog In-Reply-To: <20200311142841.GL12423@bill-the-cat> References: <2204261a8e80503d41bec1b0eb68e00080be5c4c.1583923701.git.michal.simek@xilinx.com> <66f1396f-bb10-90dd-6bbf-49615a1ac26a@xilinx.com> <2f57c132-cc77-2dc8-310c-62e623514b84@xilinx.com> <20200311142841.GL12423@bill-the-cat> Message-ID: <11f82a69-c9ea-524b-244d-4822258100b7@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 15:28, Tom Rini wrote: > 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. ok. Then let's us use regmap instead. Ashok: Can you please take a look? Thanks, Michal