aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r--arch/mips/txx9/generic/setup.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index b136c6692a5f..94ce1a5c38a4 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -21,6 +21,7 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/serial_core.h>
24#include <asm/bootinfo.h> 25#include <asm/bootinfo.h>
25#include <asm/time.h> 26#include <asm/time.h>
26#include <asm/reboot.h> 27#include <asm/reboot.h>
@@ -247,6 +248,29 @@ void __init txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr)
247 platform_device_put(pdev); 248 platform_device_put(pdev);
248} 249}
249 250
251void __init txx9_sio_init(unsigned long baseaddr, int irq,
252 unsigned int line, unsigned int sclk, int nocts)
253{
254#ifdef CONFIG_SERIAL_TXX9
255 struct uart_port req;
256
257 memset(&req, 0, sizeof(req));
258 req.line = line;
259 req.iotype = UPIO_MEM;
260 req.membase = ioremap(baseaddr, 0x24);
261 req.mapbase = baseaddr;
262 req.irq = irq;
263 if (!nocts)
264 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
265 if (sclk) {
266 req.flags |= UPF_MAGIC_MULTIPLIER /*USE_SCLK*/;
267 req.uartclk = sclk;
268 } else
269 req.uartclk = TXX9_IMCLK;
270 early_serial_txx9_setup(&req);
271#endif /* CONFIG_SERIAL_TXX9 */
272}
273
250/* wrappers */ 274/* wrappers */
251void __init plat_mem_setup(void) 275void __init plat_mem_setup(void)
252{ 276{