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/ddb5xxx/ddb5477 | |
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/ddb5xxx/ddb5477')
-rw-r--r-- | arch/mips/ddb5xxx/ddb5477/Makefile | 3 | ||||
-rw-r--r-- | arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c | 49 |
2 files changed, 51 insertions, 1 deletions
diff --git a/arch/mips/ddb5xxx/ddb5477/Makefile b/arch/mips/ddb5xxx/ddb5477/Makefile index 23fd3b81fe1a..4864b8a659c7 100644 --- a/arch/mips/ddb5xxx/ddb5477/Makefile +++ b/arch/mips/ddb5xxx/ddb5477/Makefile | |||
@@ -2,7 +2,8 @@ | |||
2 | # Makefile for NEC DDB-Vrc5477 board | 2 | # Makefile for NEC DDB-Vrc5477 board |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += irq.o irq_5477.o setup.o lcd44780.o | 5 | obj-y += ddb5477-platform.o irq.o irq_5477.o setup.o \ |
6 | lcd44780.o | ||
6 | 7 | ||
7 | obj-$(CONFIG_RUNTIME_DEBUG) += debug.o | 8 | obj-$(CONFIG_RUNTIME_DEBUG) += debug.o |
8 | obj-$(CONFIG_KGDB) += kgdb_io.o | 9 | obj-$(CONFIG_KGDB) += kgdb_io.o |
diff --git a/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c b/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c new file mode 100644 index 000000000000..c16020ad54c2 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5477/ddb5477-platform.c | |||
@@ -0,0 +1,49 @@ | |||
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 | #include <linux/init.h> | ||
9 | #include <linux/module.h> | ||
10 | #include <linux/serial_8250.h> | ||
11 | |||
12 | #include <asm/ddb5xxx/ddb5477.h> | ||
13 | |||
14 | #define DDB_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
15 | |||
16 | #define DDB5477_PORT(base, int) \ | ||
17 | { \ | ||
18 | .mapbase = base, \ | ||
19 | .irq = int, \ | ||
20 | .uartclk = 1843200, \ | ||
21 | .iotype = UPIO_MEM, \ | ||
22 | .flags = DDB_UART_FLAGS, \ | ||
23 | .regshift = 3, \ | ||
24 | } | ||
25 | |||
26 | static struct plat_serial8250_port uart8250_data[] = { | ||
27 | DDB5477_PORT(0xbfa04200, VRC5477_IRQ_UART0), | ||
28 | DDB5477_PORT(0xbfa04240, VRC5477_IRQ_UART1), | ||
29 | { }, | ||
30 | }; | ||
31 | |||
32 | static struct platform_device uart8250_device = { | ||
33 | .name = "serial8250", | ||
34 | .id = PLAT8250_DEV_PLATFORM, | ||
35 | .dev = { | ||
36 | .platform_data = uart8250_data, | ||
37 | }, | ||
38 | }; | ||
39 | |||
40 | static int __init uart8250_init(void) | ||
41 | { | ||
42 | return platform_device_register(&uart8250_device); | ||
43 | } | ||
44 | |||
45 | module_init(uart8250_init); | ||
46 | |||
47 | MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
48 | MODULE_LICENSE("GPL"); | ||
49 | MODULE_DESCRIPTION("8250 UART probe driver for the NEC DDB5477"); | ||