vserver 1.9.5.x5
[linux-2.6.git] / drivers / serial / 8250.h
1 /*
2  *  linux/drivers/char/8250.h
3  *
4  *  Driver for 8250/16550-type serial ports
5  *
6  *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
7  *
8  *  Copyright (C) 2001 Russell King.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  *  $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $
16  */
17
18 #include <linux/config.h>
19
20 int serial8250_register_port(struct uart_port *);
21 void serial8250_unregister_port(int line);
22 void serial8250_suspend_port(int line);
23 void serial8250_resume_port(int line);
24
25 struct old_serial_port {
26         unsigned int uart;
27         unsigned int baud_base;
28         unsigned int port;
29         unsigned int irq;
30         unsigned int flags;
31         unsigned char hub6;
32         unsigned char io_type;
33         unsigned char *iomem_base;
34         unsigned short iomem_reg_shift;
35 };
36
37 /*
38  * This replaces serial_uart_config in include/linux/serial.h
39  */
40 struct serial8250_config {
41         const char      *name;
42         unsigned short  fifo_size;
43         unsigned short  tx_loadsz;
44         unsigned char   fcr;
45         unsigned int    flags;
46 };
47
48 #define UART_CAP_FIFO   (1 << 8)        /* UART has FIFO */
49 #define UART_CAP_EFR    (1 << 9)        /* UART has EFR */
50 #define UART_CAP_SLEEP  (1 << 10)       /* UART has IER sleep */
51 #define UART_CAP_AFE    (1 << 11)       /* MCR-based hw flow control */
52
53 #undef SERIAL_DEBUG_PCI
54
55 #if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486))
56 #define SERIAL_INLINE
57 #endif
58   
59 #ifdef SERIAL_INLINE
60 #define _INLINE_ inline
61 #else
62 #define _INLINE_
63 #endif
64
65 #define PROBE_RSA       (1 << 0)
66 #define PROBE_ANY       (~0)
67
68 #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
69
70 #ifdef CONFIG_SERIAL_8250_SHARE_IRQ
71 #define SERIAL8250_SHARE_IRQS 1
72 #else
73 #define SERIAL8250_SHARE_IRQS 0
74 #endif
75
76 #if defined(__alpha__) && !defined(CONFIG_PCI)
77 /*
78  * Digital did something really horribly wrong with the OUT1 and OUT2
79  * lines on at least some ALPHA's.  The failure mode is that if either
80  * is cleared, the machine locks up with endless interrupts.
81  */
82 #define ALPHA_KLUDGE_MCR  (UART_MCR_OUT2 | UART_MCR_OUT1)
83 #else
84 #define ALPHA_KLUDGE_MCR 0
85 #endif