Re: [PATCH] use rtc_lock to protect RTC operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> On Thu, 3 Nov 2005 13:15:32 +0000 (GMT), "Maciej W. Rozycki" <macro@xxxxxxxxxxxxxx> said:

>> Unlike on PC CMOS_READ on a DEC is a single read operation, so
>> atomic and so doesn't need to be protected.  I'd have to check the
>> datasheet for any other reason why it might need locking though, so
>> I apply your patch for now and leave this to Maciej for later
>> optimization.

macro>  You are correct -- unless you need to perform multiple RTC
macro> access cycles uninterrupted in a row, a lock is not needed.

Then the dec_rtc_is_updating would be one liner:

	return (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);

What good hardware!

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux