serial_pnx8xxx.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Embedded Alley Solutions, source@embeddedalley.com.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (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, MA 02111-1307 USA
  17. */
  18. #ifndef _LINUX_SERIAL_PNX8XXX_H
  19. #define _LINUX_SERIAL_PNX8XXX_H
  20. #include <linux/serial_core.h>
  21. #include <linux/device.h>
  22. #define PNX8XXX_NR_PORTS 2
  23. struct pnx8xxx_port {
  24. struct uart_port port;
  25. struct timer_list timer;
  26. unsigned int old_status;
  27. };
  28. /* register offsets */
  29. #define PNX8XXX_LCR 0
  30. #define PNX8XXX_MCR 0x004
  31. #define PNX8XXX_BAUD 0x008
  32. #define PNX8XXX_CFG 0x00c
  33. #define PNX8XXX_FIFO 0x028
  34. #define PNX8XXX_ISTAT 0xfe0
  35. #define PNX8XXX_IEN 0xfe4
  36. #define PNX8XXX_ICLR 0xfe8
  37. #define PNX8XXX_ISET 0xfec
  38. #define PNX8XXX_PD 0xff4
  39. #define PNX8XXX_MID 0xffc
  40. #define PNX8XXX_UART_LCR_TXBREAK (1<<30)
  41. #define PNX8XXX_UART_LCR_PAREVN 0x10000000
  42. #define PNX8XXX_UART_LCR_PAREN 0x08000000
  43. #define PNX8XXX_UART_LCR_2STOPB 0x04000000
  44. #define PNX8XXX_UART_LCR_8BIT 0x01000000
  45. #define PNX8XXX_UART_LCR_TX_RST 0x00040000
  46. #define PNX8XXX_UART_LCR_RX_RST 0x00020000
  47. #define PNX8XXX_UART_LCR_RX_NEXT 0x00010000
  48. #define PNX8XXX_UART_MCR_SCR 0xFF000000
  49. #define PNX8XXX_UART_MCR_DCD 0x00800000
  50. #define PNX8XXX_UART_MCR_CTS 0x00100000
  51. #define PNX8XXX_UART_MCR_LOOP 0x00000010
  52. #define PNX8XXX_UART_MCR_RTS 0x00000002
  53. #define PNX8XXX_UART_MCR_DTR 0x00000001
  54. #define PNX8XXX_UART_INT_TX 0x00000080
  55. #define PNX8XXX_UART_INT_EMPTY 0x00000040
  56. #define PNX8XXX_UART_INT_RCVTO 0x00000020
  57. #define PNX8XXX_UART_INT_RX 0x00000010
  58. #define PNX8XXX_UART_INT_RXOVRN 0x00000008
  59. #define PNX8XXX_UART_INT_FRERR 0x00000004
  60. #define PNX8XXX_UART_INT_BREAK 0x00000002
  61. #define PNX8XXX_UART_INT_PARITY 0x00000001
  62. #define PNX8XXX_UART_INT_ALLRX 0x0000003F
  63. #define PNX8XXX_UART_INT_ALLTX 0x000000C0
  64. #define PNX8XXX_UART_FIFO_TXFIFO 0x001F0000
  65. #define PNX8XXX_UART_FIFO_TXFIFO_STA (0x1f<<16)
  66. #define PNX8XXX_UART_FIFO_RXBRK 0x00008000
  67. #define PNX8XXX_UART_FIFO_RXFE 0x00004000
  68. #define PNX8XXX_UART_FIFO_RXPAR 0x00002000
  69. #define PNX8XXX_UART_FIFO_RXFIFO 0x00001F00
  70. #define PNX8XXX_UART_FIFO_RBRTHR 0x000000FF
  71. #endif