aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 04:11:32 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 04:11:32 -0400
commitaf514ca7d27b31e3c278e1331f0ebdb3ad385a90 (patch)
treeaf5444786b8b9251e6a6f011ee71333025bb2c84 /arch/sh/boards
parent2991be725260d6fec11691a6138b9d71de949956 (diff)
sh: Rename rtc_get/set_time() to avoid RTC_CLASS conflict.
We have a clash with RTC_CLASS over these names, so we change them.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/dreamcast/rtc.c4
-rw-r--r--arch/sh/boards/landisk/rtc.c17
-rw-r--r--arch/sh/boards/mpc1211/rtc.c4
-rw-r--r--arch/sh/boards/sh03/rtc.c9
-rw-r--r--arch/sh/boards/snapgear/rtc.c8
5 files changed, 16 insertions, 26 deletions
diff --git a/arch/sh/boards/dreamcast/rtc.c b/arch/sh/boards/dreamcast/rtc.c
index 44420494dc22..b3a876a3b859 100644
--- a/arch/sh/boards/dreamcast/rtc.c
+++ b/arch/sh/boards/dreamcast/rtc.c
@@ -75,7 +75,7 @@ int aica_rtc_settimeofday(const time_t secs)
75 75
76void aica_time_init(void) 76void aica_time_init(void)
77{ 77{
78 rtc_get_time = aica_rtc_gettimeofday; 78 rtc_sh_get_time = aica_rtc_gettimeofday;
79 rtc_set_time = aica_rtc_settimeofday; 79 rtc_sh_set_time = aica_rtc_settimeofday;
80} 80}
81 81
diff --git a/arch/sh/boards/landisk/rtc.c b/arch/sh/boards/landisk/rtc.c
index d666aa63303f..35ba726a0979 100644
--- a/arch/sh/boards/landisk/rtc.c
+++ b/arch/sh/boards/landisk/rtc.c
@@ -16,17 +16,9 @@
16#include <linux/time.h> 16#include <linux/time.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/bcd.h>
20#include <asm/rtc.h>
19 21
20#ifndef BCD_TO_BIN
21#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
22#endif
23
24#ifndef BIN_TO_BCD
25#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
26#endif
27
28extern void (*rtc_get_time) (struct timespec *);
29extern int (*rtc_set_time) (const time_t);
30extern spinlock_t rtc_lock; 22extern spinlock_t rtc_lock;
31 23
32extern void 24extern void
@@ -94,9 +86,8 @@ int landisk_rtc_settimeofday(const time_t secs)
94 return retval; 86 return retval;
95} 87}
96 88
97
98void landisk_time_init(void) 89void landisk_time_init(void)
99{ 90{
100 rtc_get_time = landisk_rtc_gettimeofday; 91 rtc_sh_get_time = landisk_rtc_gettimeofday;
101 rtc_set_time = landisk_rtc_settimeofday; 92 rtc_sh_set_time = landisk_rtc_settimeofday;
102} 93}
diff --git a/arch/sh/boards/mpc1211/rtc.c b/arch/sh/boards/mpc1211/rtc.c
index a76c655dceee..03b123a4bba4 100644
--- a/arch/sh/boards/mpc1211/rtc.c
+++ b/arch/sh/boards/mpc1211/rtc.c
@@ -130,7 +130,7 @@ int mpc1211_rtc_settimeofday(const struct timeval *tv)
130 130
131void mpc1211_time_init(void) 131void mpc1211_time_init(void)
132{ 132{
133 rtc_get_time = mpc1211_rtc_gettimeofday; 133 rtc_sh_get_time = mpc1211_rtc_gettimeofday;
134 rtc_set_time = mpc1211_rtc_settimeofday; 134 rtc_sh_set_time = mpc1211_rtc_settimeofday;
135} 135}
136 136
diff --git a/arch/sh/boards/sh03/rtc.c b/arch/sh/boards/sh03/rtc.c
index d609863cfe53..0a9266bb51c5 100644
--- a/arch/sh/boards/sh03/rtc.c
+++ b/arch/sh/boards/sh03/rtc.c
@@ -10,9 +10,10 @@
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/bcd.h> 12#include <linux/bcd.h>
13#include <asm/io.h>
14#include <linux/rtc.h> 13#include <linux/rtc.h>
15#include <linux/spinlock.h> 14#include <linux/spinlock.h>
15#include <asm/io.h>
16#include <asm/rtc.h>
16 17
17#define RTC_BASE 0xb0000000 18#define RTC_BASE 0xb0000000
18#define RTC_SEC1 (RTC_BASE + 0) 19#define RTC_SEC1 (RTC_BASE + 0)
@@ -34,8 +35,6 @@
34#define RTC_BUSY 1 35#define RTC_BUSY 1
35#define RTC_STOP 2 36#define RTC_STOP 2
36 37
37extern void (*rtc_get_time)(struct timespec *);
38extern int (*rtc_set_time)(const time_t);
39extern spinlock_t rtc_lock; 38extern spinlock_t rtc_lock;
40 39
41unsigned long get_cmos_time(void) 40unsigned long get_cmos_time(void)
@@ -128,6 +127,6 @@ int sh03_rtc_settimeofday(const time_t secs)
128 127
129void sh03_time_init(void) 128void sh03_time_init(void)
130{ 129{
131 rtc_get_time = sh03_rtc_gettimeofday; 130 rtc_sh_get_time = sh03_rtc_gettimeofday;
132 rtc_set_time = sh03_rtc_settimeofday; 131 rtc_sh_set_time = sh03_rtc_settimeofday;
133} 132}
diff --git a/arch/sh/boards/snapgear/rtc.c b/arch/sh/boards/snapgear/rtc.c
index 287bc4ed3ac7..722479deb55a 100644
--- a/arch/sh/boards/snapgear/rtc.c
+++ b/arch/sh/boards/snapgear/rtc.c
@@ -165,11 +165,11 @@ void __init secureedge5410_rtc_init(void)
165 } 165 }
166 166
167 if (use_ds1302) { 167 if (use_ds1302) {
168 rtc_get_time = snapgear_rtc_gettimeofday; 168 rtc_sh_get_time = snapgear_rtc_gettimeofday;
169 rtc_set_time = snapgear_rtc_settimeofday; 169 rtc_sh_set_time = snapgear_rtc_settimeofday;
170 } else { 170 } else {
171 rtc_get_time = sh_rtc_gettimeofday; 171 rtc_sh_get_time = sh_rtc_gettimeofday;
172 rtc_set_time = sh_rtc_settimeofday; 172 rtc_sh_set_time = sh_rtc_settimeofday;
173 } 173 }
174 174
175 printk("SnapGear RTC: using %s rtc.\n", use_ds1302 ? "ds1302" : "internal"); 175 printk("SnapGear RTC: using %s rtc.\n", use_ds1302 ? "ds1302" : "internal");