[PATCH 0/4] clk-imx8mm: Reduce SPL binary size

Fabio Estevam festevam at denx.de
Mon Sep 26 18:40:07 CEST 2022


Reduce the SPL binary size by building some clocks only for the
non-SPL case, such as Ethernet and PWM and by also building ECSPI
and QSPI when their respective drivers are enabled.

On a imx8mm_evk_defconfig the following SPL binary reduction was
observed.

Prior to this series:

$ aarch64-linux-gnu-readelf -s spl/u-boot-spl | sort -nk 3 | grep imx8mm_clk_probe
   766: 00000000007f34c8  4100 FUNC    LOCAL  DEFAULT    1 imx8mm_clk_probe

After this series:

$ aarch64-linux-gnu-readelf -s spl/u-boot-spl | sort -nk 3 | grep imx8mm_clk_probe
   766: 00000000007f34c8  3316 FUNC    LOCAL  DEFAULT    1 imx8mm_clk_probe

Total reduction: 4100 - 3316 = 784 bytes.

Fabio Estevam (4):
  clk-imx8mm: Only build PWM clocks in non-SPL code
  clk-imx8mm: Move CLK_ENET_AXI to the non-SPL section
  clk-imx8mm: Only build ecspi clocks when CONFIG_DM_SPI=y
  clk-imx8mm: Only build QSPI clocks when CONFIG_NXP_FSPI=y

 drivers/clk/imx/clk-imx8mm.c | 86 ++++++++++++++++++++----------------
 1 file changed, 49 insertions(+), 37 deletions(-)

-- 
2.25.1



More information about the U-Boot mailing list