serial-sh7722.c 498 B

123456789101112131415161718192021222324
  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. #define PSCR 0xA405011E
  6. static void sh7722_sci_init_pins(struct uart_port *port, unsigned int cflag)
  7. {
  8. unsigned short data;
  9. if (port->mapbase == 0xffe00000) {
  10. data = __raw_readw(PSCR);
  11. data &= ~0x03cf;
  12. if (!(cflag & CRTSCTS))
  13. data |= 0x0340;
  14. __raw_writew(data, PSCR);
  15. }
  16. }
  17. struct plat_sci_port_ops sh7722_sci_port_ops = {
  18. .init_pins = sh7722_sci_init_pins,
  19. };