diff options
Diffstat (limited to 'include/asm-powerpc/time.h')
-rw-r--r-- | include/asm-powerpc/time.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index fdc271ebe41c..fa331dad97cb 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -149,6 +149,11 @@ static inline u64 get_tb(void) | |||
149 | } | 149 | } |
150 | #endif /* !CONFIG_PPC64 */ | 150 | #endif /* !CONFIG_PPC64 */ |
151 | 151 | ||
152 | static inline u64 get_tb_or_rtc(void) | ||
153 | { | ||
154 | return __USE_RTC() ? get_rtc() : get_tb(); | ||
155 | } | ||
156 | |||
152 | static inline void set_tb(unsigned int upper, unsigned int lower) | 157 | static inline void set_tb(unsigned int upper, unsigned int lower) |
153 | { | 158 | { |
154 | mtspr(SPRN_TBWL, 0); | 159 | mtspr(SPRN_TBWL, 0); |