[U-Boot] [PATCH v3 3/4] arm: socfpga: Convert system manager from struct to defines

Ley Foon Tan lftan.linux at gmail.com
Thu Oct 10 23:54:45 UTC 2019


On Thu, Oct 10, 2019 at 6:09 PM Marek Vasut <marex at denx.de> wrote:
>
> On 10/10/19 12:00 PM, Anatolij Gustschin wrote:
> > On Thu, 10 Oct 2019 11:39:13 +0200
> > Marek Vasut wrote:
> > ...
> >>> The preferred way for I/O access is documented in [1], see "Use structures
> >>> for I/O access" section.
> >>
> >> This seems to not scale and I keep running into the problem where a few
> >> registers changed between various mutations of the IP more and more often.
> >>
> >> This seems to be the case here too.
> >
> > The maintainers of these drivers should decide what is better here.
>
> Then I guess we go for the macros, since the structures don't work in
> the SoCFPGA case after all ?
I'm prefer using macros than struct. 1. We don't need to add unused
registers. 2. Some registers are not continuous, adding padding is
wasting space.
3. Easily reuse in different platform that only have few registers differences.

Regards
Ley Foon


More information about the U-Boot mailing list