diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-09-19 06:21:56 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-19 07:26:34 +0200 |
commit | c27da339698145a9383e052c1070a950d30da478 (patch) | |
tree | 817025c780b6be5d80405c90f4c5fb88086b6cb8 /include/asm-powerpc/time.h | |
parent | [POWERPC] Don't expose clock vDSO functions when CPU has no timebase (diff) | |
download | linux-c27da339698145a9383e052c1070a950d30da478.tar.xz linux-c27da339698145a9383e052c1070a950d30da478.zip |
[POWERPC] Fix timekeeping on PowerPC 601
Recent changes to the timekeeping code broke support for the PowerPC 601
processor which doesn't have the usual timebase facility but a slightly
different thing called (yuck) the RTC.
This fixes it, boot tested on an old 601 based PowerMac 7200.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to '')
-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 d7f5ddfbaac7..c104c15c6625 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h @@ -149,6 +149,11 @@ static inline u64 get_tb(void) } #endif /* !CONFIG_PPC64 */ +static inline u64 get_tb_or_rtc(void) +{ + return __USE_RTC() ? get_rtc() : get_tb(); +} + static inline void set_tb(unsigned int upper, unsigned int lower) { mtspr(SPRN_TBWL, 0); |