The new HPET RTC emulation code uses a function in rtc.c, get_rtc_time().
So that function was made non-static. Problem is, the same function name is
used elsewhere by some architectures, so there will be linkage problems.
And rtc_get_time() is used too, so I renamed it to rtc_get_rtc_time().
Also, the HPET code was setting CONFIG_HPET_EMULATE_RTC by hand in a header
file. Fix it to use the Kconfig system properly.
Choose N to continue using the legacy 8254 timer.
+config HPET_EMULATE_RTC
+ def_bool HPET_TIMER && RTC=y
+
config SMP
bool "Symmetric multi-processing support"
---help---
#include <linux/rtc.h>
extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-extern void get_rtc_time(struct rtc_time *rtc_tm);
#define DEFAULT_RTC_INT_FREQ 64
#define RTC_NUM_INTS 1
hpet_rtc_timer_reinit();
if (UIE_on | AIE_on) {
- get_rtc_time(&curr_time);
+ rtc_get_rtc_time(&curr_time);
}
if (UIE_on) {
if (curr_time.tm_sec != prev_update_sec) {
static unsigned int rtc_poll(struct file *file, poll_table *wait);
#endif
-void get_rtc_time (struct rtc_time *rtc_tm);
static void get_rtc_alm_time (struct rtc_time *alm_tm);
#if RTC_IRQ
static void rtc_dropped_irq(unsigned long data);
}
case RTC_RD_TIME: /* Read the time/date from RTC */
{
- get_rtc_time(&wtime);
+ rtc_get_rtc_time(&wtime);
break;
}
case RTC_SET_TIME: /* Set the RTC */
p = buf;
- get_rtc_time(&tm);
+ rtc_get_rtc_time(&tm);
/*
* There is no way to tell if the luser has the RTC set for local
return uip;
}
-void get_rtc_time(struct rtc_time *rtc_tm)
+void rtc_get_rtc_time(struct rtc_time *rtc_tm)
{
unsigned long uip_watchdog = jiffies;
unsigned char ctrl;
extern int hpet_readl(unsigned long a);
extern void hpet_writel(unsigned long d, unsigned long a);
-#ifdef CONFIG_RTC
-#define CONFIG_HPET_EMULATE_RTC 1
+#ifdef CONFIG_HPET_EMULATE_RTC
extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask);
extern int hpet_set_rtc_irq_bit(unsigned long bit_mask);
extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min, unsigned char sec);
extern int hpet_rtc_dropped_irq(void);
extern int hpet_rtc_timer_init(void);
extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-#endif /* CONFIG_RTC */
+#endif /* CONFIG_HPET_EMULATE_RTC */
#endif /* CONFIG_HPET_TIMER */
#endif /* _I386_HPET_H */
int rtc_register(rtc_task_t *task);
int rtc_unregister(rtc_task_t *task);
int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
+void rtc_get_rtc_time(struct rtc_time *rtc_tm);
#endif /* __KERNEL__ */