wdeth.h

Go to the documentation of this file.
00001 /*
00002 wdeth.h
00003 
00004 Created:        before Dec 28, 1992 by Philip Homburg
00005 */
00006 
00007 #ifndef WDETH_H
00008 #define WDETH_H
00009 
00010 /* Western Digital Ethercard Plus, or WD8003E card. */
00011 
00012 #define EPL_REG0         0x0            /* Control(write) and status(read) */
00013 #define EPL_REG1         0x1
00014 #define EPL_REG2         0x2
00015 #define EPL_REG3         0x3
00016 #define EPL_REG4         0x4
00017 #define EPL_REG5         0x5
00018 #define EPL_REG6         0x6
00019 #define EPL_REG7         0x7
00020 #define EPL_EA0          0x8            /* Most significant eaddr byte */
00021 #define EPL_EA1          0x9
00022 #define EPL_EA2          0xA
00023 #define EPL_EA3          0xB
00024 #define EPL_EA4          0xC
00025 #define EPL_EA5          0xD            /* Least significant eaddr byte */
00026 #define EPL_TLB          0xE
00027 #define EPL_CHKSUM       0xF            /* sum from epl_ea0 upto here is 0xFF */
00028 #define EPL_DP8390      0x10            /* NatSemi chip */
00029 
00030 #define EPL_MSR         EPL_REG0        /* memory select register */
00031 #define EPL_ICR         EPL_REG1        /* interface configuration register */
00032 #define EPL_IRR         EPL_REG4        /* interrupt request register (IRR) */
00033 #define EPL_790_HWR     EPL_REG4        /* '790 hardware support register */
00034 #define EPL_LAAR        EPL_REG5        /* LA address register (write only) */
00035 #define EPL_790_ICR     EPL_REG6        /* '790 interrupt control register */
00036 #define EPL_GP2         EPL_REG7        /* general purpose register 2 */
00037 #define EPL_790_B       EPL_EA3         /* '790 memory register */
00038 #define EPL_790_GCR     EPL_EA5         /* '790 General Control Register */
00039 
00040 /* Bits in EPL_MSR */
00041 #define E_MSR_MEMADDR   0x3F            /* Bits SA18-SA13, SA19 implicit 1 */
00042 #define E_MSR_MENABLE   0x40            /* Memory Enable */
00043 #define E_MSR_RESET     0x80            /* Software Reset */
00044 
00045 /* Bits in EPL_ICR */
00046 #define E_ICR_16BIT     0x01            /* 16 bit bus */
00047 #define E_ICR_IR2       0x04            /* bit 2 of encoded IRQ */
00048 #define E_ICR_MEMBIT    0x08            /* 583 mem size mask */
00049 
00050 /* Bits in EPL_IRR */
00051 #define E_IRR_IR0       0x20            /* bit 0 of encoded IRQ */
00052 #define E_IRR_IR1       0x40            /* bit 1 of encoded IRQ */
00053 #define E_IRR_IEN       0x80            /* enable interrupts */
00054 
00055 /* Bits in EPL_LAAR */
00056 #define E_LAAR_A19      0x01            /* address lines for above 1M ram */
00057 #define E_LAAR_A20      0x02            /* address lines for above 1M ram */
00058 #define E_LAAR_A21      0x04            /* address lines for above 1M ram */
00059 #define E_LAAR_A22      0x08            /* address lines for above 1M ram */
00060 #define E_LAAR_A23      0x10            /* address lines for above 1M ram */
00061 #define E_LAAR_SOFTINT  0x20            /* enable software interrupt */
00062 #define E_LAAR_LAN16E   0x40            /* enables 16 bit RAM for LAN */
00063 #define E_LAAR_MEM16E   0x80            /* enables 16 bit RAM for host */
00064 
00065 /* Bits and values in EPL_TLB */
00066 #define E_TLB_EB        0x05            /* WD8013EB */
00067 #define E_TLB_E         0x27            /* WD8013 Elite */
00068 #define E_TLB_SMCE      0x29            /* SMC Elite 16 */
00069 #define E_TLB_SMC8216T  0x2A            /* SMC 8216 T */
00070 #define E_TLB_SMC8216C  0x2B            /* SMC 8216 C */
00071 
00072 #define E_TLB_REV       0x1F            /* revision mask */
00073 #define E_TLB_SOFT      0x20            /* soft config */
00074 #define E_TLB_RAM       0x40            /* extra ram bit */
00075 
00076 /* Bits in EPL_790_HWR */
00077 #define E_790_HWR_SWH   0x80            /* switch register set */
00078 
00079 /* Bits in EPL_790_ICR */
00080 #define E_790_ICR_EIL   0x01            /* enable interrupts */
00081 
00082 /* Bits in EPL_790_GCR when E_790_HWR_SWH is set in EPL_790_HWR */
00083 #define E_790_GCR_IR0   0x04            /* bit 0 of encoded IRQ */
00084 #define E_790_GCR_IR1   0x08            /* bit 1 of encoded IRQ */
00085 #define E_790_GCR_IR2   0x40            /* bit 2 of encoded IRQ */
00086 
00087 #define inb_we(dep, reg)        (inb(dep->de_base_port+reg))
00088 #define outb_we(dep, reg, data) (outb(dep->de_base_port+reg, data))
00089 
00090 #endif /* WDETH_H */
00091 
00092 /*
00093  * $PchId: wdeth.h,v 1.6 2003/09/10 19:29:52 philip Exp $
00094  */

Generated on Fri Apr 14 22:57:15 2006 for minix by  doxygen 1.4.6