[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>
This commit is contained in:

committed by
Paul Mackerras

parent
7b5acbaac3
commit
c27da33969
@@ -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);
|
||||
|
Reference in New Issue
Block a user