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

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Tue Sep 27 14:24:23 CEST 2022


Hi Fabio

On Mon, Sep 26, 2022 at 6:40 PM Fabio Estevam <festevam at denx.de> wrote:
>
> 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

I'm not really convinced of those two. I mean with should maybe think about
some different approach of clock framework to reduce the size

Michael

>   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
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael at amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info at amarulasolutions.com
www.amarulasolutions.com


More information about the U-Boot mailing list