1 #include <linux/serial_sci.h>
2 #include <linux/serial_core.h>
3 #include <linux/io.h>
4 #include <cpu/serial.h>
5 
6 #define PACR 0xa4050100
7 #define PBCR 0xa4050102
8 
9 static void sh7710_sci_init_pins(struct uart_port *port, unsigned int cflag)
10 {
11 	if (port->mapbase == 0xA4400000) {
12 		__raw_writew(__raw_readw(PACR) & 0xffc0, PACR);
13 		__raw_writew(__raw_readw(PBCR) & 0x0fff, PBCR);
14 	} else if (port->mapbase == 0xA4410000)
15 		__raw_writew(__raw_readw(PBCR) & 0xf003, PBCR);
16 }
17 
18 struct plat_sci_port_ops sh7710_sci_port_ops = {
19 	.init_pins	= sh7710_sci_init_pins,
20 };
21