From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] versal: watchdog: Add support for Xilinx window watchdog
Date: Wed, 11 Mar 2020 10:28:41 -0400 [thread overview]
Message-ID: <20200311142841.GL12423@bill-the-cat> (raw)
In-Reply-To: <2f57c132-cc77-2dc8-310c-62e623514b84@xilinx.com>
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:
> >
> > <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?
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: <https://lists.denx.de/pipermail/u-boot/attachments/20200311/dd41eae5/attachment.sig>
next prev parent reply other threads:[~2020-03-11 14:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 10:48 [PATCH] versal: watchdog: Add support for Xilinx window watchdog Michal Simek
2020-03-11 11:25 ` Stefan Roese
2020-03-11 11:34 ` Michal Simek
2020-03-11 11:54 ` Andy Shevchenko
2020-03-11 12:31 ` Michal Simek
2020-03-11 11:56 ` Stefan Roese
2020-03-11 12:11 ` Michal Simek
2020-03-11 14:28 ` Tom Rini [this message]
2020-03-11 14:30 ` Michal Simek
2020-03-11 11:52 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200311142841.GL12423@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox