[PATCH RFC 00/40] clk: port full Linux Common Clock Framework to U-Boot

Ferass El Hafidi funderscore at postmarketos.org
Thu Mar 19 22:30:36 CET 2026


Hi,

On Thu, 19 Mar 2026 20:56, "Casey Connolly via groups.io" <casey.connolly=linaro.org at groups.io> wrote:

>    This RFC provides a proof of concept for using the full Linux CCF in
>    U-Boot and consequently porting full Linux clock drivers with extremely
>    minimal changes.
>
>    [...]
>
>    === Memory/perf overhead ===
>
>    The memory and size overhead of CCF is undoubtably bigger than uCCF,
>    although I suspect the difference is less than it might seem at
>    first glance. In particular: clk_core is only ~50 bytes larger than
>    struct udevice on ARM64, and an additional 120 bytes is saved for each
>    U_BOOT_DRIVER used by uCCF.
>
>    On the other hand, the CPU overhead is probably more significant,
>    but not an unreasonable cost to ensure correctness and propagate rate
>    changes across the clock tree.
>
>    Just comparing the binary size of sandbox64_defconfig with uCCF vs
>    CCF_FULL, CCF_FULL results in a 135k size increase in the binary. I
>    haven't done any more detailed analysis here (still haven't got buildman
>    to play nice...).
>
>    === SPL ===
>
>    This RFC doesn't have any SPL specific support, I think this role is
>    better fulfilled by UCLASS_CLK.

It is worth noting that not a lot of boards actually use the existing
CCF port under SPL.

	configs$ git grep "CONFIG_SPL=y" | wc -l
	550
	configs$ git grep "CONFIG_SPL_CLK=y" | wc -l
	179
	configs$ git grep "CONFIG_SPL_CLK_CCF=y" | wc -l
	25

As far as I know, this is most likely because that existing CCF is
already quite huge for such a small environment like SPL (SPL_CLK is
already quite big, especially with its dependency on driver model, which
is fine but some devices are so restricted when SPL runs that even
DM is too big to fit). So I wouldn't bother trying to support SPL with
this.

Just wanted to share this, FYI.

Best regards,
Ferass

[PS: had to remove some people from CC, because my email provider does
     not let me CC that many people. Also sorry for those who got this
     email twice]


More information about the U-Boot mailing list