git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
sh
/
boards
/
dreamcast
/
rtc.c
diff --git
a/arch/sh/boards/dreamcast/rtc.c
b/arch/sh/boards/dreamcast/rtc.c
index
379de16
..
b3a876a
100644
(file)
--- a/
arch/sh/boards/dreamcast/rtc.c
+++ b/
arch/sh/boards/dreamcast/rtc.c
@@
-1,4
+1,5
@@
-/* arch/sh/kernel/rtc-aica.c
+/*
+ * arch/sh/boards/dreamcast/rtc.c
*
* Dreamcast AICA RTC routines.
*
*
* Dreamcast AICA RTC routines.
*
@@
-10,15
+11,12
@@
*/
#include <linux/time.h>
*/
#include <linux/time.h>
-
+#include <asm/rtc.h>
#include <asm/io.h>
#include <asm/io.h>
-extern void (*rtc_get_time)(struct timespec *);
-extern int (*rtc_set_time)(const time_t);
-
/* The AICA RTC has an Epoch of 1/1/1950, so we must subtract 20 years (in
/* The AICA RTC has an Epoch of 1/1/1950, so we must subtract 20 years (in
- seconds
to get the standard Unix Epoch when getting the time, and add 20
- years when setting the time. */
+ seconds
) to get the standard Unix Epoch when getting the time, and add
+
20
years when setting the time. */
#define TWENTY_YEARS ((20 * 365LU + 5) * 86400)
/* The AICA RTC is represented by a 32-bit seconds counter stored in 2 16-bit
#define TWENTY_YEARS ((20 * 365LU + 5) * 86400)
/* The AICA RTC is represented by a 32-bit seconds counter stored in 2 16-bit
@@
-32,7
+30,8
@@
extern int (*rtc_set_time)(const time_t);
*
* Grabs the current RTC seconds counter and adjusts it to the Unix Epoch.
*/
*
* Grabs the current RTC seconds counter and adjusts it to the Unix Epoch.
*/
-void aica_rtc_gettimeofday(struct timespec *ts) {
+void aica_rtc_gettimeofday(struct timespec *ts)
+{
unsigned long val1, val2;
do {
unsigned long val1, val2;
do {
@@
-55,7
+54,8
@@
void aica_rtc_gettimeofday(struct timespec *ts) {
*
* Adjusts the given @tv to the AICA Epoch and sets the RTC seconds counter.
*/
*
* Adjusts the given @tv to the AICA Epoch and sets the RTC seconds counter.
*/
-int aica_rtc_settimeofday(const time_t secs) {
+int aica_rtc_settimeofday(const time_t secs)
+{
unsigned long val1, val2;
unsigned long adj = secs + TWENTY_YEARS;
unsigned long val1, val2;
unsigned long adj = secs + TWENTY_YEARS;
@@
-75,7
+75,7
@@
int aica_rtc_settimeofday(const time_t secs) {
void aica_time_init(void)
{
void aica_time_init(void)
{
- rtc_get_time = aica_rtc_gettimeofday;
- rtc_set_time = aica_rtc_settimeofday;
+ rtc_
sh_
get_time = aica_rtc_gettimeofday;
+ rtc_s
h_s
et_time = aica_rtc_settimeofday;
}
}