Commit | Line | Data |
---|---|---|
04572e08 AF |
1 | /* |
2 | * Copyright (c) 1992 OMRON Corporation. | |
3 | * Copyright (c) 1992 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley by | |
7 | * OMRON Corporation. | |
8 | * | |
9 | * %sccs.include.redist.c% | |
10 | * | |
11 | * @(#)device.h 7.1 (Berkeley) %G% | |
12 | */ | |
13 | ||
14 | struct driver { | |
15 | int (*d_init)(); | |
16 | char *d_name; | |
17 | int (*d_start)(); | |
18 | int (*d_go)(); | |
19 | int (*d_intr)(); | |
20 | int (*d_done)(); | |
21 | }; | |
22 | ||
23 | struct hp_ctlr { | |
24 | struct driver *hp_driver; | |
25 | int hp_unit; | |
26 | int hp_alive; | |
27 | char *hp_addr; | |
28 | int hp_flags; | |
29 | int hp_ipl; | |
30 | }; | |
31 | ||
32 | struct hp_device { | |
33 | struct driver *hp_driver; | |
34 | struct driver *hp_cdriver; | |
35 | int hp_unit; | |
36 | int hp_ctlr; | |
37 | int hp_slave; | |
38 | char *hp_addr; | |
39 | int hp_dk; | |
40 | int hp_flags; | |
41 | int hp_alive; | |
42 | int hp_ipl; | |
43 | }; | |
44 | ||
45 | struct devqueue { | |
46 | struct devqueue *dq_forw; | |
47 | struct devqueue *dq_back; | |
48 | int dq_ctlr; | |
49 | int dq_unit; | |
50 | int dq_slave; | |
51 | struct driver *dq_driver; | |
52 | }; | |
53 | ||
54 | struct hp_hw { | |
55 | char *hw_addr; /* physical address of registers */ | |
56 | short hw_sc; /* select code (if applicable) */ | |
57 | short hw_type; /* type (defined below) */ | |
58 | short hw_id; /* HW returned id */ | |
59 | short hw_id2; /* secondary HW id (displays) */ | |
60 | char *hw_name; /* HP product name */ | |
61 | }; | |
62 | ||
63 | #define MAX_CTLR 16 /* Totally arbitrary */ | |
64 | #define MAXSLAVES 8 /* Currently the HPIB limit */ | |
65 | ||
66 | #define WILD_CARD_CTLR 0 | |
67 | ||
68 | /* A controller is a card which can have one or more slaves attached */ | |
69 | #define CONTROLLER 0x10 | |
70 | #define HPIB 0x16 | |
71 | #define SCSI 0x17 | |
72 | #define VME 0x18 | |
73 | #define FLINK 0x19 | |
74 | ||
75 | /* Slaves are devices which attach to controllers, e.g. disks, tapes */ | |
76 | #define RD 0x2a | |
77 | #define PPI 0x2b | |
78 | #define CT 0x2c | |
79 | ||
80 | /* These are not controllers, but may have their own HPIB address */ | |
81 | #define BITMAP 1 | |
82 | #define NET 2 | |
83 | #define FPA 4 | |
84 | #define MISC 5 | |
85 | #define KEYBOARD 6 | |
86 | #define COMMDCA 7 | |
87 | #define COMMDCM 8 | |
88 | #define COMMDCL 9 | |
89 | #define PPORT 10 | |
90 | #define SIO 11 | |
91 | ||
92 | #ifdef KERNEL | |
93 | extern struct hp_ctlr hp_cinit[]; | |
94 | extern struct hp_device hp_dinit[]; | |
95 | extern struct hp_hw sc_table[]; | |
96 | #endif |