Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  1 #define FEPCODESEG  0x0200L
  2 #define FEPCODE     0x2000L
  3 #define BIOSCODE    0xf800L
  4 
  5 #define MISCGLOBAL  0x0C00L
  6 #define NPORT       0x0C22L
  7 #define MBOX        0x0C40L
  8 #define PORTBASE    0x0C90L
  9 
 10 #define FEPCLR      0x00
 11 #define FEPMEM      0x02
 12 #define FEPRST      0x04
 13 #define FEPINT      0x08
 14 #define FEPMASK     0x0e
 15 #define FEPWIN      0x80
 16 
 17 /* Maximum Number of Boards supported */
 18 #define MAX_DIGI_BOARDS 4
 19 
 20 #define PCXX_NUM_TYPES  4
 21 
 22 #define PCXI            0
 23 #define PCXE            1
 24 #define PCXEVE          2
 25 #define PCXEM           3
 26 
 27 static char *board_desc[] = {
 28         "PC/Xi",
 29         "PC/Xe",
 30         "PC/Xeve",
 31         "PC/Xem",
 32 };
 33 
 34 static char *board_mem[] = {
 35         "64k",
 36         "64k",
 37         "8k",
 38         "32k",
 39 };
 40 #define STARTC      021
 41 #define STOPC       023
 42 #define IAIXON      0x2000
 43 
 44 
 45 struct board_info       {
 46         unchar status;
 47         unchar type;
 48         unchar altpin;
 49         ushort numports;
 50         ushort port;
 51         ulong  membase;
 52         ulong  memsize;
 53         ushort first_minor;
 54         void *region;
 55 };
 56 
 57 
 58 #define TXSTOPPED   0x01
 59 #define LOWWAIT         0x02
 60 #define EMPTYWAIT       0x04
 61 #define RXSTOPPED       0x08
 62 #define TXBUSY          0x10
 63 
 64 #define DISABLED   0
 65 #define ENABLED    1
 66 #define OFF        0
 67 #define ON         1
 68 
 69 #define FEPTIMEOUT 200000  
 70 #define SERIAL_TYPE_NORMAL      1
 71 #define PCXE_EVENT_HANGUP   1
 72 #define PCXX_MAGIC      0x5c6df104L
 73 
 74 struct channel {
 75                                                         /* --------- Board/channel information ---------- */
 76         long                                            magic;
 77         unchar                                          boardnum;
 78         unchar                                          channelnum;
 79         uint                                            dev;
 80         struct tty_struct                       *tty;
 81         struct board_info                       *board;
 82         volatile struct board_chan      *brdchan;
 83         volatile struct global_data *mailbox;
 84         int                                                     asyncflags;
 85         int                                                     count;
 86         int                                                     blocked_open;
 87         int                                                     close_delay;
 88         unsigned long                                           event;
 89         wait_queue_head_t                       open_wait;
 90         wait_queue_head_t                       close_wait;
 91         struct work_struct                      tqueue;
 92                                                         /* ------------ Async control data ------------- */
 93         unchar                                          modemfake;      /* Modem values to be forced */
 94         unchar                                          modem;          /* Force values */
 95         ulong                                           statusflags;
 96         unchar                                          omodem;         /* FEP output modem status */
 97         unchar                                          imodem;         /* FEP input modem status */
 98         unchar                                          hflow;
 99         unchar                                          dsr;
100         unchar                                          dcd;
101         unchar                                          stopc;
102         unchar                                          startc;
103         unchar                                          stopca;
104         unchar                                          startca;
105         unchar                                          fepstopc;
106         unchar                                          fepstartc;
107         unchar                                          fepstopca;
108         unchar                                          fepstartca;
109         ushort                                          fepiflag;
110         ushort                                          fepcflag;
111         ushort                                          fepoflag;
112                                                         /* ---------- Transmit/receive system ---------- */
113         unchar                                          txwin;
114         unchar                                          rxwin;
115         ushort                                          txbufsize;
116         ushort                                          rxbufsize;
117         unchar                                          *txptr;
118         unchar                                          *rxptr;
119         unchar                                          *tmp_buf;               /* Temp buffer */
120         struct semaphore                                tmp_buf_sem;
121                                                         /* ---- Termios data ---- */
122         ulong                                           c_iflag;
123         ulong                                           c_cflag;
124         ulong                                           c_lflag;
125         ulong                                           c_oflag;
126         struct digi_struct                      digiext;
127         ulong                                           dummy[8];
128 };
129 
  This page was automatically generated by the LXR engine.