On Fri, May 1, 2026 at 1:52 PM A. Sverdlin <[email protected]> wrote: > > From: Alexander Sverdlin <[email protected]> > > When commit 1d7993d1d0ef > ("clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: > v5.1.12)") > introduced the parts of Linux Common Clock Framework, it was done for i.MX6 > only and even had "depends on SPL_CLK_IMX6Q" conditions. Since commit > ccab06689aa2 ("clk: imx: expose CCF entry for all") the framework can be > re-used with SoCs of other vendors (say, TI), but NXP SoC-specific code is > still being build. Is is especially problematic for size-constrained SPL > images on TI AM62x. > > Make the build of the i.MX6/RTxxxx code not only dependent on > CONFIG_$(PHASE_)CLK_CCF, but also on the corresponding CONFIG_ARCH_* > options taking into account that only two platforms seem to use the code in > question. > > This saves 2264 bytes on ARM platforms [using CCF]. > > Signed-off-by: Alexander Sverdlin <[email protected]>
This breaks the build. make imx8mm-icore-mx8mm-ctouch2_defconfig make /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /tmp/cc1Ra7A0.ltrans4.ltrans.o: in function `imx8mm_clk_probe': /home/fabio/custodian/u-boot-imx/drivers/clk/imx/clk.h:129:(.text.imx8mm_clk_probe+0xbd0): undefined reference to `clk_register_gate2' /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/fabio/custodian/u-boot-imx/drivers/clk/imx/clk.h:129:(.text.imx8mm_clk_probe+0xc10): undefined reference to `clk_register_gate2' /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/fabio/custodian/u-boot-imx/drivers/clk/imx/clk.h:129:(.text.imx8mm_clk_probe+0xc50): undefined reference to `clk_register_gate2' /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/fabio/custodian/u-boot-imx/drivers/clk/imx/clk.h:129:(.text.imx8mm_clk_probe+0xc90): undefined reference to `clk_register_gate2' /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/fabio/custodian/u-boot-imx/drivers/clk/imx/clk.h:129:(.text.imx8mm_clk_probe+0xdb8): undefined reference to `clk_register_gate2' /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /tmp/cc1Ra7A0.ltrans4.ltrans.o:/home/fabio/custodian/u-boot-imx/drivers/clk/imx/clk.h:129: more undefined references to `clk_register_gate2' follow collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. make: *** [Makefile:2109: u-boot] Error 1 make: *** Deleting file 'u-boot'

