xref: /netbsd-src/sys/dev/qbus/rlvar.h (revision 72d26a2dda23791b892cf8f1f49376e5de407c78)
1*72d26a2dSrin /*	$NetBSD: rlvar.h,v 1.11 2020/04/16 23:29:53 rin Exp $	*/
2f3082cc9Sragge 
3f3082cc9Sragge /*
4f3082cc9Sragge  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
5f3082cc9Sragge  *
6f3082cc9Sragge  * Redistribution and use in source and binary forms, with or without
7f3082cc9Sragge  * modification, are permitted provided that the following conditions
8f3082cc9Sragge  * are met:
9f3082cc9Sragge  * 1. Redistributions of source code must retain the above copyright
10f3082cc9Sragge  *    notice, this list of conditions and the following disclaimer.
11f3082cc9Sragge  * 2. Redistributions in binary form must reproduce the above copyright
12f3082cc9Sragge  *    notice, this list of conditions and the following disclaimer in the
13f3082cc9Sragge  *    documentation and/or other materials provided with the distribution.
14f3082cc9Sragge  *
15f3082cc9Sragge  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16f3082cc9Sragge  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17f3082cc9Sragge  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18f3082cc9Sragge  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19f3082cc9Sragge  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20f3082cc9Sragge  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21f3082cc9Sragge  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22f3082cc9Sragge  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23f3082cc9Sragge  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24f3082cc9Sragge  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25f3082cc9Sragge  */
26f3082cc9Sragge 
27f3082cc9Sragge /*
28f3082cc9Sragge  * RL11/RLV11/RLV12 disk controller driver and
29f3082cc9Sragge  * RL01/RL02 disk device driver.
30f3082cc9Sragge  */
31f3082cc9Sragge 
32*72d26a2dSrin #include <sys/cdefs.h>
33*72d26a2dSrin __KERNEL_RCSID(0, "$NetBSD: rlvar.h,v 1.11 2020/04/16 23:29:53 rin Exp $");
34*72d26a2dSrin 
35f3082cc9Sragge struct rlc_softc {
36dfba8166Smatt 	device_t sc_dev;
37dfba8166Smatt 	struct uba_softc *sc_uh;
38f3082cc9Sragge 	struct evcnt sc_intrcnt;
39f3082cc9Sragge 	bus_space_tag_t sc_iot;
40f3082cc9Sragge 	bus_space_handle_t sc_ioh;
41f3082cc9Sragge 	bus_dma_tag_t sc_dmat;
42f3082cc9Sragge 	bus_dmamap_t sc_dmam;
43aec75b1cSyamt 	struct bufq_state *sc_q;	/* Queue of waiting bufs */
44f3082cc9Sragge 	struct buf *sc_active;		/* Currently active buf */
4553524e44Schristos 	void *sc_bufaddr;		/* Current in-core address */
46f3082cc9Sragge 	int sc_diskblk;			/* Current block on disk */
47f3082cc9Sragge 	int sc_bytecnt;			/* How much left to transfer */
48f3082cc9Sragge };
49f3082cc9Sragge 
50f3082cc9Sragge struct rl_softc {
51dfba8166Smatt 	device_t rc_dev;
52dfba8166Smatt 	struct rlc_softc *rc_rlc;
53f3082cc9Sragge 	struct disk rc_disk;
54f3082cc9Sragge 	int rc_state;
55f3082cc9Sragge 	int rc_head;
56f3082cc9Sragge 	int rc_cyl;
57f3082cc9Sragge 	int rc_hwid;
58f3082cc9Sragge };
59f3082cc9Sragge 
60f3082cc9Sragge struct rlc_attach_args {
61f3082cc9Sragge 	u_int16_t type;
62f3082cc9Sragge 	int hwid;
63f3082cc9Sragge };
64f3082cc9Sragge 
65