2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
8 #include <linux/module.h>
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/serial_8250.h>
13 #include <asm/ip32/mace.h>
14 #include <asm/ip32/ip32_ints.h>
17 * .iobase isn't a constant (in the sense of C) so we fill it in at runtime.
19 #define MACE_PORT(int) \
24 .flags = UPF_SKIP_TEST, \
28 static struct plat_serial8250_port uart8250_data[] = {
29 MACE_PORT(MACEISA_SERIAL1_IRQ),
30 MACE_PORT(MACEISA_SERIAL2_IRQ),
34 static struct platform_device uart8250_device = {
36 .id = PLAT8250_DEV_PLATFORM,
38 .platform_data = uart8250_data,
42 static int __init uart8250_init(void)
44 uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
45 uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1;
47 return platform_device_register(&uart8250_device);
50 device_initcall(uart8250_init);
52 static __init int meth_devinit(void)
54 struct platform_device *pd;
57 pd = platform_device_alloc("meth", -1);
61 ret = platform_device_add(pd);
63 platform_device_put(pd);
68 device_initcall(meth_devinit);
70 MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
71 MODULE_LICENSE("GPL");
72 MODULE_DESCRIPTION("8250 UART probe driver for SGI IP32 aka O2");