2 * linux/arch/arm/mach-footbridge/isa.c
4 * Copyright (C) 2004 Russell King.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #include <linux/init.h>
11 #include <linux/serial_8250.h>
14 #include <asm/hardware/dec21285.h>
18 static struct resource rtc_resources[] = {
22 .flags = IORESOURCE_IO,
25 .start = IRQ_ISA_RTC_ALARM,
26 .end = IRQ_ISA_RTC_ALARM,
27 .flags = IORESOURCE_IRQ,
31 static struct platform_device rtc_device = {
34 .resource = rtc_resources,
35 .num_resources = ARRAY_SIZE(rtc_resources),
38 static struct resource serial_resources[] = {
42 .flags = IORESOURCE_IO,
47 .flags = IORESOURCE_IO,
51 static struct plat_serial8250_port serial_platform_data[] = {
58 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
66 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
71 static struct platform_device serial_device = {
73 .id = PLAT8250_DEV_PLATFORM,
75 .platform_data = serial_platform_data,
77 .resource = serial_resources,
78 .num_resources = ARRAY_SIZE(serial_resources),
81 static int __init footbridge_isa_init(void)
85 if (!footbridge_cfn_mode())
88 /* Personal server doesn't have RTC */
89 if (!machine_is_personal_server()) {
91 err = platform_device_register(&rtc_device);
93 printk(KERN_ERR "Unable to register RTC device: %d\n", err);
95 err = platform_device_register(&serial_device);
97 printk(KERN_ERR "Unable to register serial device: %d\n", err);
101 arch_initcall(footbridge_isa_init);