6 #include <linux/module.h>
7 #include <linux/signal.h>
24 #define CUMANASCSI_PUBLIC_RELEASE 1
26 #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
27 #define NCR5380_local_declare() struct Scsi_Host *_instance
28 #define NCR5380_setup(instance) _instance = instance
29 #define NCR5380_read(reg) cumanascsi_read(_instance, reg)
30 #define NCR5380_write(reg, value) cumanascsi_write(_instance, reg, value)
31 #define NCR5380_intr cumanascsi_intr
32 #define NCR5380_queue_command cumanascsi_queue_command
33 #define NCR5380_proc_info cumanascsi_proc_info
35 #define NCR5380_implementation_fields \
40 #define BOARD_NORMAL 0
41 #define BOARD_NCR53C400 1
43 #include "../NCR5380.h"
56 #define L(v) (((v)<<16)|((v) & 0x0000ffff))
57 #define H(v) (((v)>>16)|((v) & 0xffff0000))
68 laddr = (
unsigned long *)addr;
91 addr = (
unsigned char *)laddr;
125 unsigned long *
laddr;
131 laddr = (
unsigned long *)addr;
153 addr = (
unsigned char *)laddr;
164 *addr++ =
readb(dma);
174 *addr++ =
readb(dma);
184 static unsigned char cumanascsi_read(
struct Scsi_Host *host,
unsigned int reg)
191 val =
readb(base + 0x2100 + (reg << 2));
193 priv(host)->ctrl = 0x40;
199 static void cumanascsi_write(
struct Scsi_Host *host,
unsigned int reg,
unsigned int value)
205 writeb(value, base + 0x2100 + (reg << 2));
207 priv(host)->ctrl = 0x40;
211 #include "../NCR5380.c"
215 .name =
"Cumana 16-bit SCSI",
217 .queuecommand = cumanascsi_queue_command,
225 .proc_name =
"CumanaSCSI-1",
248 if (!
priv(host)->base || !
priv(host)->dma) {
255 NCR5380_init(host, 0);
257 priv(host)->ctrl = 0;
267 "CumanaSCSI-1", host);
269 printk(
"scsi%d: IRQ%d not free: %d\n",
274 printk(
"scsi%d: at port 0x%08lx irq %d",
276 printk(
" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
279 NCR5380_print_options(host);
282 ret = scsi_add_host(host, &ec->
dev);
316 static const struct ecard_id cumanascsi1_cids[] = {
322 .probe = cumanascsi1_probe,
324 .id_table = cumanascsi1_cids,
326 .name =
"cumanascsi1",
330 static int __init cumanascsi_init(
void)
335 static void __exit cumanascsi_exit(
void)