diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2020-09-29 06:48:38 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-10-08 21:17:14 +1100 |
commit | a4c5a355422920bcbfe3fd1f01aead2d3a2a820c (patch) | |
tree | e17f779ec930fff7cd998fc84f9757980d552b3f /arch/powerpc/include/asm | |
parent | 2e38ea486615bddbc7a42d002aee93a3a9e7a36f (diff) |
powerpc: Remove __USE_RTC()
Now that PowerPC 601 is gone, __USE_RTC() is never true.
Remove it.
That also leads to removing get_rtc() and get_rtcl()
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/4757e1ed21fe1968c761ae081d1f3d790a9673f8.1601362098.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/time.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h index ce065589192a..caf68a4bc19e 100644 --- a/arch/powerpc/include/asm/time.h +++ b/arch/powerpc/include/asm/time.h @@ -38,9 +38,6 @@ struct div_result { u64 result_low; }; -/* Accessor functions for the timebase (RTC on 601) registers. */ -#define __USE_RTC() (0) - #ifdef CONFIG_PPC64 /* For compatibility, get_tbl() is defined as get_tb() on ppc64 */ @@ -59,25 +56,6 @@ static inline unsigned int get_tbu(void) } #endif /* !CONFIG_PPC64 */ -static inline unsigned int get_rtcl(void) -{ - unsigned int rtcl; - - asm volatile("mfrtcl %0" : "=r" (rtcl)); - return rtcl; -} - -static inline u64 get_rtc(void) -{ - unsigned int hi, lo, hi2; - - do { - asm volatile("mfrtcu %0; mfrtcl %1; mfrtcu %2" - : "=r" (hi), "=r" (lo), "=r" (hi2)); - } while (hi2 != hi); - return (u64)hi * 1000000000 + lo; -} - static inline u64 get_vtb(void) { #ifdef CONFIG_PPC_BOOK3S_64 @@ -109,7 +87,7 @@ static inline u64 get_tb(void) static inline u64 get_tb_or_rtc(void) { - return __USE_RTC() ? get_rtc() : get_tb(); + return get_tb(); } static inline void set_tb(unsigned int upper, unsigned int lower) @@ -153,10 +131,6 @@ static inline void set_dec(u64 val) static inline unsigned long tb_ticks_since(unsigned long tstamp) { - if (__USE_RTC()) { - int delta = get_rtcl() - (unsigned int) tstamp; - return delta < 0 ? delta + 1000000000 : delta; - } return get_tbl() - tstamp; } |