serialio.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _SPEAKUP_SERIAL_H
  2. #define _SPEAKUP_SERIAL_H
  3. #include <linux/serial.h> /* for rs_table, serial constants */
  4. #include <linux/serial_reg.h> /* for more serial constants */
  5. #ifndef __sparc__
  6. #include <linux/serial.h>
  7. #endif
  8. /*
  9. * this is cut&paste from 8250.h. Get rid of the structure, the definitions
  10. * and this whole broken driver.
  11. */
  12. struct old_serial_port {
  13. unsigned int uart; /* unused */
  14. unsigned int baud_base;
  15. unsigned int port;
  16. unsigned int irq;
  17. unsigned int flags; /* unused */
  18. };
  19. /* countdown values for serial timeouts in us */
  20. #define SPK_SERIAL_TIMEOUT 100000
  21. /* countdown values transmitter/dsr timeouts in us */
  22. #define SPK_XMITR_TIMEOUT 100000
  23. /* countdown values cts timeouts in us */
  24. #define SPK_CTS_TIMEOUT 100000
  25. /* check ttyS0 ... ttyS3 */
  26. #define SPK_LO_TTY 0
  27. #define SPK_HI_TTY 3
  28. /* # of timeouts permitted before disable */
  29. #define NUM_DISABLE_TIMEOUTS 3
  30. /* buffer timeout in ms */
  31. #define SPK_TIMEOUT 100
  32. #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
  33. #define spk_serial_tx_busy() \
  34. ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY)
  35. #endif