linux-mips
[Top] [All Lists]

Re: [MIPS] Use generic NTP code for all MIPS platforms

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [MIPS] Use generic NTP code for all MIPS platforms
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 14 Aug 2007 11:29:13 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20070814.003242.59465104.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <S20023068AbXHMO0W/20070813142622Z+9352@ftp.linux-mips.org> <20070814.003242.59465104.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.14 (2007-02-12)
On Tue, Aug 14, 2007 at 12:32:42AM +0900, Atsushi Nemoto wrote:

> config GENERIC_CMOS_UPDATE
>       bool
>       default y
> 
> I think there are no point using GENERIC_CMOS_UPDATE for users of the
> new-style RTC_CLASS drivers or platforms with no RTC.

Platforms with no RTC are easy to handle, just throw in a dummy
implementation of all the RTC functions.  Or if you just don't want
RTC updates, set no_sync_cmos_clock = 1.

Several platforms had their own timer interrupt handlers overriding the
generic interrupt handler and breaking the NTP.  In most cases I doubt
this was a design decission so I had to go for a solution that makes
NTP work by default.

> There are some possible ways:
> 
> A) Make default of GENERIC_CMOS_UPDATE to "n" and select it explicitly
>    on platforms which need it.
> 
> B) Make default of GENERIC_CMOS_UPDATE depends on CONFIG_RTC_CLASS.
> 
> C) set no_sync_cmos_clock to 0 on time_init() if rtc_mips_set_mmss was
>    NULL and rtc_mips_set_time and was null_rtc_set_time.
> 
> And combinations ot variations of those...

You may want to look at my time changes.  One of the patches turns all
the excessive function pointer business we have in the MIPS time code
upside down in preparation for the dyntick code.

  Ralf

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