[U-Boot] [PATCH v2 11/20] sunxi: spl: deassert the NAND controller reset line

Wolfgang Denk wd at denx.de
Mon Feb 26 08:52:21 UTC 2018


Dear Maxime,

In message <20180226084006.5armemyuslxgqjtw at flea.lan> you wrote:
> 
> > +#if defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I || \
> > +    defined CONFIG_MACH_SUN9I || defined CONFIG_MACH_SUN50I
> 
> Yep, that would be better.

Actually such (ever growing) lists of board selectors are pretty much
deprecated.

Instead, you should define a feature macro which describes the
specific property, which you can then enable in all boards which
have this property.

The big advantage is that (1) you don't have to touch this common
code when you just add support for a new board and (2) the code
becomes much easier to read and to understand.

Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.


More information about the U-Boot mailing list