On Thu, 10 Oct 2019 10:43:46 +0200 Simon Goldschmidt simon.k.r.goldschm...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot