9 #include <linux/module.h>
16 static unsigned char dma_bits[] = {
17 4, 1, 2, 3, 0, 5, 6, 7
20 static unsigned char irq_bits[] = {
21 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 0, 10, 11
24 static unsigned char sb_irq_bits[] = {
25 0x00, 0x00, 0x08, 0x10, 0x00, 0x18, 0x00, 0x20,
26 0x00, 0x08, 0x28, 0x30, 0x38, 0, 0
29 static unsigned char sb_dma_bits[] = {
30 0x00, 0x40, 0x80, 0xC0, 0, 0, 0, 0
39 static int pas_intr_mask;
41 static int pas_sb_base;
43 #ifndef CONFIG_PAS_JOYSTICK
46 static bool joystick = 1;
49 static bool symphony = 1;
53 #ifdef BROKEN_BUS_CLOCK
54 static bool broken_bus_clock = 1;
56 static bool broken_bus_clock;
63 static char *pas_model_names[] = {
67 "Pro AudioSpectrum 16",
68 "Pro AudioSpectrum 16D"
116 pas_intr_mask |=
mask;
127 pas_intr_mask &= ~mask;
142 pas_irq = hw_config->
irq;
152 pas_write(0x80 | 0x40 | 0x20 | 1, 0x0B8A);
153 pas_write(0x80 | 0x20 | 0x10 | 0x08 | 0x01, 0xF8A);
159 pas_write(0x80 | (joystick ? 0x40 : 0), 0xF388);
161 if (pas_irq < 0 || pas_irq > 15)
170 int_ptrs = (int_ptrs & 0xf0) | irq_bits[pas_irq];
172 if (!irq_bits[pas_irq])
180 if (
request_irq(pas_irq, pasintr, 0,
"PAS16",hw_config) < 0) {
188 if (hw_config->
dma < 0 || hw_config->
dma > 7)
197 if (!dma_bits[hw_config->
dma])
226 pas_write(0x01 | 0x10 | 0x20 | 0x04, 0x8388);
246 unsigned char irq_dma;
261 pas_sb_base = sb_config->
io_base;
263 if (!sb_dma_bits[sb_config->
dma])
266 if (!sb_irq_bits[sb_config->
irq])
269 irq_dma = sb_dma_bits[sb_config->
dma] |
270 sb_irq_bits[sb_config->
irq];
295 outb((0xBC), 0x9A01);
302 if (board_id == 0xff)
311 foo = board_id ^ 0xe0;
327 pas_irq = hw_config->
irq;
329 if (detect_pas_hw(hw_config))
337 "%s rev %d", pas_model_names[(
int)
pas_model],
341 if (config_pas_hw(hw_config))
352 return detect_pas_hw(hw_config);
360 if (hw_config->
dma>0)
362 if (hw_config->
irq>0)
399 static int __init init_pas2(
void)
401 printk(
KERN_INFO "Pro Audio Spectrum driver Copyright (C) by Hannu Savolainen 1993-1996\n");
408 cfg2.io_base = sb_io;
411 cfg2.dma2 = sb_dma16;
413 if (
cfg.io_base == -1 ||
cfg.dma == -1 ||
cfg.irq == -1) {
418 if (!probe_pas(&
cfg))
420 attach_pas_card(&
cfg);
425 static void __exit cleanup_pas2(
void)