FreeBSD/Linux Kernel Cross Reference
sys/dev/tc/tcdsvar.h
1 /* $NetBSD: tcdsvar.h,v 1.2 2001/08/22 05:00:27 nisimura Exp $ */
2
3 /*
4 * Copyright (c) 1995, 1996 Carnegie-Mellon University.
5 * All rights reserved.
6 *
7 * Author: Chris G. Demetriou
8 *
9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation.
14 *
15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 *
19 * Carnegie Mellon requests users of this software to return to
20 *
21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
25 *
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
28 */
29
30 struct tcds_slotconfig {
31 /*
32 * Bookkeeping information
33 */
34 int sc_slot;
35
36 bus_space_tag_t sc_bst; /* to frob TCDS regs */
37 bus_space_handle_t sc_bsh;
38
39 int (*sc_intrhand) __P((void *)); /* intr. handler */
40 void *sc_intrarg; /* intr. handler arg. */
41 struct evcnt sc_evcnt; /* intr. count */
42 char sc_name[8]; /* ev_name */
43
44 /*
45 * Sets of bits in TCDS CIR and IMER that enable/check
46 * various things.
47 */
48 u_int32_t sc_resetbits;
49 u_int32_t sc_intrmaskbits;
50 u_int32_t sc_intrbits;
51 u_int32_t sc_dmabits;
52 u_int32_t sc_errorbits;
53
54 /*
55 * Offsets to slot-specific DMA resources.
56 */
57 bus_size_t sc_sda;
58 bus_size_t sc_dic;
59 bus_size_t sc_dud0;
60 bus_size_t sc_dud1;
61 };
62
63 struct tcdsdev_attach_args {
64 bus_space_tag_t tcdsda_bst; /* bus space tag */
65 bus_space_handle_t tcdsda_bsh; /* bus space handle */
66 bus_dma_tag_t tcdsda_dmat; /* bus dma tag */
67 struct tcds_slotconfig *tcdsda_sc; /* slot configuration */
68 int tcdsda_chip; /* chip number */
69 int tcdsda_id; /* SCSI ID */
70 u_int tcdsda_freq; /* chip frequency */
71 int tcdsda_period; /* min. sync period */
72 int tcdsda_variant; /* NCR chip variant */
73 int tcdsda_fast; /* chip does Fast mode */
74 };
75
76 /*
77 * TCDS functions.
78 */
79 void tcds_intr_establish __P((struct device *, int,
80 int (*)(void *), void *));
81 void tcds_intr_disestablish __P((struct device *, int));
82 void tcds_dma_enable __P((struct tcds_slotconfig *, int));
83 void tcds_scsi_enable __P((struct tcds_slotconfig *, int));
84 int tcds_scsi_iserr __P((struct tcds_slotconfig *));
85 int tcds_scsi_isintr __P((struct tcds_slotconfig *, int));
86 void tcds_scsi_reset __P((struct tcds_slotconfig *));
Cache object: bf6eddd98db8d503416ffaaedfbf14eb
|