summaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-25 23:08:06 +0900
committerRalf Baechle <ralf@linux-mips.org>2008-07-30 21:54:40 +0100
commit7779a5e07d33fe316fe468e7afe7975fb686a831 (patch)
tree05426226c35b46a938a555a37524307ceb1a22d7 /arch/mips/txx9/generic/setup.c
parentbb72f1f729dcbd6a6a93c74479eeaa19deebfb47 (diff)
downloadlinux-stable-7779a5e07d33fe316fe468e7afe7975fb686a831.tar.gz
linux-stable-7779a5e07d33fe316fe468e7afe7975fb686a831.tar.bz2
linux-stable-7779a5e07d33fe316fe468e7afe7975fb686a831.zip
[MIPS] TXx9: Unify serial_txx9 setup
* Unify calling of early_serial_txx9_setup. * Use dedicated serial clock on RBTX4938. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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 @@
#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
+#include <linux/serial_core.h>
#include <asm/bootinfo.h>
#include <asm/time.h>
#include <asm/reboot.h>
@@ -247,6 +248,29 @@ void __init txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr)
platform_device_put(pdev);
}
+void __init txx9_sio_init(unsigned long baseaddr, int irq,
+ unsigned int line, unsigned int sclk, int nocts)
+{
+#ifdef CONFIG_SERIAL_TXX9
+ struct uart_port req;
+
+ memset(&req, 0, sizeof(req));
+ req.line = line;
+ req.iotype = UPIO_MEM;
+ req.membase = ioremap(baseaddr, 0x24);
+ req.mapbase = baseaddr;
+ req.irq = irq;
+ if (!nocts)
+ req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
+ if (sclk) {
+ req.flags |= UPF_MAGIC_MULTIPLIER /*USE_SCLK*/;
+ req.uartclk = sclk;
+ } else
+ req.uartclk = TXX9_IMCLK;
+ early_serial_txx9_setup(&req);
+#endif /* CONFIG_SERIAL_TXX9 */
+}
+
/* wrappers */
void __init plat_mem_setup(void)
{