aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/sh03/rtc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/sh/boards/sh03/rtc.c b/arch/sh/boards/sh03/rtc.c
index cbeca7037ba5..e8bec67be84d 100644
--- a/arch/sh/boards/sh03/rtc.c
+++ b/arch/sh/boards/sh03/rtc.c
@@ -48,13 +48,9 @@ extern spinlock_t rtc_lock;
48unsigned long get_cmos_time(void) 48unsigned long get_cmos_time(void)
49{ 49{
50 unsigned int year, mon, day, hour, min, sec; 50 unsigned int year, mon, day, hour, min, sec;
51 int i;
52 51
53 spin_lock(&rtc_lock); 52 spin_lock(&rtc_lock);
54 again: 53 again:
55 for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */
56 if (!(ctrl_inb(RTC_CTL) & RTC_BUSY))
57 break;
58 do { 54 do {
59 sec = (ctrl_inb(RTC_SEC1) & 0xf) + (ctrl_inb(RTC_SEC10) & 0x7) * 10; 55 sec = (ctrl_inb(RTC_SEC1) & 0xf) + (ctrl_inb(RTC_SEC10) & 0x7) * 10;
60 min = (ctrl_inb(RTC_MIN1) & 0xf) + (ctrl_inb(RTC_MIN10) & 0xf) * 10; 56 min = (ctrl_inb(RTC_MIN1) & 0xf) + (ctrl_inb(RTC_MIN10) & 0xf) * 10;