[PATCH 14/14] arm: Convert arm to use read_persistent_clock

From: John Stultz
Date: Wed Mar 03 2010 - 22:58:54 EST


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@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
Signed-off-by: John Stultz <johnstul@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/