diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-02-18 10:15:50 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-03-15 22:56:48 +0100 |
commit | 0aafbdf35c75cbfec82636d01e6dc7950bc1507c (patch) | |
tree | 9f8885c561ae24ed14b65d8190520aec7cacc81f /arch/powerpc/kernel/time.c | |
parent | powerpc/85xx: Fix function naming for p1023_rdb platform (diff) | |
download | linux-0aafbdf35c75cbfec82636d01e6dc7950bc1507c.tar.xz linux-0aafbdf35c75cbfec82636d01e6dc7950bc1507c.zip |
powerpc: Make generic_calibrate_decr() the default
ppc_md.calibrate_decr() is a mandatory item. Its nullity is never
checked so it must be non null on all platforms.
Most platforms define generic_calibrate_decr() as their
ppc_md.calibrate_decr(). Have time_init() call
generic_calibrate_decr() when ppc_md.calibrate_decr() is NULL,
and remove default assignment from all machines.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | arch/powerpc/kernel/time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 9d8665910350..df20cf201f74 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -887,7 +887,11 @@ void __init time_init(void) unsigned shift; /* Normal PowerPC with timebase register */ - ppc_md.calibrate_decr(); + if (ppc_md.calibrate_decr) + ppc_md.calibrate_decr(); + else + generic_calibrate_decr(); + printk(KERN_DEBUG "time_init: decrementer frequency = %lu.%.6lu MHz\n", ppc_tb_freq / 1000000, ppc_tb_freq % 1000000); printk(KERN_DEBUG "time_init: processor frequency = %lu.%.6lu MHz\n", |