[Letux-kernel] jz4730-i2c - clocksource
H. Nikolaus Schaller
hns at goldelico.com
Sun Mar 7 09:22:41 CET 2021
> Am 06.03.2021 um 18:07 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
> Maybe it is not THE issue but contributed. Basically a 16 bit counter
> should overflow only every 18 ms. This is more than a tick for HZ100.
>
> It may only become a problem because something else stalls for more
> than 18 ms and blocks interrupt processing.
>
> But 26 bit is on the safe side - and we have it. So there is no reason
> to work with the smallest reasonable width.
>
> Ideal would be if 32 bits work, or 31.
Interestingly the CI20 tells with v5.11 kernel:
[ 0.000000] clocksource: ingenic-timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 38884100 ns
[ 0.000001] sched_clock: 16 bits at 750kHz, resolution 1333ns, wraps every 43690000ns
[ 0.100714] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.440673] clocksource: Switched to clocksource ingenic-timer
So it *is* running with 16 bits...
But the processor is faster serving any interrupts.
And it fails with our new letux-5.12-rc2 kernel.
So why is he CI20 loading the ingenic-timer at all? DTS says it should use the ingenic-ost...
Ok:
tcu: timer at 10002000 {
compatible = "ingenic,jz4780-tcu",
"ingenic,jz4770-tcu",
"simple-mfd";
TIMER_OF_DECLARE(jz4770_tcu_intc, "ingenic,jz4770-tcu", ingenic_tcu_init);
This means we are running our jz4730 extensions on the jz4770 as well.
BR,
Nikolaus
More information about the Letux-kernel
mailing list