xref: /linux/arch/sh/kernel/cpu/sh3/serial-sh7710.c (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
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