serial-sh7722.c 462 B

1234567891011121314151617181920212223
  1. #include <linux/serial_sci.h>
  2. #include <linux/serial_core.h>
  3. #include <linux/io.h>
  4. #define PSCR 0xA405011E
  5. static void sh7722_sci_init_pins(struct uart_port *port, unsigned int cflag)
  6. {
  7. unsigned short data;
  8. if (port->mapbase == 0xffe00000) {
  9. data = __raw_readw(PSCR);
  10. data &= ~0x03cf;
  11. if (!(cflag & CRTSCTS))
  12. data |= 0x0340;
  13. __raw_writew(data, PSCR);
  14. }
  15. }
  16. struct plat_sci_port_ops sh7722_sci_port_ops = {
  17. .init_pins = sh7722_sci_init_pins,
  18. };