X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fserial%2Fsh-sci.c;h=8fdafc27fce8a3bccfcfb840d288c30d7a34857f;hb=7371fd11a6e2aed99895db4f100940fa5022f7fe;hp=969106187718d909e0aacb9478477296d43e04ae;hpb=d626e3bf728c47746f2129aa00c775d4e8c2a73b;p=linux-2.6 diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 9691061877..8fdafc27fc 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -42,14 +42,12 @@ #include #include #include - -#ifdef CONFIG_CPU_FREQ #include #include -#endif - -#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) +#include #include + +#ifdef CONFIG_SUPERH #include #include #include @@ -80,7 +78,7 @@ struct sci_port { struct timer_list break_timer; int break_flag; -#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) +#ifdef CONFIG_SUPERH /* Port clock */ struct clk *clk; #endif @@ -365,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); }