[PATCH] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

Michael Walle michael at walle.cc
Wed Aug 17 11:13:07 CEST 2022


Am 2022-08-17 10:43, schrieb Michael Walle:
> 3) There is a chance that the timer code is actually pretty 
> straight-forward
>    and we don't need DM_CLK.
> 
> FWIW I'm working on 3) at the moment. So if that works out, we can use
> CONFIG_TIMER on kirkwood and then apply your initial patch. As there 
> are
> no bugfix releases for u-boot anyway, we don't have to care for a 
> backport
> fix.

Ah damn, we cannot do this depending on wether CONFIG_TIMER is set or 
not.
E.g. on a per-device basis. Or we do some ugly stuff as

#ifdef CONFIG_TIMER
#define CONFIG_SYS_TCLK                        ((readl(CONFIG_SAR_REG) & 
BIT(21)) ? \
                                        166666667 : 200000000)
#else
#define CONFIG_SYS_TCLK 200000000
#endif

So it seems we are back to 1) or 2) :(

-michael


More information about the U-Boot mailing list