Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
[wrt350n-kernel.git] / drivers / serial / mcfserial.h
blob56420e2cb110d946da96f24f631770d7502a3e6f
1 /*
2 * mcfserial.c -- serial driver for ColdFire internal UARTS.
4 * Copyright (c) 1999 Greg Ungerer <gerg@snapgear.com>
5 * Copyright (c) 2000-2001 Lineo, Inc. <www.lineo.com>
6 * Copyright (c) 2002 SnapGear Inc., <www.snapgear.com>
8 * Based on code from 68332serial.c which was:
10 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
11 * Copyright (C) 1998 TSHG
12 * Copyright (c) 1999 Rt-Control Inc. <jeff@uclinux.org>
13 */
14 #ifndef _MCF_SERIAL_H
15 #define _MCF_SERIAL_H
17 #include <linux/serial.h>
19 #ifdef __KERNEL__
22 * Define a local serial stats structure.
25 struct mcf_stats {
26 unsigned int rx;
27 unsigned int tx;
28 unsigned int rxbreak;
29 unsigned int rxframing;
30 unsigned int rxparity;
31 unsigned int rxoverrun;
36 * This is our internal structure for each serial port's state.
37 * Each serial port has one of these structures associated with it.
40 struct mcf_serial {
41 int magic;
42 volatile unsigned char *addr; /* UART memory address */
43 int irq;
44 int flags; /* defined in tty.h */
45 int type; /* UART type */
46 struct tty_struct *tty;
47 unsigned char imr; /* Software imr register */
48 unsigned int baud;
49 int sigs;
50 int custom_divisor;
51 int x_char; /* xon/xoff character */
52 int baud_base;
53 int close_delay;
54 unsigned short closing_wait;
55 unsigned short closing_wait2;
56 unsigned long event;
57 int line;
58 int count; /* # of fd on device */
59 int blocked_open; /* # of blocked opens */
60 unsigned char *xmit_buf;
61 int xmit_head;
62 int xmit_tail;
63 int xmit_cnt;
64 struct mcf_stats stats;
65 struct work_struct tqueue;
66 struct work_struct tqueue_hangup;
67 wait_queue_head_t open_wait;
68 wait_queue_head_t close_wait;
72 #endif /* __KERNEL__ */
74 #endif /* _MCF_SERIAL_H */