serial-sh7710.c 554 B

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