License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / drivers / staging / speakup / serialio.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
c6e3fd22
WH
2#ifndef _SPEAKUP_SERIAL_H
3#define _SPEAKUP_SERIAL_H
4
4b71598b 5#include <linux/serial.h> /* for rs_table, serial constants */
c6e3fd22 6#include <linux/serial_reg.h> /* for more serial constants */
c6e3fd22 7#ifndef __sparc__
f79b0d9c 8#include <linux/serial.h>
c6e3fd22 9#endif
ff59f2a6 10#include <linux/serial_core.h>
c6e3fd22 11
6b9ad1c7
OK
12#include "spk_priv.h"
13
3ee0017e
JS
14/*
15 * this is cut&paste from 8250.h. Get rid of the structure, the definitions
16 * and this whole broken driver.
17 */
18struct old_serial_port {
19 unsigned int uart; /* unused */
20 unsigned int baud_base;
21 unsigned int port;
22 unsigned int irq;
ff59f2a6 23 upf_t flags; /* unused */
3ee0017e
JS
24};
25
c6e3fd22 26/* countdown values for serial timeouts in us */
6b9ad1c7 27#define SPK_SERIAL_TIMEOUT SPK_SYNTH_TIMEOUT
c6e3fd22
WH
28/* countdown values transmitter/dsr timeouts in us */
29#define SPK_XMITR_TIMEOUT 100000
30/* countdown values cts timeouts in us */
31#define SPK_CTS_TIMEOUT 100000
32/* check ttyS0 ... ttyS3 */
33#define SPK_LO_TTY 0
34#define SPK_HI_TTY 3
35/* # of timeouts permitted before disable */
36#define NUM_DISABLE_TIMEOUTS 3
37/* buffer timeout in ms */
38#define SPK_TIMEOUT 100
39#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
40
63b8ebe4
SG
41#define spk_serial_tx_busy() \
42 ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY)
c6e3fd22 43
c6e3fd22 44#endif