Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59251
b: refs/heads/master
c: fcae8e0
h: refs/heads/master
i:
  59249: ddbf73c
  59247: a79537e
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jul 12, 2007
1 parent 202097d commit db98da2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3ebbc20ab835ff98cf920f85de989064e352ee5
refs/heads/master: fcae8e098877b798c365fd9d807f86d5e2a2b324
24 changes: 0 additions & 24 deletions trunk/arch/arm/mach-sa1100/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit db98da2

Please sign in to comment.