2009-05-26 16:03:56 +00:00
|
|
|
--- a/arch/mips/sibyte/swarm/setup.c
|
|
|
|
+++ b/arch/mips/sibyte/swarm/setup.c
|
|
|
|
@@ -56,14 +56,6 @@ extern void sb1250_setup(void);
|
|
|
|
#error invalid SiByte board configuration
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-extern int xicor_probe(void);
|
|
|
|
-extern int xicor_set_time(unsigned long);
|
|
|
|
-extern unsigned long xicor_get_time(void);
|
|
|
|
-
|
|
|
|
-extern int m41t81_probe(void);
|
|
|
|
-extern int m41t81_set_time(unsigned long);
|
|
|
|
-extern unsigned long m41t81_get_time(void);
|
|
|
|
-
|
|
|
|
const char *get_system_type(void)
|
|
|
|
{
|
|
|
|
return "SiByte " SIBYTE_BOARD_NAME;
|
2010-02-17 23:00:47 +00:00
|
|
|
@@ -79,49 +71,18 @@ int swarm_be_handler(struct pt_regs *reg
|
2009-05-26 16:03:56 +00:00
|
|
|
return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL);
|
|
|
|
}
|
|
|
|
|
|
|
|
-enum swarm_rtc_type {
|
|
|
|
- RTC_NONE,
|
|
|
|
- RTC_XICOR,
|
2011-03-18 13:33:18 +00:00
|
|
|
- RTC_M41T81,
|
2009-05-26 16:03:56 +00:00
|
|
|
-};
|
|
|
|
-
|
|
|
|
-enum swarm_rtc_type swarm_rtc_type;
|
|
|
|
-
|
2010-02-17 23:00:47 +00:00
|
|
|
void read_persistent_clock(struct timespec *ts)
|
2009-05-26 16:03:56 +00:00
|
|
|
{
|
2010-02-17 23:00:47 +00:00
|
|
|
unsigned long sec;
|
|
|
|
|
2009-05-26 16:03:56 +00:00
|
|
|
- switch (swarm_rtc_type) {
|
|
|
|
- case RTC_XICOR:
|
2010-02-17 23:00:47 +00:00
|
|
|
- sec = xicor_get_time();
|
|
|
|
- break;
|
2009-05-26 16:03:56 +00:00
|
|
|
-
|
2011-03-18 13:33:18 +00:00
|
|
|
- case RTC_M41T81:
|
2010-02-17 23:00:47 +00:00
|
|
|
- sec = m41t81_get_time();
|
|
|
|
- break;
|
2009-05-26 16:03:56 +00:00
|
|
|
-
|
|
|
|
- case RTC_NONE:
|
|
|
|
- default:
|
2010-02-17 23:00:47 +00:00
|
|
|
- sec = mktime(2000, 1, 1, 0, 0, 0);
|
|
|
|
- break;
|
2009-05-26 16:03:56 +00:00
|
|
|
- }
|
2010-02-17 23:00:47 +00:00
|
|
|
+ sec = mktime(2000, 1, 1, 0, 0, 0);
|
|
|
|
ts->tv_sec = sec;
|
|
|
|
ts->tv_nsec = 0;
|
2009-05-26 16:03:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int rtc_mips_set_time(unsigned long sec)
|
|
|
|
{
|
|
|
|
- switch (swarm_rtc_type) {
|
|
|
|
- case RTC_XICOR:
|
|
|
|
- return xicor_set_time(sec);
|
|
|
|
-
|
2011-03-18 13:33:18 +00:00
|
|
|
- case RTC_M41T81:
|
2009-05-26 16:03:56 +00:00
|
|
|
- return m41t81_set_time(sec);
|
|
|
|
-
|
|
|
|
- case RTC_NONE:
|
|
|
|
- default:
|
2010-02-17 23:00:47 +00:00
|
|
|
return -1;
|
2009-05-26 16:03:56 +00:00
|
|
|
- }
|
|
|
|
}
|
|
|
|
|
|
|
|
void __init plat_mem_setup(void)
|
2010-02-17 23:00:47 +00:00
|
|
|
@@ -138,11 +99,6 @@ void __init plat_mem_setup(void)
|
2009-05-26 16:03:56 +00:00
|
|
|
|
|
|
|
board_be_handler = swarm_be_handler;
|
|
|
|
|
|
|
|
- if (xicor_probe())
|
|
|
|
- swarm_rtc_type = RTC_XICOR;
|
|
|
|
- if (m41t81_probe())
|
2011-03-18 13:33:18 +00:00
|
|
|
- swarm_rtc_type = RTC_M41T81;
|
2009-05-26 16:03:56 +00:00
|
|
|
-
|
2009-06-15 07:11:22 +00:00
|
|
|
#ifdef CONFIG_VT
|
|
|
|
screen_info = (struct screen_info) {
|
2011-03-18 13:33:18 +00:00
|
|
|
.orig_video_page = 52,
|