[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1267675049-12337-15-git-send-email-johnstul@us.ibm.com>
Date: Wed, 3 Mar 2010 19:57:29 -0800
From: John Stultz <johnstul@...ibm.com>
To: " lkml" <linux-kernel@...r.kernel.org>
Cc: John Stultz <johnstul@...ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Russell King <linux@....linux.org.uk>
Subject: [PATCH 14/14] arm: Convert arm to use read_persistent_clock
This patch converts the arm architecture to use the generic read_persistent_clock and update_persistent_clock interfaces, reducing the amount of arch specific code we have to maintain, and allowing for further cleanups in the future.
Also removes a direct xtime access, replacing it with current_kernel_time()
I have not built or tested this patch, so help from arch maintainers would be appreciated.
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Russell King <linux@....linux.org.uk>
Signed-off-by: John Stultz <johnstul@...ibm.com>
---
arch/arm/Kconfig | 3 +++
arch/arm/kernel/time.c | 7 +++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3b18128..b70929d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -43,6 +43,9 @@ config GENERIC_GPIO
config GENERIC_TIME
bool
+config GENERIC_CMOS_UPDATE
+ def_bool y
+
config GENERIC_CLOCKEVENTS
bool
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 2875380..eebe8f5 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -79,6 +79,13 @@ static unsigned long dummy_gettimeoffset(void)
}
#endif
+int update_persistent_clock(struct timespec now)
+{
+ if (set_rtc == NULL)
+ return -1;
+ return set_rtc(now);
+}
+
#ifdef CONFIG_LEDS_TIMER
static inline void do_leds(void)
{
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists