From f3ebbc20ab835ff98cf920f85de989064e352ee5 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 12 Jul 2007 21:29:06 +0100 Subject: [ARM] sa1100: stop doing our own rtc management over suspend Remove the RTC management over a suspend/resume cycle. As per the corresponding PXA patch, the RTC library code handles updating system time on resume. Signed-off-by: Russell King --- arch/arm/mach-sa1100/pm.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch/arm/mach-sa1100') diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index d674cf34315..01a37d3c072 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c @@ -57,12 +57,7 @@ enum { SLEEP_SAVE_SP = 0, static int sa11x0_pm_enter(suspend_state_t state) { unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE]; - struct timespec delta, rtc; - /* preserve current time */ - rtc.tv_sec = RCNR; - rtc.tv_nsec = 0; - save_time_delta(&delta, &rtc); gpio = GPLR; /* save vital registers */ @@ -119,10 +114,6 @@ static int sa11x0_pm_enter(suspend_state_t state) */ PSSR = PSSR_PH; - /* restore current time */ - rtc.tv_sec = RCNR; - restore_time_delta(&delta, &rtc); - return 0; } -- cgit v1.2.3 From fcae8e098877b798c365fd9d807f86d5e2a2b324 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 12 Jul 2007 21:29:45 +0100 Subject: [ARM] sa1100: remove boot time RTC initialisation The RTC library code contains everything necessary to set the system time from the RTC; for similar reasons as the previous commit, it's far better to let the RTC library code sort this out rather than implement something which might not be appropriate for everyone. Signed-off-by: Russell King --- arch/arm/mach-sa1100/time.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'arch/arm/mach-sa1100') diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 29cb0c1604a..fdf7b016e7a 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c @@ -21,25 +21,6 @@ #define RTC_DEF_DIVIDER (32768 - 1) #define RTC_DEF_TRIM 0 -static unsigned long __init sa1100_get_rtc_time(void) -{ - /* - * According to the manual we should be able to let RTTR be zero - * and then a default divisor for a 32.768KHz clock is used. - * Apparently this doesn't work, at least for my SA1110 rev 5. - * If the clock divider is uninitialized then reset it to the - * default value to get the 1Hz clock. - */ - if (RTTR == 0) { - RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16); - printk(KERN_WARNING "Warning: uninitialized Real Time Clock\n"); - /* The current RTC value probably doesn't make sense either */ - RCNR = 0; - return 0; - } - return RCNR; -} - static int sa1100_set_rtc(void) { unsigned long current_time = xtime.tv_sec; @@ -117,15 +98,10 @@ static struct irqaction sa1100_timer_irq = { static void __init sa1100_timer_init(void) { - struct timespec tv; unsigned long flags; set_rtc = sa1100_set_rtc; - tv.tv_nsec = 0; - tv.tv_sec = sa1100_get_rtc_time(); - do_settimeofday(&tv); - OIER = 0; /* disable any timer interrupts */ OSSR = 0xf; /* clear status on all timers */ setup_irq(IRQ_OST0, &sa1100_timer_irq); -- cgit v1.2.3