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]
/
include
/
asm-generic
/
rtc.h
diff --git
a/include/asm-generic/rtc.h
b/include/asm-generic/rtc.h
index
1a1ea02
..
d3238f1
100644
(file)
--- a/
include/asm-generic/rtc.h
+++ b/
include/asm-generic/rtc.h
@@
-1,5
+1,5
@@
/*
/*
- * inclue/asm-generic/rtc.h
+ * inclu
d
e/asm-generic/rtc.h
*
* Author: Tom Rini <trini@mvista.com>
*
*
* Author: Tom Rini <trini@mvista.com>
*
@@
-46,7
+46,7
@@
static inline unsigned int get_rtc_time(struct rtc_time *time)
{
unsigned long uip_watchdog = jiffies;
unsigned char ctrl;
{
unsigned long uip_watchdog = jiffies;
unsigned char ctrl;
-#ifdef CONFIG_DECSTATION
+#ifdef CONFIG_
MACH_
DECSTATION
unsigned int real_year;
#endif
unsigned int real_year;
#endif
@@
-79,7
+79,7
@@
static inline unsigned int get_rtc_time(struct rtc_time *time)
time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH);
time->tm_mon = CMOS_READ(RTC_MONTH);
time->tm_year = CMOS_READ(RTC_YEAR);
time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH);
time->tm_mon = CMOS_READ(RTC_MONTH);
time->tm_year = CMOS_READ(RTC_YEAR);
-#ifdef CONFIG_DECSTATION
+#ifdef CONFIG_
MACH_
DECSTATION
real_year = CMOS_READ(RTC_DEC_YEAR);
#endif
ctrl = CMOS_READ(RTC_CONTROL);
real_year = CMOS_READ(RTC_DEC_YEAR);
#endif
ctrl = CMOS_READ(RTC_CONTROL);
@@
-95,7
+95,7
@@
static inline unsigned int get_rtc_time(struct rtc_time *time)
BCD_TO_BIN(time->tm_year);
}
BCD_TO_BIN(time->tm_year);
}
-#ifdef CONFIG_DECSTATION
+#ifdef CONFIG_
MACH_
DECSTATION
time->tm_year += real_year - 72;
#endif
time->tm_year += real_year - 72;
#endif
@@
-114,10
+114,11
@@
static inline unsigned int get_rtc_time(struct rtc_time *time)
/* Set the current date and time in the real time clock. */
static inline int set_rtc_time(struct rtc_time *time)
{
/* Set the current date and time in the real time clock. */
static inline int set_rtc_time(struct rtc_time *time)
{
+ unsigned long flags;
unsigned char mon, day, hrs, min, sec;
unsigned char save_control, save_freq_select;
unsigned int yrs;
unsigned char mon, day, hrs, min, sec;
unsigned char save_control, save_freq_select;
unsigned int yrs;
-#ifdef CONFIG_DECSTATION
+#ifdef CONFIG_
MACH_
DECSTATION
unsigned int real_yrs, leap_yr;
#endif
unsigned int real_yrs, leap_yr;
#endif
@@
-131,8
+132,8
@@
static inline int set_rtc_time(struct rtc_time *time)
if (yrs > 255) /* They are unsigned */
return -EINVAL;
if (yrs > 255) /* They are unsigned */
return -EINVAL;
- spin_lock_irq
(&rtc_lock
);
-#ifdef CONFIG_DECSTATION
+ spin_lock_irq
save(&rtc_lock, flags
);
+#ifdef CONFIG_
MACH_
DECSTATION
real_yrs = yrs;
leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) ||
!((yrs + 1900) % 400));
real_yrs = yrs;
leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) ||
!((yrs + 1900) % 400));
@@
-152,7
+153,7
@@
static inline int set_rtc_time(struct rtc_time *time)
* whether the chip is in binary mode or not.
*/
if (yrs > 169) {
* whether the chip is in binary mode or not.
*/
if (yrs > 169) {
- spin_unlock_irq
(&rtc_lock
);
+ spin_unlock_irq
restore(&rtc_lock, flags
);
return -EINVAL;
}
return -EINVAL;
}
@@
-174,7
+175,7
@@
static inline int set_rtc_time(struct rtc_time *time)
save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
-#ifdef CONFIG_DECSTATION
+#ifdef CONFIG_
MACH_
DECSTATION
CMOS_WRITE(real_yrs, RTC_DEC_YEAR);
#endif
CMOS_WRITE(yrs, RTC_YEAR);
CMOS_WRITE(real_yrs, RTC_DEC_YEAR);
#endif
CMOS_WRITE(yrs, RTC_YEAR);
@@
-187,7
+188,7
@@
static inline int set_rtc_time(struct rtc_time *time)
CMOS_WRITE(save_control, RTC_CONTROL);
CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
CMOS_WRITE(save_control, RTC_CONTROL);
CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
- spin_unlock_irq
(&rtc_lock
);
+ spin_unlock_irq
restore(&rtc_lock, flags
);
return 0;
}
return 0;
}