serial_pxa.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2016 Marcel Ziswiler <marcel.ziswiler@toradex.com>
  4. */
  5. #ifndef __SERIAL_PXA_H
  6. #define __SERIAL_PXA_H
  7. /*
  8. * The numbering scheme differs here for PXA25x, PXA27x and PXA3xx so we can
  9. * easily handle enabling of clock.
  10. */
  11. #ifdef CONFIG_CPU_MONAHANS
  12. #define UART_CLK_BASE CKENA_21_BTUART
  13. #define UART_CLK_REG CKENA
  14. #define BTUART_INDEX 0
  15. #define FFUART_INDEX 1
  16. #define STUART_INDEX 2
  17. #elif CONFIG_CPU_PXA25X
  18. #define UART_CLK_BASE (1 << 4) /* HWUART */
  19. #define UART_CLK_REG CKEN
  20. #define HWUART_INDEX 0
  21. #define STUART_INDEX 1
  22. #define FFUART_INDEX 2
  23. #define BTUART_INDEX 3
  24. #else /* PXA27x */
  25. #define UART_CLK_BASE CKEN5_STUART
  26. #define UART_CLK_REG CKEN
  27. #define STUART_INDEX 0
  28. #define FFUART_INDEX 1
  29. #define BTUART_INDEX 2
  30. #endif
  31. /*
  32. * Only PXA250 has HWUART, to avoid poluting the code with more macros,
  33. * artificially introduce this.
  34. */
  35. #ifndef CONFIG_CPU_PXA25X
  36. #define HWUART_INDEX 0xff
  37. #endif
  38. /*
  39. * struct pxa_serial_platdata - information about a PXA port
  40. *
  41. * @base: Uart port base register address
  42. * @port: Uart port index, for cpu with pinmux for uart / gpio
  43. * baudrtatre: Uart port baudrate
  44. */
  45. struct pxa_serial_platdata {
  46. struct pxa_uart_regs *base;
  47. int port;
  48. int baudrate;
  49. };
  50. #endif /* __SERIAL_PXA_H */