drivers/char/hvc_console.c: adjust call to put_tty_driver
[linux-2.6-block.git] / drivers / serial / mcfserial.h
CommitLineData
1da177e4
LT
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
1da177e4
LT
17#include <linux/serial.h>
18
19#ifdef __KERNEL__
20
21/*
22 * Define a local serial stats structure.
23 */
24
25struct 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;
32};
33
34
35/*
36 * This is our internal structure for each serial port's state.
37 * Each serial port has one of these structures associated with it.
38 */
39
40struct 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;
69
70};
71
72#endif /* __KERNEL__ */
73
74#endif /* _MCF_SERIAL_H */