|
|
|
|
@@ -744,6 +744,168 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
|
|
|
|
|
return IRQ_NONE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_ACPI
|
|
|
|
|
|
|
|
|
|
#include <linux/acpi.h>
|
|
|
|
|
|
|
|
|
|
static u32 rtc_handler(void *context)
|
|
|
|
|
{
|
|
|
|
|
struct device *dev = context;
|
|
|
|
|
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
|
|
|
|
unsigned char rtc_control = 0;
|
|
|
|
|
unsigned char rtc_intr;
|
|
|
|
|
unsigned long flags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Always update rtc irq when ACPI is used as RTC Alarm.
|
|
|
|
|
* Or else, ACPI SCI is enabled during suspend/resume only,
|
|
|
|
|
* update rtc irq in that case.
|
|
|
|
|
*/
|
|
|
|
|
if (cmos_use_acpi_alarm())
|
|
|
|
|
cmos_interrupt(0, (void *)cmos->rtc);
|
|
|
|
|
else {
|
|
|
|
|
/* Fix me: can we use cmos_interrupt() here as well? */
|
|
|
|
|
spin_lock_irqsave(&rtc_lock, flags);
|
|
|
|
|
if (cmos_rtc.suspend_ctrl)
|
|
|
|
|
rtc_control = CMOS_READ(RTC_CONTROL);
|
|
|
|
|
if (rtc_control & RTC_AIE) {
|
|
|
|
|
cmos_rtc.suspend_ctrl &= ~RTC_AIE;
|
|
|
|
|
CMOS_WRITE(rtc_control, RTC_CONTROL);
|
|
|
|
|
rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
|
|
|
|
|
rtc_update_irq(cmos->rtc, 1, rtc_intr);
|
|
|
|
|
}
|
|
|
|
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pm_wakeup_hard_event(dev);
|
|
|
|
|
acpi_clear_event(ACPI_EVENT_RTC);
|
|
|
|
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
return ACPI_INTERRUPT_HANDLED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void acpi_rtc_event_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
if (acpi_disabled)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
|
|
|
|
|
/*
|
|
|
|
|
* After the RTC handler is installed, the Fixed_RTC event should
|
|
|
|
|
* be disabled. Only when the RTC alarm is set will it be enabled.
|
|
|
|
|
*/
|
|
|
|
|
acpi_clear_event(ACPI_EVENT_RTC);
|
|
|
|
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void acpi_rtc_event_cleanup(void)
|
|
|
|
|
{
|
|
|
|
|
if (acpi_disabled)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
acpi_remove_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rtc_wake_on(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
acpi_clear_event(ACPI_EVENT_RTC);
|
|
|
|
|
acpi_enable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rtc_wake_off(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86
|
|
|
|
|
/* Enable use_acpi_alarm mode for Intel platforms no earlier than 2015 */
|
|
|
|
|
static void use_acpi_alarm_quirks(void)
|
|
|
|
|
{
|
|
|
|
|
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!is_hpet_enabled())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (dmi_get_bios_year() < 2015)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
use_acpi_alarm = true;
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
static inline void use_acpi_alarm_quirks(void) { }
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static void acpi_cmos_wake_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
if (acpi_disabled)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
use_acpi_alarm_quirks();
|
|
|
|
|
|
|
|
|
|
cmos_rtc.wake_on = rtc_wake_on;
|
|
|
|
|
cmos_rtc.wake_off = rtc_wake_off;
|
|
|
|
|
|
|
|
|
|
/* ACPI tables bug workaround. */
|
|
|
|
|
if (acpi_gbl_FADT.month_alarm && !acpi_gbl_FADT.day_alarm) {
|
|
|
|
|
dev_dbg(dev, "bogus FADT month_alarm (%d)\n",
|
|
|
|
|
acpi_gbl_FADT.month_alarm);
|
|
|
|
|
acpi_gbl_FADT.month_alarm = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cmos_rtc.day_alrm = acpi_gbl_FADT.day_alarm;
|
|
|
|
|
cmos_rtc.mon_alrm = acpi_gbl_FADT.month_alarm;
|
|
|
|
|
cmos_rtc.century = acpi_gbl_FADT.century;
|
|
|
|
|
|
|
|
|
|
if (acpi_gbl_FADT.flags & ACPI_FADT_S4_RTC_WAKE)
|
|
|
|
|
dev_info(dev, "RTC can wake from S4\n");
|
|
|
|
|
|
|
|
|
|
/* RTC always wakes from S1/S2/S3, and often S4/STD */
|
|
|
|
|
device_init_wakeup(dev, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void cmos_check_acpi_rtc_status(struct device *dev,
|
|
|
|
|
unsigned char *rtc_control)
|
|
|
|
|
{
|
|
|
|
|
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
|
|
|
|
acpi_event_status rtc_status;
|
|
|
|
|
acpi_status status;
|
|
|
|
|
|
|
|
|
|
if (acpi_gbl_FADT.flags & ACPI_FADT_FIXED_RTC)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
status = acpi_get_event_status(ACPI_EVENT_RTC, &rtc_status);
|
|
|
|
|
if (ACPI_FAILURE(status)) {
|
|
|
|
|
dev_err(dev, "Could not get RTC status\n");
|
|
|
|
|
} else if (rtc_status & ACPI_EVENT_FLAG_SET) {
|
|
|
|
|
unsigned char mask;
|
|
|
|
|
*rtc_control &= ~RTC_AIE;
|
|
|
|
|
CMOS_WRITE(*rtc_control, RTC_CONTROL);
|
|
|
|
|
mask = CMOS_READ(RTC_INTR_FLAGS);
|
|
|
|
|
rtc_update_irq(cmos->rtc, 1, mask);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#else /* !CONFIG_ACPI */
|
|
|
|
|
|
|
|
|
|
static inline void acpi_rtc_event_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void acpi_rtc_event_cleanup(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void acpi_cmos_wake_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void cmos_check_acpi_rtc_status(struct device *dev,
|
|
|
|
|
unsigned char *rtc_control)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
#endif /* CONFIG_ACPI */
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_PNP
|
|
|
|
|
#define INITSECTION
|
|
|
|
|
|
|
|
|
|
@@ -827,19 +989,27 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
|
|
|
|
|
if (info->address_space)
|
|
|
|
|
address_space = info->address_space;
|
|
|
|
|
|
|
|
|
|
if (info->rtc_day_alarm && info->rtc_day_alarm < 128)
|
|
|
|
|
cmos_rtc.day_alrm = info->rtc_day_alarm;
|
|
|
|
|
if (info->rtc_mon_alarm && info->rtc_mon_alarm < 128)
|
|
|
|
|
cmos_rtc.mon_alrm = info->rtc_mon_alarm;
|
|
|
|
|
if (info->rtc_century && info->rtc_century < 128)
|
|
|
|
|
cmos_rtc.century = info->rtc_century;
|
|
|
|
|
cmos_rtc.day_alrm = info->rtc_day_alarm;
|
|
|
|
|
cmos_rtc.mon_alrm = info->rtc_mon_alarm;
|
|
|
|
|
cmos_rtc.century = info->rtc_century;
|
|
|
|
|
|
|
|
|
|
if (info->wake_on && info->wake_off) {
|
|
|
|
|
cmos_rtc.wake_on = info->wake_on;
|
|
|
|
|
cmos_rtc.wake_off = info->wake_off;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
acpi_cmos_wake_setup(dev);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (cmos_rtc.day_alrm >= 128)
|
|
|
|
|
cmos_rtc.day_alrm = 0;
|
|
|
|
|
|
|
|
|
|
if (cmos_rtc.mon_alrm >= 128)
|
|
|
|
|
cmos_rtc.mon_alrm = 0;
|
|
|
|
|
|
|
|
|
|
if (cmos_rtc.century >= 128)
|
|
|
|
|
cmos_rtc.century = 0;
|
|
|
|
|
|
|
|
|
|
cmos_rtc.dev = dev;
|
|
|
|
|
dev_set_drvdata(dev, &cmos_rtc);
|
|
|
|
|
|
|
|
|
|
@@ -928,6 +1098,13 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
|
|
|
|
|
nvmem_cfg.size = address_space - NVRAM_OFFSET;
|
|
|
|
|
devm_rtc_nvmem_register(cmos_rtc.rtc, &nvmem_cfg);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Everything has gone well so far, so by default register a handler for
|
|
|
|
|
* the ACPI RTC fixed event.
|
|
|
|
|
*/
|
|
|
|
|
if (!info)
|
|
|
|
|
acpi_rtc_event_setup(dev);
|
|
|
|
|
|
|
|
|
|
dev_info(dev, "%s%s, %d bytes nvram%s\n",
|
|
|
|
|
!is_valid_irq(rtc_irq) ? "no alarms" :
|
|
|
|
|
cmos_rtc.mon_alrm ? "alarms up to one year" :
|
|
|
|
|
@@ -973,6 +1150,9 @@ static void cmos_do_remove(struct device *dev)
|
|
|
|
|
hpet_unregister_irq_handler(cmos_interrupt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!dev_get_platdata(dev))
|
|
|
|
|
acpi_rtc_event_cleanup();
|
|
|
|
|
|
|
|
|
|
cmos->rtc = NULL;
|
|
|
|
|
|
|
|
|
|
ports = cmos->iomem;
|
|
|
|
|
@@ -1122,9 +1302,6 @@ static void cmos_check_wkalrm(struct device *dev)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void cmos_check_acpi_rtc_status(struct device *dev,
|
|
|
|
|
unsigned char *rtc_control);
|
|
|
|
|
|
|
|
|
|
static int __maybe_unused cmos_resume(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
|
|
|
|
@@ -1191,174 +1368,16 @@ static SIMPLE_DEV_PM_OPS(cmos_pm_ops, cmos_suspend, cmos_resume);
|
|
|
|
|
* predate even PNPBIOS should set up platform_bus devices.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_ACPI
|
|
|
|
|
|
|
|
|
|
#include <linux/acpi.h>
|
|
|
|
|
|
|
|
|
|
static u32 rtc_handler(void *context)
|
|
|
|
|
{
|
|
|
|
|
struct device *dev = context;
|
|
|
|
|
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
|
|
|
|
unsigned char rtc_control = 0;
|
|
|
|
|
unsigned char rtc_intr;
|
|
|
|
|
unsigned long flags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Always update rtc irq when ACPI is used as RTC Alarm.
|
|
|
|
|
* Or else, ACPI SCI is enabled during suspend/resume only,
|
|
|
|
|
* update rtc irq in that case.
|
|
|
|
|
*/
|
|
|
|
|
if (cmos_use_acpi_alarm())
|
|
|
|
|
cmos_interrupt(0, (void *)cmos->rtc);
|
|
|
|
|
else {
|
|
|
|
|
/* Fix me: can we use cmos_interrupt() here as well? */
|
|
|
|
|
spin_lock_irqsave(&rtc_lock, flags);
|
|
|
|
|
if (cmos_rtc.suspend_ctrl)
|
|
|
|
|
rtc_control = CMOS_READ(RTC_CONTROL);
|
|
|
|
|
if (rtc_control & RTC_AIE) {
|
|
|
|
|
cmos_rtc.suspend_ctrl &= ~RTC_AIE;
|
|
|
|
|
CMOS_WRITE(rtc_control, RTC_CONTROL);
|
|
|
|
|
rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
|
|
|
|
|
rtc_update_irq(cmos->rtc, 1, rtc_intr);
|
|
|
|
|
}
|
|
|
|
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pm_wakeup_hard_event(dev);
|
|
|
|
|
acpi_clear_event(ACPI_EVENT_RTC);
|
|
|
|
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
return ACPI_INTERRUPT_HANDLED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void rtc_wake_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
|
|
|
|
|
/*
|
|
|
|
|
* After the RTC handler is installed, the Fixed_RTC event should
|
|
|
|
|
* be disabled. Only when the RTC alarm is set will it be enabled.
|
|
|
|
|
*/
|
|
|
|
|
acpi_clear_event(ACPI_EVENT_RTC);
|
|
|
|
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rtc_wake_on(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
acpi_clear_event(ACPI_EVENT_RTC);
|
|
|
|
|
acpi_enable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rtc_wake_off(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86
|
|
|
|
|
/* Enable use_acpi_alarm mode for Intel platforms no earlier than 2015 */
|
|
|
|
|
static void use_acpi_alarm_quirks(void)
|
|
|
|
|
{
|
|
|
|
|
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!is_hpet_enabled())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (dmi_get_bios_year() < 2015)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
use_acpi_alarm = true;
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
static inline void use_acpi_alarm_quirks(void) { }
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Every ACPI platform has a mc146818 compatible "cmos rtc". Here we find
|
|
|
|
|
* its device node and pass extra config data. This helps its driver use
|
|
|
|
|
* capabilities that the now-obsolete mc146818 didn't have, and informs it
|
|
|
|
|
* that this board's RTC is wakeup-capable (per ACPI spec).
|
|
|
|
|
*/
|
|
|
|
|
static struct cmos_rtc_board_info acpi_rtc_info;
|
|
|
|
|
|
|
|
|
|
static void cmos_wake_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
if (acpi_disabled)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
use_acpi_alarm_quirks();
|
|
|
|
|
|
|
|
|
|
rtc_wake_setup(dev);
|
|
|
|
|
acpi_rtc_info.wake_on = rtc_wake_on;
|
|
|
|
|
acpi_rtc_info.wake_off = rtc_wake_off;
|
|
|
|
|
|
|
|
|
|
/* workaround bug in some ACPI tables */
|
|
|
|
|
if (acpi_gbl_FADT.month_alarm && !acpi_gbl_FADT.day_alarm) {
|
|
|
|
|
dev_dbg(dev, "bogus FADT month_alarm (%d)\n",
|
|
|
|
|
acpi_gbl_FADT.month_alarm);
|
|
|
|
|
acpi_gbl_FADT.month_alarm = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
acpi_rtc_info.rtc_day_alarm = acpi_gbl_FADT.day_alarm;
|
|
|
|
|
acpi_rtc_info.rtc_mon_alarm = acpi_gbl_FADT.month_alarm;
|
|
|
|
|
acpi_rtc_info.rtc_century = acpi_gbl_FADT.century;
|
|
|
|
|
|
|
|
|
|
/* NOTE: S4_RTC_WAKE is NOT currently useful to Linux */
|
|
|
|
|
if (acpi_gbl_FADT.flags & ACPI_FADT_S4_RTC_WAKE)
|
|
|
|
|
dev_info(dev, "RTC can wake from S4\n");
|
|
|
|
|
|
|
|
|
|
dev->platform_data = &acpi_rtc_info;
|
|
|
|
|
|
|
|
|
|
/* RTC always wakes from S1/S2/S3, and often S4/STD */
|
|
|
|
|
device_init_wakeup(dev, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void cmos_check_acpi_rtc_status(struct device *dev,
|
|
|
|
|
unsigned char *rtc_control)
|
|
|
|
|
{
|
|
|
|
|
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
|
|
|
|
acpi_event_status rtc_status;
|
|
|
|
|
acpi_status status;
|
|
|
|
|
|
|
|
|
|
if (acpi_gbl_FADT.flags & ACPI_FADT_FIXED_RTC)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
status = acpi_get_event_status(ACPI_EVENT_RTC, &rtc_status);
|
|
|
|
|
if (ACPI_FAILURE(status)) {
|
|
|
|
|
dev_err(dev, "Could not get RTC status\n");
|
|
|
|
|
} else if (rtc_status & ACPI_EVENT_FLAG_SET) {
|
|
|
|
|
unsigned char mask;
|
|
|
|
|
*rtc_control &= ~RTC_AIE;
|
|
|
|
|
CMOS_WRITE(*rtc_control, RTC_CONTROL);
|
|
|
|
|
mask = CMOS_READ(RTC_INTR_FLAGS);
|
|
|
|
|
rtc_update_irq(cmos->rtc, 1, mask);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
static void cmos_wake_setup(struct device *dev)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void cmos_check_acpi_rtc_status(struct device *dev,
|
|
|
|
|
unsigned char *rtc_control)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_PNP
|
|
|
|
|
|
|
|
|
|
#include <linux/pnp.h>
|
|
|
|
|
|
|
|
|
|
static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
|
|
|
|
|
{
|
|
|
|
|
cmos_wake_setup(&pnp->dev);
|
|
|
|
|
int irq;
|
|
|
|
|
|
|
|
|
|
if (pnp_port_start(pnp, 0) == 0x70 && !pnp_irq_valid(pnp, 0)) {
|
|
|
|
|
unsigned int irq = 0;
|
|
|
|
|
irq = 0;
|
|
|
|
|
#ifdef CONFIG_X86
|
|
|
|
|
/* Some machines contain a PNP entry for the RTC, but
|
|
|
|
|
* don't define the IRQ. It should always be safe to
|
|
|
|
|
@@ -1367,13 +1386,11 @@ static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
|
|
|
|
|
if (nr_legacy_irqs())
|
|
|
|
|
irq = RTC_IRQ;
|
|
|
|
|
#endif
|
|
|
|
|
return cmos_do_probe(&pnp->dev,
|
|
|
|
|
pnp_get_resource(pnp, IORESOURCE_IO, 0), irq);
|
|
|
|
|
} else {
|
|
|
|
|
return cmos_do_probe(&pnp->dev,
|
|
|
|
|
pnp_get_resource(pnp, IORESOURCE_IO, 0),
|
|
|
|
|
pnp_irq(pnp, 0));
|
|
|
|
|
irq = pnp_irq(pnp, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return cmos_do_probe(&pnp->dev, pnp_get_resource(pnp, IORESOURCE_IO, 0), irq);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void cmos_pnp_remove(struct pnp_dev *pnp)
|
|
|
|
|
@@ -1460,7 +1477,6 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
|
|
|
|
|
int irq;
|
|
|
|
|
|
|
|
|
|
cmos_of_init(pdev);
|
|
|
|
|
cmos_wake_setup(&pdev->dev);
|
|
|
|
|
|
|
|
|
|
if (RTC_IOMAPPED)
|
|
|
|
|
resource = platform_get_resource(pdev, IORESOURCE_IO, 0);
|
|
|
|
|
|