Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / tc / tcdsvar.h
blobd8ea869a47e9c24a271ca80e2894e3e6c165a191
1 /* $NetBSD: tcdsvar.h,v 1.5 2005/12/11 12:24:00 christos Exp $ */
3 /*
4 * Copyright (c) 1995, 1996 Carnegie-Mellon University.
5 * All rights reserved.
7 * Author: Chris G. Demetriou
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.
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.
19 * Carnegie Mellon requests users of this software to return to
21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
30 struct tcds_slotconfig {
32 * Bookkeeping information
34 int sc_slot;
36 bus_space_tag_t sc_bst; /* to frob TCDS regs */
37 bus_space_handle_t sc_bsh;
39 int (*sc_intrhand)(void *); /* intr. handler */
40 void *sc_intrarg; /* intr. handler arg. */
41 struct evcnt sc_evcnt; /* intr. count */
42 char sc_name[8]; /* ev_name */
45 * Sets of bits in TCDS CIR and IMER that enable/check
46 * various things.
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;
55 * Offsets to slot-specific DMA resources.
57 bus_size_t sc_sda;
58 bus_size_t sc_dic;
59 bus_size_t sc_dud0;
60 bus_size_t sc_dud1;
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 */
77 * TCDS functions.
79 void tcds_intr_establish(device_t, int, int (*)(void *), void *);
80 void tcds_intr_disestablish(device_t, int);
81 void tcds_dma_enable(struct tcds_slotconfig *, int);
82 void tcds_scsi_enable(struct tcds_slotconfig *, int);
83 int tcds_scsi_iserr(struct tcds_slotconfig *);
84 int tcds_scsi_isintr(struct tcds_slotconfig *, int);
85 void tcds_scsi_reset(struct tcds_slotconfig *);