diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:08:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:08:33 -0400 |
commit | d3d07d941fd80c173b6d690ded00ee5fb8302e06 (patch) | |
tree | f1a82c956e393df9933c8544bb564ef1735384ee /arch/sh/boards/mach-sh03/rtc.c | |
parent | 6cd8e300b49332eb9eeda45816c711c198d31505 (diff) | |
parent | 54ff328b46e58568c4b3350c2fa3223ef862e5a4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (266 commits)
sh: Tie sparseirq in to Kconfig.
sh: Wire up sys_rt_tgsigqueueinfo.
sh: Fix sys_pwritev() syscall table entry for sh32.
sh: Fix sh4a llsc-based cmpxchg()
sh: sh7724: Add JPU support
sh: sh7724: INTC setting update
sh: sh7722 clock framework rewrite
sh: sh7366 clock framework rewrite
sh: sh7343 clock framework rewrite
sh: sh7724 clock framework rewrite V3
sh: sh7723 clock framework rewrite V2
sh: add enable()/disable()/set_rate() to div6 code
sh: add AP325RXA mode pin configuration
sh: add Migo-R mode pin configuration
sh: sh7722 mode pin definitions
sh: sh7724 mode pin comments
sh: sh7723 mode pin V2
sh: rework mode pin code
sh: clock div6 helper code
sh: clock div4 frequency table offset fix
...
Diffstat (limited to 'arch/sh/boards/mach-sh03/rtc.c')
-rw-r--r-- | arch/sh/boards/mach-sh03/rtc.c | 10 |
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 | ||
38 | extern spinlock_t rtc_lock; | 38 | static DEFINE_SPINLOCK(sh03_rtc_lock); |
39 | 39 | ||
40 | unsigned long get_cmos_time(void) | 40 | unsigned 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 | } |