[PATCH] versal: watchdog: Add support for Xilinx window watchdog

Andy Shevchenko andriy.shevchenko at linux.intel.com
Wed Mar 11 12:54:58 CET 2020


On Wed, Mar 11, 2020 at 12:34:33PM +0100, Michal Simek wrote:
> On 11. 03. 20 12:25, Stefan Roese wrote:
> > On 11.03.20 11:48, Michal Simek wrote:
> >> From: Ashok Reddy Soma <ashok.reddy.soma at xilinx.com>

> >> +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?
> 
> Origin driver had macros but I have asked Ashok to change it to
> structure based.

I don't know how many wasted kbytes Xilinx can afford, but in general it's a
bad example to waste memory as above.
Any issues with regmap approach?

-- 
With Best Regards,
Andy Shevchenko




More information about the U-Boot mailing list