Re: [PATCH RFC 00/40] clk: port full Linux Common Clock Framework to U-Boot
Ferass El Hafidi <[email protected]> Thu, 19 Mar 2026 21:30:36 +0000
| Newsgroups | io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Thu, 19 Mar 2026 20:56, "Casey Connolly via groups.io" <casey.connolly= [email protected]> 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 extrem= ely > minimal changes. > > [...] > > =3D=3D=3D Memory/perf overhead =3D=3D=3D > > 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 ea= ch > 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 rat= e > 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 buil= dman > to play nice...). > > =3D=3D=3D SPL =3D=3D=3D > > 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=3Dy" | wc -l 550 configs$ git grep "CONFIG_SPL_CLK=3Dy" | wc -l 179 configs$ git grep "CONFIG_SPL_CLK_CCF=3Dy" | 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]