x86: register a platform RTC device if PNP doesn't describe it
commit758a7f7bb86b520aadc484f23da85e547b3bf3d8
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 14 Oct 2008 23:01:03 +0000 (14 17:01 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Oct 2008 23:30:14 +0000 (14 16:30 -0700)
treed268b55fb9607f24e9433d900a260ca6d0bc1f7c
parenta474aaedac99ba86e28ef6c912a7647c482db6dd
x86: register a platform RTC device if PNP doesn't describe it

Most if not all x86 platforms have an RTC device, but sometimes the RTC
is not exposed as a PNP0b00/PNP0b01/PNP0b02 device in PNPBIOS or ACPI:

    http://bugzilla.kernel.org/show_bug.cgi?id=11580
    https://bugzilla.redhat.com/show_bug.cgi?id=451188

It's best if we can discover the RTC via PNP because then we know
which flavor of device it is, where it lives, and which IRQ it uses.

But if we can't, we should register a platform device using the
compiled-in RTC_PORT/RTC_IRQ resource assumptions.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Reported-by: Rik Theys <rik.theys@esat.kuleuven.be>
Reported-by: shr_msn@yahoo.com.tw
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/rtc.c