| 1 |
|
| 2 | #ifndef _SCC_H
|
| 3 | #define _SCC_H
|
| 4 |
|
| 5 | #include <uapi/linux/scc.h>
|
| 6 |
|
| 7 |
|
| 8 | enum {TX_OFF, TX_ON};
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 | #define VECTOR_MASK 0x06
|
| 13 | #define TXINT 0x00
|
| 14 | #define EXINT 0x02
|
| 15 | #define RXINT 0x04
|
| 16 | #define SPINT 0x06
|
| 17 |
|
| 18 | #ifdef CONFIG_SCC_DELAY
|
| 19 | #define Inb(port) inb_p(port)
|
| 20 | #define Outb(port, val) outb_p(val, port)
|
| 21 | #else
|
| 22 | #define Inb(port) inb(port)
|
| 23 | #define Outb(port, val) outb(val, port)
|
| 24 | #endif
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 | struct scc_kiss {
|
| 29 | unsigned char txdelay;
|
| 30 | unsigned char persist;
|
| 31 | unsigned char slottime;
|
| 32 | unsigned char tailtime;
|
| 33 | unsigned char fulldup;
|
| 34 | unsigned char waittime;
|
| 35 | unsigned int maxkeyup;
|
| 36 | unsigned int mintime;
|
| 37 | unsigned int idletime;
|
| 38 | unsigned int maxdefer;
|
| 39 | unsigned char tx_inhibit;
|
| 40 | unsigned char group;
|
| 41 | unsigned char mode;
|
| 42 | unsigned char softdcd;
|
| 43 | };
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 | struct scc_channel {
|
| 49 | int init;
|
| 50 |
|
| 51 | struct net_device *dev;
|
| 52 | struct net_device_stats dev_stat;
|
| 53 |
|
| 54 | char brand;
|
| 55 | long clock;
|
| 56 |
|
| 57 | io_port ctrl;
|
| 58 | io_port data;
|
| 59 | io_port special;
|
| 60 | int irq;
|
| 61 |
|
| 62 | char option;
|
| 63 | char enhanced;
|
| 64 |
|
| 65 | unsigned char wreg[16];
|
| 66 | unsigned char status;
|
| 67 | unsigned char dcd;
|
| 68 |
|
| 69 | struct scc_kiss kiss;
|
| 70 | struct scc_stat stat;
|
| 71 | struct scc_modem modem;
|
| 72 |
|
| 73 | struct sk_buff_head tx_queue;
|
| 74 | struct sk_buff *rx_buff;
|
| 75 | struct sk_buff *tx_buff;
|
| 76 |
|
| 77 |
|
| 78 | struct timer_list tx_t;
|
| 79 | struct timer_list tx_wdog;
|
| 80 |
|
| 81 |
|
| 82 | spinlock_t lock;
|
| 83 | };
|
| 84 |
|
| 85 | #endif
|