|
|
1.1 ! root 1: /* ! 2: * Mach Operating System ! 3: * Copyright (c) 1992 Carnegie Mellon University ! 4: * All Rights Reserved. ! 5: * ! 6: * Permission to use, copy, modify and distribute this software and its ! 7: * documentation is hereby granted, provided that both the copyright ! 8: * notice and this permission notice appear in all copies of the ! 9: * software, derivative works or modified versions, and any portions ! 10: * thereof, and that both notices appear in supporting documentation. ! 11: * ! 12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" ! 13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR ! 14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 15: * ! 16: * Carnegie Mellon requests users of this software to return to ! 17: * ! 18: * Software Distribution Coordinator or [email protected] ! 19: * School of Computer Science ! 20: * Carnegie Mellon University ! 21: * Pittsburgh PA 15213-3890 ! 22: * ! 23: * any improvements or extensions that they make and grant Carnegie Mellon ! 24: * the rights to redistribute these changes. ! 25: */ ! 26: ! 27: /*** FORE TCA-100 Turbochannel ATM computer interface ***/ ! 28: ! 29: #define RX_COUNT_INTR 0x0001 ! 30: #define RX_EOM_INTR 0x0002 ! 31: #define RX_TIME_INTR 0x0004 ! 32: #define TX_COUNT_INTR 0x0008 ! 33: #define RX_CELL_LOST 0x0010 ! 34: #define RX_NO_CARRIER 0x0020 ! 35: #define CR_RX_ENABLE 0x0040 ! 36: #define CR_TX_ENABLE 0x0080 ! 37: #define CR_RX_RESET 0x0100 ! 38: #define CR_TX_RESET 0x0200 ! 39: ! 40: #define ATM_READ_REG(reg) ((reg) & 0x3ff) /* 10 bit register mask */ ! 41: ! 42: ! 43: struct atm_device { ! 44: unsigned int prom[64 * 1024 / 4]; ! 45: volatile unsigned int sreg; ! 46: volatile unsigned int creg_set; ! 47: volatile unsigned int creg_clr; ! 48: volatile unsigned int creg; ! 49: volatile unsigned int rxtimer; ! 50: unsigned int pad1; ! 51: volatile unsigned int rxtimerv; ! 52: unsigned int pad2; ! 53: volatile unsigned int rxcount; ! 54: unsigned int pad3; ! 55: volatile unsigned int rxthresh; ! 56: unsigned int pad4; ! 57: volatile unsigned int txcount; ! 58: unsigned int pad5; ! 59: volatile unsigned int txthresh; ! 60: unsigned int pad6[64*1024/4 - 15]; ! 61: volatile unsigned int rxfifo[14]; ! 62: unsigned int pad7[64*1024/4 - 14]; ! 63: volatile unsigned int txfifo[14]; ! 64: unsigned int pad8[64*1024/4 - 14]; ! 65: }; ! 66: /* MUST BE PAGE ALIGNED OR YOU WILL GET KILLED BELOW WITH ATM_INFO */ ! 67: ! 68: struct sar_data { ! 69: int header; ! 70: int payload[12]; ! 71: int trailer; ! 72: }; ! 73: ! 74: ! 75: /* ! 76: * Information for mapped atm device ! 77: */ ! 78: typedef struct mapped_atm_info { ! 79: volatile unsigned int interrupt_count; /* tot interrupts received */ ! 80: volatile unsigned short saved_status_reg; /* copy of status reg from last interrupt */ ! 81: unsigned int hello_world; ! 82: unsigned wait_event; ! 83: } *mapped_atm_info_t; ! 84: ! 85: ! 86: ! 87: #define ATM_DEVICE(p) (struct atm_device*)(p) ! 88: #define ATM_INFO(p) (mapped_atm_info_t)( (p) + sizeof(struct atm_device) ) ! 89:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.