1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-footbridge/isa.c
5 * Copyright (C) 2004 Russell King.
7 #include <linux/init.h>
8 #include <linux/serial_8250.h>
11 #include <asm/hardware/dec21285.h>
15 static struct resource rtc_resources
[] = {
19 .flags
= IORESOURCE_IO
,
22 .start
= IRQ_ISA_RTC_ALARM
,
23 .end
= IRQ_ISA_RTC_ALARM
,
24 .flags
= IORESOURCE_IRQ
,
28 static struct platform_device rtc_device
= {
31 .resource
= rtc_resources
,
32 .num_resources
= ARRAY_SIZE(rtc_resources
),
35 static struct resource serial_resources
[] = {
39 .flags
= IORESOURCE_IO
,
44 .flags
= IORESOURCE_IO
,
48 static struct plat_serial8250_port serial_platform_data
[] = {
55 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
63 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
68 static struct platform_device serial_device
= {
70 .id
= PLAT8250_DEV_PLATFORM
,
72 .platform_data
= serial_platform_data
,
74 .resource
= serial_resources
,
75 .num_resources
= ARRAY_SIZE(serial_resources
),
78 static int __init
footbridge_isa_init(void)
82 if (!footbridge_cfn_mode())
85 /* Personal server doesn't have RTC */
86 if (!machine_is_personal_server()) {
88 err
= platform_device_register(&rtc_device
);
90 printk(KERN_ERR
"Unable to register RTC device: %d\n", err
);
92 err
= platform_device_register(&serial_device
);
94 printk(KERN_ERR
"Unable to register serial device: %d\n", err
);
98 arch_initcall(footbridge_isa_init
);