mantis_uart.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. Mantis PCI bridge driver
  3. Copyright (C) Manu Abraham (abraham.manu@gmail.com)
  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. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef __MANTIS_UART_H
  17. #define __MANTIS_UART_H
  18. #define MANTIS_UART_CTL 0xe0
  19. #define MANTIS_UART_RXINT (1 << 4)
  20. #define MANTIS_UART_RXFLUSH (1 << 2)
  21. #define MANTIS_UART_RXD 0xe8
  22. #define MANTIS_UART_BAUD 0xec
  23. #define MANTIS_UART_STAT 0xf0
  24. #define MANTIS_UART_RXFIFO_DATA (1 << 7)
  25. #define MANTIS_UART_RXFIFO_EMPTY (1 << 6)
  26. #define MANTIS_UART_RXFIFO_FULL (1 << 3)
  27. #define MANTIS_UART_FRAME_ERR (1 << 2)
  28. #define MANTIS_UART_PARITY_ERR (1 << 1)
  29. #define MANTIS_UART_RXTHRESH_INT (1 << 0)
  30. enum mantis_baud {
  31. MANTIS_BAUD_9600 = 0,
  32. MANTIS_BAUD_19200,
  33. MANTIS_BAUD_38400,
  34. MANTIS_BAUD_57600,
  35. MANTIS_BAUD_115200
  36. };
  37. enum mantis_parity {
  38. MANTIS_PARITY_NONE = 0,
  39. MANTIS_PARITY_EVEN,
  40. MANTIS_PARITY_ODD,
  41. };
  42. struct mantis_pci;
  43. extern int mantis_uart_init(struct mantis_pci *mantis);
  44. extern void mantis_uart_exit(struct mantis_pci *mantis);
  45. #endif /* __MANTIS_UART_H */