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/momentum/ocelot_3 | |
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/momentum/ocelot_3')
-rw-r--r-- | arch/mips/momentum/ocelot_3/platform.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c index 44e4c3fc7403..cb63c82ef650 100644 --- a/arch/mips/momentum/ocelot_3/platform.c +++ b/arch/mips/momentum/ocelot_3/platform.c | |||
@@ -1,8 +1,19 @@ | |||
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) 2006, 07 Ralf Baechle (ralf@linux-mips.org) | ||
7 | * Copyright (C) 2007 Dale Farnsworth (dale@farnsworth.org) | ||
8 | */ | ||
1 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
2 | #include <linux/if_ether.h> | 10 | #include <linux/if_ether.h> |
11 | #include <linux/init.h> | ||
3 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <linux/module.h> | ||
4 | #include <linux/mv643xx.h> | 14 | #include <linux/mv643xx.h> |
5 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/serial_8250.h> | ||
6 | 17 | ||
7 | #include "ocelot_3_fpga.h" | 18 | #include "ocelot_3_fpga.h" |
8 | 19 | ||
@@ -206,3 +217,36 @@ static int __init mv643xx_eth_add_pds(void) | |||
206 | device_initcall(mv643xx_eth_add_pds); | 217 | device_initcall(mv643xx_eth_add_pds); |
207 | 218 | ||
208 | #endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */ | 219 | #endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */ |
220 | |||
221 | #define OCELOT3_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) | ||
222 | |||
223 | static struct plat_serial8250_port uart8250_data[] = { | ||
224 | { | ||
225 | .membase = (signed long) 0xfd000020, | ||
226 | .irq = 6, | ||
227 | .uartclk = 20000000, | ||
228 | .iotype = UPIO_MEM, | ||
229 | .flags = OCELOT3_UART_FLAGS, | ||
230 | .regshift = 2, | ||
231 | }, | ||
232 | { }, | ||
233 | }; | ||
234 | |||
235 | static struct platform_device uart8250_device = { | ||
236 | .name = "serial8250", | ||
237 | .id = PLAT8250_DEV_PLATFORM, | ||
238 | .dev = { | ||
239 | .platform_data = uart8250_data, | ||
240 | }, | ||
241 | }; | ||
242 | |||
243 | static int __init uart8250_init(void) | ||
244 | { | ||
245 | return platform_device_register(&uart8250_device); | ||
246 | } | ||
247 | |||
248 | module_init(uart8250_init); | ||
249 | |||
250 | MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
251 | MODULE_LICENSE("GPL"); | ||
252 | MODULE_DESCRIPTION("8250 UART probe driver for the Ocelot 3"); | ||