All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/4] arm: socfpga: Convert system manager from struct to defines
Date: Thu, 10 Oct 2019 11:29:13 +0200	[thread overview]
Message-ID: <20191010112913.4a580c80@crub> (raw)
In-Reply-To: <CAAh8qsy9LnUofWdU8Xdt-kXZ5M+D9a7N3Z_+igpqE_s3+AuqHg@mail.gmail.com>

On Thu, 10 Oct 2019 10:43:46 +0200
Simon Goldschmidt simon.k.r.goldschmidt at gmail.com wrote:
...
> > Why is this required? In the past we have rejected all new code adding
> > defines instead of structs for register accesses. Have we changed our mind now?  
> 
> Who is we?

U-Boot maintainers/community.

> I haven't noticed that in the last 2 years. Plus Linux is rather
> using structs than defines, or am I wrong?

The preferred way for I/O access is documented in [1], see "Use structures
for I/O access" section.
 
> This started because Ley introduced a new platform where the structs were
> nearly the same but *some* registers have changed. Adding new structs
> that were nearly the same seemed more mess than using the same defines.
>
> I'm not pressing this into any direction, we can continue using structs
> if that's the consensus.

If there is no other easy way to continue using struct, then this should
be mentioned in the commit description/cover letter to justify the changes.

[1] http://www.denx.de/wiki/U-Boot/CodingStyle

--
Anatolij

  reply	other threads:[~2019-10-10  9:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  6:20 [U-Boot] [PATCH v3 0/4] arm: socfpga: Convert drivers from struct to defines Ley Foon Tan
2019-10-10  6:20 ` [U-Boot] [PATCH v3 1/4] arm: dts: socfpga: Add u-boot, dm-pre-reloc for sysmgr and clkmgr nodes Ley Foon Tan
2019-10-10  6:20 ` [U-Boot] [PATCH v3 2/4] arm: socfpga: Convert reset manager from struct to defines Ley Foon Tan
2019-10-10  7:14   ` Simon Goldschmidt
2019-10-10  7:17     ` Ley Foon Tan
2019-10-10  6:20 ` [U-Boot] [PATCH v3 3/4] arm: socfpga: Convert system " Ley Foon Tan
2019-10-10  7:16   ` Simon Goldschmidt
2019-10-10  8:09     ` Anatolij Gustschin
2019-10-10  8:43       ` Simon Goldschmidt
2019-10-10  9:29         ` Anatolij Gustschin [this message]
2019-10-10  9:39           ` Marek Vasut
2019-10-10 10:00             ` Anatolij Gustschin
2019-10-10 10:09               ` Marek Vasut
2019-10-10 23:54                 ` Ley Foon Tan
2019-10-10  9:41           ` Simon Goldschmidt
2019-10-10  6:20 ` [U-Boot] [PATCH v3 4/4] arm: socfpga: Convert clock " Ley Foon Tan
2019-10-10  7:16   ` Simon Goldschmidt

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=20191010112913.4a580c80@crub \
    --to=agust@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.