109 #include <linux/signal.h>
113 #include <linux/stat.h>
115 #include <linux/module.h>
121 #define AUTOPROBE_IRQ
124 static struct override {
135 #define NO_OVERRIDES ARRAY_SIZE(overrides)
140 } bases[] __initdata = {
141 { 0xcc000, 0}, { 0xc8000, 0}, { 0xdc000, 0}, { 0xd8000, 0}
144 #define NO_BASES ARRAY_SIZE(bases)
149 } signatures[] __initdata = {
150 {
"TSROM: SCSI BIOS, Version 1.12", 0x36},
153 #define NO_SIGNATURES ARRAY_SIZE(signatures)
166 static int commandline_current = 0;
169 printk(
"t128_setup : usage t128=address,irq\n");
172 overrides[commandline_current].address = ints[1];
173 overrides[commandline_current].irq = ints[2];
175 if (bases[i].
address == ints[1]) {
179 ++commandline_current;
197 static int current_override = 0, current_base = 0;
206 for (count = 0; current_override <
NO_OVERRIDES; ++current_override) {
211 base =
overrides[current_override].address;
212 p =
ioremap(bases[current_base].address, 0x2000);
216 for (; !base && (current_base <
NO_BASES); ++current_base) {
217 #if (TDEBUG & TDEBUG_INIT)
218 printk(
"scsi-t128 : probing address %08x\n", bases[current_base].address);
220 if (bases[current_base].noauto)
222 p =
ioremap(bases[current_base].address, 0x2000);
227 signatures[sig].
string,
228 strlen(signatures[sig].
string))) {
229 base = bases[current_base].address;
230 #if (TDEBUG & TDEBUG_INIT)
231 printk(
"scsi-t128 : detected board.\n");
238 #if defined(TDEBUG) && (TDEBUG & TDEBUG_INIT)
239 printk(
"scsi-t128 : base = %08x\n", (
unsigned int) base);
253 NCR5380_init(instance, 0);
263 printk(
"scsi%d : IRQ%d not free, interrupts disabled\n",
269 printk(
"scsi%d : interrupts not enabled. for better interactive performance,\n", instance->
host_no);
270 printk(
"scsi%d : please jumper the board for a free IRQ.\n", instance->
host_no);
273 #if defined(TDEBUG) && (TDEBUG & TDEBUG_INIT)
279 printk (
" interrupts disabled");
282 printk(
" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
284 NCR5380_print_options(instance);
332 ip[2] = capacity >> 11;
353 unsigned char *
d =
dst;
354 register int i = len;
375 printk(
"scsi%d : watchdog timer fired in NCR5380_pread()\n",
399 unsigned char *
s =
src;
400 register int i = len;
421 printk(
"scsi%d : watchdog timer fired in NCR5380_pwrite()\n",
433 .name =
"Trantor T128/T128F/T228",
435 .release = t128_release,
436 .queuecommand = t128_queue_command,
437 .eh_abort_handler = t128_abort,
438 .eh_bus_reset_handler = t128_bus_reset,