aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-sh03/rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/mach-sh03/rtc.c')
-rw-r--r--arch/sh/boards/mach-sh03/rtc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sh/boards/mach-sh03/rtc.c b/arch/sh/boards/mach-sh03/rtc.c
index 0a9266bb51c5..a8b9f844ab5b 100644
--- a/arch/sh/boards/mach-sh03/rtc.c
+++ b/arch/sh/boards/mach-sh03/rtc.c
@@ -35,13 +35,13 @@
35#define RTC_BUSY 1 35#define RTC_BUSY 1
36#define RTC_STOP 2 36#define RTC_STOP 2
37 37
38extern spinlock_t rtc_lock; 38static DEFINE_SPINLOCK(sh03_rtc_lock);
39 39
40unsigned long get_cmos_time(void) 40unsigned long get_cmos_time(void)
41{ 41{
42 unsigned int year, mon, day, hour, min, sec; 42 unsigned int year, mon, day, hour, min, sec;
43 43
44 spin_lock(&rtc_lock); 44 spin_lock(&sh03_rtc_lock);
45 again: 45 again:
46 do { 46 do {
47 sec = (ctrl_inb(RTC_SEC1) & 0xf) + (ctrl_inb(RTC_SEC10) & 0x7) * 10; 47 sec = (ctrl_inb(RTC_SEC1) & 0xf) + (ctrl_inb(RTC_SEC10) & 0x7) * 10;
@@ -73,7 +73,7 @@ unsigned long get_cmos_time(void)
73 goto again; 73 goto again;
74 } 74 }
75 75
76 spin_unlock(&rtc_lock); 76 spin_unlock(&sh03_rtc_lock);
77 return mktime(year, mon, day, hour, min, sec); 77 return mktime(year, mon, day, hour, min, sec);
78} 78}
79 79
@@ -91,7 +91,7 @@ static int set_rtc_mmss(unsigned long nowtime)
91 int i; 91 int i;
92 92
93 /* gets recalled with irq locally disabled */ 93 /* gets recalled with irq locally disabled */
94 spin_lock(&rtc_lock); 94 spin_lock(&sh03_rtc_lock);
95 for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */ 95 for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */
96 if (!(ctrl_inb(RTC_CTL) & RTC_BUSY)) 96 if (!(ctrl_inb(RTC_CTL) & RTC_BUSY))
97 break; 97 break;
@@ -113,7 +113,7 @@ static int set_rtc_mmss(unsigned long nowtime)
113 cmos_minutes, real_minutes); 113 cmos_minutes, real_minutes);
114 retval = -1; 114 retval = -1;
115 } 115 }
116 spin_unlock(&rtc_lock); 116 spin_unlock(&sh03_rtc_lock);
117 117
118 return retval; 118 return retval;
119} 119}