[Top] [All Lists]

Re: [PATCH] use rtc_lock to protect RTC operations

Subject: Re: [PATCH] use rtc_lock to protect RTC operations
From: Atsushi Nemoto <>
Date: Thu, 03 Nov 2005 22:37:05 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
>>>>> On Thu, 3 Nov 2005 13:15:32 +0000 (GMT), "Maciej W. Rozycki" 
>>>>> <> 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

<Prev in Thread] Current Thread [Next in Thread>