summaryrefslogtreecommitdiff
path: root/drivers/serial/sh-sci.c
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-04-23 21:25:29 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-05-08 19:51:57 +0900
commit346b746300f470bb4a72b66275d6a43987c5dfa6 (patch)
tree3827c877091f8fef576886a96a3fa30dfd368c09 /drivers/serial/sh-sci.c
parent191d4437b9c028afee1a0568d9c7e6e0b264c703 (diff)
sh-sci: improve sh7722 support
Improve sh7722 support for SCIF1 and SCIF2 and separate code from sh7366 implementation. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r--drivers/serial/sh-sci.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 0a051bca01c7..8fdafc27fce8 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -363,21 +363,19 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
{
unsigned int fcr_val = 0;
+ unsigned short data;
- if (cflag & CRTSCTS) {
- fcr_val |= SCFCR_MCE;
-
- ctrl_outw(0x0000, PORT_PSCR);
- } else {
- unsigned short data;
-
- data = ctrl_inw(PORT_PSCR);
- data &= 0x033f;
- data |= 0x0400;
- ctrl_outw(data, PORT_PSCR);
+ if (port->mapbase == 0xffe00000) {
+ data = ctrl_inw(PSCR);
+ data &= ~0x03cf;
+ if (cflag & CRTSCTS)
+ fcr_val |= SCFCR_MCE;
+ else
+ data |= 0x0340;
- ctrl_outw(ctrl_inw(SCSPTR0) & 0x17, SCSPTR0);
+ ctrl_outw(data, PSCR);
}
+ /* SCIF1 and SCIF2 should be setup by board code */
sci_out(port, SCFCR, fcr_val);
}