30 #define SIS3820_CONTROL_STATUS 0x0
31 #define SIS3820_MODID 0x4
32 #define SIS3820_IRQ_CONFIG 0x8
33 #define SIS3820_IRQ_CONTROL 0xC
35 #define SIS3820_ACQUISITION_PRESET 0x10
36 #define SIS3820_ACQUISITION_COUNT 0x14
38 #define SIS3820_LNE_PRESCALE 0x18
41 #define SIS3820_PRESET_GROUP1 0x20
42 #define SIS3820_PRESET_GROUP2 0x24
43 #define SIS3820_PRESET_ENABLE_HIT 0x28
45 #define SIS3820_CBLT_BROADCAST_SETUP 0x30
46 #define SIS3820_SDRAM_PAGE 0x34
47 #define SIS3820_FIFO_WORDCOUNTER 0x38
48 #define SIS3820_FIFO_WORDCOUNT_THRESHOLD 0x3C
50 #define SIS3820_HISCAL_START_PRESET 0x40
51 #define SIS3820_HISCAL_COUNT 0x44
52 #define SIS3820_HISCAL_LAST_ACQ_COUNT 0x48
54 #define SIS3820_OPERATION_MODE 0x100
55 #define SIS3820_COPY_DISABLE 0x104
56 #define SIS3820_LNE_CHANNEL_SELECT 0x108
57 #define SIS3820_PRESET_CHANNEL_SELECT 0x10C
59 #define SIS3820_COUNTER_INHIBIT 0x200
60 #define SIS3820_COUNTER_CLEAR 0x204
61 #define SIS3820_COUNTER_OVERFLOW 0x208
63 #define SIS3820_SDRAM_EEPROM_CTRL_STAT 0x300
65 #define SIS3820_JTAG_TEST 0x310
66 #define SIS3820_JTAG_CONTROL 0x314
67 #define SIS3820_JTAG_DATA_IN 0x310
69 #define SIS3820_KEY_RESET 0x400
70 #define SIS3820_KEY_SDRAM_FIFO_RESET 0x404
71 #define SIS3820_KEY_TEST_PULS 0x408
72 #define SIS3820_KEY_COUNTER_CLEAR 0x40C
74 #define SIS3820_KEY_LNE_PULS 0x410
75 #define SIS3820_KEY_OPERATION_ARM 0x414
76 #define SIS3820_KEY_OPERATION_ENABLE 0x418
77 #define SIS3820_KEY_OPERATION_DISABLE 0x41C
79 #define SIS3820_KEY_HISCAL_START_PULS 0x420
80 #define SIS3820_KEY_HISCAL_ENABLE_LNE_ARM 0x424
81 #define SIS3820_KEY_HISCAL_ENABLE_LNE_ENABLE 0x428
82 #define SIS3820_KEY_HISCAL_DISABLE 0x42C
84 #define SIS3820_COUNTER_SHADOW_CH1 0x800
85 #define SIS3820_COUNTER_CH1 0xA00
87 #define SIS3820_FIFO_BASE 0x800000
88 #define SIS3820_SDRAM_BASE 0x800000
91 #define SIS3820_ACTUAL_VERSION 0x38200101
92 #define SIS3820_ACTUAL_VERSION_38200102 0x38200102
95 #define SIS3820_IRQ_SOURCE0_ENABLE 0x1
96 #define SIS3820_IRQ_SOURCE1_ENABLE 0x2
97 #define SIS3820_IRQ_SOURCE2_ENABLE 0x4
98 #define SIS3820_IRQ_SOURCE3_ENABLE 0x8
99 #define SIS3820_IRQ_SOURCE4_ENABLE 0x10
100 #define SIS3820_IRQ_SOURCE5_ENABLE 0x20
101 #define SIS3820_IRQ_SOURCE6_ENABLE 0x40
102 #define SIS3820_IRQ_SOURCE7_ENABLE 0x80
104 #define SIS3820_IRQ_SOURCE0_DISABLE 0x100
105 #define SIS3820_IRQ_SOURCE1_DISABLE 0x200
106 #define SIS3820_IRQ_SOURCE2_DISABLE 0x400
107 #define SIS3820_IRQ_SOURCE3_DISABLE 0x800
108 #define SIS3820_IRQ_SOURCE4_DISABLE 0x1000
109 #define SIS3820_IRQ_SOURCE5_DISABLE 0x2000
110 #define SIS3820_IRQ_SOURCE6_DISABLE 0x4000
111 #define SIS3820_IRQ_SOURCE7_DISABLE 0x8000
113 #define SIS3820_IRQ_SOURCE0_CLEAR 0x10000
114 #define SIS3820_IRQ_SOURCE1_CLEAR 0x20000
115 #define SIS3820_IRQ_SOURCE2_CLEAR 0x40000
116 #define SIS3820_IRQ_SOURCE3_CLEAR 0x80000
117 #define SIS3820_IRQ_SOURCE4_CLEAR 0x100000
118 #define SIS3820_IRQ_SOURCE5_CLEAR 0x200000
119 #define SIS3820_IRQ_SOURCE6_CLEAR 0x400000
120 #define SIS3820_IRQ_SOURCE7_CLEAR 0x800000
122 #define SIS3820_IRQ_SOURCE0_FLAG 0x1000000
123 #define SIS3820_IRQ_SOURCE1_FLAG 0x2000000
124 #define SIS3820_IRQ_SOURCE2_FLAG 0x4000000
125 #define SIS3820_IRQ_SOURCE3_FLAG 0x8000000
126 #define SIS3820_IRQ_SOURCE4_FLAG 0x10000000
127 #define SIS3820_IRQ_SOURCE5_FLAG 0x20000000
128 #define SIS3820_IRQ_SOURCE6_FLAG 0x40000000
129 #define SIS3820_IRQ_SOURCE7_FLAG 0x80000000
131 #define SIS3820_FLAG_SOURCE0 0x10000
132 #define SIS3820_FLAG_SOURCE1 0x20000
133 #define SIS3820_FLAG_SOURCE2 0x40000
134 #define SIS3820_FLAG_SOURCE3 0x80000
135 #define SIS3820_FLAG_SOURCE4 0x100000
136 #define SIS3820_FLAG_SOURCE5 0x200000
137 #define SIS3820_FLAG_SOURCE6 0x400000
138 #define SIS3820_FLAG_SOURCE7 0x800000
141 #define CTRL_USER_LED_OFF 0x10000
142 #define CTRL_USER_LED_ON 0x1
143 #define CTRL_COUNTER_TEST_25MHZ_DISABLE 0x100000
144 #define CTRL_COUNTER_TEST_25MHZ_ENABLE 0x10
145 #define CTRL_COUNTER_TEST_MODE_DISABLE 0x200000
146 #define CTRL_COUNTER_TEST_MODE_ENABLE 0x20
147 #define CTRL_REFERENCE_CH1_DISABLE 0x400000
148 #define CTRL_REFERENCE_CH1_ENABLE 0x40
151 #define STAT_OPERATION_SCALER_ENABLED 0x10000
152 #define STAT_OPERATION_MCS_ENABLED 0x40000
153 #define STAT_OPERATION_VME_WRITE_ENABLED 0x800000
156 #define SIS3820_CLEARING_MODE 0x0
157 #define SIS3820_NON_CLEARING_MODE 0x1
158 #define SIS3820_MCS_DATA_FORMAT_32BIT 0x0
159 #define SIS3820_MCS_DATA_FORMAT_24BIT 0x4
160 #define SIS3820_MCS_DATA_FORMAT_16BIT 0x8
161 #define SIS3820_MCS_DATA_FORMAT_8BIT 0xC
162 #define SIS3820_SCALER_DATA_FORMAT_32BIT 0x0
163 #define SIS3820_SCALER_DATA_FORMAT_24BIT 0x4
164 #define SIS3820_LNE_SOURCE_VME 0x0
165 #define SIS3820_LNE_SOURCE_CONTROL_SIGNAL 0x10
166 #define SIS3820_LNE_SOURCE_INTERNAL_10MHZ 0x20
167 #define SIS3820_LNE_SOURCE_CHANNEL_N 0x30
168 #define SIS3820_LNE_SOURCE_PRESET 0x40
169 #define SIS3820_ARM_ENABLE_CONTROL_SIGNAL 0x000
170 #define SIS3820_ARM_ENABLE_CHANNEL_N 0x100
171 #define SIS3820_FIFO_MODE 0x0000
172 #define SIS3820_SDRAM_MODE 0x1000
173 #define SIS3820_SDRAM_ADD_MODE 0x2000
174 #define SIS3820_HISCAL_START_SOURCE_VME 0x0000
175 #define SIS3820_HISCAL_START_SOURCE_EXTERN 0x4000
176 #define SIS3820_CONTROL_INPUT_MODE0 0x00000
177 #define SIS3820_CONTROL_INPUT_MODE1 0x10000
178 #define SIS3820_CONTROL_INPUT_MODE2 0x20000
179 #define SIS3820_CONTROL_INPUT_MODE3 0x30000
180 #define SIS3820_CONTROL_INPUT_MODE4 0x40000
181 #define SIS3820_CONTROL_INPUT_MODE5 0x50000
182 #define SIS3820_CONTROL_INPUTS_INVERT 0x80000
183 #define SIS3820_CONTROL_OUTPUT_MODE0 0x000000
184 #define SIS3820_CONTROL_OUTPUT_MODE1 0x100000
185 #define SIS3820_CONTROL_OUTPUTS_INVERT 0x800000
186 #define SIS3820_OP_MODE_SCALER 0x00000000
187 #define SIS3820_OP_MODE_MULTI_CHANNEL_SCALER 0x20000000
188 #define SIS3820_OP_MODE_VME_FIFO_WRITE 0x70000000
191 #define SIS3820_PRESET_STATUS_ENABLE_GROUP1 0x1
192 #define SIS3820_PRESET_REACHED_GROUP1 0x2
193 #define SIS3820_PRESET_LNELATCHED_REACHED_GROUP1 0x4
194 #define SIS3820_PRESET_STATUS_ENABLE_GROUP2 0x10000
195 #define SIS3820_PRESET_REACHED_GROUP2 0x20000
196 #define SIS3820_PRESET_LNELATCHED_REACHED_GROUP2 0x40000
199 #define SIS3820_SDRAM_EEPROM_SCL 0x1
200 #define SIS3820_SDRAM_EEPROM_SDA_OUT 0x2
201 #define SIS3820_SDRAM_EEPROM_SDA_OE 0x4
202 #define SIS3820_SDRAM_EEPROM_SDA_IN 0x100
int sis3820_key_disable(int device, u_int32_t sis3820_base)
int sis3820_key_enable(int device, u_int32_t sis3820_base)
INT mode
scaler mode, see scaler_mode()
int sis3820_operation_mode_read(int device, u_int32_t sis3820_base, u_int32_t *mode)
int sis3820_operation_mode_write(int device, u_int32_t sis3820_base, u_int32_t mode)
int sis3820_control_read(int device, u_int32_t sis3820_base, u_int32_t *control_status)
int sis3820_copy_disable_channel(int device, u_int32_t sis3820_base, u_int32_t channel_disable)
int sis3820_key_reset(int device, u_int32_t sis3820_base)
int sis3820_scaler_read(int device, u_int32_t sis3820_base, int mode, int nwords, u_int32_t *data)
int sis3820_modid_read(int device, u_int32_t sis3820_base, u_int32_t *modid)
int sis3820_control_write(int device, u_int32_t sis3820_base, u_int32_t control_status)