Lines Matching +full:0 +full:x8ff

45 static int       trans_mode = 0;	/* default: BIOS */
46 module_param (trans_mode, int, 0);
47 MODULE_PARM_DESC(trans_mode, "transfer mode (0: BIOS(default) 1: Async 2: Ultra20M");
51 static bool auto_param = 0; /* default: ON */
52 module_param (auto_param, bool, 0);
53 MODULE_PARM_DESC(auto_param, "AutoParameter mode (0: ON(default) 1: OFF)");
56 module_param (disc_priv, bool, 0);
57 MODULE_PARM_DESC(disc_priv, "disconnection privilege mode (0: ON 1: OFF(default))");
126 {0,0,},
140 {0x1, 0, 0x0c, 0x0c, SMPL_40M}, /* 20.0 : 50ns, 25ns */
141 {0x2, 0, 0x0d, 0x18, SMPL_40M}, /* 13.3 : 75ns, 25ns */
142 {0x3, 1, 0x19, 0x19, SMPL_40M}, /* 10.0 : 100ns, 50ns */
143 {0x4, 1, 0x1a, 0x1f, SMPL_20M}, /* 8.0 : 125ns, 50ns */
144 {0x5, 2, 0x20, 0x25, SMPL_20M}, /* 6.7 : 150ns, 75ns */
145 {0x6, 2, 0x26, 0x31, SMPL_20M}, /* 5.7 : 175ns, 75ns */
146 {0x7, 3, 0x32, 0x32, SMPL_20M}, /* 5.0 : 200ns, 100ns */
147 {0x8, 3, 0x33, 0x38, SMPL_10M}, /* 4.4 : 225ns, 100ns */
148 {0x9, 3, 0x39, 0x3e, SMPL_10M}, /* 4.0 : 250ns, 100ns */
152 {0x1, 0, 0x19, 0x19, SMPL_40M}, /* 10.0 : 100ns, 50ns */
153 {0x2, 0, 0x1a, 0x25, SMPL_20M}, /* 6.7 : 150ns, 50ns */
154 {0x3, 1, 0x26, 0x32, SMPL_20M}, /* 5.0 : 200ns, 100ns */
155 {0x4, 1, 0x33, 0x3e, SMPL_10M}, /* 4.0 : 250ns, 100ns */
156 {0x5, 2, 0x3f, 0x4b, SMPL_10M}, /* 3.3 : 300ns, 150ns */
157 {0x6, 2, 0x4c, 0x57, SMPL_10M}, /* 2.8 : 350ns, 150ns */
158 {0x7, 3, 0x58, 0x64, SMPL_10M}, /* 2.5 : 400ns, 200ns */
159 {0x8, 3, 0x65, 0x70, SMPL_10M}, /* 2.2 : 450ns, 200ns */
160 {0x9, 3, 0x71, 0x7d, SMPL_10M}, /* 2.0 : 500ns, 200ns */
164 {0x1, 0, 0x0c, 0x0f, SMPL_40M}, /* 16.6 : 60ns, 30ns */
165 {0x2, 0, 0x10, 0x16, SMPL_40M}, /* 11.1 : 90ns, 30ns */
166 {0x3, 1, 0x17, 0x1e, SMPL_20M}, /* 8.3 : 120ns, 60ns */
167 {0x4, 1, 0x1f, 0x25, SMPL_20M}, /* 6.7 : 150ns, 60ns */
168 {0x5, 2, 0x26, 0x2d, SMPL_20M}, /* 5.6 : 180ns, 90ns */
169 {0x6, 2, 0x2e, 0x34, SMPL_10M}, /* 4.8 : 210ns, 90ns */
170 {0x7, 3, 0x35, 0x3c, SMPL_10M}, /* 4.2 : 240ns, 120ns */
171 {0x8, 3, 0x3d, 0x43, SMPL_10M}, /* 3.7 : 270ns, 120ns */
172 {0x9, 3, 0x44, 0x4b, SMPL_10M}, /* 3.3 : 300ns, 120ns */
285 # define NSP32_DEBUG_MASK 0x000000
286 # define nsp32_msg(type, args...) nsp32_message ("", 0, (type), args)
289 # define NSP32_DEBUG_MASK 0xffffff
296 #define NSP32_DEBUG_QUEUECOMMAND BIT(0)
346 printk("nsp32-debug: 0x%x %s (%d): %s\n", mask, func, line, buf); in nsp32_dmessage()
369 if (disc_priv == 0) { in nsp32_build_identify()
405 if (pos != 0) { in nsp32_build_nop()
430 #if 0
480 if (data->msgout_len == 0) { in nsp32_selection_autopara()
484 } else if (data->msgout_len > 0 && data->msgout_len <= 3) { in nsp32_selection_autopara()
485 msgout = 0; in nsp32_selection_autopara()
486 for (i = 0; i < data->msgout_len; i++) { in nsp32_selection_autopara()
489 * MCNT 3: MSG#0 -> MSG#1 -> MSG#2 in nsp32_selection_autopara()
500 msgout = 0; in nsp32_selection_autopara()
503 // nsp_dbg(NSP32_DEBUG_AUTOSCSI, "sel time out=0x%x\n", in nsp32_selection_autopara()
510 memset(param, 0, sizeof(nsp32_autoparam)); in nsp32_selection_autopara()
513 for (i = 0; i < SCpnt->cmd_len; i++) { in nsp32_selection_autopara()
526 // nsp32_dbg(NSP32_DEBUG_AUTOSCSI, "sample rate=0x%x\n", data->cur_target->sample_reg); in nsp32_selection_autopara()
537 s = 0; in nsp32_selection_autopara()
589 unsigned short command = 0; in nsp32_selection_autoscsi()
590 unsigned int msgout = 0; in nsp32_selection_autoscsi()
624 for (i = 0; i < SCpnt->cmd_len; i++) { in nsp32_selection_autoscsi()
627 nsp32_dbg(NSP32_DEBUG_CDB_CONTENTS, "CDB[0]=[0x%x]", SCpnt->cmnd[0]); in nsp32_selection_autoscsi()
641 if (data->msgout_len == 0) { in nsp32_selection_autoscsi()
646 } else if (data->msgout_len > 0 && data->msgout_len <= 3) { in nsp32_selection_autoscsi()
647 msgout = 0; in nsp32_selection_autoscsi()
648 for (i = 0; i < data->msgout_len; i++) { in nsp32_selection_autoscsi()
651 * MCNT 3: MSG#0 -> MSG#1 -> MSG#2 in nsp32_selection_autoscsi()
663 nsp32_write4(base, SCSI_MSG_OUT, 0); in nsp32_selection_autoscsi()
674 * TODO: sample_rate (BASE+0F) is 0 when internal clock = 40MHz. in nsp32_selection_autoscsi()
696 "syncreg=0x%x, ackwidth=0x%x, sgtpaddr=0x%x, id=0x%x", in nsp32_selection_autoscsi()
700 nsp32_dbg(NSP32_DEBUG_AUTOSCSI, "msgout_len=%d, msgout=0x%x", in nsp32_selection_autoscsi()
711 command = 0; in nsp32_selection_autoscsi()
714 if (scsi_bufflen(SCpnt) > 0) { in nsp32_selection_autoscsi()
743 nsp32_write2(base, IRQ_CONTROL, 0); in nsp32_selection_autoscsi()
761 int time = 0; in nsp32_arbitration()
766 } while ((arbit & (ARBIT_WIN | ARBIT_FAIL)) == 0 && in nsp32_arbitration()
770 "arbit: 0x%x, delay time: %d", arbit, time); in nsp32_arbitration()
820 newid = 0; in nsp32_reselection()
835 newlun >= ARRAY_SIZE(data->lunt[0])) { in nsp32_reselection()
877 else if (num < 0) in nsp32_setup_sg_table()
887 if (le32_to_cpu(sgt[i].len) > 0x10000) { in nsp32_setup_sg_table()
890 "size=0x%x", le32_to_cpu(sgt[i].len)); in nsp32_setup_sg_table()
894 "num 0x%x : addr 0x%lx len 0x%lx", in nsp32_setup_sg_table()
917 "enter. target: 0x%x LUN: 0x%llx cmnd: 0x%x cmndlen: 0x%x " in nsp32_queuecommand_lck()
918 "use_sg: 0x%x reqbuf: 0x%lx reqlen: 0x%x", in nsp32_queuecommand_lck()
919 SCpnt->device->id, SCpnt->device->lun, SCpnt->cmnd[0], in nsp32_queuecommand_lck()
928 return 0; in nsp32_queuecommand_lck()
936 return 0; in nsp32_queuecommand_lck()
944 return 0; in nsp32_queuecommand_lck()
954 data->msgout_len = 0; in nsp32_queuecommand_lck()
955 data->msgin_len = 0; in nsp32_queuecommand_lck()
958 cur_lunt->save_datp = 0; in nsp32_queuecommand_lck()
969 return 0; in nsp32_queuecommand_lck()
996 "SDTR: entry: %d start_period: 0x%x offset: 0x%x\n", in nsp32_queuecommand_lck()
1025 "target: %d sync_flag: 0x%x syncreg: 0x%x ackwidth: 0x%x", in nsp32_queuecommand_lck()
1030 if (auto_param == 0) { in nsp32_queuecommand_lck()
1041 return 0; in nsp32_queuecommand_lck()
1055 if ((lc_reg & 0xff00) == 0) { in DEF_SCSI_QCMD()
1056 lc_reg |= (0x20 << 8); in DEF_SCSI_QCMD()
1057 nsp32_index_write2(base, CFG_LATE_CACHE, lc_reg & 0xffff); in DEF_SCSI_QCMD()
1061 nsp32_write2(base, TRANSFER_CONTROL, 0); in DEF_SCSI_QCMD()
1062 nsp32_write4(base, BM_CNT, 0); in DEF_SCSI_QCMD()
1063 nsp32_write2(base, SCSI_EXECUTE_PHASE, 0); in DEF_SCSI_QCMD()
1067 nsp32_dbg(NSP32_DEBUG_INIT, "irq_stat 0x%x", irq_stat); in DEF_SCSI_QCMD()
1076 nsp32_index_write1(base, FIFO_FULL_SHLD_COUNT, 0x40); in DEF_SCSI_QCMD()
1077 nsp32_index_write1(base, FIFO_EMPTY_SHLD_COUNT, 0x40); in DEF_SCSI_QCMD()
1079 nsp32_index_write1(base, FIFO_FULL_SHLD_COUNT, 0x10); in DEF_SCSI_QCMD()
1080 nsp32_index_write1(base, FIFO_EMPTY_SHLD_COUNT, 0x60); in DEF_SCSI_QCMD()
1085 nsp32_dbg(NSP32_DEBUG_INIT, "full 0x%x emp 0x%x", in DEF_SCSI_QCMD()
1092 nsp32_write1(base, PARITY_CONTROL, 0); /* parity check is disable */ in DEF_SCSI_QCMD()
1106 * we have to set TRANSFERCONTROL_BM_START as 0 and set in DEF_SCSI_QCMD()
1117 nsp32_index_write1(base, TERM_PWR_CONTROL, 0); in DEF_SCSI_QCMD()
1127 nsp32_write1(base, SYNC_REG, 0); in DEF_SCSI_QCMD()
1128 nsp32_write1(base, ACK_WIDTH, 0); in DEF_SCSI_QCMD()
1145 nsp32_write2(base, IRQ_CONTROL, 0); in DEF_SCSI_QCMD()
1165 int handled = 0; in do_nsp32_isr()
1175 "enter IRQ: %d, IRQstatus: 0x%x", irq, irq_stat); in do_nsp32_isr()
1177 if ((irq_stat & IRQSTATUS_ANY_IRQ) == 0) { in do_nsp32_isr()
1179 "shared interrupt: irq other 0x%x", irq_stat); in do_nsp32_isr()
1189 if ((irq_stat == 0xffff) && (trans_stat == 0xffff)) { in do_nsp32_isr()
1219 nsp32_msg(KERN_WARNING, "irq_stat=0x%x trans_stat=0x%x", in do_nsp32_isr()
1233 nsp32_write2(base, SCSI_EXECUTE_PHASE, 0); in do_nsp32_isr()
1259 data->msgout_len = 0; in do_nsp32_isr()
1266 (scsi_get_resid(SCpnt) > 0) && in do_nsp32_isr()
1267 ((nsp32_read2(base, FIFO_REST_CNT) & FIFO_REST_MASK) != 0)) { in do_nsp32_isr()
1278 nsp32_dbg(NSP32_DEBUG_INTR, "BMCNT=0x%lx", in do_nsp32_isr()
1280 nsp32_dbg(NSP32_DEBUG_INTR, "addr=0x%lx", in do_nsp32_isr()
1282 nsp32_dbg(NSP32_DEBUG_INTR, "SACK=0x%lx", in do_nsp32_isr()
1284 nsp32_dbg(NSP32_DEBUG_INTR, "SSACK=0x%lx", in do_nsp32_isr()
1287 scsi_set_resid(SCpnt, 0); /* all data transferred! */ in do_nsp32_isr()
1380 nsp32_dbg(NSP32_DEBUG_INTR, "irq_stat=0x%x trans_stat=0x%x", in do_nsp32_isr()
1396 nsp32_msgin_occur(SCpnt, irq_stat, 0); in do_nsp32_isr()
1400 nsp32_msg(KERN_WARNING, "irq_stat=0x%x trans_stat=0x%x\n", in do_nsp32_isr()
1424 #if 0 in do_nsp32_isr()
1426 "irq_stat=0x%x trans_stat=0x%x", irq_stat, trans_stat); in do_nsp32_isr()
1432 nsp32_write2(base, IRQ_CONTROL, 0); in do_nsp32_isr()
1462 seq_printf(m, "IO: 0x%lx-0x%lx\n", in nsp32_show_info()
1464 seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", in nsp32_show_info()
1468 seq_printf(m, "Chip revision: 0x%x\n", in nsp32_show_info()
1469 (nsp32_read2(base, INDEX_REG) >> 8) & 0xff); in nsp32_show_info()
1482 seq_printf(m, "CurrentSC: 0x%p\n\n", data->CurrentSC); in nsp32_show_info()
1487 for (id = 0; id < ARRAY_SIZE(data->target); id++) { in nsp32_show_info()
1497 if (data->target[id].period == 0 && in nsp32_show_info()
1507 if (data->target[id].period != 0) { in nsp32_show_info()
1519 return 0; in nsp32_show_info()
1538 nsp32_write2(base, TRANSFER_CONTROL, 0); in nsp32_scsi_done()
1539 nsp32_write4(base, BM_CNT, 0); in nsp32_scsi_done()
1571 nsp32_dbg(NSP32_DEBUG_BUSFREE, "enter execph=0x%x", execph); in nsp32_busfree_occur()
1574 nsp32_write4(base, BM_CNT, 0); in nsp32_busfree_occur()
1575 nsp32_write2(base, TRANSFER_CONTROL, 0); in nsp32_busfree_occur()
1606 * If SAVEDSACKCNT == 0, it means SavedDataPointer is in nsp32_busfree_occur()
1609 if (s_sacklen > 0) { in nsp32_busfree_occur()
1688 "normal end stat=0x%x resid=0x%x\n", in nsp32_busfree_occur()
1691 (nsp32_priv(SCpnt)->status << 0); in nsp32_busfree_occur()
1729 nsp32_dbg(NSP32_DEBUG_SGLIST, "old resid=0x%x", scsi_get_resid(SCpnt)); in nsp32_adjust_busfree()
1738 sentlen = 0; in nsp32_adjust_busfree()
1780 nsp32_dbg(NSP32_DEBUG_SGLIST, "new resid=0x%x", scsi_get_resid(SCpnt)); in nsp32_adjust_busfree()
1801 "enter: msgout_len: 0x%x", data->msgout_len); in nsp32_msgout_occur()
1807 if (data->msgout_len == 0) { in nsp32_msgout_occur()
1814 for (i = 0; i < data->msgout_len; i++) { in nsp32_msgout_occur()
1816 "%d : 0x%x", i, data->msgoutbuf[i]); in nsp32_msgout_occur()
1845 nsp32_dbg(NSP32_DEBUG_MSGOUTOCCUR, "bus: 0x%x\n", in nsp32_msgout_occur()
1849 data->msgout_len = 0; in nsp32_msgout_occur()
1864 unsigned short transfer = 0; in nsp32_restart_autoscsi()
1896 transfer = 0; in nsp32_restart_autoscsi()
1899 if (scsi_bufflen(SCpnt) > 0) { in nsp32_restart_autoscsi()
1935 unsigned short command = 0; in nsp32_msgin_occur()
1947 msgtype = data->msginbuf[0]; in nsp32_msgin_occur()
1949 "enter: msglen: 0x%x msgin: 0x%x msgtype: 0x%x", in nsp32_msgin_occur()
1964 if (msgtype & 0x80) { in nsp32_msgin_occur()
1970 newlun = msgtype & 0x1f; /* TODO: SPI-3 compliant? */ in nsp32_msgin_occur()
1995 "unexpected message of AutoSCSI MsgIn: 0x%x", msg); in nsp32_msgin_occur()
2007 if ((execph & MSGIN_02_VALID) && (s_sacklen > 0)) { in nsp32_msgin_occur()
2060 "unsupported message: 0x%x", msgtype); in nsp32_msgin_occur()
2073 case 0x23: in nsp32_msgin_occur()
2075 * 0x23: Ignore_Wide_Residue is not declared in scsi.h. in nsp32_msgin_occur()
2103 * (msgin_len starts counting from 0, so buf[1] + 1). in nsp32_msgin_occur()
2159 data->msgin_len = 0; in nsp32_msgin_occur()
2163 * (msgout_len > 0), set AutoATN, and set SCSIMSGOUT as 0 in nsp32_msgin_occur()
2164 * (MV_VALID = 0). When commandcontrol is written with in nsp32_msgin_occur()
2168 if (data->msgout_len > 0) { in nsp32_msgin_occur()
2169 nsp32_write4(base, SCSI_MSG_OUT, 0); in nsp32_msgin_occur()
2212 "current msg: 0x%x (len: 0x%x), processing msg: 0x%x", in nsp32_msgin_occur()
2215 data->msgin_len = 0; in nsp32_msgin_occur()
2279 if (get_period < data->synct[0].period_num) { in nsp32_analyze_sdtr()
2289 if (entry < 0) { in nsp32_analyze_sdtr()
2314 if (get_period < data->synct[0].period_num) { in nsp32_analyze_sdtr()
2315 get_period = data->synct[0].period_num; in nsp32_analyze_sdtr()
2320 if (get_offset == ASYNC_OFFSET || entry < 0) { in nsp32_analyze_sdtr()
2322 nsp32_build_sdtr(SCpnt, 0, ASYNC_OFFSET); in nsp32_analyze_sdtr()
2343 target->period = 0; in nsp32_analyze_sdtr()
2361 target->limit_entry = 0; in nsp32_search_period_entry()
2391 target->period = 0; in nsp32_set_async()
2393 target->ackwidth = 0; in nsp32_set_async()
2394 target->sample_reg = 0; in nsp32_set_async()
2418 target->sample_reg = 0; /* disable SREQ sampling */ in nsp32_set_max_sync()
2456 int wait_time = 0; in nsp32_wait_req()
2463 req_bit = (state == ASSERT ? BUSMON_REQ : 0); in nsp32_wait_req()
2476 nsp32_msg(KERN_WARNING, "wait REQ timeout, req_bit: 0x%x", req_bit); in nsp32_wait_req()
2485 int wait_time = 0; in nsp32_wait_sack()
2492 ack_bit = (state == ASSERT ? BUSMON_ACK : 0); in nsp32_wait_sack()
2505 nsp32_msg(KERN_WARNING, "wait SACK timeout, ack_bit: 0x%x", ack_bit); in nsp32_wait_sack()
2539 * Note: n_io_port is defined as 0x7f because I/O register port is
2541 * 0x800-0x8ff: memory mapped I/O port
2542 * 0x900-0xbff: (map same 0x800-0x8ff I/O port image repeatedly)
2543 * 0xc00-0xfff: CardBus status registers
2630 if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)) != 0) { in nsp32_detect()
2656 for (i = 0; i < ARRAY_SIZE(data->lunt); i++) { in nsp32_detect()
2657 for (j = 0; j < ARRAY_SIZE(data->lunt[0]); j++) { in nsp32_detect()
2658 int offset = i * ARRAY_SIZE(data->lunt[0]) + j; in nsp32_detect()
2661 .save_datp = 0, in nsp32_detect()
2663 .sg_num = 0, in nsp32_detect()
2664 .cur_entry = 0, in nsp32_detect()
2676 for (i = 0; i < ARRAY_SIZE(data->target); i++) { in nsp32_detect()
2679 target->limit_entry = 0; in nsp32_detect()
2680 target->sync_flag = 0; in nsp32_detect()
2698 "NinjaSCSI-32Bi/UDE: irq %d, io 0x%lx+0x%x", in nsp32_detect()
2722 if (ret < 0) { in nsp32_detect()
2734 "I/O region 0x%x+0x%x is already used", in nsp32_detect()
2746 return 0; in nsp32_detect()
2795 return 0; in nsp32_release()
2823 data->cur_target->sync_flag = 0; in nsp32_eh_abort()
2827 nsp32_write2(base, TRANSFER_CONTROL, 0); in nsp32_eh_abort()
2828 nsp32_write2(base, BM_CNT, 0); in nsp32_eh_abort()
2850 nsp32_write2(base, TRANSFER_CONTROL, 0); in nsp32_do_bus_reset()
2851 nsp32_write4(base, BM_CNT, 0); in nsp32_do_bus_reset()
2858 for (i = 0; i < ARRAY_SIZE(data->target); i++) { in nsp32_do_bus_reset()
2861 target->sync_flag = 0; in nsp32_do_bus_reset()
2870 nsp32_write1(base, SCSI_BUS_CONTROL, 0); in nsp32_do_bus_reset()
2871 for(i = 0; i < 5; i++) { in nsp32_do_bus_reset()
2873 nsp32_dbg(NSP32_DEBUG_BUSRESET, "irq:1: 0x%x", intrdat); in nsp32_do_bus_reset()
2886 nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt); in nsp32_eh_host_reset()
2893 nsp32_write2(base, IRQ_CONTROL, 0); in nsp32_eh_host_reset()
2917 ret = nsp32_prom_read(data, 0x7e); in nsp32_getprom_param()
2918 if (ret != 0x55) { in nsp32_getprom_param()
2919 nsp32_msg(KERN_INFO, "No EEPROM detected: 0x%x", ret); in nsp32_getprom_param()
2922 ret = nsp32_prom_read(data, 0x7f); in nsp32_getprom_param()
2923 if (ret != 0xaa) { in nsp32_getprom_param()
2924 nsp32_msg(KERN_INFO, "Invalid number: 0x%x", ret); in nsp32_getprom_param()
2946 for (i = 0; i <= 0x1f; i++) { in nsp32_getprom_param()
2949 "rom address 0x%x : 0x%x", i, val); in nsp32_getprom_param()
2960 * 0x00 - 0x06 : Device Synchronous Transfer Period (SCSI ID 0 - 6)
2961 * Value 0x0: ASYNC, 0x0c: Ultra-20M, 0x19: Fast-10M
2962 * 0x07 : HBA Synchronous Transfer Period
2963 * Value 0: AutoSync, 1: Manual Setting
2964 * 0x08 - 0x0f : Not Used? (0x0)
2965 * 0x10 : Bus Termination
2966 * Value 0: Auto[ON], 1: ON, 2: OFF
2967 * 0x11 : Not Used? (0)
2968 * 0x12 : Bus Reset Delay Time (0x03)
2969 * 0x13 : Bootable CD Support
2970 * Value 0: Disable, 1: Enable
2971 * 0x14 : Device Scan
2972 * Bit 7 6 5 4 3 2 1 0
2974 * | SCSI ID: Value 0: Skip, 1: YES
2975 * |-> Value 0: ALL scan, Value 1: Manual
2976 * 0x15 - 0x1b : Not Used? (0)
2977 * 0x1c : Constant? (0x01) (clock div?)
2978 * 0x1d - 0x7c : Not Used (0xff)
2979 * 0x7d : Not Used? (0xff)
2980 * 0x7e : Constant (0x55), Validity signature
2981 * 0x7f : Constant (0xaa), Validity signature
2995 data->resettime = nsp32_prom_read(data, 0x12); in nsp32_getprom_at24()
3000 * Note: auto_sync = 0: auto, 1: manual. Ninja SCSI HBA spec says in nsp32_getprom_at24()
3001 * that if auto_sync is 0 (auto), and connected SCSI devices are in nsp32_getprom_at24()
3007 * only ignored. If auto_sync is 0 (auto), then transfer speed is in nsp32_getprom_at24()
3010 ret = nsp32_prom_read(data, 0x07); in nsp32_getprom_at24()
3012 case 0: in nsp32_getprom_at24()
3031 for (i = 0; i < NSP32_HOST_SCSIID; i++) { in nsp32_getprom_at24()
3034 target->limit_entry = 0; /* set as ULTRA20M */ in nsp32_getprom_at24()
3038 if (entry < 0) { in nsp32_getprom_at24()
3040 entry = 0; in nsp32_getprom_at24()
3054 * 0x00 - 0x06 : Device Synchronous Transfer Period (SCSI ID 0 - 6)
3055 * Value 0x0: 20MB/S, 0x1: 10MB/S, 0x2: 5MB/S, 0x3: ASYNC
3056 * 0x07 : 0 (HBA Synchronous Transfer Period: Auto Sync)
3057 * 0x08 - 0x0f : Not Used? (0x0)
3058 * 0x10 : Transfer Mode
3059 * Value 0: PIO, 1: Busmater
3060 * 0x11 : Bus Reset Delay Time (0x00-0x20)
3061 * 0x12 : Bus Termination
3062 * Value 0: Disable, 1: Enable
3063 * 0x13 - 0x19 : Disconnection
3064 * Value 0: Disable, 1: Enable
3065 * 0x1a - 0x7c : Not Used? (0)
3066 * 0x7d : Not Used? (0xf8)
3067 * 0x7e : Constant (0x55), Validity signature
3068 * 0x7f : Constant (0xaa), Validity signature
3081 data->resettime = nsp32_prom_read(data, 0x11); in nsp32_getprom_c16()
3086 for (i = 0; i < NSP32_HOST_SCSIID; i++) { in nsp32_getprom_c16()
3090 case 0: /* 20MB/s */ in nsp32_getprom_c16()
3091 val = 0x0c; in nsp32_getprom_c16()
3094 val = 0x19; in nsp32_getprom_c16()
3097 val = 0x32; in nsp32_getprom_c16()
3100 val = 0x00; in nsp32_getprom_c16()
3103 val = 0x0c; in nsp32_getprom_c16()
3107 if (entry < 0 || trans_mode == ULTRA20M_MODE) { in nsp32_getprom_c16()
3109 entry = 0; in nsp32_getprom_c16()
3130 nsp32_prom_write_bit(data, 0); /* 0 */ in nsp32_prom_read()
3132 nsp32_prom_write_bit(data, 0); /* 0 */ in nsp32_prom_read()
3133 nsp32_prom_write_bit(data, 0); /* A2: 0 (GND) */ in nsp32_prom_read()
3134 nsp32_prom_write_bit(data, 0); /* A1: 0 (GND) */ in nsp32_prom_read()
3135 nsp32_prom_write_bit(data, 0); /* A0: 0 (GND) */ in nsp32_prom_read()
3138 nsp32_prom_write_bit(data, 0); in nsp32_prom_read()
3141 nsp32_prom_write_bit(data, 0); in nsp32_prom_read()
3144 for (i = 7; i >= 0; i--) { in nsp32_prom_read()
3149 nsp32_prom_write_bit(data, 0); in nsp32_prom_read()
3156 nsp32_prom_write_bit(data, 0); /* 0 */ in nsp32_prom_read()
3158 nsp32_prom_write_bit(data, 0); /* 0 */ in nsp32_prom_read()
3159 nsp32_prom_write_bit(data, 0); /* A2: 0 (GND) */ in nsp32_prom_read()
3160 nsp32_prom_write_bit(data, 0); /* A1: 0 (GND) */ in nsp32_prom_read()
3161 nsp32_prom_write_bit(data, 0); /* A0: 0 (GND) */ in nsp32_prom_read()
3167 nsp32_prom_write_bit(data, 0); in nsp32_prom_read()
3170 val = 0; in nsp32_prom_read()
3171 for (i = 7; i >= 0; i--) { in nsp32_prom_read()
3191 if (val == 0) { in nsp32_prom_set()
3209 return 0; in nsp32_prom_get()
3215 if (tmp == 0) { in nsp32_prom_get()
3216 ret = 0; in nsp32_prom_get()
3232 nsp32_prom_set(data, SDA, 0); /* keeping SCL=1 and transiting in nsp32_prom_start()
3233 * SDA 1->0 is start condition */ in nsp32_prom_start()
3234 nsp32_prom_set(data, SCL, 0); in nsp32_prom_start()
3241 nsp32_prom_set(data, SDA, 0); in nsp32_prom_stop()
3244 nsp32_prom_set(data, SCL, 0); in nsp32_prom_stop()
3252 nsp32_prom_set(data, SCL, 0 ); in nsp32_prom_write_bit()
3260 nsp32_prom_set(data, ENA, 0); /* input mode */ in nsp32_prom_read_bit()
3265 nsp32_prom_set(data, SCL, 0); in nsp32_prom_read_bit()
3282 nsp32_msg(KERN_INFO, "pci-suspend: pdev=0x%p, state.event=%x, slot=%s, host=0x%p", in nsp32_suspend()
3289 return 0; in nsp32_suspend()
3299 nsp32_msg(KERN_INFO, "pci-resume: pdev=0x%p, slot=%s, host=0x%p", in nsp32_resume()
3303 pci_enable_wake (pdev, PCI_D0, 0); in nsp32_resume()
3308 nsp32_msg(KERN_INFO, "io=0x%x reg=0x%x", data->BaseAddress, reg); in nsp32_resume()
3310 if (reg == 0xffff) { in nsp32_resume()
3312 return 0; in nsp32_resume()
3320 return 0; in nsp32_resume()
3344 data->BaseAddress = pci_resource_start(pdev, 0); in nsp32_probe()
3345 data->NumAddress = pci_resource_len (pdev, 0); in nsp32_probe()
3353 nsp32_msg(KERN_INFO, "irq: %i mmio: %p+0x%lx slot: %s model: %s", in nsp32_probe()