From: Marcus C. <ma...@id...> - 2000-12-01 15:17:41
|
>>>>> "Philipp" == Philipp Rumpf <pr...@pa...> writes: Philipp> Are the counters latched when you read the first register ? Otherwise you Nope. Philipp> might want to use the standard trick of doing Philipp> do { Philipp> val1 = (ctrl_inl(high word)<<16) + (ctrl_inl(low word)&0xffff); Philipp> val2 = (ctrl_inl(high word)<<16) + (ctrl_inl(low word)&0xffff); Philipp> } while(val1 != val2); The code I use check that the value is the same four times in a row. That is what the SEGA libraries do, so maybe it's necessary. Philipp> so arch/sh/kernel/time.c: get_rtc_time would look like this; What is said here only concerns the Dreamcast. It should not be applied to other machines using the SH cpu. The Dreamcast RTC is part of the AICA chip, not of the cpu. Philipp> val1 -= 631152000; Yup. // Marcus |