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