diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-07-10 12:33:01 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-07-10 12:33:01 -0400 |
commit | e7c4782f92fc4b83d953ce53f77f05ae65dcd773 (patch) | |
tree | 8b72472f8653ed55593f52fc10e7eaa9b7b31f1b /arch/mips/gt64120 | |
parent | 192cca6ef2c49ac5ff46f7a31cb9dd175995658e (diff) |
[MIPS] Put an end to <asm/serial.h>'s long and annyoing existence
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/gt64120')
-rw-r--r-- | arch/mips/gt64120/momenco_ocelot/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/gt64120/momenco_ocelot/ocelot-platform.c | 46 |
2 files changed, 47 insertions, 1 deletions
diff --git a/arch/mips/gt64120/momenco_ocelot/Makefile b/arch/mips/gt64120/momenco_ocelot/Makefile index 9f9a33fc76b9..1df5fe23c642 100644 --- a/arch/mips/gt64120/momenco_ocelot/Makefile +++ b/arch/mips/gt64120/momenco_ocelot/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for Momentum's Ocelot board. | 2 | # Makefile for Momentum's Ocelot board. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += irq.o prom.o reset.o setup.o | 5 | obj-y += irq.o ocelot-platform.o prom.o reset.o setup.o |
6 | 6 | ||
7 | obj-$(CONFIG_KGDB) += dbg_io.o | 7 | obj-$(CONFIG_KGDB) += dbg_io.o |
diff --git a/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c b/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c new file mode 100644 index 000000000000..81d9031a5a2a --- /dev/null +++ b/arch/mips/gt64120/momenco_ocelot/ocelot-platform.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
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 | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
7 | * | ||
8 | * A NS16552 DUART with a 20MHz crystal. | ||
9 | * | ||
10 | */ | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/serial_8250.h> | ||
14 | |||
15 | #define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
16 | |||
17 | static struct plat_serial8250_port uart8250_data[] = { | ||
18 | { | ||
19 | .mapbase = 0xe0001020, | ||
20 | .irq = 4, | ||
21 | .uartclk = 20000000, | ||
22 | .iotype = UPIO_MEM, | ||
23 | .flags = OCELOT_UART_FLAGS, | ||
24 | .regshift = 2, | ||
25 | }, | ||
26 | { }, | ||
27 | }; | ||
28 | |||
29 | static struct platform_device uart8250_device = { | ||
30 | .name = "serial8250", | ||
31 | .id = PLAT8250_DEV_PLATFORM, | ||
32 | .dev = { | ||
33 | .platform_data = uart8250_data, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | static int __init uart8250_init(void) | ||
38 | { | ||
39 | return platform_device_register(&uart8250_device); | ||
40 | } | ||
41 | |||
42 | module_init(uart8250_init); | ||
43 | |||
44 | MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
45 | MODULE_LICENSE("GPL"); | ||
46 | MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot"); | ||