1*41480Smckusick /* 2*41480Smckusick * Copyright (c) 1982, 1990 The Regents of the University of California. 3*41480Smckusick * All rights reserved. 4*41480Smckusick * 5*41480Smckusick * %sccs.include.redist.c% 6*41480Smckusick * 7*41480Smckusick * @(#)hpibvar.h 7.1 (Berkeley) 05/08/90 8*41480Smckusick */ 9*41480Smckusick 10*41480Smckusick #define HPIB_IPL(x) ((((x) >> 4) & 0x3) + 3) 11*41480Smckusick 12*41480Smckusick #define HPIBA 32 13*41480Smckusick #define HPIBB 1 14*41480Smckusick #define HPIBC 8 15*41480Smckusick #define HPIBA_BA 21 16*41480Smckusick #define HPIBC_BA 30 17*41480Smckusick #define HPIBA_IPL 3 18*41480Smckusick 19*41480Smckusick #define CSA_BA 0x1F 20*41480Smckusick 21*41480Smckusick #define IDS_WDMA 0x04 22*41480Smckusick #define IDS_WRITE 0x08 23*41480Smckusick #define IDS_IR 0x40 24*41480Smckusick #define IDS_IE 0x80 25*41480Smckusick #define IDS_DMA(x) (1 << (x)) 26*41480Smckusick 27*41480Smckusick #define C_DCL 0x14 28*41480Smckusick #define C_LAG 0x20 29*41480Smckusick #define C_UNL 0x3f 30*41480Smckusick #define C_TAG 0x40 31*41480Smckusick #define C_UNA 0x5e 32*41480Smckusick #define C_UNT 0x5f 33*41480Smckusick #define C_SCG 0x60 34*41480Smckusick 35*41480Smckusick struct hpib_softc { 36*41480Smckusick struct hp_ctlr *sc_hc; 37*41480Smckusick int sc_flags; 38*41480Smckusick struct devqueue sc_dq; 39*41480Smckusick struct devqueue sc_sq; 40*41480Smckusick int sc_ba; 41*41480Smckusick int sc_type; 42*41480Smckusick char *sc_addr; 43*41480Smckusick int sc_count; 44*41480Smckusick int sc_curcnt; 45*41480Smckusick }; 46*41480Smckusick 47*41480Smckusick /* sc_flags */ 48*41480Smckusick #define HPIBF_IO 0x1 49*41480Smckusick #define HPIBF_DONE 0x2 50*41480Smckusick #define HPIBF_PPOLL 0x4 51*41480Smckusick #define HPIBF_READ 0x8 52*41480Smckusick #define HPIBF_DMA16 0x8000 53*41480Smckusick 54*41480Smckusick #ifdef KERNEL 55*41480Smckusick extern struct hpib_softc hpib_softc[]; 56*41480Smckusick extern int internalhpib; 57*41480Smckusick #endif 58