Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146725
b: refs/heads/master
c: cd1408f
h: refs/heads/master
i:
  146723: dca3f43
v: v3
  • Loading branch information
Paul Mundt committed May 8, 2009
1 parent 41f705b commit 20bd048
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 6459d7bb72e9767bc7d22f2ee44aab35188e4b8a
refs/heads/master: cd1408f22d2fd8f0d09c082b07cf0b9bcfb6eac9
10 changes: 5 additions & 5 deletions trunk/arch/sh/boards/mach-sh03/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
#define RTC_BUSY 1
#define RTC_STOP 2

extern spinlock_t rtc_lock;
static DEFINE_SPINLOCK(sh03_rtc_lock);

unsigned long get_cmos_time(void)
{
unsigned int year, mon, day, hour, min, sec;

spin_lock(&rtc_lock);
spin_lock(&sh03_rtc_lock);
again:
do {
sec = (ctrl_inb(RTC_SEC1) & 0xf) + (ctrl_inb(RTC_SEC10) & 0x7) * 10;
Expand Down Expand Up @@ -73,7 +73,7 @@ unsigned long get_cmos_time(void)
goto again;
}

spin_unlock(&rtc_lock);
spin_unlock(&sh03_rtc_lock);
return mktime(year, mon, day, hour, min, sec);
}

Expand All @@ -91,7 +91,7 @@ static int set_rtc_mmss(unsigned long nowtime)
int i;

/* gets recalled with irq locally disabled */
spin_lock(&rtc_lock);
spin_lock(&sh03_rtc_lock);
for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */
if (!(ctrl_inb(RTC_CTL) & RTC_BUSY))
break;
Expand All @@ -113,7 +113,7 @@ static int set_rtc_mmss(unsigned long nowtime)
cmos_minutes, real_minutes);
retval = -1;
}
spin_unlock(&rtc_lock);
spin_unlock(&sh03_rtc_lock);

return retval;
}
Expand Down

0 comments on commit 20bd048

Please sign in to comment.