[PATCH 04/24] clk: introduce struct clk_hw

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Jun 11 00:55:36 PDT 2021


Hello Sascha,

On 02.06.21 11:54, Sascha Hauer wrote:

> In Linux the ops in struct clk_ops take a struct clk_hw * argument

> instead of a struct clk * argument as in barebox. With this taking

> new clk drivers from Linux requires a lot of mechanical conversions.

> Instead of doing this over and over again swallow the pill once and

> convert the existing barebox code over to clk_hw.

> 

> The implementation is a little different from Linux. In Linux struct clk

> is only known to the core clock code. In barebox struct clk is

> publically known and it is embedded into struct clk_hw. This allows

> us to still use struct clk members in the clock drivers which we

> currently still need, because otherwise this patch would be even

> bigger.

> 

> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>

drivers/clk/sifive, which was added recently doesn't have these changes
and thus the build fails. To reproduce, without installed RISC-V toolchain, try:

   ./test/emulate.pl --runtime=podman sifive_defconfig

Doing the conversions aren't completely trivial to me, as there are no
clkdev clk_hw helpers ported and I still need to figure out how to use them.
Given that your caches are still hot, could you take a look?

Thanks,
Ahmad



More information about the barebox mailing list