spi-topcliff-pch: supports a spi mode setup and bit order setup by IO control
[zen-stable.git] / arch / sh / kernel / cpu / sh4a / serial-sh7722.c
blob59bc3a72702e3a96bf98cad4d5ed0e551f94a0c9
1 #include <linux/serial_sci.h>
2 #include <linux/serial_core.h>
3 #include <linux/io.h>
5 #define PSCR 0xA405011E
7 static void sh7722_sci_init_pins(struct uart_port *port, unsigned int cflag)
9 unsigned short data;
11 if (port->mapbase == 0xffe00000) {
12 data = __raw_readw(PSCR);
13 data &= ~0x03cf;
14 if (!(cflag & CRTSCTS))
15 data |= 0x0340;
17 __raw_writew(data, PSCR);
21 struct plat_sci_port_ops sh7722_sci_port_ops = {
22 .init_pins = sh7722_sci_init_pins,