regs-uartapp.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * stmp37xx: UARTAPP register definitions
  3. *
  4. * Copyright (c) 2008 Freescale Semiconductor
  5. * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #define REGS_UARTAPP_BASE (STMP3XXX_REGS_BASE + 0x6C000)
  22. #define REGS_UARTAPP1_PHYS 0x8006C000
  23. #define REGS_UARTAPP_SIZE 0x2000
  24. #define HW_UARTAPP_CTRL0 0x0
  25. #define BM_UARTAPP_CTRL0_XFER_COUNT 0x0000FFFF
  26. #define BP_UARTAPP_CTRL0_XFER_COUNT 0
  27. #define BM_UARTAPP_CTRL0_RXTIMEOUT 0x07FF0000
  28. #define BP_UARTAPP_CTRL0_RXTIMEOUT 16
  29. #define BM_UARTAPP_CTRL0_RXTO_ENABLE 0x08000000
  30. #define BM_UARTAPP_CTRL0_RUN 0x20000000
  31. #define BM_UARTAPP_CTRL0_SFTRST 0x80000000
  32. #define BM_UARTAPP_CTRL1_XFER_COUNT 0x0000FFFF
  33. #define BP_UARTAPP_CTRL1_XFER_COUNT 0
  34. #define BM_UARTAPP_CTRL1_RUN 0x10000000
  35. #define HW_UARTAPP_CTRL2 0x20
  36. #define BM_UARTAPP_CTRL2_UARTEN 0x00000001
  37. #define BP_UARTAPP_CTRL2_UARTEN 0
  38. #define BM_UARTAPP_CTRL2_TXE 0x00000100
  39. #define BM_UARTAPP_CTRL2_RXE 0x00000200
  40. #define BM_UARTAPP_CTRL2_RTS 0x00000800
  41. #define BM_UARTAPP_CTRL2_RTSEN 0x00004000
  42. #define BM_UARTAPP_CTRL2_CTSEN 0x00008000
  43. #define BM_UARTAPP_CTRL2_RXDMAE 0x01000000
  44. #define BM_UARTAPP_CTRL2_TXDMAE 0x02000000
  45. #define BM_UARTAPP_CTRL2_DMAONERR 0x04000000
  46. #define HW_UARTAPP_LINECTRL 0x30
  47. #define BM_UARTAPP_LINECTRL_BRK 0x00000001
  48. #define BP_UARTAPP_LINECTRL_BRK 0
  49. #define BM_UARTAPP_LINECTRL_PEN 0x00000002
  50. #define BM_UARTAPP_LINECTRL_EPS 0x00000004
  51. #define BM_UARTAPP_LINECTRL_STP2 0x00000008
  52. #define BM_UARTAPP_LINECTRL_FEN 0x00000010
  53. #define BM_UARTAPP_LINECTRL_WLEN 0x00000060
  54. #define BP_UARTAPP_LINECTRL_WLEN 5
  55. #define BM_UARTAPP_LINECTRL_SPS 0x00000080
  56. #define BM_UARTAPP_LINECTRL_BAUD_DIVFRAC 0x00003F00
  57. #define BP_UARTAPP_LINECTRL_BAUD_DIVFRAC 8
  58. #define BM_UARTAPP_LINECTRL_BAUD_DIVINT 0xFFFF0000
  59. #define BP_UARTAPP_LINECTRL_BAUD_DIVINT 16
  60. #define HW_UARTAPP_INTR 0x50
  61. #define BM_UARTAPP_INTR_CTSMIS 0x00000002
  62. #define BM_UARTAPP_INTR_RTIS 0x00000040
  63. #define BM_UARTAPP_INTR_CTSMIEN 0x00020000
  64. #define BM_UARTAPP_INTR_RXIEN 0x00100000
  65. #define BM_UARTAPP_INTR_RTIEN 0x00400000
  66. #define HW_UARTAPP_DATA 0x60
  67. #define HW_UARTAPP_STAT 0x70
  68. #define BM_UARTAPP_STAT_RXCOUNT 0x0000FFFF
  69. #define BP_UARTAPP_STAT_RXCOUNT 0
  70. #define BM_UARTAPP_STAT_FERR 0x00010000
  71. #define BM_UARTAPP_STAT_PERR 0x00020000
  72. #define BM_UARTAPP_STAT_BERR 0x00040000
  73. #define BM_UARTAPP_STAT_OERR 0x00080000
  74. #define BM_UARTAPP_STAT_RXFE 0x01000000
  75. #define BM_UARTAPP_STAT_TXFF 0x02000000
  76. #define BM_UARTAPP_STAT_TXFE 0x08000000
  77. #define BM_UARTAPP_STAT_CTS 0x10000000
  78. #define HW_UARTAPP_VERSION 0x90