regs-uart.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * arch/arm/mach-ks8695/include/mach/regs-uart.h
  3. *
  4. * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
  5. * Copyright (C) 2006 Simtec Electronics
  6. *
  7. * KS8695 - UART register and bit definitions.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef KS8695_UART_H
  14. #define KS8695_UART_H
  15. #define KS8695_UART_OFFSET (0xF0000 + 0xE000)
  16. #define KS8695_UART_VA (KS8695_IO_VA + KS8695_UART_OFFSET)
  17. #define KS8695_UART_PA (KS8695_IO_PA + KS8695_UART_OFFSET)
  18. /*
  19. * UART registers
  20. */
  21. #define KS8695_URRB (0x00) /* Receive Buffer Register */
  22. #define KS8695_URTH (0x04) /* Transmit Holding Register */
  23. #define KS8695_URFC (0x08) /* FIFO Control Register */
  24. #define KS8695_URLC (0x0C) /* Line Control Register */
  25. #define KS8695_URMC (0x10) /* Modem Control Register */
  26. #define KS8695_URLS (0x14) /* Line Status Register */
  27. #define KS8695_URMS (0x18) /* Modem Status Register */
  28. #define KS8695_URBD (0x1C) /* Baud Rate Divisor Register */
  29. #define KS8695_USR (0x20) /* Status Register */
  30. /* FIFO Control Register */
  31. #define URFC_URFRT (3 << 6) /* Receive FIFO Trigger Level */
  32. #define URFC_URFRT_1 (0 << 6)
  33. #define URFC_URFRT_4 (1 << 6)
  34. #define URFC_URFRT_8 (2 << 6)
  35. #define URFC_URFRT_14 (3 << 6)
  36. #define URFC_URTFR (1 << 2) /* Transmit FIFO Reset */
  37. #define URFC_URRFR (1 << 1) /* Receive FIFO Reset */
  38. #define URFC_URFE (1 << 0) /* FIFO Enable */
  39. /* Line Control Register */
  40. #define URLC_URSBC (1 << 6) /* Set Break Condition */
  41. #define URLC_PARITY (7 << 3) /* Parity */
  42. #define URPE_NONE (0 << 3)
  43. #define URPE_ODD (1 << 3)
  44. #define URPE_EVEN (3 << 3)
  45. #define URPE_MARK (5 << 3)
  46. #define URPE_SPACE (7 << 3)
  47. #define URLC_URSB (1 << 2) /* Stop Bits */
  48. #define URLC_URCL (3 << 0) /* Character Length */
  49. #define URCL_5 (0 << 0)
  50. #define URCL_6 (1 << 0)
  51. #define URCL_7 (2 << 0)
  52. #define URCL_8 (3 << 0)
  53. /* Modem Control Register */
  54. #define URMC_URLB (1 << 4) /* Loop-back mode */
  55. #define URMC_UROUT2 (1 << 3) /* OUT2 signal */
  56. #define URMC_UROUT1 (1 << 2) /* OUT1 signal */
  57. #define URMC_URRTS (1 << 1) /* Request to Send */
  58. #define URMC_URDTR (1 << 0) /* Data Terminal Ready */
  59. /* Line Status Register */
  60. #define URLS_URRFE (1 << 7) /* Receive FIFO Error */
  61. #define URLS_URTE (1 << 6) /* Transmit Empty */
  62. #define URLS_URTHRE (1 << 5) /* Transmit Holding Register Empty */
  63. #define URLS_URBI (1 << 4) /* Break Interrupt */
  64. #define URLS_URFE (1 << 3) /* Framing Error */
  65. #define URLS_URPE (1 << 2) /* Parity Error */
  66. #define URLS_URROE (1 << 1) /* Receive Overrun Error */
  67. #define URLS_URDR (1 << 0) /* Receive Data Ready */
  68. /* Modem Status Register */
  69. #define URMS_URDCD (1 << 7) /* Data Carrier Detect */
  70. #define URMS_URRI (1 << 6) /* Ring Indicator */
  71. #define URMS_URDSR (1 << 5) /* Data Set Ready */
  72. #define URMS_URCTS (1 << 4) /* Clear to Send */
  73. #define URMS_URDDCD (1 << 3) /* Delta Data Carrier Detect */
  74. #define URMS_URTERI (1 << 2) /* Trailing Edge Ring Indicator */
  75. #define URMS_URDDST (1 << 1) /* Delta Data Set Ready */
  76. #define URMS_URDCTS (1 << 0) /* Delta Clear to Send */
  77. /* Status Register */
  78. #define USR_UTI (1 << 0) /* Timeout Indication */
  79. #endif