1*b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0 261a6976bSPaul Mundt #include <linux/serial_sci.h> 361a6976bSPaul Mundt #include <linux/serial_core.h> 461a6976bSPaul Mundt #include <linux/io.h> 561a6976bSPaul Mundt 661a6976bSPaul Mundt #define PSCR 0xA405011E 761a6976bSPaul Mundt sh7722_sci_init_pins(struct uart_port * port,unsigned int cflag)861a6976bSPaul Mundtstatic void sh7722_sci_init_pins(struct uart_port *port, unsigned int cflag) 961a6976bSPaul Mundt { 1061a6976bSPaul Mundt unsigned short data; 1161a6976bSPaul Mundt 1261a6976bSPaul Mundt if (port->mapbase == 0xffe00000) { 1361a6976bSPaul Mundt data = __raw_readw(PSCR); 1461a6976bSPaul Mundt data &= ~0x03cf; 1561a6976bSPaul Mundt if (!(cflag & CRTSCTS)) 1661a6976bSPaul Mundt data |= 0x0340; 1761a6976bSPaul Mundt 1861a6976bSPaul Mundt __raw_writew(data, PSCR); 1961a6976bSPaul Mundt } 2061a6976bSPaul Mundt } 2161a6976bSPaul Mundt 2261a6976bSPaul Mundt struct plat_sci_port_ops sh7722_sci_port_ops = { 2361a6976bSPaul Mundt .init_pins = sh7722_sci_init_pins, 2461a6976bSPaul Mundt }; 25