Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _SPEAKUP_SERIAL_H
0003 #define _SPEAKUP_SERIAL_H
0004 
0005 #include <linux/serial.h>   /* for rs_table, serial constants */
0006 #include <linux/serial_reg.h>   /* for more serial constants */
0007 #include <linux/serial_core.h>
0008 
0009 #include "spk_priv.h"
0010 
0011 /*
0012  * this is cut&paste from 8250.h. Get rid of the structure, the definitions
0013  * and this whole broken driver.
0014  */
0015 struct old_serial_port {
0016     unsigned int uart; /* unused */
0017     unsigned int baud_base;
0018     unsigned int port;
0019     unsigned int irq;
0020     upf_t flags; /* unused */
0021 };
0022 
0023 /* countdown values for serial timeouts in us */
0024 #define SPK_SERIAL_TIMEOUT SPK_SYNTH_TIMEOUT
0025 /* countdown values transmitter/dsr timeouts in us */
0026 #define SPK_XMITR_TIMEOUT 100000
0027 /* countdown values cts timeouts in us */
0028 #define SPK_CTS_TIMEOUT 100000
0029 /* check ttyS0 ... ttyS3 */
0030 #define SPK_LO_TTY 0
0031 #define SPK_HI_TTY 3
0032 /* # of timeouts permitted before disable */
0033 #define NUM_DISABLE_TIMEOUTS 3
0034 /* buffer timeout in ms */
0035 #define SPK_TIMEOUT 100
0036 
0037 #define spk_serial_tx_busy() \
0038     (!uart_lsr_tx_empty(inb(speakup_info.port_tts + UART_LSR)))
0039 
0040 #endif