29 #include <linux/module.h>
30 #include <linux/slab.h>
33 #include <linux/device.h>
64 param_setup(
char *
str)
74 else if(!
strncmp(pos,
"id:", 3)) {
88 __setup(
"sim710=", param_setup);
91 .name =
"LSI (Symbios) 710 EISA",
92 .proc_name =
"sim710",
98 sim710_probe_common(
struct device *
dev,
unsigned long base_addr,
107 irq, clock, base_addr, scsi_id);
109 if(hostdata ==
NULL) {
128 if((host =
NCR_700_detect(&sim710_driver_template, hostdata, dev))
130 printk(
KERN_ERR "sim710: No host detected; card configuration problem?\n");
134 host->
base = base_addr;
157 sim710_device_remove(
struct device *dev)
181 sim710_eisa_probe(
struct device *dev)
185 char eisa_cpq_irqs[] = { 11, 14, 15, 10, 9, 0 };
186 char eisa_hwp_irqs[] = { 3, 4, 5, 7, 12, 10, 11, 0};
188 unsigned char irq_index;
189 unsigned char irq, differential = 0, scsi_id = 7;
191 if(
strcmp(edev->
id.sig,
"HWP0C80") == 0) {
193 eisa_irqs = eisa_hwp_irqs;
194 irq_index = (
inb(io_addr + 0xc85) & 0x7) - 1;
196 val =
inb(io_addr + 0x4);
197 scsi_id =
ffs(val) - 1;
199 if(scsi_id > 7 || (val & ~(1<<scsi_id)) != 0) {
200 printk(
KERN_ERR "sim710.c, EISA card %s has incorrect scsi_id, setting to 7\n", dev_name(dev));
204 eisa_irqs = eisa_cpq_irqs;
205 irq_index =
inb(io_addr + 0xc88) & 0x07;
208 if(irq_index >=
strlen(eisa_irqs)) {
209 printk(
"sim710.c: irq nasty\n");
213 irq = eisa_irqs[irq_index];
215 return sim710_probe_common(dev, io_addr, irq, 50,
216 differential, scsi_id);
223 .probe = sim710_eisa_probe,
229 static int __init sim710_init(
void)
249 static void __exit sim710_exit(
void)