[ARM] 2964/1: S3C2410 - serial: add .owner to driver
[linux-2.6] / drivers / serial / mcfserial.h
1 /*
2  * mcfserial.c -- serial driver for ColdFire internal UARTS.
3  *
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>
7  *
8  * Based on code from 68332serial.c which was:
9  *
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
16
17 #include <linux/config.h>
18 #include <linux/serial.h>
19
20 #ifdef __KERNEL__
21
22 /*
23  *      Define a local serial stats structure.
24  */
25
26 struct mcf_stats {
27         unsigned int    rx;
28         unsigned int    tx;
29         unsigned int    rxbreak;
30         unsigned int    rxframing;
31         unsigned int    rxparity;
32         unsigned int    rxoverrun;
33 };
34
35
36 /*
37  * This is our internal structure for each serial port's state.
38  * Each serial port has one of these structures associated with it.
39  */
40
41 struct mcf_serial {
42         int                     magic;
43         volatile unsigned char  *addr;          /* UART memory address */
44         int                     irq;
45         int                     flags;          /* defined in tty.h */
46         int                     type;           /* UART type */
47         struct tty_struct       *tty;
48         unsigned char           imr;            /* Software imr register */
49         unsigned int            baud;
50         int                     sigs;
51         int                     custom_divisor;
52         int                     x_char; /* xon/xoff character */
53         int                     baud_base;
54         int                     close_delay;
55         unsigned short          closing_wait;
56         unsigned short          closing_wait2;
57         unsigned long           event;
58         int                     line;
59         int                     count;      /* # of fd on device */
60         int                     blocked_open; /* # of blocked opens */
61         unsigned char           *xmit_buf;
62         int                     xmit_head;
63         int                     xmit_tail;
64         int                     xmit_cnt;
65         struct mcf_stats        stats;
66         struct work_struct      tqueue;
67         struct work_struct      tqueue_hangup;
68         wait_queue_head_t       open_wait;
69         wait_queue_head_t       close_wait;
70
71 };
72
73 #endif /* __KERNEL__ */
74
75 #endif /* _MCF_SERIAL_H */