[PATCH] W1: w1_netlink: New init/fini netlink callbacks.
[linux-2.6/verdex.git] / drivers / serial / 8250.h
blobb1b459efda524fa27f2743b848497d48c3bf953a
1 /*
2 * linux/drivers/char/8250.h
4 * Driver for 8250/16550-type serial ports
6 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
8 * Copyright (C) 2001 Russell King.
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.
15 * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $
18 #include <linux/config.h>
19 #include <linux/serial_8250.h>
21 struct old_serial_port {
22 unsigned int uart;
23 unsigned int baud_base;
24 unsigned int port;
25 unsigned int irq;
26 unsigned int flags;
27 unsigned char hub6;
28 unsigned char io_type;
29 unsigned char *iomem_base;
30 unsigned short iomem_reg_shift;
34 * This replaces serial_uart_config in include/linux/serial.h
36 struct serial8250_config {
37 const char *name;
38 unsigned short fifo_size;
39 unsigned short tx_loadsz;
40 unsigned char fcr;
41 unsigned int flags;
44 #define UART_CAP_FIFO (1 << 8) /* UART has FIFO */
45 #define UART_CAP_EFR (1 << 9) /* UART has EFR */
46 #define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */
47 #define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */
48 #define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */
50 #define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
51 #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
53 #if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486))
54 #define _INLINE_ inline
55 #else
56 #define _INLINE_
57 #endif
59 #define PROBE_RSA (1 << 0)
60 #define PROBE_ANY (~0)
62 #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
64 #ifdef CONFIG_SERIAL_8250_SHARE_IRQ
65 #define SERIAL8250_SHARE_IRQS 1
66 #else
67 #define SERIAL8250_SHARE_IRQS 0
68 #endif
70 #if defined(__alpha__) && !defined(CONFIG_PCI)
72 * Digital did something really horribly wrong with the OUT1 and OUT2
73 * lines on at least some ALPHA's. The failure mode is that if either
74 * is cleared, the machine locks up with endless interrupts.
76 #define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1)
77 #elif defined(CONFIG_SBC8560)
79 * WindRiver did something similarly broken on their SBC8560 board. The
80 * UART tristates its IRQ output while OUT2 is clear, but they pulled
81 * the interrupt line _up_ instead of down, so if we register the IRQ
82 * while the UART is in that state, we die in an IRQ storm. */
83 #define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
84 #else
85 #define ALPHA_KLUDGE_MCR 0
86 #endif