From d59c1004bf20297a9cc9624786f30056c25da57c Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 30 Sep 2007 17:39:05 +0100 Subject: [PATCH] --- yaml --- r: 69481 b: refs/heads/master c: cba774ae8731699d39cbaf979aa4a0b351045924 h: refs/heads/master i: 69479: f8401edd94ecf499885af9d76f369d50c0c1c635 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-footbridge/isa.c | 45 +++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 3b2a0faaeb6d..10ee612ff549 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 883042d6ea31fcaffb0b8763cadfbcb2862ebc48 +refs/heads/master: cba774ae8731699d39cbaf979aa4a0b351045924 diff --git a/trunk/arch/arm/mach-footbridge/isa.c b/trunk/arch/arm/mach-footbridge/isa.c index 28846c7edaaf..725a219d0ed5 100644 --- a/trunk/arch/arm/mach-footbridge/isa.c +++ b/trunk/arch/arm/mach-footbridge/isa.c @@ -12,6 +12,39 @@ #include +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);