First, remove unused macro and rs_multiport_struct structure. Nobody uses them at all. Further, the 2 drivers (they are below) which use the rest of structures from serialP.h (async_struct and serial_state) do not use all the members. Remove the members: * which are unused or * which are only initialized and never used for something real. Everybody should avoid the structures with a looong distance. Finally, remove the ALPHA kludge MCR quirks. They are 1:1 copy from 8250.h. No need to redefine them here. The 2 promised users of the structures: arch/ia64/hp/sim/simserial.c drivers/tty/amiserial.c Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
78 lines
1.8 KiB
C
78 lines
1.8 KiB
C
/*
|
|
* Private header file for the (dumb) serial driver
|
|
*
|
|
* Copyright (C) 1997 by Theodore Ts'o.
|
|
*
|
|
* Redistribution of this file is permitted under the terms of the GNU
|
|
* Public License (GPL)
|
|
*/
|
|
|
|
#ifndef _LINUX_SERIALP_H
|
|
#define _LINUX_SERIALP_H
|
|
|
|
/*
|
|
* This is our internal structure for each serial port's state.
|
|
*
|
|
* Many fields are paralleled by the structure used by the serial_struct
|
|
* structure.
|
|
*
|
|
* For definitions of the flags field, see tty.h
|
|
*/
|
|
|
|
#include <linux/termios.h>
|
|
#include <linux/workqueue.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/circ_buf.h>
|
|
#include <linux/wait.h>
|
|
|
|
struct serial_state {
|
|
int baud_base;
|
|
unsigned long port;
|
|
int irq;
|
|
int flags;
|
|
int type;
|
|
int line;
|
|
int xmit_fifo_size;
|
|
int custom_divisor;
|
|
int count;
|
|
unsigned short close_delay;
|
|
unsigned short closing_wait; /* time to wait before closing */
|
|
struct async_icount icount;
|
|
struct async_struct *info;
|
|
};
|
|
|
|
struct async_struct {
|
|
unsigned long port;
|
|
int flags;
|
|
int xmit_fifo_size;
|
|
struct serial_state *state;
|
|
struct tty_struct *tty;
|
|
int read_status_mask;
|
|
int ignore_status_mask;
|
|
int timeout;
|
|
int quot;
|
|
int x_char; /* xon/xoff character */
|
|
int close_delay;
|
|
unsigned short closing_wait;
|
|
int IER; /* Interrupt Enable Register */
|
|
int MCR; /* Modem control register */
|
|
unsigned long event;
|
|
int line;
|
|
int blocked_open; /* # of blocked opens */
|
|
struct circ_buf xmit;
|
|
struct tasklet_struct tlet;
|
|
wait_queue_head_t open_wait;
|
|
wait_queue_head_t close_wait;
|
|
wait_queue_head_t delta_msr_wait;
|
|
struct async_struct *next_port; /* For the linked list */
|
|
struct async_struct *prev_port;
|
|
};
|
|
|
|
/*
|
|
* Events are used to schedule things to happen at timer-interrupt
|
|
* time, instead of at rs interrupt time.
|
|
*/
|
|
#define RS_EVENT_WRITE_WAKEUP 0
|
|
|
|
#endif /* _LINUX_SERIAL_H */
|