hpcvar.h revision 1.6 1 1.6 sekiya /* $NetBSD: hpcvar.h,v 1.6 2003/12/16 11:59:04 sekiya Exp $ */
2 1.1 thorpej
3 1.1 thorpej /*
4 1.1 thorpej * Copyright (c) 2001 Rafal K. Boni
5 1.1 thorpej * All rights reserved.
6 1.4 simonb *
7 1.1 thorpej * Redistribution and use in source and binary forms, with or without
8 1.1 thorpej * modification, are permitted provided that the following conditions
9 1.1 thorpej * are met:
10 1.1 thorpej * 1. Redistributions of source code must retain the above copyright
11 1.1 thorpej * notice, this list of conditions and the following disclaimer.
12 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 thorpej * notice, this list of conditions and the following disclaimer in the
14 1.1 thorpej * documentation and/or other materials provided with the distribution.
15 1.1 thorpej * 3. The name of the author may not be used to endorse or promote products
16 1.1 thorpej * derived from this software without specific prior written permission.
17 1.4 simonb *
18 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 1.1 thorpej * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 1.1 thorpej * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 1.1 thorpej * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 1.1 thorpej * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 1.1 thorpej * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 1.1 thorpej * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 1.1 thorpej * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 1.1 thorpej * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 1.1 thorpej * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 1.1 thorpej */
29 1.1 thorpej
30 1.1 thorpej #ifndef _ARCH_SGIMIPS_HPC_HPCVAR_H_
31 1.1 thorpej #define _ARCH_SGIMIPS_HPC_HPCVAR_H_
32 1.5 sekiya
33 1.5 sekiya #define HPCDEV_IP12 (1U << 0) /* Indigo R3k, 4D/3x */
34 1.5 sekiya #define HPCDEV_IP20 (1U << 1) /* Indigo R4k */
35 1.5 sekiya #define HPCDEV_IP22 (1U << 2) /* Indigo2 */
36 1.5 sekiya #define HPCDEV_IP24 (1U << 3) /* Indy */
37 1.1 thorpej
38 1.6 sekiya /* HPC 1.5/3 differ a bit, thus we need an abstraction layer */
39 1.6 sekiya
40 1.6 sekiya struct hpc_values {
41 1.6 sekiya int revision;
42 1.6 sekiya u_int32_t scsi0_regs;
43 1.6 sekiya u_int32_t scsi0_regs_size;
44 1.6 sekiya u_int32_t scsi0_cbp;
45 1.6 sekiya u_int32_t scsi0_ndbp;
46 1.6 sekiya u_int32_t scsi0_bc;
47 1.6 sekiya u_int32_t scsi0_ctl;
48 1.6 sekiya u_int32_t scsi0_gio;
49 1.6 sekiya u_int32_t scsi0_dev;
50 1.6 sekiya u_int32_t scsi0_dmacfg;
51 1.6 sekiya u_int32_t scsi0_piocfg;
52 1.6 sekiya u_int32_t scsi1_regs;
53 1.6 sekiya u_int32_t scsi1_regs_size;
54 1.6 sekiya u_int32_t scsi1_cbp;
55 1.6 sekiya u_int32_t scsi1_ndbp;
56 1.6 sekiya u_int32_t scsi1_bc;
57 1.6 sekiya u_int32_t scsi1_ctl;
58 1.6 sekiya u_int32_t scsi1_gio;
59 1.6 sekiya u_int32_t scsi1_dev;
60 1.6 sekiya u_int32_t scsi1_dmacfg;
61 1.6 sekiya u_int32_t scsi1_piocfg;
62 1.6 sekiya u_int32_t dmactl_dir;
63 1.6 sekiya u_int32_t dmactl_flush;
64 1.6 sekiya u_int32_t dmactl_active;
65 1.6 sekiya u_int32_t dmactl_reset;
66 1.6 sekiya u_int32_t enet_regs;
67 1.6 sekiya u_int32_t enet_regs_size;
68 1.6 sekiya u_int32_t enet_intdelay;
69 1.6 sekiya u_int32_t enet_intdelayval;
70 1.6 sekiya u_int32_t enetr_cbp;
71 1.6 sekiya u_int32_t enetr_ndbp;
72 1.6 sekiya u_int32_t enetr_bc;
73 1.6 sekiya u_int32_t enetr_ctl;
74 1.6 sekiya u_int32_t enetr_ctl_active;
75 1.6 sekiya u_int32_t enetr_reset;
76 1.6 sekiya u_int32_t enetr_dmacfg;
77 1.6 sekiya u_int32_t enetr_piocfg;
78 1.6 sekiya u_int32_t enetx_cbp;
79 1.6 sekiya u_int32_t enetx_ndbp;
80 1.6 sekiya u_int32_t enetx_bc;
81 1.6 sekiya u_int32_t enetx_ctl;
82 1.6 sekiya u_int32_t enetx_ctl_active;
83 1.6 sekiya u_int32_t enetx_dev;
84 1.6 sekiya u_int32_t enetr_fifo;
85 1.6 sekiya u_int32_t enetr_fifo_size;
86 1.6 sekiya u_int32_t enetx_fifo;
87 1.6 sekiya u_int32_t enetx_fifo_size;
88 1.6 sekiya u_int32_t scsi0_devregs_size;
89 1.6 sekiya u_int32_t scsi1_devregs_size;
90 1.6 sekiya u_int32_t enet_devregs;
91 1.6 sekiya u_int32_t enet_devregs_size;
92 1.6 sekiya u_int32_t pbus_fifo;
93 1.6 sekiya u_int32_t pbus_fifo_size;
94 1.6 sekiya u_int32_t pbus_bbram;
95 1.6 sekiya u_int32_t scsi_dma_segs;
96 1.6 sekiya u_int32_t scsi_dma_segs_size;
97 1.6 sekiya u_int32_t clk_freq;
98 1.6 sekiya u_int32_t dma_datain_cmd;
99 1.6 sekiya u_int32_t dma_dataout_cmd;
100 1.6 sekiya u_int32_t scsi_dmactl_flush;
101 1.6 sekiya u_int32_t scsi_dmactl_active;
102 1.6 sekiya u_int32_t scsi_dmactl_reset;
103 1.6 sekiya };
104 1.6 sekiya
105 1.1 thorpej struct hpc_attach_args {
106 1.3 thorpej const char *ha_name; /* name of device */
107 1.3 thorpej bus_addr_t ha_devoff; /* offset of device */
108 1.3 thorpej bus_addr_t ha_dmaoff; /* offset of DMA regs */
109 1.3 thorpej int ha_irq; /* interrupt line */
110 1.2 wdk
111 1.3 thorpej bus_space_tag_t ha_st; /* HPC space tag */
112 1.3 thorpej bus_space_handle_t ha_sh; /* HPC space handle XXX */
113 1.3 thorpej bus_dma_tag_t ha_dmat; /* HPC DMA tag */
114 1.6 sekiya
115 1.6 sekiya struct hpc_values *hpc_regs; /* HPC register definitions */
116 1.1 thorpej };
117 1.1 thorpej
118 1.1 thorpej #endif /* _ARCH_SGIMIPS_HPC_HPCVAR_H_ */
119