[PATCH RFC 15/40] clk: restrict clk/imx to MACH_IMX
Tom Rini
trini at konsulko.com
Fri Mar 20 16:09:27 CET 2026
On Thu, Mar 19, 2026 at 09:25:14PM +0000, Ferass El Hafidi wrote:
> On Thu, 19 Mar 2026 20:56, "Casey Connolly via groups.io" <casey.connolly=linaro.org at groups.io> wrote:
> > Only build IMX clocks when MACH_IMX is enabled, otherwise IMX clock
> > drivers get compiled for all platforms with CLK_CCF enabled.
> >
> > Signed-off-by: Casey Connolly <casey.connolly at linaro.org>
> > ---
> > drivers/clk/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 5f0c0d8a5c28..f96d57a3223a 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -15,9 +15,9 @@ obj-$(CONFIG_$(PHASE_)CLK_STUB) += clk-stub.o
> >
> > obj-y += adi/
> > obj-y += airoha/
> > obj-y += analogbits/
> > -obj-y += imx/
> > +obj-$(CONFIG_$(PHASE_)MACH_IMX) += imx/
>
> I think this is not necessary. drivers/clk/imx/Makefile already requires
> that imx config options be enabled for the driver to be compiled in.
Almost all of them do. I see:
$ rg obj.*CLK_CCF drivers/clk/
drivers/clk/Makefile
10:obj-$(CONFIG_$(PHASE_)CLK_CCF) += clk.o clk-divider.o clk-mux.o clk-gate.o
11:obj-$(CONFIG_$(PHASE_)CLK_CCF) += clk-fixed-factor.o
61:obj-$(CONFIG_SANDBOX_CLK_CCF) += clk_sandbox_ccf.o
drivers/clk/exynos/Makefile
10:obj-$(CONFIG_$(PHASE_)CLK_CCF) += clk.o clk-pll.o
drivers/clk/imx/Makefile
5:obj-$(CONFIG_$(PHASE_)CLK_CCF) += clk-gate2.o clk-pllv3.o clk-pfd.o
But exynos is guarded by CONFIG_CLK_EXYNOS to start with. So I think
this is right, and also something that could just be standalone and
picked up shortly as it's a build cleanup.
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260320/2fd2f271/attachment.sig>
More information about the U-Boot
mailing list