Commit fcae8e09 authored by Russell King's avatar Russell King Committed by Russell King

[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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent f3ebbc20
...@@ -21,25 +21,6 @@ ...@@ -21,25 +21,6 @@
#define RTC_DEF_DIVIDER (32768 - 1) #define RTC_DEF_DIVIDER (32768 - 1)
#define RTC_DEF_TRIM 0 #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) static int sa1100_set_rtc(void)
{ {
unsigned long current_time = xtime.tv_sec; unsigned long current_time = xtime.tv_sec;
...@@ -117,15 +98,10 @@ static struct irqaction sa1100_timer_irq = { ...@@ -117,15 +98,10 @@ static struct irqaction sa1100_timer_irq = {
static void __init sa1100_timer_init(void) static void __init sa1100_timer_init(void)
{ {
struct timespec tv;
unsigned long flags; unsigned long flags;
set_rtc = sa1100_set_rtc; 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 */ OIER = 0; /* disable any timer interrupts */
OSSR = 0xf; /* clear status on all timers */ OSSR = 0xf; /* clear status on all timers */
setup_irq(IRQ_OST0, &sa1100_timer_irq); setup_irq(IRQ_OST0, &sa1100_timer_irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment