diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-29 04:54:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 23:16:45 +0200 |
commit | 582defd8ddb90448d72692a8e1d5b2966d2ed819 (patch) | |
tree | a707bc23500f1c76ed794f55beb8fc098a96f600 /drivers/rtc/rtc-cmos.c | |
parent | sparc: Remove Documentation/sparc/sbus_drivers.txt (diff) | |
download | linux-582defd8ddb90448d72692a8e1d5b2966d2ed819.tar.xz linux-582defd8ddb90448d72692a8e1d5b2966d2ed819.zip |
rtc: Allow RTC_DRV_CMOS to be used on SPARC.
Add Sparc to the Kconfig depends list.
Add __sparc___ to address_sparc = 128 ifdef.
Finally, don't be concerned about 24-hour BCD mode support if the RTC
doesn't have a valid IRQ. We won't even use the alarm code in this
case and the Sparc RTCs have this limitation.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 6ea349aba3ba..04ecfd2e7c88 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -636,7 +636,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) */ #if defined(CONFIG_ATARI) address_space = 64; -#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) +#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__sparc__) address_space = 128; #else #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes. @@ -699,7 +699,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) /* FIXME teach the alarm code how to handle binary mode; * <asm-generic/rtc.h> doesn't know 12-hour mode either. */ - if (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY))) { + if (is_valid_irq(rtc_irq) && + (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) { dev_dbg(dev, "only 24-hr BCD mode supported\n"); retval = -ENXIO; goto cleanup1; |