+ if (pattern[0] != 0x55 || pattern[1] != 0x00 ||
+ pattern[2] != 0xaa || pattern[3] != 0xff) {
+ iounmap(module);
+ continue;
+ }
+
+ tc_bus[slot].base_addr = slotaddr;
+ for (i = 0; i < 8; i++) {
+ tc_bus[slot].firmware[i] =
+ module[TC_FIRM_VER + offset + 4 * i];
+ tc_bus[slot].vendor[i] =
+ module[TC_VENDOR + offset + 4 * i];
+ tc_bus[slot].name[i] =
+ module[TC_MODULE + offset + 4 * i];
+ }
+ tc_bus[slot].firmware[8] = 0;
+ tc_bus[slot].vendor[8] = 0;
+ tc_bus[slot].name[8] = 0;
+ /*
+ * Looks unneccesary, but we may change
+ * TC? in the future
+ */
+ switch (slot) {
+ case 0:
+ tc_bus[slot].interrupt = dec_interrupt[DEC_IRQ_TC0];
+ break;
+ case 1:
+ tc_bus[slot].interrupt = dec_interrupt[DEC_IRQ_TC1];
+ break;
+ case 2:
+ tc_bus[slot].interrupt = dec_interrupt[DEC_IRQ_TC2];
+ break;
+ /*
+ * Yuck! DS5000/200 onboard devices
+ */
+ case 5:
+ tc_bus[slot].interrupt = dec_interrupt[DEC_IRQ_TC5];
+ break;
+ case 6:
+ tc_bus[slot].interrupt = dec_interrupt[DEC_IRQ_TC6];
+ break;
+ default:
+ tc_bus[slot].interrupt = -1;
+ break;
+ }
+
+ iounmap(module);
+ }