Re: [PATCH RFC 15/40] clk: restrict clk/imx to MACH_IMX

Tom Rini <[email protected]> Fri, 20 Mar 2026 09:09:27 -0600
Newsgroups io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot
Message-ID <20260320150927.GB502704@bill-the-cat>
--Groupsio=4FdcDjTdklHzaoQstA1h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=
[email protected]> wrote:
> > Only build IMX clocks when MACH_IMX is enabled, otherwise IMX clock
> > drivers get compiled for all platforms with CLK_CCF enabled.
> >=20
> > Signed-off-by: Casey Connolly <[email protected]>
> > ---
> > drivers/clk/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >=20
> > 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) +=3D clk-stub.o
> >=20
> > obj-y +=3D adi/
> > obj-y +=3D airoha/
> > obj-y +=3D analogbits/
> > -obj-y +=3D imx/
> > +obj-$(CONFIG_$(PHASE_)MACH_IMX) +=3D imx/
>=20
> 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) +=3D clk.o clk-divider.o clk-mux.o clk-ga=
te.o
11:obj-$(CONFIG_$(PHASE_)CLK_CCF) +=3D clk-fixed-factor.o
61:obj-$(CONFIG_SANDBOX_CLK_CCF) +=3D clk_sandbox_ccf.o

drivers/clk/exynos/Makefile
10:obj-$(CONFIG_$(PHASE_)CLK_CCF)       +=3D clk.o clk-pll.o

drivers/clk/imx/Makefile
5:obj-$(CONFIG_$(PHASE_)CLK_CCF) +=3D 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 <[email protected]>

--=20
Tom

--Groupsio=4FdcDjTdklHzaoQstA1h
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCab1jIwAKCRAr4qD1Cr/k
CjdCAQCgnFWFQ/O1pXOo/rj9vi9RzSILtD9BX3tunzOiyXst+QEA9c8UGn0xwevE
3kHJZ86ibblj5T9B/MJ/PecPqlx1Jgo=
=GY9m
-----END PGP SIGNATURE-----

--Groupsio=4FdcDjTdklHzaoQstA1h--