Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: ralf@linux-mips.org, anemo@mba.ocn.ne.jp
Cc: linux-mips@linux-mips.org
Subject: [PATCH 3/3] time: implement read_persistent_clock()
Date: Fri,  4 May 2007 17:36:46 +0200	[thread overview]
Message-ID: <1178293006620-git-send-email-fbuihuu@gmail.com> (raw)
In-Reply-To: <11782930063123-git-send-email-fbuihuu@gmail.com>

From: Franck Bui-Huu <fbuihuu@gmail.com>

This function is needed by timekeeping subsystem.

This also removes the need to setup xtime.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/time.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 5a4fd06..0d6efda 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -326,17 +326,16 @@ static void __init init_mips_clocksource(void)
 	clocksource_register(&clocksource_mips);
 }
 
+unsigned long read_persistent_clock(void)
+{
+	return rtc_mips_get_time();
+}
+
 void __init time_init(void)
 {
 	if (!rtc_mips_set_mmss)
 		rtc_mips_set_mmss = rtc_mips_set_time;
 
-	xtime.tv_sec = rtc_mips_get_time();
-	xtime.tv_nsec = 0;
-
-	set_normalized_timespec(&wall_to_monotonic,
-	                        -xtime.tv_sec, -xtime.tv_nsec);
-
 	/* Choose appropriate high precision timer routines.  */
 	if (!cpu_has_counter && !clocksource_mips.read)
 		/* No high precision timer -- sorry.  */
-- 
1.5.1.3

  reply	other threads:[~2007-05-04 15:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04 15:36 [PATCH 1/3] clocksource: use CLOCKSOURCE_MASK() macro Franck Bui-Huu
2007-05-04 15:36 ` [PATCH 2/3] time: replace board_time_init() by plat_clk_setup() Franck Bui-Huu
2007-05-04 15:36   ` Franck Bui-Huu [this message]
2007-05-05 16:03   ` Atsushi Nemoto
2007-05-07  8:50     ` Franck Bui-Huu
2007-05-07  9:28       ` Atsushi Nemoto
2007-05-07 10:08         ` Franck Bui-Huu
2007-05-09 13:54         ` Ralf Baechle
2007-05-11 11:41     ` Ralf Baechle
2007-05-11 12:26       ` Franck Bui-Huu
2007-05-05 16:16   ` Atsushi Nemoto
2007-05-07  8:51     ` Franck Bui-Huu
2007-05-09 13:22 ` [PATCH 1/3] clocksource: use CLOCKSOURCE_MASK() macro Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1178293006620-git-send-email-fbuihuu@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox