summaryrefslogtreecommitdiffstats
path: root/arch/mips/lasat
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lasat')
-rw-r--r--arch/mips/lasat/ds1603.c6
-rw-r--r--arch/mips/lasat/ds1603.h2
-rw-r--r--arch/mips/lasat/setup.c6
-rw-r--r--arch/mips/lasat/sysctl.c10
4 files changed, 10 insertions, 14 deletions
diff --git a/arch/mips/lasat/ds1603.c b/arch/mips/lasat/ds1603.c
index 0b315f51d62..52cb1436a12 100644
--- a/arch/mips/lasat/ds1603.c
+++ b/arch/mips/lasat/ds1603.c
@@ -135,8 +135,7 @@ static void rtc_end_op(void)
lasat_ndelay(1000);
}
-/* interface */
-unsigned long ds1603_read(void)
+unsigned long read_persistent_clock(void)
{
unsigned long word;
unsigned long flags;
@@ -147,10 +146,11 @@ unsigned long ds1603_read(void)
word = rtc_read_word();
rtc_end_op();
spin_unlock_irqrestore(&rtc_lock, flags);
+
return word;
}
-int ds1603_set(unsigned long time)
+int rtc_mips_set_mmss(unsigned long time)
{
unsigned long flags;
diff --git a/arch/mips/lasat/ds1603.h b/arch/mips/lasat/ds1603.h
index c2e5c76a379..2da3704044f 100644
--- a/arch/mips/lasat/ds1603.h
+++ b/arch/mips/lasat/ds1603.h
@@ -20,8 +20,6 @@ struct ds_defs {
extern struct ds_defs *ds1603;
-unsigned long ds1603_read(void);
-int ds1603_set(unsigned long);
void ds1603_set_trimmer(unsigned int);
void ds1603_enable(void);
void ds1603_disable(void);
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c
index 187e37821d9..54827d0174b 100644
--- a/arch/mips/lasat/setup.c
+++ b/arch/mips/lasat/setup.c
@@ -117,7 +117,7 @@ static struct notifier_block lasat_panic_block[] =
}
};
-static void lasat_time_init(void)
+void plat_time_init(void)
{
mips_hpt_frequency = lasat_board_info.li_cpu_hz / 2;
}
@@ -142,12 +142,8 @@ void __init plat_mem_setup(void)
lasat_reboot_setup();
- board_time_init = lasat_time_init;
-
#ifdef CONFIG_DS1603
ds1603 = &ds_defs[mips_machtype];
- rtc_mips_get_time = ds1603_read;
- rtc_mips_set_time = ds1603_set;
#endif
#ifdef DYNAMIC_SERIAL_INIT
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 4575a829766..389336c4ecc 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -32,6 +32,8 @@
#include <linux/mutex.h>
#include <linux/uaccess.h>
+#include <asm/time.h>
+
#include "sysctl.h"
#include "ds1603.h"
@@ -106,7 +108,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
mutex_lock(&lasat_info_mutex);
if (!write) {
- rtctmp = ds1603_read();
+ rtctmp = read_persistent_clock();
/* check for time < 0 and set to 0 */
if (rtctmp < 0)
rtctmp = 0;
@@ -116,7 +118,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
mutex_unlock(&lasat_info_mutex);
return r;
}
- ds1603_set(rtctmp);
+ rtc_mips_set_mmss(rtctmp);
mutex_unlock(&lasat_info_mutex);
return 0;
@@ -152,7 +154,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
int r;
mutex_lock(&lasat_info_mutex);
- rtctmp = ds1603_read();
+ rtctmp = read_persistent_clock();
if (rtctmp < 0)
rtctmp = 0;
r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
@@ -161,7 +163,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
return r;
}
if (newval && newlen)
- ds1603_set(rtctmp);
+ rtc_mips_set_mmss(rtctmp);
mutex_unlock(&lasat_info_mutex);
return 1;