[PATCH] versal: watchdog: Add support for Xilinx window watchdog
Michal Simek
michal.simek at xilinx.com
Wed Mar 11 13:11:07 CET 2020
On 11. 03. 20 12:56, Stefan Roese wrote:
> Hi Michal,
>
> On 11.03.20 12:34, Michal Simek wrote:
>
> <snip>
>
>>>> +/* 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
More information about the U-Boot
mailing list