141480Smckusick /* 2*63151Sbostic * Copyright (c) 1982, 1990, 1993 3*63151Sbostic * The Regents of the University of California. All rights reserved. 441480Smckusick * 541480Smckusick * %sccs.include.redist.c% 641480Smckusick * 7*63151Sbostic * @(#)hpibvar.h 8.1 (Berkeley) 06/10/93 841480Smckusick */ 941480Smckusick 1041480Smckusick #define HPIB_IPL(x) ((((x) >> 4) & 0x3) + 3) 1141480Smckusick 1241480Smckusick #define HPIBA 32 1341480Smckusick #define HPIBB 1 1441480Smckusick #define HPIBC 8 1541480Smckusick #define HPIBA_BA 21 1641480Smckusick #define HPIBC_BA 30 1741480Smckusick #define HPIBA_IPL 3 1841480Smckusick 1941480Smckusick #define CSA_BA 0x1F 2041480Smckusick 2141480Smckusick #define IDS_WDMA 0x04 2241480Smckusick #define IDS_WRITE 0x08 2341480Smckusick #define IDS_IR 0x40 2441480Smckusick #define IDS_IE 0x80 2541480Smckusick #define IDS_DMA(x) (1 << (x)) 2641480Smckusick 2741480Smckusick #define C_DCL 0x14 2841480Smckusick #define C_LAG 0x20 2941480Smckusick #define C_UNL 0x3f 3041480Smckusick #define C_TAG 0x40 3141480Smckusick #define C_UNA 0x5e 3241480Smckusick #define C_UNT 0x5f 3341480Smckusick #define C_SCG 0x60 3441480Smckusick 3541480Smckusick struct hpib_softc { 3641480Smckusick struct hp_ctlr *sc_hc; 3741480Smckusick int sc_flags; 3841480Smckusick struct devqueue sc_dq; 3941480Smckusick struct devqueue sc_sq; 4041480Smckusick int sc_ba; 4141480Smckusick int sc_type; 4241480Smckusick char *sc_addr; 4341480Smckusick int sc_count; 4441480Smckusick int sc_curcnt; 4541480Smckusick }; 4641480Smckusick 4741480Smckusick /* sc_flags */ 4841480Smckusick #define HPIBF_IO 0x1 4941480Smckusick #define HPIBF_DONE 0x2 5041480Smckusick #define HPIBF_PPOLL 0x4 5141480Smckusick #define HPIBF_READ 0x8 5241480Smckusick #define HPIBF_DMA16 0x8000 5341480Smckusick 5441480Smckusick #ifdef KERNEL 5541480Smckusick extern struct hpib_softc hpib_softc[]; 5649307Shibler extern caddr_t internalhpib; 5745502Smckusick extern int hpibtimeout; 5845502Smckusick extern int hpibdmathresh; 5954770Storek void fhpibppwatch __P((void *arg)); 6054770Storek void nhpibppwatch __P((void *arg)); 6141480Smckusick #endif 62