regs-uart.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef __REGS_UART_H__
  20. #define __REGS_UART_H__
  21. #define FFUART_BASE 0x40100000
  22. #define BTUART_BASE 0x40200000
  23. #define STUART_BASE 0x40700000
  24. #define HWUART_BASE 0x41600000
  25. struct pxa_uart_regs {
  26. union {
  27. uint32_t thr;
  28. uint32_t rbr;
  29. uint32_t dll;
  30. };
  31. union {
  32. uint32_t ier;
  33. uint32_t dlh;
  34. };
  35. union {
  36. uint32_t fcr;
  37. uint32_t iir;
  38. };
  39. uint32_t lcr;
  40. uint32_t mcr;
  41. uint32_t lsr;
  42. uint32_t msr;
  43. uint32_t spr;
  44. uint32_t isr;
  45. };
  46. #define IER_DMAE (1 << 7)
  47. #define IER_UUE (1 << 6)
  48. #define IER_NRZE (1 << 5)
  49. #define IER_RTIOE (1 << 4)
  50. #define IER_MIE (1 << 3)
  51. #define IER_RLSE (1 << 2)
  52. #define IER_TIE (1 << 1)
  53. #define IER_RAVIE (1 << 0)
  54. #define IIR_FIFOES1 (1 << 7)
  55. #define IIR_FIFOES0 (1 << 6)
  56. #define IIR_TOD (1 << 3)
  57. #define IIR_IID2 (1 << 2)
  58. #define IIR_IID1 (1 << 1)
  59. #define IIR_IP (1 << 0)
  60. #define FCR_ITL2 (1 << 7)
  61. #define FCR_ITL1 (1 << 6)
  62. #define FCR_RESETTF (1 << 2)
  63. #define FCR_RESETRF (1 << 1)
  64. #define FCR_TRFIFOE (1 << 0)
  65. #define FCR_ITL_1 0
  66. #define FCR_ITL_8 (FCR_ITL1)
  67. #define FCR_ITL_16 (FCR_ITL2)
  68. #define FCR_ITL_32 (FCR_ITL2|FCR_ITL1)
  69. #define LCR_DLAB (1 << 7)
  70. #define LCR_SB (1 << 6)
  71. #define LCR_STKYP (1 << 5)
  72. #define LCR_EPS (1 << 4)
  73. #define LCR_PEN (1 << 3)
  74. #define LCR_STB (1 << 2)
  75. #define LCR_WLS1 (1 << 1)
  76. #define LCR_WLS0 (1 << 0)
  77. #define LSR_FIFOE (1 << 7)
  78. #define LSR_TEMT (1 << 6)
  79. #define LSR_TDRQ (1 << 5)
  80. #define LSR_BI (1 << 4)
  81. #define LSR_FE (1 << 3)
  82. #define LSR_PE (1 << 2)
  83. #define LSR_OE (1 << 1)
  84. #define LSR_DR (1 << 0)
  85. #define MCR_LOOP (1 << 4)
  86. #define MCR_OUT2 (1 << 3)
  87. #define MCR_OUT1 (1 << 2)
  88. #define MCR_RTS (1 << 1)
  89. #define MCR_DTR (1 << 0)
  90. #define MSR_DCD (1 << 7)
  91. #define MSR_RI (1 << 6)
  92. #define MSR_DSR (1 << 5)
  93. #define MSR_CTS (1 << 4)
  94. #define MSR_DDCD (1 << 3)
  95. #define MSR_TERI (1 << 2)
  96. #define MSR_DDSR (1 << 1)
  97. #define MSR_DCTS (1 << 0)
  98. #endif /* __REGS_UART_H__ */