linux-mips
[Top] [All Lists]

Re: [PATCH 2.6] enable genrtc for MIPS

To: jsun@mvista.com
Subject: Re: [PATCH 2.6] enable genrtc for MIPS
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Tue, 03 Feb 2004 10:30:25 +0900 (JST)
Cc: macro@ds2.pg.gda.pl, linux-mips@linux-mips.org
In-reply-to: <20040202131950.I18155@mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.55.0401302012200.10311@jurand.ds.pg.gda.pl> <20040201.203005.74756858.anemo@mba.ocn.ne.jp> <20040202131950.I18155@mvista.com>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Mon, 2 Feb 2004 13:19:50 -0800, Jun Sun <jsun@mvista.com> said:
>> By the way, with this patch, individual board can not implement
>> it's own genrtc routines.  How about making gen_rtc_time,
>> etc. pointer to functions to allow overrides?

jsun> Is this necessary?  How about letting us wait until there is a
jsun> sensible need?

OK, we can wait.  But still I suppose gen_rtc_time will become a
pointer sooner or later....

Anyway, I think using genrtc instead of mips-rtc is very good idea.
Thank you.

jsun> If I understand you correctly, you like to have board rtc read
jsun> routines to return a rtc structure instead of the unsigned long
jsun> integer.

jsun> There are actually boards which makes the current implementation
jsun> more efficient.  See vr4181.

I see.

jsun> In general, however, this is not a bad idea, just involving a
jsun> lot more board level changes.  I think it deserves another patch
jsun> or even debate.

Though I'm not have a real code yet, how about this idea?

1. Provide std_rtc_get_time (returns ulong) implemented with
   get_rtc_time (returns rtc struct) pointer.
2. Provide std_get_rtc_time (returns rtc struct) implemented with
   rtc_get_time returns ulong) pointer.
3. Each board implement its own rtc_get_time or get_rtc_time.
4. In generic time_init(), initialize rtc_get_time pointer or
   get_rtc_time pointer with std_rtc_get_time or std_get_rtc_time if
   they were NULL.

---
Atsushi Nemoto

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