Staging: Panel: panel: Fixed checkpatch line length warnings
[linux/fpc-iii.git] / arch / arm / mach-footbridge / isa.c
blob4d9276c27d6f309bba9be58bb2ae773c9725bc81
1 /*
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.
9 */
10 #include <linux/init.h>
11 #include <linux/serial_8250.h>
13 #include <asm/irq.h>
14 #include <asm/hardware/dec21285.h>
16 #include "common.h"
18 static struct resource rtc_resources[] = {
19 [0] = {
20 .start = 0x70,
21 .end = 0x73,
22 .flags = IORESOURCE_IO,
24 [1] = {
25 .start = IRQ_ISA_RTC_ALARM,
26 .end = IRQ_ISA_RTC_ALARM,
27 .flags = IORESOURCE_IRQ,
31 static struct platform_device rtc_device = {
32 .name = "rtc_cmos",
33 .id = -1,
34 .resource = rtc_resources,
35 .num_resources = ARRAY_SIZE(rtc_resources),
38 static struct resource serial_resources[] = {
39 [0] = {
40 .start = 0x3f8,
41 .end = 0x3ff,
42 .flags = IORESOURCE_IO,
44 [1] = {
45 .start = 0x2f8,
46 .end = 0x2ff,
47 .flags = IORESOURCE_IO,
51 static struct plat_serial8250_port serial_platform_data[] = {
53 .iobase = 0x3f8,
54 .irq = IRQ_ISA_UART,
55 .uartclk = 1843200,
56 .regshift = 0,
57 .iotype = UPIO_PORT,
58 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
61 .iobase = 0x2f8,
62 .irq = IRQ_ISA_UART2,
63 .uartclk = 1843200,
64 .regshift = 0,
65 .iotype = UPIO_PORT,
66 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
68 { },
71 static struct platform_device serial_device = {
72 .name = "serial8250",
73 .id = PLAT8250_DEV_PLATFORM,
74 .dev = {
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)
83 int err = 0;
85 if (!footbridge_cfn_mode())
86 return 0;
88 /* Personal server doesn't have RTC */
89 if (!machine_is_personal_server()) {
90 isa_rtc_init();
91 err = platform_device_register(&rtc_device);
92 if (err)
93 printk(KERN_ERR "Unable to register RTC device: %d\n", err);
95 err = platform_device_register(&serial_device);
96 if (err)
97 printk(KERN_ERR "Unable to register serial device: %d\n", err);
98 return 0;
101 arch_initcall(footbridge_isa_init);