157083Sakito /* 257083Sakito * Copyright (c) 1992 OMRON Corporation. 3*63199Sbostic * Copyright (c) 1992, 1993 4*63199Sbostic * The Regents of the University of California. All rights reserved. 557083Sakito * 657083Sakito * This code is derived from software contributed to Berkeley by 757083Sakito * OMRON Corporation. 857083Sakito * 957083Sakito * %sccs.include.redist.c% 1057083Sakito * 11*63199Sbostic * @(#)device.h 8.1 (Berkeley) 06/10/93 1257083Sakito */ 1357083Sakito 1457083Sakito struct driver { 1557083Sakito int (*d_init)(); 1657083Sakito char *d_name; 1757083Sakito int (*d_start)(); 1857083Sakito int (*d_go)(); 1957083Sakito int (*d_intr)(); 2057083Sakito int (*d_done)(); 2157083Sakito }; 2257083Sakito 2357083Sakito struct hp_ctlr { 2457083Sakito struct driver *hp_driver; 2557083Sakito int hp_unit; 2657083Sakito int hp_alive; 2757083Sakito char *hp_addr; 2857083Sakito int hp_flags; 2957083Sakito int hp_ipl; 3057083Sakito }; 3157083Sakito 3257083Sakito struct hp_device { 3357083Sakito struct driver *hp_driver; 3457083Sakito struct driver *hp_cdriver; 3557083Sakito int hp_unit; 3657083Sakito int hp_ctlr; 3757083Sakito int hp_slave; 3857083Sakito char *hp_addr; 3957083Sakito int hp_dk; 4057083Sakito int hp_flags; 4157083Sakito int hp_alive; 4257083Sakito int hp_ipl; 4357083Sakito }; 4457083Sakito 4557083Sakito struct devqueue { 4657083Sakito struct devqueue *dq_forw; 4757083Sakito struct devqueue *dq_back; 4857083Sakito int dq_ctlr; 4957083Sakito int dq_unit; 5057083Sakito int dq_slave; 5157083Sakito struct driver *dq_driver; 5257083Sakito }; 5357083Sakito 5457083Sakito struct hp_hw { 5557083Sakito char *hw_addr; /* physical address of registers */ 5657083Sakito short hw_sc; /* select code (if applicable) */ 5757083Sakito short hw_type; /* type (defined below) */ 5857083Sakito short hw_id; /* HW returned id */ 5957083Sakito short hw_id2; /* secondary HW id (displays) */ 6057083Sakito char *hw_name; /* HP product name */ 6157083Sakito }; 6257083Sakito 6357083Sakito #define MAX_CTLR 16 /* Totally arbitrary */ 6457083Sakito #define MAXSLAVES 8 /* Currently the HPIB limit */ 6557083Sakito 6657083Sakito #define WILD_CARD_CTLR 0 6757083Sakito 6857083Sakito /* A controller is a card which can have one or more slaves attached */ 6957083Sakito #define CONTROLLER 0x10 7057083Sakito #define HPIB 0x16 7157083Sakito #define SCSI 0x17 7257083Sakito #define VME 0x18 7357083Sakito #define FLINK 0x19 7457083Sakito 7557083Sakito /* Slaves are devices which attach to controllers, e.g. disks, tapes */ 7657083Sakito #define RD 0x2a 7757083Sakito #define PPI 0x2b 7857083Sakito #define CT 0x2c 7957083Sakito 8057083Sakito /* These are not controllers, but may have their own HPIB address */ 8157083Sakito #define BITMAP 1 8257083Sakito #define NET 2 8357083Sakito #define FPA 4 8457083Sakito #define MISC 5 8557083Sakito #define KEYBOARD 6 8657083Sakito #define COMMDCA 7 8757083Sakito #define COMMDCM 8 8857083Sakito #define COMMDCL 9 8957083Sakito #define PPORT 10 9057083Sakito #define SIO 11 9157083Sakito 9257083Sakito #ifdef KERNEL 9357083Sakito extern struct hp_ctlr hp_cinit[]; 9457083Sakito extern struct hp_device hp_dinit[]; 9557083Sakito extern struct hp_hw sc_table[]; 9657083Sakito #endif 97