source: drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100_map.h@ 23

Last change on this file since 23 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq program
File size: 3.5 KB
Line 
1/* $ZEL: sis5100_map.h,v 1.2 2004/05/27 23:10:46 wuestner Exp $ */
2
3/*
4 * Copyright (c) 2004
5 * Peter Wuestner. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#ifndef _sis5100_map_h_
30#define _sis5100_map_h_
31
32struct sis5100_reg {
33 u_int32_t ident; /* 0x000 */
34 u_int32_t optical_sr; /* 0x004 */
35 u_int32_t optical_cr; /* 0x008 */
36 u_int32_t res0[29];
37 u_int32_t in_out; /* 0x080 */
38 u_int32_t in_latch_irq; /* 0x084 */
39 u_int32_t res1[30];
40 u_int32_t camac_sc; /* 0x100 */
41 u_int32_t camac_irq_sc; /* 0x104 */
42 u_int32_t lam_enable; /* 0x108 */
43 u_int32_t res2[1];
44 u_int32_t multistation; /* 0x110 */
45 u_int32_t res3[60];
46 u_int32_t dma_write_counter; /* 0x204 */
47 u_int32_t res4[62];
48 u_int32_t dsp_sc; /* 0x300 */
49};
50
51/* bits in in_out */
52#define sis5100_io_flat_out1 (1<<0)
53#define sis5100_io_flat_out2 (1<<1)
54#define sis5100_io_flat_out3 (1<<2)
55
56#define sis5100_io_lemo_out1 (1<<4)
57#define sis5100_io_lemo_out2 (1<<5)
58#define sis5100_io_lemo_out3 (1<<6)
59/* clear is (io_*_out?)<<16 */
60
61#define sis5100_io_flat_in1 (1<<16)
62#define sis5100_io_flat_in2 (1<<17)
63#define sis5100_io_flat_in3 (1<<18)
64
65#define sis5100_io_lemo_in1 (1<<20)
66#define sis5100_io_lemo_in2 (1<<21)
67#define sis5100_io_lemo_in3 (1<<22)
68
69#define sis5100_io_flat_pulse1 (1<<24)
70#define sis5100_io_flat_pulse2 (1<<25)
71#define sis5100_io_flat_pulse3 (1<<26)
72
73#define sis5100_io_lemo_pulse1 (1<<28)
74#define sis5100_io_lemo_pulse2 (1<<29)
75#define sis5100_io_lemo_pulse3 (1<<30)
76
77/* bits in in_latch_irq */
78/* XXX fixme */
79
80/* bits in camac_sc */
81/* clear is (camac_*)<<16 */
82#define sis5100_camac_inhibit (1<<0)
83#define sis5100_camac_user_led (1<<7)
84
85/* bits in dsp_sc */
86#define sis5100_dsp_irq_pulse (1<<0)
87#define sis5100_dsp_run (1<<8)
88#define sis5100_dsp_boot_eprom (1<<9)
89#define sis5100_dsp_boot_ctrl (1<<11)
90
91#define sis5100_dsp_available (1<<24)
92#define sis5100_dsp_flag0 (1<<28)
93#define sis5100_dsp_flag1 (1<<29)
94#define sis5100_dsp_flag2 (1<<30)
95#define sis5100_dsp_flag3 (1<<31)
96
97/* error codes */
98#define sis5100_sis3100_re_berr 0x211 /* Bus Error */
99#define sis5100_sis3100_re_retr 0x212 /* Retry */
100#define sis5100_sis3100_re_atimeout 0x214 /* Arbitration timeout */
101
102#endif
Note: See TracBrowser for help on using the repository browser.