1*433d6423SLionel Sambuc /* 2*433d6423SLionel Sambuc wdeth.h 3*433d6423SLionel Sambuc 4*433d6423SLionel Sambuc Created: before Dec 28, 1992 by Philip Homburg 5*433d6423SLionel Sambuc */ 6*433d6423SLionel Sambuc 7*433d6423SLionel Sambuc #ifndef WDETH_H 8*433d6423SLionel Sambuc #define WDETH_H 9*433d6423SLionel Sambuc 10*433d6423SLionel Sambuc /* Western Digital Ethercard Plus, or WD8003E card. */ 11*433d6423SLionel Sambuc 12*433d6423SLionel Sambuc #define EPL_REG0 0x0 /* Control(write) and status(read) */ 13*433d6423SLionel Sambuc #define EPL_REG1 0x1 14*433d6423SLionel Sambuc #define EPL_REG2 0x2 15*433d6423SLionel Sambuc #define EPL_REG3 0x3 16*433d6423SLionel Sambuc #define EPL_REG4 0x4 17*433d6423SLionel Sambuc #define EPL_REG5 0x5 18*433d6423SLionel Sambuc #define EPL_REG6 0x6 19*433d6423SLionel Sambuc #define EPL_REG7 0x7 20*433d6423SLionel Sambuc #define EPL_EA0 0x8 /* Most significant eaddr byte */ 21*433d6423SLionel Sambuc #define EPL_EA1 0x9 22*433d6423SLionel Sambuc #define EPL_EA2 0xA 23*433d6423SLionel Sambuc #define EPL_EA3 0xB 24*433d6423SLionel Sambuc #define EPL_EA4 0xC 25*433d6423SLionel Sambuc #define EPL_EA5 0xD /* Least significant eaddr byte */ 26*433d6423SLionel Sambuc #define EPL_TLB 0xE 27*433d6423SLionel Sambuc #define EPL_CHKSUM 0xF /* sum from epl_ea0 upto here is 0xFF */ 28*433d6423SLionel Sambuc #define EPL_DP8390 0x10 /* NatSemi chip */ 29*433d6423SLionel Sambuc 30*433d6423SLionel Sambuc #define EPL_MSR EPL_REG0 /* memory select register */ 31*433d6423SLionel Sambuc #define EPL_ICR EPL_REG1 /* interface configuration register */ 32*433d6423SLionel Sambuc #define EPL_IRR EPL_REG4 /* interrupt request register (IRR) */ 33*433d6423SLionel Sambuc #define EPL_790_HWR EPL_REG4 /* '790 hardware support register */ 34*433d6423SLionel Sambuc #define EPL_LAAR EPL_REG5 /* LA address register (write only) */ 35*433d6423SLionel Sambuc #define EPL_790_ICR EPL_REG6 /* '790 interrupt control register */ 36*433d6423SLionel Sambuc #define EPL_GP2 EPL_REG7 /* general purpose register 2 */ 37*433d6423SLionel Sambuc #define EPL_790_B EPL_EA3 /* '790 memory register */ 38*433d6423SLionel Sambuc #define EPL_790_GCR EPL_EA5 /* '790 General Control Register */ 39*433d6423SLionel Sambuc 40*433d6423SLionel Sambuc /* Bits in EPL_MSR */ 41*433d6423SLionel Sambuc #define E_MSR_MEMADDR 0x3F /* Bits SA18-SA13, SA19 implicit 1 */ 42*433d6423SLionel Sambuc #define E_MSR_MENABLE 0x40 /* Memory Enable */ 43*433d6423SLionel Sambuc #define E_MSR_RESET 0x80 /* Software Reset */ 44*433d6423SLionel Sambuc 45*433d6423SLionel Sambuc /* Bits in EPL_ICR */ 46*433d6423SLionel Sambuc #define E_ICR_16BIT 0x01 /* 16 bit bus */ 47*433d6423SLionel Sambuc #define E_ICR_IR2 0x04 /* bit 2 of encoded IRQ */ 48*433d6423SLionel Sambuc #define E_ICR_MEMBIT 0x08 /* 583 mem size mask */ 49*433d6423SLionel Sambuc 50*433d6423SLionel Sambuc /* Bits in EPL_IRR */ 51*433d6423SLionel Sambuc #define E_IRR_IR0 0x20 /* bit 0 of encoded IRQ */ 52*433d6423SLionel Sambuc #define E_IRR_IR1 0x40 /* bit 1 of encoded IRQ */ 53*433d6423SLionel Sambuc #define E_IRR_IEN 0x80 /* enable interrupts */ 54*433d6423SLionel Sambuc 55*433d6423SLionel Sambuc /* Bits in EPL_LAAR */ 56*433d6423SLionel Sambuc #define E_LAAR_A19 0x01 /* address lines for above 1M ram */ 57*433d6423SLionel Sambuc #define E_LAAR_A20 0x02 /* address lines for above 1M ram */ 58*433d6423SLionel Sambuc #define E_LAAR_A21 0x04 /* address lines for above 1M ram */ 59*433d6423SLionel Sambuc #define E_LAAR_A22 0x08 /* address lines for above 1M ram */ 60*433d6423SLionel Sambuc #define E_LAAR_A23 0x10 /* address lines for above 1M ram */ 61*433d6423SLionel Sambuc #define E_LAAR_SOFTINT 0x20 /* enable software interrupt */ 62*433d6423SLionel Sambuc #define E_LAAR_LAN16E 0x40 /* enables 16 bit RAM for LAN */ 63*433d6423SLionel Sambuc #define E_LAAR_MEM16E 0x80 /* enables 16 bit RAM for host */ 64*433d6423SLionel Sambuc 65*433d6423SLionel Sambuc /* Bits and values in EPL_TLB */ 66*433d6423SLionel Sambuc #define E_TLB_EB 0x05 /* WD8013EB */ 67*433d6423SLionel Sambuc #define E_TLB_E 0x27 /* WD8013 Elite */ 68*433d6423SLionel Sambuc #define E_TLB_SMCE 0x29 /* SMC Elite 16 */ 69*433d6423SLionel Sambuc #define E_TLB_SMC8216T 0x2A /* SMC 8216 T */ 70*433d6423SLionel Sambuc #define E_TLB_SMC8216C 0x2B /* SMC 8216 C */ 71*433d6423SLionel Sambuc 72*433d6423SLionel Sambuc #define E_TLB_REV 0x1F /* revision mask */ 73*433d6423SLionel Sambuc #define E_TLB_SOFT 0x20 /* soft config */ 74*433d6423SLionel Sambuc #define E_TLB_RAM 0x40 /* extra ram bit */ 75*433d6423SLionel Sambuc 76*433d6423SLionel Sambuc /* Bits in EPL_790_HWR */ 77*433d6423SLionel Sambuc #define E_790_HWR_SWH 0x80 /* switch register set */ 78*433d6423SLionel Sambuc 79*433d6423SLionel Sambuc /* Bits in EPL_790_ICR */ 80*433d6423SLionel Sambuc #define E_790_ICR_EIL 0x01 /* enable interrupts */ 81*433d6423SLionel Sambuc 82*433d6423SLionel Sambuc /* Bits in EPL_790_GCR when E_790_HWR_SWH is set in EPL_790_HWR */ 83*433d6423SLionel Sambuc #define E_790_GCR_IR0 0x04 /* bit 0 of encoded IRQ */ 84*433d6423SLionel Sambuc #define E_790_GCR_IR1 0x08 /* bit 1 of encoded IRQ */ 85*433d6423SLionel Sambuc #define E_790_GCR_IR2 0x40 /* bit 2 of encoded IRQ */ 86*433d6423SLionel Sambuc 87*433d6423SLionel Sambuc #define inb_we(dep, reg) (inb(dep->de_base_port+reg)) 88*433d6423SLionel Sambuc #define outb_we(dep, reg, data) (outb(dep->de_base_port+reg, data)) 89*433d6423SLionel Sambuc 90*433d6423SLionel Sambuc #endif /* WDETH_H */ 91*433d6423SLionel Sambuc 92*433d6423SLionel Sambuc /* 93*433d6423SLionel Sambuc * $PchId: wdeth.h,v 1.6 2003/09/10 19:29:52 philip Exp $ 94*433d6423SLionel Sambuc */ 95