[PATCH v3 03/21] clk: actions: Add common clock driver
Amit Tomer
amittomer25 at gmail.com
Tue Mar 3 09:23:05 CET 2020
Hi,
Thanks for having a look.
> Either use `priv->soc` or the guard throughout the driver. Please don't mix
> both.
But have used #ifdef guard only where it is really necessary and to
keep implementation
clean used priv->soc.
> > +
> > +static const struct udevice_id owl_clk_ids[] = {
> > +#if defined(CONFIG_MACH_S900)
> > + { .compatible = "actions,s900-cmu", .data = S900 },
> > +#elif defined(CONFIG_MACH_S700)
> > + { .compatible = "actions,s700-cmu", .data = S700 },
> > + { }
> > +#endif
>
> Guard is not necessary here.
But this is something suggested by Andre in previous review round
"just protect the compatible strings below with MACH_S[79]00 ifdefs,
so that both SoCs share the
file, but compile to different drivers supporting only one compatible
(due to the different reg_sx00.h and the #ifdef protected parts)."
Thanks
Amit
More information about the U-Boot
mailing list