diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2007-11-14 19:59:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:45:41 -0500 |
commit | 9626f1f117be21b6e4b7a1cb49814fc065dd3d2d (patch) | |
tree | 259ba0c9362924d1a7e21a6befcc43e23f9fa9d5 /include | |
parent | 4c06be10c790008aa2b2d19df2872ff39990b7bd (diff) |
rtc: fall back to requesting only the ports we actually use
Firmware like PNPBIOS or ACPI can report the address space consumed by the
RTC. The actual space consumed may be less than the size (RTC_IO_EXTENT)
assumed by the RTC driver.
The PNP core doesn't request resources yet, but I'd like to make it do so.
If/when it does, the RTC_IO_EXTENT request may fail, which prevents the RTC
driver from loading.
Since we only use the RTC index and data registers at RTC_PORT(0) and
RTC_PORT(1), we can fall back to requesting just enough space for those.
If the PNP core requests resources, this results in typical I/O port usage
like this:
0070-0073 : 00:06 <-- PNP device 00:06 responds to 70-73
0070-0071 : rtc <-- RTC driver uses only 70-71
instead of the current:
0070-0077 : rtc <-- RTC_IO_EXTENT == 8
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mc146818rtc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 580b3f4956ee..2f4e957af656 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -109,8 +109,11 @@ struct cmos_rtc_board_info { | |||
109 | #ifndef ARCH_RTC_LOCATION /* Override by <asm/mc146818rtc.h>? */ | 109 | #ifndef ARCH_RTC_LOCATION /* Override by <asm/mc146818rtc.h>? */ |
110 | 110 | ||
111 | #define RTC_IO_EXTENT 0x8 | 111 | #define RTC_IO_EXTENT 0x8 |
112 | #define RTC_IO_EXTENT_USED 0x2 | ||
112 | #define RTC_IOMAPPED 1 /* Default to I/O mapping. */ | 113 | #define RTC_IOMAPPED 1 /* Default to I/O mapping. */ |
113 | 114 | ||
115 | #else | ||
116 | #define RTC_IO_EXTENT_USED RTC_IO_EXTENT | ||
114 | #endif /* ARCH_RTC_LOCATION */ | 117 | #endif /* ARCH_RTC_LOCATION */ |
115 | 118 | ||
116 | #endif /* _MC146818RTC_H */ | 119 | #endif /* _MC146818RTC_H */ |