7 #include <linux/module.h>
8 #include <linux/signal.h>
23 #define OAKSCSI_PUBLIC_RELEASE 1
26 #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
27 #define NCR5380_local_declare() void __iomem *_base
28 #define NCR5380_setup(host) _base = priv(host)->base
30 #define NCR5380_read(reg) readb(_base + ((reg) << 2))
31 #define NCR5380_write(reg, value) writeb(value, _base + ((reg) << 2))
32 #define NCR5380_intr oakscsi_intr
33 #define NCR5380_queue_command oakscsi_queue_command
34 #define NCR5380_proc_info oakscsi_proc_info
36 #define NCR5380_implementation_fields \
39 #define BOARD_NORMAL 0
40 #define BOARD_NCR53C400 1
42 #include "../NCR5380.h"
44 #undef START_DMA_INITIATOR_RECEIVE_REG
45 #define START_DMA_INITIATOR_RECEIVE_REG (128 + 7)
52 #define STAT ((128 + 16) << 2)
53 #define DATA ((128 + 8) << 2)
60 printk(
"writing %p len %d\n",addr, len);
66 while (((status =
readw(base +
STAT)) & 0x100)==0);
74 printk(
"reading %p len %d\n", addr, len);
82 while (((status =
readw(base +
STAT)) & 0x100)==0)
85 if(status & 0x200 || !timeout)
87 printk(
"status = %08X\n", status);
114 #include "../NCR5380.c"
118 .proc_info = oakscsi_proc_info,
119 .name =
"Oak 16-bit SCSI",
121 .queuecommand = oakscsi_queue_command,
129 .proc_name =
"oakscsi",
150 if (!
priv(host)->base) {
158 NCR5380_init(host, 0);
160 printk(
"scsi%d: at port 0x%08lx irqs disabled",
162 printk(
" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
165 NCR5380_print_options(host);
168 ret = scsi_add_host(host, &ec->
dev);
198 static const struct ecard_id oakscsi_cids[] = {
204 .probe = oakscsi_probe,
206 .id_table = oakscsi_cids,
212 static int __init oakscsi_init(
void)
217 static void __exit oakscsi_exit(
void)