summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-footbridge
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-09-30 17:39:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-10-12 23:43:32 +0100
commitcba774ae8731699d39cbaf979aa4a0b351045924 (patch)
treeda29b058bafb210f482cdda2860a85e2da5e0e5a /arch/arm/mach-footbridge
parent883042d6ea31fcaffb0b8763cadfbcb2862ebc48 (diff)
downloadop-kernel-dev-cba774ae8731699d39cbaf979aa4a0b351045924.zip
op-kernel-dev-cba774ae8731699d39cbaf979aa4a0b351045924.tar.gz
[ARM] Add rtc-cmos driver for ISA-based footbridge platforms
... but the rtc-cmos is rather broken; if PNP is enabled, it assumes that we have ACPI (!) which is quite bogus on these platforms - which may have ISAPNP but not ACPI. Something to be solved in the future. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-footbridge')
-rw-r--r--arch/arm/mach-footbridge/isa.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/arch/arm/mach-footbridge/isa.c b/arch/arm/mach-footbridge/isa.c
index 28846c7..725a219 100644
--- a/arch/arm/mach-footbridge/isa.c
+++ b/arch/arm/mach-footbridge/isa.c
@@ -12,6 +12,39 @@
#include <asm/irq.h>
+static struct resource rtc_resources[] = {
+ [0] = {
+ .start = 0x70,
+ .end = 0x73,
+ .flags = IORESOURCE_IO,
+ },
+ [1] = {
+ .start = IRQ_ISA_RTC_ALARM,
+ .end = IRQ_ISA_RTC_ALARM,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct platform_device rtc_device = {
+ .name = "rtc_cmos",
+ .id = -1,
+ .resource = rtc_resources,
+ .num_resources = ARRAY_SIZE(rtc_resources),
+};
+
+static struct resource serial_resources[] = {
+ [0] = {
+ .start = 0x3f8,
+ .end = 0x3ff,
+ .flags = IORESOURCE_IO,
+ },
+ [1] = {
+ .start = 0x2f8,
+ .end = 0x2ff,
+ .flags = IORESOURCE_IO,
+ },
+};
+
static struct plat_serial8250_port serial_platform_data[] = {
{
.iobase = 0x3f8,
@@ -38,11 +71,21 @@ static struct platform_device serial_device = {
.dev = {
.platform_data = serial_platform_data,
},
+ .resource = serial_resources,
+ .num_resources = ARRAY_SIZE(serial_resources),
};
static int __init footbridge_isa_init(void)
{
- return platform_device_register(&serial_device);
+ int err;
+
+ err = platform_device_register(&rtc_device);
+ if (err)
+ printk(KERN_ERR "Unable to register RTC device: %d\n", err);
+ err = platform_device_register(&serial_device);
+ if (err)
+ printk(KERN_ERR "Unable to register serial device: %d\n", err);
+ return 0;
}
arch_initcall(footbridge_isa_init);
OpenPOWER on IntegriCloud