ia64/linux-2.6.18-xen.hg

annotate drivers/char/rio/phb.h @ 893:f994bfe9b93b

linux/blktap2: reduce TLB flush scope

c/s 885 added very coarse TLB flushing. Since these flushes always
follow single page updates, single page flushes (when available) are
sufficient.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:32:57 2009 +0100 (2009-06-04)
parents 831230e53067
children
rev   line source
ian@0 1 /****************************************************************************
ian@0 2 ******* *******
ian@0 3 ******* P H B H E A D E R *******
ian@0 4 ******* *******
ian@0 5 ****************************************************************************
ian@0 6
ian@0 7 Author : Ian Nandhra, Jeremy Rolls
ian@0 8 Date :
ian@0 9
ian@0 10 *
ian@0 11 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
ian@0 12 *
ian@0 13 * This program is free software; you can redistribute it and/or modify
ian@0 14 * it under the terms of the GNU General Public License as published by
ian@0 15 * the Free Software Foundation; either version 2 of the License, or
ian@0 16 * (at your option) any later version.
ian@0 17 *
ian@0 18 * This program is distributed in the hope that it will be useful,
ian@0 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ian@0 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ian@0 21 * GNU General Public License for more details.
ian@0 22 *
ian@0 23 * You should have received a copy of the GNU General Public License
ian@0 24 * along with this program; if not, write to the Free Software
ian@0 25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ian@0 26
ian@0 27 Version : 0.01
ian@0 28
ian@0 29
ian@0 30 Mods
ian@0 31 ----------------------------------------------------------------------------
ian@0 32 Date By Description
ian@0 33 ----------------------------------------------------------------------------
ian@0 34
ian@0 35 ***************************************************************************/
ian@0 36
ian@0 37 #ifndef _phb_h
ian@0 38 #define _phb_h 1
ian@0 39
ian@0 40 /*************************************************
ian@0 41 * Handshake asserted. Deasserted by the LTT(s)
ian@0 42 ************************************************/
ian@0 43 #define PHB_HANDSHAKE_SET ((ushort) 0x001) /* Set by LRT */
ian@0 44
ian@0 45 #define PHB_HANDSHAKE_RESET ((ushort) 0x002) /* Set by ISR / driver */
ian@0 46
ian@0 47 #define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET | PHB_HANDSHAKE_SET)
ian@0 48 /* Reset by ltt */
ian@0 49
ian@0 50
ian@0 51 /*************************************************
ian@0 52 * Maximum number of PHB's
ian@0 53 ************************************************/
ian@0 54 #define MAX_PHB ((ushort) 128) /* range 0-127 */
ian@0 55
ian@0 56 /*************************************************
ian@0 57 * Defines for the mode fields
ian@0 58 ************************************************/
ian@0 59 #define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */
ian@0 60 #define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */
ian@0 61 #define TX_TAB3 0x0004 /* TAB3 mode */
ian@0 62 #define TX_OCRNL 0x0008 /* OCRNL mode */
ian@0 63 #define TX_ONLCR 0x0010 /* ONLCR mode */
ian@0 64 #define TX_SENDSPACES 0x0020 /* Send n spaces command needs
ian@0 65 completing */
ian@0 66 #define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */
ian@0 67 #define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */
ian@0 68 #define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
ian@0 69 port */
ian@0 70 #define TX_HANGOVER (TX_SENDSPACES | TX_SENDLF | TX_SENDNULL)
ian@0 71 #define TX_DTRFLOW 0x0200 /* DTR tx flow control */
ian@0 72 #define TX_DTRFLOWED 0x0400 /* DTR is low - don't allow more data
ian@0 73 into the FIFO */
ian@0 74 #define TX_DATAINFIFO 0x0800 /* There is data in the FIFO */
ian@0 75 #define TX_BUSY 0x1000 /* Data in FIFO, shift or holding regs */
ian@0 76
ian@0 77 #define RX_SPARE 0x0001 /* SPARE */
ian@0 78 #define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */
ian@0 79 #define RX_ICRNL 0x0008 /* ICRNL mode */
ian@0 80 #define RX_INLCR 0x0010 /* INLCR mode */
ian@0 81 #define RX_IGNCR 0x0020 /* IGNCR mode */
ian@0 82 #define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */
ian@0 83 #define RX_IXOFF 0x0080 /* IXOFF enabled */
ian@0 84 #define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */
ian@0 85 #define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */
ian@0 86 #define RX_BUFFERED 0x0400 /* Try and pass on complete packets */
ian@0 87
ian@0 88 #define PORT_ISOPEN 0x0001 /* Port open? */
ian@0 89 #define PORT_HUPCL 0x0002 /* Hangup on close? */
ian@0 90 #define PORT_MOPENPEND 0x0004 /* Modem open pending */
ian@0 91 #define PORT_ISPARALLEL 0x0008 /* Parallel port */
ian@0 92 #define PORT_BREAK 0x0010 /* Port on break */
ian@0 93 #define PORT_STATUSPEND 0x0020 /* Status packet pending */
ian@0 94 #define PORT_BREAKPEND 0x0040 /* Break packet pending */
ian@0 95 #define PORT_MODEMPEND 0x0080 /* Modem status packet pending */
ian@0 96 #define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
ian@0 97 port */
ian@0 98 #define PORT_FULLMODEM 0x0200 /* Full modem signals */
ian@0 99 #define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */
ian@0 100 #define PORT_RESTRICTED 0x0600 /* Restricted connector - no RI / DTR */
ian@0 101
ian@0 102 #define PORT_MODEMBITS 0x0600 /* Mask for modem fields */
ian@0 103
ian@0 104 #define PORT_WCLOSE 0x0800 /* Waiting for close */
ian@0 105 #define PORT_HANDSHAKEFIX 0x1000 /* Port has H/W flow control fix */
ian@0 106 #define PORT_WASPCLOSED 0x2000 /* Port closed with PCLOSE */
ian@0 107 #define DUMPMODE 0x4000 /* Dump RTA mem */
ian@0 108 #define READ_REG 0x8000 /* Read CD1400 register */
ian@0 109
ian@0 110
ian@0 111
ian@0 112 /**************************************************************************
ian@0 113 * PHB Structure
ian@0 114 * A few words.
ian@0 115 *
ian@0 116 * Normally Packets are added to the end of the list and removed from
ian@0 117 * the start. The pointer tx_add points to a SPACE to put a Packet.
ian@0 118 * The pointer tx_remove points to the next Packet to remove
ian@0 119 *************************************************************************/
ian@0 120
ian@0 121 struct PHB {
ian@0 122 u8 source;
ian@0 123 u8 handshake;
ian@0 124 u8 status;
ian@0 125 u16 timeout; /* Maximum of 1.9 seconds */
ian@0 126 u8 link; /* Send down this link */
ian@0 127 u8 destination;
ian@0 128 u16 tx_start;
ian@0 129 u16 tx_end;
ian@0 130 u16 tx_add;
ian@0 131 u16 tx_remove;
ian@0 132
ian@0 133 u16 rx_start;
ian@0 134 u16 rx_end;
ian@0 135 u16 rx_add;
ian@0 136 u16 rx_remove;
ian@0 137
ian@0 138 };
ian@0 139
ian@0 140 #endif
ian@0 141
ian@0 142 /*********** end of file ***********/