dgnc_cls.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright 2003 Digi International (www.digi.com)
  3. * Scott H Kilau <Scott_Kilau at digi dot com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2, or (at your option)
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
  12. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. * PURPOSE. See the GNU General Public License for more details.
  14. */
  15. #ifndef __DGNC_CLS_H
  16. #define __DGNC_CLS_H
  17. /************************************************************************
  18. * Per channel/port Classic UART structure *
  19. ************************************************************************
  20. * Base Structure Entries Usage Meanings to Host *
  21. * *
  22. * W = read write R = read only *
  23. * U = Unused. *
  24. ************************************************************************/
  25. /*
  26. * txrx : WR RHR/THR - Holding reg
  27. * ier : WR IER - Interrupt Enable Reg
  28. * isr_fcr : WR ISR/FCR - Interrupt Status Reg/Fifo Control Reg
  29. * lcr : WR LCR - Line Control Reg
  30. * mcr : WR MCR - Modem Control Reg
  31. * lsr : WR LSR - Line Status Reg
  32. * msr : WR MSG - Modem Status Reg
  33. * spr : WR SPR - Scratch pad Reg
  34. */
  35. struct cls_uart_struct {
  36. u8 txrx;
  37. u8 ier;
  38. u8 isr_fcr;
  39. u8 lcr;
  40. u8 mcr;
  41. u8 lsr;
  42. u8 msr;
  43. u8 spr;
  44. };
  45. /* Where to read the interrupt register (8bits) */
  46. #define UART_CLASSIC_POLL_ADDR_OFFSET 0x40
  47. #define UART_EXAR654_ENHANCED_REGISTER_SET 0xBF
  48. #define UART_16654_FCR_TXTRIGGER_16 0x10
  49. #define UART_16654_FCR_RXTRIGGER_16 0x40
  50. #define UART_16654_FCR_RXTRIGGER_56 0x80
  51. /* Received CTS/RTS change of state */
  52. #define UART_IIR_CTSRTS 0x20
  53. /* Receiver data TIMEOUT */
  54. #define UART_IIR_RDI_TIMEOUT 0x0C
  55. /*
  56. * These are the EXTENDED definitions for the Exar 654's Interrupt
  57. * Enable Register.
  58. */
  59. #define UART_EXAR654_EFR_ECB 0x10 /* Enhanced control bit */
  60. #define UART_EXAR654_EFR_IXON 0x2 /* Receiver compares Xon1/Xoff1 */
  61. #define UART_EXAR654_EFR_IXOFF 0x8 /* Transmit Xon1/Xoff1 */
  62. #define UART_EXAR654_EFR_RTSDTR 0x40 /* Auto RTS/DTR Flow Control Enable */
  63. #define UART_EXAR654_EFR_CTSDSR 0x80 /* Auto CTS/DSR Flow COntrol Enable */
  64. #define UART_EXAR654_IER_XOFF 0x20 /* Xoff Interrupt Enable */
  65. #define UART_EXAR654_IER_RTSDTR 0x40 /* Output Interrupt Enable */
  66. #define UART_EXAR654_IER_CTSDSR 0x80 /* Input Interrupt Enable */
  67. /*
  68. * Our Global Variables
  69. */
  70. extern struct board_ops dgnc_cls_ops;
  71. #endif