kernel: update to kernel 2.6.34.1
[openwrt.git] / target / linux / sibyte / patches / 104-sibyte_rtc_cleanup.patch
1 --- a/arch/mips/sibyte/swarm/setup.c
2 +++ b/arch/mips/sibyte/swarm/setup.c
3 @@ -56,14 +56,6 @@ extern void sb1250_setup(void);
4 #error invalid SiByte board configuration
5 #endif
6
7 -extern int xicor_probe(void);
8 -extern int xicor_set_time(unsigned long);
9 -extern unsigned long xicor_get_time(void);
10 -
11 -extern int m41t81_probe(void);
12 -extern int m41t81_set_time(unsigned long);
13 -extern unsigned long m41t81_get_time(void);
14 -
15 const char *get_system_type(void)
16 {
17 return "SiByte " SIBYTE_BOARD_NAME;
18 @@ -79,49 +71,18 @@ int swarm_be_handler(struct pt_regs *reg
19 return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL);
20 }
21
22 -enum swarm_rtc_type {
23 - RTC_NONE,
24 - RTC_XICOR,
25 - RTC_M4LT81
26 -};
27 -
28 -enum swarm_rtc_type swarm_rtc_type;
29 -
30 void read_persistent_clock(struct timespec *ts)
31 {
32 unsigned long sec;
33
34 - switch (swarm_rtc_type) {
35 - case RTC_XICOR:
36 - sec = xicor_get_time();
37 - break;
38 -
39 - case RTC_M4LT81:
40 - sec = m41t81_get_time();
41 - break;
42 -
43 - case RTC_NONE:
44 - default:
45 - sec = mktime(2000, 1, 1, 0, 0, 0);
46 - break;
47 - }
48 + sec = mktime(2000, 1, 1, 0, 0, 0);
49 ts->tv_sec = sec;
50 ts->tv_nsec = 0;
51 }
52
53 int rtc_mips_set_time(unsigned long sec)
54 {
55 - switch (swarm_rtc_type) {
56 - case RTC_XICOR:
57 - return xicor_set_time(sec);
58 -
59 - case RTC_M4LT81:
60 - return m41t81_set_time(sec);
61 -
62 - case RTC_NONE:
63 - default:
64 return -1;
65 - }
66 }
67
68 void __init plat_mem_setup(void)
69 @@ -138,11 +99,6 @@ void __init plat_mem_setup(void)
70
71 board_be_handler = swarm_be_handler;
72
73 - if (xicor_probe())
74 - swarm_rtc_type = RTC_XICOR;
75 - if (m41t81_probe())
76 - swarm_rtc_type = RTC_M4LT81;
77 -
78 #ifdef CONFIG_VT
79 screen_info = (struct screen_info) {
80 0, 0, /* orig-x, orig-y */
This page took 0.046363 seconds and 5 git commands to generate.