41 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2#ifndef _SPEAKUP_SERIAL_H3#define _SPEAKUP_SERIAL_H4 5#include <linux/serial.h> /* for rs_table, serial constants */6#include <linux/serial_reg.h> /* for more serial constants */7#include <linux/serial_core.h>8 9#include "spk_priv.h"10 11/*12 * this is cut&paste from 8250.h. Get rid of the structure, the definitions13 * and this whole broken driver.14 */15struct old_serial_port {16 unsigned int uart; /* unused */17 unsigned int baud_base;18 unsigned int port;19 unsigned int irq;20 upf_t flags; /* unused */21};22 23/* countdown values for serial timeouts in us */24#define SPK_SERIAL_TIMEOUT SPK_SYNTH_TIMEOUT25/* countdown values transmitter/dsr timeouts in us */26#define SPK_XMITR_TIMEOUT 10000027/* countdown values cts timeouts in us */28#define SPK_CTS_TIMEOUT 10000029/* check ttyS0 ... ttyS3 */30#define SPK_LO_TTY 031#define SPK_HI_TTY 332/* # of timeouts permitted before disable */33#define NUM_DISABLE_TIMEOUTS 334/* buffer timeout in ms */35#define SPK_TIMEOUT 10036 37#define spk_serial_tx_busy() \38 (!uart_lsr_tx_empty(inb(speakup_info.port_tts + UART_LSR)))39 40#endif41