>>>>> 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
|