LoongArch: Derive timer max_delta from PRCFG1's timer_bits
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Sat, 25 Jan 2025 10:51:33 +0000 (18:51 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 25 Jan 2025 10:51:33 +0000 (18:51 +0800)
commit98e720f77dba6bb702a57f3d8479e6445e34f38c
tree09e72d98a3a749f0400e88f5f3949f1c4d514d61
parent341cf992d331a34d764bf943e4e177daff94fc92
LoongArch: Derive timer max_delta from PRCFG1's timer_bits

As per arch spec, maximum timer bits is configurable and should not be
hardcoded in any way.

Probe timer bits from PRCFG1 and use that to determine the clockevent's
max_delta to be conformance.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/cpu-info.h
arch/loongarch/include/asm/loongarch.h
arch/loongarch/kernel/cpu-probe.c
arch/loongarch/kernel/time.c