diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-09-19 14:21:56 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-19 15:26:34 +1000 |
commit | c27da339698145a9383e052c1070a950d30da478 (patch) | |
tree | 817025c780b6be5d80405c90f4c5fb88086b6cb8 /include | |
parent | 7b5acbaac3f94ab810a977c0ec4e5fcabbf51bed (diff) | |
download | linux-c27da339698145a9383e052c1070a950d30da478.tar.bz2 |
[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 'include')
-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); |