aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup_tx4938.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-25 10:08:06 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-30 16:54:40 -0400
commit7779a5e07d33fe316fe468e7afe7975fb686a831 (patch)
tree05426226c35b46a938a555a37524307ceb1a22d7 /arch/mips/txx9/generic/setup_tx4938.c
parentbb72f1f729dcbd6a6a93c74479eeaa19deebfb47 (diff)
[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_tx4938.c')
-rw-r--r--arch/mips/txx9/generic/setup_tx4938.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c
index 1ceace45ef6a..f3040b9ba059 100644
--- a/arch/mips/txx9/generic/setup_tx4938.c
+++ b/arch/mips/txx9/generic/setup_tx4938.c
@@ -13,7 +13,6 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/ioport.h> 14#include <linux/ioport.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/serial_core.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <asm/txx9irq.h> 17#include <asm/txx9irq.h>
19#include <asm/txx9tmr.h> 18#include <asm/txx9tmr.h>
@@ -238,11 +237,9 @@ void __init tx4938_time_init(unsigned int tmrnr)
238 TXX9_IMCLK); 237 TXX9_IMCLK);
239} 238}
240 239
241void __init tx4938_setup_serial(void) 240void __init tx4938_sio_init(unsigned int sclk, unsigned int cts_mask)
242{ 241{
243#ifdef CONFIG_SERIAL_TXX9
244 int i; 242 int i;
245 struct uart_port req;
246 unsigned int ch_mask = 0; 243 unsigned int ch_mask = 0;
247 244
248 if (__raw_readq(&tx4938_ccfgptr->pcfg) & TX4938_PCFG_ETH0_SEL) 245 if (__raw_readq(&tx4938_ccfgptr->pcfg) & TX4938_PCFG_ETH0_SEL)
@@ -250,17 +247,10 @@ void __init tx4938_setup_serial(void)
250 for (i = 0; i < 2; i++) { 247 for (i = 0; i < 2; i++) {
251 if ((1 << i) & ch_mask) 248 if ((1 << i) & ch_mask)
252 continue; 249 continue;
253 memset(&req, 0, sizeof(req)); 250 txx9_sio_init(TX4938_SIO_REG(i) & 0xfffffffffULL,
254 req.line = i; 251 TXX9_IRQ_BASE + TX4938_IR_SIO(i),
255 req.iotype = UPIO_MEM; 252 i, sclk, (1 << i) & cts_mask);
256 req.membase = (unsigned char __iomem *)TX4938_SIO_REG(i);
257 req.mapbase = TX4938_SIO_REG(i) & 0xfffffffffULL;
258 req.irq = TXX9_IRQ_BASE + TX4938_IR_SIO(i);
259 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
260 req.uartclk = TXX9_IMCLK;
261 early_serial_txx9_setup(&req);
262 } 253 }
263#endif /* CONFIG_SERIAL_TXX9 */
264} 254}
265 255
266void __init tx4938_spi_init(int busid) 256void __init tx4938_spi_init(int busid)