Searched refs:iop_base (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/drivers/scsi/
H A Dadvansys.c503 PortAddr iop_base; member in struct:asc_dvc_var
1236 * Byte I/O register address from base of 'iop_base'.
1304 * Word I/O register address from base of 'iop_base'.
1341 * Doubleword I/O register address from base of 'iop_base'.
1824 AdvPortAddr iop_base; /* I/O port address */ member in struct:adv_dvc_var
1895 #define AdvReadByteRegister(iop_base, reg_off) \
1896 (ADV_MEM_READB((iop_base) + (reg_off)))
1899 #define AdvWriteByteRegister(iop_base, reg_off, byte) \
1900 (ADV_MEM_WRITEB((iop_base) + (reg_off), (byte)))
1903 #define AdvReadWordRegister(iop_base, reg_off) \
1904 (ADV_MEM_READW((iop_base) + (reg_off)))
1907 #define AdvWriteWordRegister(iop_base, reg_off, word) \
1908 (ADV_MEM_WRITEW((iop_base) + (reg_off), (word)))
1911 #define AdvWriteDWordRegister(iop_base, reg_off, dword) \
1912 (ADV_MEM_WRITEDW((iop_base) + (reg_off), (dword)))
1915 #define AdvReadByteLram(iop_base, addr, byte) \
1917 ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)); \
1918 (byte) = ADV_MEM_READB((iop_base) + IOPB_RAM_DATA); \
1922 #define AdvWriteByteLram(iop_base, addr, byte) \
1923 (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
1924 ADV_MEM_WRITEB((iop_base) + IOPB_RAM_DATA, (byte)))
1927 #define AdvReadWordLram(iop_base, addr, word) \
1929 ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)); \
1930 (word) = (ADV_MEM_READW((iop_base) + IOPW_RAM_DATA)); \
1934 #define AdvWriteWordLram(iop_base, addr, word) \
1935 (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
1936 ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word)))
1940 #define AdvWriteDWordLramNoSwap(iop_base, addr, dword) \
1941 ((ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
1942 ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \
1944 (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr) + 2), \
1945 ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \
1949 #define AdvReadWordAutoIncLram(iop_base) \
1950 (ADV_MEM_READW((iop_base) + IOPW_RAM_DATA))
1953 #define AdvWriteWordAutoIncLram(iop_base, word) \
1954 (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word)))
1960 * address 'iop_base'. Otherwise evalue to ADV_FALSE.
1962 #define AdvFindSignature(iop_base) \
1963 (((AdvReadByteRegister((iop_base), IOPB_CHIP_ID_1) == \
1965 (AdvReadWordRegister((iop_base), IOPW_CHIP_ID_0) == \
1969 * Define macro to Return the version number of the chip at 'iop_base'.
1973 #define AdvGetChipVersion(iop_base, bus_type) \
1974 AdvReadByteRegister((iop_base), IOPB_CHIP_TYPE_REV)
2313 printk(" iop_base 0x%x, err_code 0x%x, dvc_cntl 0x%x, bug_fix_cntl " asc_prt_asc_dvc_var()
2314 "%d,\n", h->iop_base, h->err_code, h->dvc_cntl, h->bug_fix_cntl); asc_prt_asc_dvc_var()
2370 printk(" iop_base 0x%lx, err_code 0x%x, ultra_able 0x%x\n", asc_prt_adv_dvc_var()
2371 (ulong)h->iop_base, h->err_code, (unsigned)h->ultra_able); asc_prt_adv_dvc_var()
2699 ASC_VERSION, widename, (ulong)adv_dvc_varp->iop_base, advansys_info()
2700 (ulong)adv_dvc_varp->iop_base + boardp->asc_n_io_port - 1, boardp->irq); advansys_info()
3353 AdvPortAddr iop_base; asc_prt_adv_board_info() local
3365 iop_base = v->iop_base; asc_prt_adv_board_info()
3373 " iop_base 0x%lx, cable_detect: %X, err_code %u\n", asc_prt_adv_board_info()
3374 (unsigned long)v->iop_base, asc_prt_adv_board_info()
3375 AdvReadWordRegister(iop_base,IOPW_SCSI_CFG1) & CABLE_DETECT, asc_prt_adv_board_info()
3382 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); asc_prt_adv_board_info()
3402 AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + i, asc_prt_adv_board_info()
3415 AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_QUEUED_CMD + i, asc_prt_adv_board_info()
3422 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); asc_prt_adv_board_info()
3436 AdvReadWordLram(iop_base, ASC_MC_WDTR_DONE, wdtr_done); asc_prt_adv_board_info()
3444 AdvReadWordLram(iop_base, asc_prt_adv_board_info()
3459 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); asc_prt_adv_board_info()
3473 AdvReadWordLram(iop_base, ASC_MC_SDTR_DONE, sdtr_done); asc_prt_adv_board_info()
3476 AdvReadWordLram(iop_base, asc_prt_adv_board_info()
3660 static void AscSetBank(PortAddr iop_base, uchar bank) AscSetBank() argument
3664 val = AscGetChipControl(iop_base) & AscSetBank()
3675 AscSetChipControl(iop_base, val); AscSetBank()
3678 static void AscSetChipIH(PortAddr iop_base, ushort ins_code) AscSetChipIH() argument
3680 AscSetBank(iop_base, 1); AscSetChipIH()
3681 AscWriteChipIH(iop_base, ins_code); AscSetChipIH()
3682 AscSetBank(iop_base, 0); AscSetChipIH()
3685 static int AscStartChip(PortAddr iop_base) AscStartChip() argument
3687 AscSetChipControl(iop_base, 0); AscStartChip()
3688 if ((AscGetChipStatus(iop_base) & CSW_HALTED) != 0) { AscStartChip()
3694 static bool AscStopChip(PortAddr iop_base) AscStopChip() argument
3699 AscGetChipControl(iop_base) & AscStopChip()
3701 AscSetChipControl(iop_base, (uchar)(cc_val | CC_HALT)); AscStopChip()
3702 AscSetChipIH(iop_base, INS_HALT); AscStopChip()
3703 AscSetChipIH(iop_base, INS_RFLAG_WTM); AscStopChip()
3704 if ((AscGetChipStatus(iop_base) & CSW_HALTED) == 0) { AscStopChip()
3710 static bool AscIsChipHalted(PortAddr iop_base) AscIsChipHalted() argument
3712 if ((AscGetChipStatus(iop_base) & CSW_HALTED) != 0) { AscIsChipHalted()
3713 if ((AscGetChipControl(iop_base) & CC_HALT) != 0) { AscIsChipHalted()
3722 PortAddr iop_base; AscResetChipAndScsiBus() local
3725 iop_base = asc_dvc->iop_base; AscResetChipAndScsiBus()
3726 while ((AscGetChipStatus(iop_base) & CSW_SCSI_RESET_ACTIVE) AscResetChipAndScsiBus()
3730 AscStopChip(iop_base); AscResetChipAndScsiBus()
3731 AscSetChipControl(iop_base, CC_CHIP_RESET | CC_SCSI_RESET | CC_HALT); AscResetChipAndScsiBus()
3733 AscSetChipIH(iop_base, INS_RFLAG_WTM); AscResetChipAndScsiBus()
3734 AscSetChipIH(iop_base, INS_HALT); AscResetChipAndScsiBus()
3735 AscSetChipControl(iop_base, CC_CHIP_RESET | CC_HALT); AscResetChipAndScsiBus()
3736 AscSetChipControl(iop_base, CC_HALT); AscResetChipAndScsiBus()
3738 AscSetChipStatus(iop_base, CIW_CLR_SCSI_RESET_INT); AscResetChipAndScsiBus()
3739 AscSetChipStatus(iop_base, 0); AscResetChipAndScsiBus()
3740 return (AscIsChipHalted(iop_base)); AscResetChipAndScsiBus()
3743 static int AscFindSignature(PortAddr iop_base) AscFindSignature() argument
3748 iop_base, AscGetChipSignatureByte(iop_base)); AscFindSignature()
3749 if (AscGetChipSignatureByte(iop_base) == (uchar)ASC_1000_ID1B) { AscFindSignature()
3751 iop_base, AscGetChipSignatureWord(iop_base)); AscFindSignature()
3752 sig_word = AscGetChipSignatureWord(iop_base); AscFindSignature()
3761 static void AscEnableInterrupt(PortAddr iop_base) AscEnableInterrupt() argument
3765 cfg = AscGetChipCfgLsw(iop_base); AscEnableInterrupt()
3766 AscSetChipCfgLsw(iop_base, cfg | ASC_CFG0_HOST_INT_ON); AscEnableInterrupt()
3769 static void AscDisableInterrupt(PortAddr iop_base) AscDisableInterrupt() argument
3773 cfg = AscGetChipCfgLsw(iop_base); AscDisableInterrupt()
3774 AscSetChipCfgLsw(iop_base, cfg & (~ASC_CFG0_HOST_INT_ON)); AscDisableInterrupt()
3777 static uchar AscReadLramByte(PortAddr iop_base, ushort addr) AscReadLramByte() argument
3783 AscSetChipLramAddr(iop_base, addr - 1); AscReadLramByte()
3784 word_data = AscGetChipLramData(iop_base); AscReadLramByte()
3787 AscSetChipLramAddr(iop_base, addr); AscReadLramByte()
3788 word_data = AscGetChipLramData(iop_base); AscReadLramByte()
3794 static ushort AscReadLramWord(PortAddr iop_base, ushort addr) AscReadLramWord() argument
3798 AscSetChipLramAddr(iop_base, addr); AscReadLramWord()
3799 word_data = AscGetChipLramData(iop_base); AscReadLramWord()
3804 AscMemWordSetLram(PortAddr iop_base, ushort s_addr, ushort set_wval, int words) AscMemWordSetLram() argument
3808 AscSetChipLramAddr(iop_base, s_addr); AscMemWordSetLram()
3810 AscSetChipLramData(iop_base, set_wval); AscMemWordSetLram()
3814 static void AscWriteLramWord(PortAddr iop_base, ushort addr, ushort word_val) AscWriteLramWord() argument
3816 AscSetChipLramAddr(iop_base, addr); AscWriteLramWord()
3817 AscSetChipLramData(iop_base, word_val); AscWriteLramWord()
3820 static void AscWriteLramByte(PortAddr iop_base, ushort addr, uchar byte_val) AscWriteLramByte() argument
3826 word_data = AscReadLramWord(iop_base, addr); AscWriteLramByte()
3830 word_data = AscReadLramWord(iop_base, addr); AscWriteLramByte()
3834 AscWriteLramWord(iop_base, addr, word_data); AscWriteLramByte()
3844 AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr, AscMemWordCopyPtrToLram() argument
3849 AscSetChipLramAddr(iop_base, s_addr); AscMemWordCopyPtrToLram()
3859 outpw(iop_base + IOP_RAM_DATA, AscMemWordCopyPtrToLram()
3871 AscMemDWordCopyPtrToLram(PortAddr iop_base, AscMemDWordCopyPtrToLram() argument
3876 AscSetChipLramAddr(iop_base, s_addr); AscMemDWordCopyPtrToLram()
3878 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */ AscMemDWordCopyPtrToLram()
3879 outpw(iop_base + IOP_RAM_DATA, ((ushort)s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */ AscMemDWordCopyPtrToLram()
3890 AscMemWordCopyPtrFromLram(PortAddr iop_base, AscMemWordCopyPtrFromLram() argument
3896 AscSetChipLramAddr(iop_base, s_addr); AscMemWordCopyPtrFromLram()
3898 word = inpw(iop_base + IOP_RAM_DATA); AscMemWordCopyPtrFromLram()
3904 static u32 AscMemSumLramWord(PortAddr iop_base, ushort s_addr, int words) AscMemSumLramWord() argument
3910 sum += AscReadLramWord(iop_base, s_addr); AscMemSumLramWord()
3919 PortAddr iop_base; AscInitLram() local
3921 iop_base = asc_dvc->iop_base; AscInitLram()
3922 AscMemWordSetLram(iop_base, ASC_QADR_BEG, 0, AscInitLram()
3927 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), AscInitLram()
3929 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), AscInitLram()
3931 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), AscInitLram()
3936 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), AscInitLram()
3938 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), AscInitLram()
3940 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), AscInitLram()
3943 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_FWD), AscInitLram()
3945 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_BWD), AscInitLram()
3947 AscWriteLramByte(iop_base, (ushort)(s_addr + ASC_SCSIQ_B_QNO), AscInitLram()
3953 AscWriteLramByte(iop_base, AscInitLram()
3955 AscWriteLramByte(iop_base, AscInitLram()
3957 AscWriteLramByte(iop_base, AscInitLram()
3963 AscLoadMicroCode(PortAddr iop_base, ushort s_addr, AscLoadMicroCode() argument
3972 AscMemWordSetLram(iop_base, s_addr, 0, mcode_word_size); AscLoadMicroCode()
3973 AscMemWordCopyPtrToLram(iop_base, s_addr, mcode_buf, mcode_word_size); AscLoadMicroCode()
3975 chksum = AscMemSumLramWord(iop_base, s_addr, mcode_word_size); AscLoadMicroCode()
3977 mcode_chksum = (ushort)AscMemSumLramWord(iop_base, AscLoadMicroCode()
3984 AscWriteLramWord(iop_base, ASCV_MCODE_CHKSUM_W, mcode_chksum); AscLoadMicroCode()
3985 AscWriteLramWord(iop_base, ASCV_MCODE_SIZE_W, mcode_size); AscLoadMicroCode()
3991 PortAddr iop_base; AscInitQLinkVar() local
3995 iop_base = asc_dvc->iop_base; AscInitQLinkVar()
3996 AscPutRiscVarFreeQHead(iop_base, 1); AscInitQLinkVar()
3997 AscPutRiscVarDoneQTail(iop_base, asc_dvc->max_total_qng); AscInitQLinkVar()
3998 AscPutVarFreeQHead(iop_base, 1); AscInitQLinkVar()
3999 AscPutVarDoneQTail(iop_base, asc_dvc->max_total_qng); AscInitQLinkVar()
4000 AscWriteLramByte(iop_base, ASCV_BUSY_QHEAD_B, AscInitQLinkVar()
4002 AscWriteLramByte(iop_base, ASCV_DISC1_QHEAD_B, AscInitQLinkVar()
4004 AscWriteLramByte(iop_base, (ushort)ASCV_TOTAL_READY_Q_B, AscInitQLinkVar()
4006 AscWriteLramWord(iop_base, ASCV_ASCDVC_ERR_CODE_W, 0); AscInitQLinkVar()
4007 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscInitQLinkVar()
4008 AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, 0); AscInitQLinkVar()
4009 AscWriteLramByte(iop_base, ASCV_SCSIBUSY_B, 0); AscInitQLinkVar()
4010 AscWriteLramByte(iop_base, ASCV_WTM_FLAG_B, 0); AscInitQLinkVar()
4011 AscPutQDoneInProgress(iop_base, 0); AscInitQLinkVar()
4014 AscWriteLramWord(iop_base, lram_addr, 0); AscInitQLinkVar()
4022 PortAddr iop_base; AscInitMicroCodeVar() local
4027 iop_base = asc_dvc->iop_base; AscInitMicroCodeVar()
4030 AscPutMCodeInitSDTRAtID(iop_base, i, AscInitMicroCodeVar()
4035 AscWriteLramByte(iop_base, ASCV_DISC_ENABLE_B, AscInitMicroCodeVar()
4037 AscWriteLramByte(iop_base, ASCV_HOSTSCSI_ID_B, AscInitMicroCodeVar()
4049 AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_PADDR_D, AscInitMicroCodeVar()
4052 AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_BSIZE_D, AscInitMicroCodeVar()
4056 AscReadLramWord(iop_base, (ushort)ASCV_MC_DATE_W); AscInitMicroCodeVar()
4058 AscReadLramWord(iop_base, (ushort)ASCV_MC_VER_W); AscInitMicroCodeVar()
4060 AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR); AscInitMicroCodeVar()
4061 if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) { AscInitMicroCodeVar()
4066 if (AscStartChip(iop_base) != 1) { AscInitMicroCodeVar()
4089 PortAddr iop_base; AscInitAsc1000Driver() local
4091 iop_base = asc_dvc->iop_base; AscInitAsc1000Driver()
4101 if (!AscFindSignature(asc_dvc->iop_base)) { AscInitAsc1000Driver()
4105 AscDisableInterrupt(iop_base); AscInitAsc1000Driver()
4125 if (AscLoadMicroCode(iop_base, 0, &fw->data[4], AscInitAsc1000Driver()
4136 AscEnableInterrupt(iop_base); AscInitAsc1000Driver()
4162 static int AdvLoadMicrocode(AdvPortAddr iop_base, const unsigned char *buf, AdvLoadMicrocode() argument
4168 AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0); AdvLoadMicrocode()
4174 AdvWriteWordAutoIncLram(iop_base, word); AdvLoadMicrocode()
4180 AdvWriteWordAutoIncLram(iop_base, word); AdvLoadMicrocode()
4186 AdvWriteWordAutoIncLram(iop_base, word); AdvLoadMicrocode()
4194 AdvWriteWordAutoIncLram(iop_base, 0); AdvLoadMicrocode()
4200 AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0); AdvLoadMicrocode()
4203 sum += AdvReadWordAutoIncLram(iop_base); AdvLoadMicrocode()
4299 AdvPortAddr iop_base; AdvSendIdleCmd() local
4301 iop_base = asc_dvc->iop_base; AdvSendIdleCmd()
4308 AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD_STATUS, (ushort)0); AdvSendIdleCmd()
4316 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IDLE_CMD_PARAMETER, AdvSendIdleCmd()
4318 AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD, idle_cmd); AdvSendIdleCmd()
4323 AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_B); AdvSendIdleCmd()
4330 AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_NOP); AdvSendIdleCmd()
4337 AdvReadWordLram(iop_base, ASC_MC_IDLE_CMD_STATUS, AdvSendIdleCmd()
4407 AdvPortAddr iop_base; AdvInitAsc3550Driver() local
4435 iop_base = asc_dvc->iop_base; AdvInitAsc3550Driver()
4446 AdvReadWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), AdvInitAsc3550Driver()
4462 AdvReadWordLram(iop_base, 0x120, wdtr_able); AdvInitAsc3550Driver()
4464 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvInitAsc3550Driver()
4467 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvInitAsc3550Driver()
4468 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); AdvInitAsc3550Driver()
4470 AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid, AdvInitAsc3550Driver()
4490 asc_dvc->err_code = AdvLoadMicrocode(iop_base, &fw->data[4], AdvInitAsc3550Driver()
4501 AdvWriteWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), AdvInitAsc3550Driver()
4509 AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, begin_addr); AdvInitAsc3550Driver()
4510 AdvReadWordLram(iop_base, ASC_MC_CODE_END_ADDR, end_addr); AdvInitAsc3550Driver()
4512 AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, begin_addr); AdvInitAsc3550Driver()
4514 code_sum += AdvReadWordAutoIncLram(iop_base); AdvInitAsc3550Driver()
4516 AdvWriteWordLram(iop_base, ASC_MC_CODE_CHK_SUM, code_sum); AdvInitAsc3550Driver()
4521 AdvReadWordLram(iop_base, ASC_MC_VERSION_DATE, AdvInitAsc3550Driver()
4523 AdvReadWordLram(iop_base, ASC_MC_VERSION_NUM, AdvInitAsc3550Driver()
4529 AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC3550); AdvInitAsc3550Driver()
4538 AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc3550Driver()
4540 AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc3550Driver()
4547 AdvWriteByteRegister(iop_base, IOPB_DMA_CFG0, AdvInitAsc3550Driver()
4563 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, AdvInitAsc3550Driver()
4565 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, AdvInitAsc3550Driver()
4601 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED1, word); AdvInitAsc3550Driver()
4604 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED2, word); AdvInitAsc3550Driver()
4607 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED3, word); AdvInitAsc3550Driver()
4610 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED4, word); AdvInitAsc3550Driver()
4618 AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, AdvInitAsc3550Driver()
4627 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG0, AdvInitAsc3550Driver()
4639 scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1); AdvInitAsc3550Driver()
4655 if ((AdvReadWordRegister(iop_base, IOPW_SCSI_CTRL) & 0x3F07) == 0x3F07) { AdvInitAsc3550Driver()
4733 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG1, AdvInitAsc3550Driver()
4747 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG, AdvInitAsc3550Driver()
4756 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SEL_MASK, AdvInitAsc3550Driver()
4774 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa); AdvInitAsc3550Driver()
4788 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa); AdvInitAsc3550Driver()
4791 AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES, AdvInitAsc3550Driver()
4795 AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, word); AdvInitAsc3550Driver()
4796 AdvWriteWordRegister(iop_base, IOPW_PC, word); AdvInitAsc3550Driver()
4799 AdvWriteWordRegister(iop_base, IOPW_RISC_CSR, ADV_RISC_CSR_RUN); AdvInitAsc3550Driver()
4817 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvInitAsc3550Driver()
4818 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvInitAsc3550Driver()
4819 AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, AdvInitAsc3550Driver()
4822 AdvWriteByteLram(iop_base, AdvInitAsc3550Driver()
4850 AdvPortAddr iop_base; AdvInitAsc38C0800Driver() local
4879 iop_base = asc_dvc->iop_base; AdvInitAsc38C0800Driver()
4890 AdvReadWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), AdvInitAsc38C0800Driver()
4897 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvInitAsc38C0800Driver()
4898 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvInitAsc38C0800Driver()
4899 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); AdvInitAsc38C0800Driver()
4901 AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid, AdvInitAsc38C0800Driver()
4935 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, PRE_TEST_MODE); AdvInitAsc38C0800Driver()
4937 byte = AdvReadByteRegister(iop_base, IOPB_RAM_BIST); AdvInitAsc38C0800Driver()
4944 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, NORMAL_MODE); AdvInitAsc38C0800Driver()
4946 if (AdvReadByteRegister(iop_base, IOPB_RAM_BIST) AdvInitAsc38C0800Driver()
4960 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, RAM_TEST_MODE); AdvInitAsc38C0800Driver()
4963 byte = AdvReadByteRegister(iop_base, IOPB_RAM_BIST); AdvInitAsc38C0800Driver()
4972 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, NORMAL_MODE); AdvInitAsc38C0800Driver()
4990 asc_dvc->err_code = AdvLoadMicrocode(iop_base, &fw->data[4], AdvInitAsc38C0800Driver()
5001 AdvWriteWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), AdvInitAsc38C0800Driver()
5009 AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, begin_addr); AdvInitAsc38C0800Driver()
5010 AdvReadWordLram(iop_base, ASC_MC_CODE_END_ADDR, end_addr); AdvInitAsc38C0800Driver()
5012 AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, begin_addr); AdvInitAsc38C0800Driver()
5014 code_sum += AdvReadWordAutoIncLram(iop_base); AdvInitAsc38C0800Driver()
5016 AdvWriteWordLram(iop_base, ASC_MC_CODE_CHK_SUM, code_sum); AdvInitAsc38C0800Driver()
5021 AdvReadWordLram(iop_base, ASC_MC_VERSION_DATE, AdvInitAsc38C0800Driver()
5023 AdvReadWordLram(iop_base, ASC_MC_VERSION_NUM, AdvInitAsc38C0800Driver()
5029 AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC38C0800); AdvInitAsc38C0800Driver()
5039 scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1); AdvInitAsc38C0800Driver()
5040 AdvWriteWordRegister(iop_base, IOPW_SCSI_CFG1, AdvInitAsc38C0800Driver()
5050 AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc38C0800Driver()
5052 AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc38C0800Driver()
5063 AdvWriteByteRegister(iop_base, IOPB_DMA_CFG0, AdvInitAsc38C0800Driver()
5080 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, AdvInitAsc38C0800Driver()
5082 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, AdvInitAsc38C0800Driver()
5095 AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, AdvInitAsc38C0800Driver()
5097 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED1, asc_dvc->sdtr_speed1); AdvInitAsc38C0800Driver()
5098 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED2, asc_dvc->sdtr_speed2); AdvInitAsc38C0800Driver()
5099 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED3, asc_dvc->sdtr_speed3); AdvInitAsc38C0800Driver()
5100 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED4, asc_dvc->sdtr_speed4); AdvInitAsc38C0800Driver()
5108 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG0, AdvInitAsc38C0800Driver()
5120 scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1); AdvInitAsc38C0800Driver()
5127 if ((AdvReadWordRegister(iop_base, IOPW_SCSI_CTRL) & 0x3F07) == 0x3F07) { AdvInitAsc38C0800Driver()
5215 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG1, scsi_cfg1); AdvInitAsc38C0800Driver()
5228 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG, AdvInitAsc38C0800Driver()
5237 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SEL_MASK, AdvInitAsc38C0800Driver()
5257 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa); AdvInitAsc38C0800Driver()
5274 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa); AdvInitAsc38C0800Driver()
5277 AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES, AdvInitAsc38C0800Driver()
5281 AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, word); AdvInitAsc38C0800Driver()
5282 AdvWriteWordRegister(iop_base, IOPW_PC, word); AdvInitAsc38C0800Driver()
5285 AdvWriteWordRegister(iop_base, IOPW_RISC_CSR, ADV_RISC_CSR_RUN); AdvInitAsc38C0800Driver()
5303 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvInitAsc38C0800Driver()
5304 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvInitAsc38C0800Driver()
5305 AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, AdvInitAsc38C0800Driver()
5308 AdvWriteByteLram(iop_base, AdvInitAsc38C0800Driver()
5336 AdvPortAddr iop_base; AdvInitAsc38C1600Driver() local
5366 iop_base = asc_dvc->iop_base; AdvInitAsc38C1600Driver()
5377 AdvReadWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), AdvInitAsc38C1600Driver()
5384 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvInitAsc38C1600Driver()
5385 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvInitAsc38C1600Driver()
5386 AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able); AdvInitAsc38C1600Driver()
5387 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); AdvInitAsc38C1600Driver()
5389 AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid, AdvInitAsc38C1600Driver()
5423 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, PRE_TEST_MODE); AdvInitAsc38C1600Driver()
5425 byte = AdvReadByteRegister(iop_base, IOPB_RAM_BIST); AdvInitAsc38C1600Driver()
5432 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, NORMAL_MODE); AdvInitAsc38C1600Driver()
5434 if (AdvReadByteRegister(iop_base, IOPB_RAM_BIST) AdvInitAsc38C1600Driver()
5448 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, RAM_TEST_MODE); AdvInitAsc38C1600Driver()
5451 byte = AdvReadByteRegister(iop_base, IOPB_RAM_BIST); AdvInitAsc38C1600Driver()
5460 AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, NORMAL_MODE); AdvInitAsc38C1600Driver()
5478 asc_dvc->err_code = AdvLoadMicrocode(iop_base, &fw->data[4], AdvInitAsc38C1600Driver()
5489 AdvWriteWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), AdvInitAsc38C1600Driver()
5497 AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, begin_addr); AdvInitAsc38C1600Driver()
5498 AdvReadWordLram(iop_base, ASC_MC_CODE_END_ADDR, end_addr); AdvInitAsc38C1600Driver()
5500 AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, begin_addr); AdvInitAsc38C1600Driver()
5502 code_sum += AdvReadWordAutoIncLram(iop_base); AdvInitAsc38C1600Driver()
5504 AdvWriteWordLram(iop_base, ASC_MC_CODE_CHK_SUM, code_sum); AdvInitAsc38C1600Driver()
5509 AdvReadWordLram(iop_base, ASC_MC_VERSION_DATE, AdvInitAsc38C1600Driver()
5511 AdvReadWordLram(iop_base, ASC_MC_VERSION_NUM, AdvInitAsc38C1600Driver()
5517 AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC38C1600); AdvInitAsc38C1600Driver()
5527 scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1); AdvInitAsc38C1600Driver()
5528 AdvWriteWordRegister(iop_base, IOPW_SCSI_CFG1, AdvInitAsc38C1600Driver()
5538 AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc38C1600Driver()
5540 AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc38C1600Driver()
5550 AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc38C1600Driver()
5552 AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word); AdvInitAsc38C1600Driver()
5559 AdvWriteByteRegister(iop_base, IOPB_DMA_CFG0, AdvInitAsc38C1600Driver()
5575 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, AdvInitAsc38C1600Driver()
5577 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, AdvInitAsc38C1600Driver()
5590 AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, AdvInitAsc38C1600Driver()
5592 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED1, asc_dvc->sdtr_speed1); AdvInitAsc38C1600Driver()
5593 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED2, asc_dvc->sdtr_speed2); AdvInitAsc38C1600Driver()
5594 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED3, asc_dvc->sdtr_speed3); AdvInitAsc38C1600Driver()
5595 AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED4, asc_dvc->sdtr_speed4); AdvInitAsc38C1600Driver()
5603 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG0, AdvInitAsc38C1600Driver()
5616 scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1); AdvInitAsc38C1600Driver()
5623 if ((AdvReadWordRegister(iop_base, IOPW_SCSI_CTRL) & 0x3F07) == 0x3F07) { AdvInitAsc38C1600Driver()
5704 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG1, scsi_cfg1); AdvInitAsc38C1600Driver()
5722 * AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG, AdvInitAsc38C1600Driver()
5725 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG, AdvInitAsc38C1600Driver()
5734 AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SEL_MASK, AdvInitAsc38C1600Driver()
5753 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa); AdvInitAsc38C1600Driver()
5754 AdvWriteDWordRegister(iop_base, IOPDW_COMMA, AdvInitAsc38C1600Driver()
5769 AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa); AdvInitAsc38C1600Driver()
5772 AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES, AdvInitAsc38C1600Driver()
5775 AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, word); AdvInitAsc38C1600Driver()
5776 AdvWriteWordRegister(iop_base, IOPW_PC, word); AdvInitAsc38C1600Driver()
5779 AdvWriteWordRegister(iop_base, IOPW_RISC_CSR, ADV_RISC_CSR_RUN); AdvInitAsc38C1600Driver()
5796 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvInitAsc38C1600Driver()
5797 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvInitAsc38C1600Driver()
5798 AdvWriteWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able); AdvInitAsc38C1600Driver()
5799 AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, AdvInitAsc38C1600Driver()
5802 AdvWriteByteLram(iop_base, AdvInitAsc38C1600Driver()
5829 AdvPortAddr iop_base; AdvResetChipAndSB() local
5832 iop_base = asc_dvc->iop_base; AdvResetChipAndSB()
5837 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvResetChipAndSB()
5838 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvResetChipAndSB()
5840 AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able); AdvResetChipAndSB()
5842 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); AdvResetChipAndSB()
5844 AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid, AdvResetChipAndSB()
5854 AdvReadWordLram(iop_base, ASC_MC_BIOS_SIGNATURE, bios_sig); AdvResetChipAndSB()
5855 AdvWriteWordLram(iop_base, ASC_MC_BIOS_SIGNATURE, 0); AdvResetChipAndSB()
5860 AdvWriteWordRegister(iop_base, IOPW_RISC_CSR, ADV_RISC_CSR_STOP); AdvResetChipAndSB()
5861 AdvWriteWordRegister(iop_base, IOPW_CTRL_REG, ADV_CTRL_REG_CMD_RESET); AdvResetChipAndSB()
5863 AdvWriteWordRegister(iop_base, IOPW_CTRL_REG, AdvResetChipAndSB()
5889 AdvWriteWordLram(iop_base, ASC_MC_BIOS_SIGNATURE, bios_sig); AdvResetChipAndSB()
5894 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); AdvResetChipAndSB()
5895 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); AdvResetChipAndSB()
5897 AdvWriteWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able); AdvResetChipAndSB()
5899 AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); AdvResetChipAndSB()
5901 AdvWriteByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid, AdvResetChipAndSB()
6118 AdvPortAddr iop_base; AdvISR() local
6126 iop_base = asc_dvc->iop_base; AdvISR()
6129 int_stat = AdvReadByteRegister(iop_base, IOPB_INTR_STATUS_REG); AdvISR()
6144 AdvReadByteLram(iop_base, ASC_MC_INTRB_CODE, intrb_code); AdvISR()
6150 AdvWriteByteRegister(iop_base, IOPB_TICKLE, AdvISR()
6153 AdvWriteByteRegister(iop_base, AdvISR()
6234 AscWriteLramWord(asc_dvc->iop_base, ASCV_ASCDVC_ERR_CODE_W, AscSetLibErrorCode()
6240 static void AscAckInterrupt(PortAddr iop_base) AscAckInterrupt() argument
6248 risc_flag = AscReadLramByte(iop_base, ASCV_RISC_FLAG_B); AscAckInterrupt()
6254 AscReadLramByte(iop_base, AscAckInterrupt()
6256 AscWriteLramByte(iop_base, ASCV_HOST_FLAG_B, AscAckInterrupt()
6258 AscSetChipStatus(iop_base, CIW_INT_ACK); AscAckInterrupt()
6260 while (AscGetChipStatus(iop_base) & CSW_INT_PENDING) { AscAckInterrupt()
6261 AscSetChipStatus(iop_base, CIW_INT_ACK); AscAckInterrupt()
6266 AscWriteLramByte(iop_base, ASCV_HOST_FLAG_B, host_flag); AscAckInterrupt()
6296 PortAddr iop_base; AscMsgOutSDTR() local
6298 iop_base = asc_dvc->iop_base; AscMsgOutSDTR()
6307 AscMemWordCopyPtrToLram(iop_base, ASCV_MSGOUT_BEG, AscMsgOutSDTR()
6313 AscMemWordCopyPtrToLram(iop_base, ASCV_MSGOUT_BEG, AscMsgOutSDTR()
6333 static bool AscSetChipSynRegAtID(PortAddr iop_base, uchar id, uchar sdtr_data) AscSetChipSynRegAtID() argument
6339 AscSetBank(iop_base, 1); AscSetChipSynRegAtID()
6340 org_id = AscReadChipDvcID(iop_base); AscSetChipSynRegAtID()
6346 AscWriteChipDvcID(iop_base, id); AscSetChipSynRegAtID()
6347 if (AscReadChipDvcID(iop_base) == (0x01 << id)) { AscSetChipSynRegAtID()
6348 AscSetBank(iop_base, 0); AscSetChipSynRegAtID()
6349 AscSetChipSyn(iop_base, sdtr_data); AscSetChipSynRegAtID()
6350 if (AscGetChipSyn(iop_base) != sdtr_data) { AscSetChipSynRegAtID()
6356 AscSetBank(iop_base, 1); AscSetChipSynRegAtID()
6357 AscWriteChipDvcID(iop_base, org_id); AscSetChipSynRegAtID()
6358 AscSetBank(iop_base, 0); AscSetChipSynRegAtID()
6362 static void AscSetChipSDTR(PortAddr iop_base, uchar sdtr_data, uchar tid_no) AscSetChipSDTR() argument
6364 AscSetChipSynRegAtID(iop_base, tid_no, sdtr_data); AscSetChipSDTR()
6365 AscPutMCodeSDTRDoneAtID(iop_base, tid_no, sdtr_data); AscSetChipSDTR()
6377 PortAddr iop_base; AscIsrChipHalted() local
6392 iop_base = asc_dvc->iop_base; AscIsrChipHalted()
6393 int_halt_code = AscReadLramWord(iop_base, ASCV_HALTCODE_W); AscIsrChipHalted()
6395 halt_qp = AscReadLramByte(iop_base, ASCV_CURCDB_B); AscIsrChipHalted()
6397 target_ix = AscReadLramByte(iop_base, AscIsrChipHalted()
6400 q_cntl = AscReadLramByte(iop_base, AscIsrChipHalted()
6411 AscSetChipSDTR(iop_base, 0, tid_no); AscIsrChipHalted()
6414 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6418 AscSetChipSDTR(iop_base, asyn_sdtr, tid_no); AscIsrChipHalted()
6421 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6424 AscMemWordCopyPtrFromLram(iop_base, AscIsrChipHalted()
6457 AscSetChipSDTR(iop_base, asyn_sdtr, AscIsrChipHalted()
6467 AscSetChipSDTR(iop_base, asyn_sdtr, tid_no); AscIsrChipHalted()
6480 AscSetChipSDTR(iop_base, sdtr_data, AscIsrChipHalted()
6495 AscSetChipSDTR(iop_base, sdtr_data, AscIsrChipHalted()
6503 AscWriteLramByte(iop_base, AscIsrChipHalted()
6507 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6514 AscMemWordCopyPtrToLram(iop_base, AscIsrChipHalted()
6519 AscWriteLramByte(iop_base, AscIsrChipHalted()
6523 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6528 AscMemWordCopyPtrToLram(iop_base, AscIsrChipHalted()
6533 AscWriteLramByte(iop_base, AscIsrChipHalted()
6537 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6548 sdtr_data = AscGetMCodeInitSDTRAtID(iop_base, tid_no); AscIsrChipHalted()
6560 AscWriteLramByte(iop_base, AscIsrChipHalted()
6564 tag_code = AscReadLramByte(iop_base, AscIsrChipHalted()
6576 AscWriteLramByte(iop_base, AscIsrChipHalted()
6581 q_status = AscReadLramByte(iop_base, AscIsrChipHalted()
6585 AscWriteLramByte(iop_base, AscIsrChipHalted()
6590 scsi_busy = AscReadLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B); AscIsrChipHalted()
6592 AscWriteLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B, scsi_busy); AscIsrChipHalted()
6594 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6598 AscMemWordCopyPtrFromLram(iop_base, AscIsrChipHalted()
6609 AscSetChipSDTR(iop_base, asyn_sdtr, tid_no); AscIsrChipHalted()
6613 AscWriteLramByte(iop_base, AscIsrChipHalted()
6616 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6620 scsi_status = AscReadLramByte(iop_base, AscIsrChipHalted()
6625 AscReadLramByte(iop_base, AscIsrChipHalted()
6630 scsi_busy = AscReadLramByte(iop_base, AscIsrChipHalted()
6633 AscWriteLramByte(iop_base, AscIsrChipHalted()
6643 AscWriteLramByte(iop_base, AscIsrChipHalted()
6661 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); AscIsrChipHalted()
6669 * DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words)
6678 DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) DvcGetQinfo() argument
6683 AscSetChipLramAddr(iop_base, s_addr); DvcGetQinfo()
6688 word = inpw(iop_base + IOP_RAM_DATA); DvcGetQinfo()
6696 _AscCopyLramScsiDoneQ(PortAddr iop_base, _AscCopyLramScsiDoneQ() argument
6703 DvcGetQinfo(iop_base, _AscCopyLramScsiDoneQ()
6708 _val = AscReadLramWord(iop_base, _AscCopyLramScsiDoneQ()
6712 _val = AscReadLramWord(iop_base, _AscCopyLramScsiDoneQ()
6716 _val = AscReadLramWord(iop_base, _AscCopyLramScsiDoneQ()
6725 scsiq->remain_bytes = (((u32)AscReadLramWord(iop_base, _AscCopyLramScsiDoneQ()
6733 scsiq->remain_bytes += AscReadLramWord(iop_base, _AscCopyLramScsiDoneQ()
6868 PortAddr iop_base; AscIsrQDone() local
6876 iop_base = asc_dvc->iop_base; AscIsrQDone()
6879 done_q_tail = (uchar)AscGetVarDoneQTail(iop_base); AscIsrQDone()
6881 next_qp = AscReadLramByte(iop_base, AscIsrQDone()
6884 AscPutVarDoneQTail(iop_base, next_qp); AscIsrQDone()
6886 sg_queue_cnt = _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, AscIsrQDone()
6888 AscWriteLramByte(iop_base, AscIsrQDone()
6900 sg_list_qp = AscReadLramByte(iop_base, AscIsrQDone()
6913 AscWriteLramByte(iop_base, AscIsrQDone()
6919 AscPutVarDoneQTail(iop_base, sg_list_qp); AscIsrQDone()
6922 cur_target_qng = AscReadLramByte(iop_base, AscIsrQDone()
6929 scsi_busy = AscReadLramByte(iop_base, (ushort) AscIsrQDone()
6932 AscWriteLramByte(iop_base, AscIsrQDone()
6978 AscStopChip(iop_base); AscIsrQDone()
6979 AscSetChipControl(iop_base, AscIsrQDone()
6983 AscSetChipControl(iop_base, CC_HALT); AscIsrQDone()
6984 AscSetChipStatus(iop_base, AscIsrQDone()
6986 AscSetChipStatus(iop_base, 0); AscIsrQDone()
6987 AscSetChipControl(iop_base, 0); AscIsrQDone()
6993 if ((AscReadLramByte(iop_base, AscIsrQDone()
7020 PortAddr iop_base; AscISR() local
7028 iop_base = asc_dvc->iop_base; AscISR()
7031 if (AscIsIntPending(iop_base) == 0) AscISR()
7046 ctrl_reg = AscGetChipControl(iop_base); AscISR()
7049 chipstat = AscGetChipStatus(iop_base); AscISR()
7056 while ((AscGetChipStatus(iop_base) & AscISR()
7060 AscSetChipControl(iop_base, (CC_CHIP_RESET | CC_HALT)); AscISR()
7061 AscSetChipControl(iop_base, CC_HALT); AscISR()
7062 AscSetChipStatus(iop_base, CIW_CLR_SCSI_RESET_INT); AscISR()
7063 AscSetChipStatus(iop_base, 0); AscISR()
7064 chipstat = AscGetChipStatus(iop_base); AscISR()
7067 saved_ram_addr = AscGetChipLramAddr(iop_base); AscISR()
7068 host_flag = AscReadLramByte(iop_base, AscISR()
7071 AscWriteLramByte(iop_base, ASCV_HOST_FLAG_B, AscISR()
7074 AscAckInterrupt(iop_base); AscISR()
7096 AscWriteLramByte(iop_base, ASCV_HOST_FLAG_B, host_flag); AscISR()
7097 AscSetChipLramAddr(iop_base, saved_ram_addr); AscISR()
7098 AscSetChipControl(iop_base, saved_ctrl_reg); AscISR()
7257 static bool AscHostReqRiscHalt(PortAddr iop_base) AscHostReqRiscHalt() argument
7263 if (AscIsChipHalted(iop_base)) AscHostReqRiscHalt()
7265 saved_stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B); AscHostReqRiscHalt()
7266 AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, AscHostReqRiscHalt()
7269 if (AscIsChipHalted(iop_base)) { AscHostReqRiscHalt()
7275 AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, saved_stop_code); AscHostReqRiscHalt()
7280 AscSetRunChipSynRegAtID(PortAddr iop_base, uchar tid_no, uchar sdtr_data) AscSetRunChipSynRegAtID() argument
7284 if (AscHostReqRiscHalt(iop_base)) { AscSetRunChipSynRegAtID()
7285 sta = AscSetChipSynRegAtID(iop_base, tid_no, sdtr_data); AscSetRunChipSynRegAtID()
7286 AscStartChip(iop_base); AscSetRunChipSynRegAtID()
7310 AscSetRunChipSynRegAtID(asc_dvc->iop_base, sdev->id, AscAsyncFix()
7350 AscWriteLramByte(asc_dvc->iop_base, ASCV_DISC_ENABLE_B, advansys_narrow_slave_configure()
7352 AscWriteLramByte(asc_dvc->iop_base, ASCV_USE_TAGGED_QNG_B, advansys_narrow_slave_configure()
7354 AscWriteLramByte(asc_dvc->iop_base, ASCV_CAN_TAGGED_QNG_B, advansys_narrow_slave_configure()
7359 AscWriteLramByte(asc_dvc->iop_base, advansys_narrow_slave_configure()
7373 advansys_wide_enable_wdtr(AdvPortAddr iop_base, unsigned short tidmask) advansys_wide_enable_wdtr() argument
7376 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, cfg_word); advansys_wide_enable_wdtr()
7381 AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, cfg_word); advansys_wide_enable_wdtr()
7389 AdvReadWordLram(iop_base, ASC_MC_SDTR_DONE, cfg_word); advansys_wide_enable_wdtr()
7391 AdvWriteWordLram(iop_base, ASC_MC_SDTR_DONE, cfg_word); advansys_wide_enable_wdtr()
7392 AdvReadWordLram(iop_base, ASC_MC_WDTR_DONE, cfg_word); advansys_wide_enable_wdtr()
7394 AdvWriteWordLram(iop_base, ASC_MC_WDTR_DONE, cfg_word); advansys_wide_enable_wdtr()
7405 advansys_wide_enable_sdtr(AdvPortAddr iop_base, unsigned short tidmask) advansys_wide_enable_sdtr() argument
7408 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, cfg_word); advansys_wide_enable_sdtr()
7413 AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, cfg_word); advansys_wide_enable_sdtr()
7419 AdvReadWordLram(iop_base, ASC_MC_SDTR_DONE, cfg_word); advansys_wide_enable_sdtr()
7421 AdvWriteWordLram(iop_base, ASC_MC_SDTR_DONE, cfg_word); advansys_wide_enable_sdtr()
7433 AdvPortAddr iop_base, unsigned short tidmask) advansys_wide_enable_ppr()
7435 AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, adv_dvc->ppr_able); advansys_wide_enable_ppr()
7437 AdvWriteWordLram(iop_base, ASC_MC_PPR_ABLE, adv_dvc->ppr_able); advansys_wide_enable_ppr()
7443 AdvPortAddr iop_base = adv_dvc->iop_base; advansys_wide_slave_configure() local
7454 advansys_wide_enable_wdtr(iop_base, tidmask); advansys_wide_slave_configure()
7456 advansys_wide_enable_sdtr(iop_base, tidmask); advansys_wide_slave_configure()
7458 advansys_wide_enable_ppr(adv_dvc, iop_base, tidmask); advansys_wide_slave_configure()
7469 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, cfg_word); advansys_wide_slave_configure()
7471 AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, advansys_wide_slave_configure()
7473 AdvWriteByteLram(iop_base, advansys_wide_slave_configure()
7909 static uchar AscAllocFreeQueue(PortAddr iop_base, uchar free_q_head) AscAllocFreeQueue() argument
7916 q_status = (uchar)AscReadLramByte(iop_base, AscAllocFreeQueue()
7919 next_qp = AscReadLramByte(iop_base, (ushort)(q_addr + ASC_SCSIQ_B_FWD)); AscAllocFreeQueue()
7926 AscAllocMultipleFreeQueue(PortAddr iop_base, uchar free_q_head, uchar n_free_q) AscAllocMultipleFreeQueue() argument
7931 free_q_head = AscAllocFreeQueue(iop_base, free_q_head); AscAllocMultipleFreeQueue()
7940 * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words)
7949 DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) DvcPutScsiQ() argument
7954 AscSetChipLramAddr(iop_base, s_addr); DvcPutScsiQ()
7959 outpw(iop_base + IOP_RAM_DATA, DvcPutScsiQ()
7971 PortAddr iop_base; AscPutReadyQueue() local
7973 iop_base = asc_dvc->iop_base; AscPutReadyQueue()
7977 sdtr_data = AscGetMCodeInitSDTRAtID(iop_base, tid_no); AscPutReadyQueue()
7991 AscMemWordCopyPtrToLram(iop_base, AscPutReadyQueue()
7995 DvcPutScsiQ(iop_base, AscPutReadyQueue()
7999 AscWriteLramWord(iop_base, AscPutReadyQueue()
8015 PortAddr iop_base; AscPutReadySgListQueue() local
8022 iop_base = asc_dvc->iop_base; AscPutReadySgListQueue()
8073 next_qp = AscReadLramByte(iop_base, AscPutReadySgListQueue()
8078 AscMemWordCopyPtrToLram(iop_base, AscPutReadySgListQueue()
8082 AscMemDWordCopyPtrToLram(iop_base, AscPutReadySgListQueue()
8102 PortAddr iop_base; AscSendScsiQueue() local
8109 iop_base = asc_dvc->iop_base; AscSendScsiQueue()
8113 free_q_head = (uchar)AscGetVarFreeQHead(iop_base); AscSendScsiQueue()
8115 next_qp = AscAllocMultipleFreeQueue(iop_base, free_q_head, AscSendScsiQueue()
8125 next_qp = AscAllocFreeQueue(iop_base, free_q_head); AscSendScsiQueue()
8132 AscPutVarFreeQHead(iop_base, next_qp); AscSendScsiQueue()
8161 PortAddr iop_base; AscExeScsiQueue() local
8178 iop_base = asc_dvc->iop_base; AscExeScsiQueue()
8193 sdtr_data = AscGetMCodeInitSDTRAtID(iop_base, tid_no); AscExeScsiQueue()
8389 AdvPortAddr iop_base; AdvExeScsiQueue() local
8402 iop_base = asc_dvc->iop_base; AdvExeScsiQueue()
8447 AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_A); AdvExeScsiQueue()
8454 AdvWriteByteRegister(iop_base, IOPB_TICKLE, AdvExeScsiQueue()
8462 AdvWriteDWordRegister(iop_base, IOPDW_COMMA, AdvExeScsiQueue()
8586 static ushort AscGetEisaChipCfg(PortAddr iop_base) AscGetEisaChipCfg() argument
8588 PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | AscGetEisaChipCfg()
8597 static unsigned short AscGetChipBiosAddress(PortAddr iop_base, AscGetChipBiosAddress() argument
8612 cfg_lsw = AscGetEisaChipCfg(iop_base); AscGetChipBiosAddress()
8618 cfg_lsw = AscGetChipCfgLsw(iop_base); AscGetChipBiosAddress()
8629 static uchar AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) AscSetChipScsiID() argument
8633 if (AscGetChipScsiID(iop_base) == new_host_id) { AscSetChipScsiID()
8636 cfg_lsw = AscGetChipCfgLsw(iop_base); AscSetChipScsiID()
8639 AscSetChipCfgLsw(iop_base, cfg_lsw); AscSetChipScsiID()
8640 return (AscGetChipScsiID(iop_base)); AscSetChipScsiID()
8643 static unsigned char AscGetChipScsiCtrl(PortAddr iop_base) AscGetChipScsiCtrl() argument
8647 AscSetBank(iop_base, 1); AscGetChipScsiCtrl()
8648 sc = inp(iop_base + IOP_REG_SC); AscGetChipScsiCtrl()
8649 AscSetBank(iop_base, 0); AscGetChipScsiCtrl()
8653 static unsigned char AscGetChipVersion(PortAddr iop_base, AscGetChipVersion() argument
8659 eisa_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | AscGetChipVersion()
8664 return AscGetChipVerNo(iop_base); AscGetChipVersion()
8680 static int AscStopQueueExe(PortAddr iop_base) AscStopQueueExe() argument
8684 if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) == 0) { AscStopQueueExe()
8685 AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, AscStopQueueExe()
8688 if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) & AscStopQueueExe()
8708 static ushort AscGetIsaDmaChannel(PortAddr iop_base) AscGetIsaDmaChannel() argument
8712 channel = AscGetChipCfgLsw(iop_base) & 0x0003; AscGetIsaDmaChannel()
8720 static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) AscSetIsaDmaChannel() argument
8730 cfg_lsw = AscGetChipCfgLsw(iop_base) & 0xFFFC; AscSetIsaDmaChannel()
8732 AscSetChipCfgLsw(iop_base, cfg_lsw); AscSetIsaDmaChannel()
8733 return (AscGetIsaDmaChannel(iop_base)); AscSetIsaDmaChannel()
8738 static uchar AscGetIsaDmaSpeed(PortAddr iop_base) AscGetIsaDmaSpeed() argument
8742 AscSetBank(iop_base, 1); AscGetIsaDmaSpeed()
8743 speed_value = AscReadChipDmaSpeed(iop_base); AscGetIsaDmaSpeed()
8745 AscSetBank(iop_base, 0); AscGetIsaDmaSpeed()
8749 static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) AscSetIsaDmaSpeed() argument
8752 AscSetBank(iop_base, 1); AscSetIsaDmaSpeed()
8753 AscWriteChipDmaSpeed(iop_base, speed_value); AscSetIsaDmaSpeed()
8754 AscSetBank(iop_base, 0); AscSetIsaDmaSpeed()
8755 return AscGetIsaDmaSpeed(iop_base); AscSetIsaDmaSpeed()
8762 PortAddr iop_base; AscInitAscDvcVar() local
8765 iop_base = asc_dvc->iop_base; AscInitAscDvcVar()
8771 AscSetChipControl(iop_base, CC_HALT); AscInitAscDvcVar()
8772 AscSetChipStatus(iop_base, 0); AscInitAscDvcVar()
8800 chip_version = AscGetChipVersion(iop_base, asc_dvc->bus_type); AscInitAscDvcVar()
8810 AscSetExtraControl(iop_base, AscInitAscDvcVar()
8813 AscSetExtraControl(iop_base, AscInitAscDvcVar()
8819 AscSetExtraControl(iop_base, AscInitAscDvcVar()
8827 AscSetChipIFC(iop_base, IFC_INIT_DEFAULT); AscInitAscDvcVar()
8831 (uchar)AscGetIsaDmaChannel(iop_base); AscInitAscDvcVar()
8843 static int AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) AscWriteEEPCmdReg() argument
8849 AscSetChipEEPCmd(iop_base, cmd_reg); AscWriteEEPCmdReg()
8851 read_back = AscGetChipEEPCmd(iop_base); AscWriteEEPCmdReg()
8863 static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) AscReadEEPWord() argument
8868 AscWriteEEPCmdReg(iop_base, ASC_EEP_CMD_WRITE_DISABLE); AscReadEEPWord()
8871 AscWriteEEPCmdReg(iop_base, cmd_reg); AscReadEEPWord()
8873 read_wval = AscGetChipEEPData(iop_base); AscReadEEPWord()
8878 static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, AscGetEEPConfig() argument
8893 *wbuf = AscReadEEPWord(iop_base, (uchar)s_addr); AscGetEEPConfig()
8904 wval = AscReadEEPWord(iop_base, (uchar)s_addr); AscGetEEPConfig()
8921 *wbuf = AscReadEEPWord(iop_base, (uchar)s_addr); AscGetEEPConfig()
8927 PortAddr iop_base; AscTestExternalLram() local
8932 iop_base = asc_dvc->iop_base; AscTestExternalLram()
8935 saved_word = AscReadLramWord(iop_base, q_addr); AscTestExternalLram()
8936 AscSetChipLramAddr(iop_base, q_addr); AscTestExternalLram()
8937 AscSetChipLramData(iop_base, 0x55AA); AscTestExternalLram()
8939 AscSetChipLramAddr(iop_base, q_addr); AscTestExternalLram()
8940 if (AscGetChipLramData(iop_base) == 0x55AA) { AscTestExternalLram()
8942 AscWriteLramWord(iop_base, q_addr, saved_word); AscTestExternalLram()
8952 static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) AscWriteEEPDataReg() argument
8959 AscSetChipEEPData(iop_base, data_reg); AscWriteEEPDataReg()
8961 read_back = AscGetChipEEPData(iop_base); AscWriteEEPDataReg()
8971 static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) AscWriteEEPWord() argument
8975 read_wval = AscReadEEPWord(iop_base, addr); AscWriteEEPWord()
8977 AscWriteEEPCmdReg(iop_base, ASC_EEP_CMD_WRITE_ABLE); AscWriteEEPWord()
8979 AscWriteEEPDataReg(iop_base, word_val); AscWriteEEPWord()
8981 AscWriteEEPCmdReg(iop_base, AscWriteEEPWord()
8984 AscWriteEEPCmdReg(iop_base, ASC_EEP_CMD_WRITE_DISABLE); AscWriteEEPWord()
8986 return (AscReadEEPWord(iop_base, addr)); AscWriteEEPWord()
8991 static int AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, AscSetEEPConfigOnce() argument
9009 if (*wbuf != AscWriteEEPWord(iop_base, (uchar)s_addr, *wbuf)) { AscSetEEPConfigOnce()
9028 AscWriteEEPWord(iop_base, (uchar)s_addr, word)) { AscSetEEPConfigOnce()
9034 AscWriteEEPWord(iop_base, (uchar)s_addr, *wbuf)) { AscSetEEPConfigOnce()
9042 if (sum != AscWriteEEPWord(iop_base, (uchar)s_addr, sum)) { AscSetEEPConfigOnce()
9052 if (*wbuf != AscReadEEPWord(iop_base, (uchar)s_addr)) { AscSetEEPConfigOnce()
9071 (iop_base, (uchar)s_addr)); AscSetEEPConfigOnce()
9074 word = AscReadEEPWord(iop_base, (uchar)s_addr); AscSetEEPConfigOnce()
9081 if (AscReadEEPWord(iop_base, (uchar)s_addr) != sum) { AscSetEEPConfigOnce()
9087 static int AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, AscSetEEPConfig() argument
9095 if ((n_error = AscSetEEPConfigOnce(iop_base, cfg_buf, AscSetEEPConfig()
9110 PortAddr iop_base; AscInitFromEEP() local
9117 iop_base = asc_dvc->iop_base; AscInitFromEEP()
9119 AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0x00FE); AscInitFromEEP()
9120 AscStopQueueExe(iop_base); AscInitFromEEP()
9121 if ((AscStopChip(iop_base)) || AscInitFromEEP()
9122 (AscGetChipScsiCtrl(iop_base) != 0)) { AscInitFromEEP()
9127 if (!AscIsChipHalted(iop_base)) { AscInitFromEEP()
9131 AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR); AscInitFromEEP()
9132 if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) { AscInitFromEEP()
9137 cfg_msw = AscGetChipCfgMsw(iop_base); AscInitFromEEP()
9138 cfg_lsw = AscGetChipCfgLsw(iop_base); AscInitFromEEP()
9142 AscSetChipCfgMsw(iop_base, cfg_msw); AscInitFromEEP()
9144 chksum = AscGetEEPConfig(iop_base, eep_config, asc_dvc->bus_type); AscInitFromEEP()
9149 if (AscGetChipStatus(iop_base) & CSW_AUTO_CONFIG) { AscInitFromEEP()
9155 AscGetChipCfgLsw(iop_base); AscInitFromEEP()
9160 AscGetChipCfgMsw(iop_base); AscInitFromEEP()
9168 if (AscGetChipVersion(iop_base, asc_dvc->bus_type) == AscInitFromEEP()
9217 AscSetChipCfgMsw(iop_base, cfg_msw); AscInitFromEEP()
9256 eep_config->cfg_msw = AscGetChipCfgMsw(iop_base); AscInitFromEEP()
9258 if ((i = AscSetEEPConfig(iop_base, eep_config, AscInitFromEEP()
9281 if (AscFindSignature(asc_dvc->iop_base)) { AscInitGetConfig()
9329 PortAddr iop_base = asc_dvc->iop_base; AscInitSetConfig() local
9336 if (!AscFindSignature(asc_dvc->iop_base)) { AscInitSetConfig()
9341 cfg_msw = AscGetChipCfgMsw(iop_base); AscInitSetConfig()
9345 AscSetChipCfgMsw(iop_base, cfg_msw); AscInitSetConfig()
9352 if (AscGetChipStatus(iop_base) & CSW_AUTO_CONFIG) { AscInitSetConfig()
9358 AscSetChipCfgMsw(iop_base, cfg_msw); AscInitSetConfig()
9371 if (AscGetChipVersion(iop_base, asc_dvc->bus_type) AscInitSetConfig()
9376 if (AscSetChipScsiID(iop_base, asc_dvc->cfg->chip_scsi_id) != AscInitSetConfig()
9382 AscSetIsaDmaChannel(iop_base, asc_dvc->cfg->isa_dma_channel); AscInitSetConfig()
9383 AscSetIsaDmaSpeed(iop_base, asc_dvc->cfg->isa_dma_speed); AscInitSetConfig()
9779 static void AdvWaitEEPCmd(AdvPortAddr iop_base) AdvWaitEEPCmd() argument
9784 if (AdvReadWordRegister(iop_base, IOPW_EE_CMD) & AdvWaitEEPCmd()
9790 if ((AdvReadWordRegister(iop_base, IOPW_EE_CMD) & ASC_EEP_CMD_DONE) == AdvWaitEEPCmd()
9798 static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) AdvReadEEPWord() argument
9800 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvReadEEPWord()
9802 AdvWaitEEPCmd(iop_base); AdvReadEEPWord()
9803 return AdvReadWordRegister(iop_base, IOPW_EE_DATA); AdvReadEEPWord()
9809 static void AdvSet3550EEPConfig(AdvPortAddr iop_base, AdvSet3550EEPConfig() argument
9820 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_ABLE); AdvSet3550EEPConfig()
9821 AdvWaitEEPCmd(iop_base); AdvSet3550EEPConfig()
9836 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvSet3550EEPConfig()
9837 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvSet3550EEPConfig()
9839 AdvWaitEEPCmd(iop_base); AdvSet3550EEPConfig()
9846 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum); AdvSet3550EEPConfig()
9847 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvSet3550EEPConfig()
9848 AdvWaitEEPCmd(iop_base); AdvSet3550EEPConfig()
9864 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvSet3550EEPConfig()
9865 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvSet3550EEPConfig()
9867 AdvWaitEEPCmd(iop_base); AdvSet3550EEPConfig()
9869 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_DISABLE); AdvSet3550EEPConfig()
9870 AdvWaitEEPCmd(iop_base); AdvSet3550EEPConfig()
9876 static void AdvSet38C0800EEPConfig(AdvPortAddr iop_base, AdvSet38C0800EEPConfig() argument
9887 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_ABLE); AdvSet38C0800EEPConfig()
9888 AdvWaitEEPCmd(iop_base); AdvSet38C0800EEPConfig()
9903 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvSet38C0800EEPConfig()
9904 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvSet38C0800EEPConfig()
9906 AdvWaitEEPCmd(iop_base); AdvSet38C0800EEPConfig()
9913 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum); AdvSet38C0800EEPConfig()
9914 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvSet38C0800EEPConfig()
9915 AdvWaitEEPCmd(iop_base); AdvSet38C0800EEPConfig()
9931 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvSet38C0800EEPConfig()
9932 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvSet38C0800EEPConfig()
9934 AdvWaitEEPCmd(iop_base); AdvSet38C0800EEPConfig()
9936 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_DISABLE); AdvSet38C0800EEPConfig()
9937 AdvWaitEEPCmd(iop_base); AdvSet38C0800EEPConfig()
9943 static void AdvSet38C1600EEPConfig(AdvPortAddr iop_base, AdvSet38C1600EEPConfig() argument
9954 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_ABLE); AdvSet38C1600EEPConfig()
9955 AdvWaitEEPCmd(iop_base); AdvSet38C1600EEPConfig()
9970 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvSet38C1600EEPConfig()
9971 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvSet38C1600EEPConfig()
9973 AdvWaitEEPCmd(iop_base); AdvSet38C1600EEPConfig()
9980 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum); AdvSet38C1600EEPConfig()
9981 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvSet38C1600EEPConfig()
9982 AdvWaitEEPCmd(iop_base); AdvSet38C1600EEPConfig()
9998 AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvSet38C1600EEPConfig()
9999 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, AdvSet38C1600EEPConfig()
10001 AdvWaitEEPCmd(iop_base); AdvSet38C1600EEPConfig()
10003 AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_DISABLE); AdvSet38C1600EEPConfig()
10004 AdvWaitEEPCmd(iop_base); AdvSet38C1600EEPConfig()
10012 static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, AdvGet3550EEPConfig() argument
10026 wval = AdvReadEEPWord(iop_base, eep_addr); AdvGet3550EEPConfig()
10035 *wbuf = AdvReadEEPWord(iop_base, eep_addr); AdvGet3550EEPConfig()
10042 *wbuf = AdvReadEEPWord(iop_base, eep_addr); AdvGet3550EEPConfig()
10055 static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, AdvGet38C0800EEPConfig() argument
10069 wval = AdvReadEEPWord(iop_base, eep_addr); AdvGet38C0800EEPConfig()
10078 *wbuf = AdvReadEEPWord(iop_base, eep_addr); AdvGet38C0800EEPConfig()
10085 *wbuf = AdvReadEEPWord(iop_base, eep_addr); AdvGet38C0800EEPConfig()
10098 static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, AdvGet38C1600EEPConfig() argument
10112 wval = AdvReadEEPWord(iop_base, eep_addr); AdvGet38C1600EEPConfig()
10121 *wbuf = AdvReadEEPWord(iop_base, eep_addr); AdvGet38C1600EEPConfig()
10128 *wbuf = AdvReadEEPWord(iop_base, eep_addr); AdvGet38C1600EEPConfig()
10150 AdvPortAddr iop_base; AdvInitFrom3550EEP() local
10154 iop_base = asc_dvc->iop_base; AdvInitFrom3550EEP()
10163 if (AdvGet3550EEPConfig(iop_base, &eep_config) != eep_config.check_sum) { AdvInitFrom3550EEP()
10177 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1); AdvInitFrom3550EEP()
10180 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2); AdvInitFrom3550EEP()
10183 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3); AdvInitFrom3550EEP()
10185 AdvSet3550EEPConfig(iop_base, &eep_config); AdvInitFrom3550EEP()
10300 AdvPortAddr iop_base; AdvInitFrom38C0800EEP() local
10306 iop_base = asc_dvc->iop_base; AdvInitFrom38C0800EEP()
10315 if (AdvGet38C0800EEPConfig(iop_base, &eep_config) != AdvInitFrom38C0800EEP()
10330 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1); AdvInitFrom38C0800EEP()
10333 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2); AdvInitFrom38C0800EEP()
10336 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3); AdvInitFrom38C0800EEP()
10338 AdvSet38C0800EEPConfig(iop_base, &eep_config); AdvInitFrom38C0800EEP()
10499 AdvPortAddr iop_base; AdvInitFrom38C1600EEP() local
10505 iop_base = asc_dvc->iop_base; AdvInitFrom38C1600EEP()
10514 if (AdvGet38C1600EEPConfig(iop_base, &eep_config) != AdvInitFrom38C1600EEP()
10546 AdvWriteByteRegister(iop_base, IOPB_GPIO_CNTL, 0); AdvInitFrom38C1600EEP()
10547 ints = AdvReadByteRegister(iop_base, IOPB_GPIO_DATA); AdvInitFrom38C1600EEP()
10557 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1); AdvInitFrom38C1600EEP()
10559 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2); AdvInitFrom38C1600EEP()
10561 AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3); AdvInitFrom38C1600EEP()
10563 AdvSet38C1600EEPConfig(iop_base, &eep_config); AdvInitFrom38C1600EEP()
10722 AdvPortAddr iop_base = asc_dvc->iop_base; AdvInitGetConfig() local
10740 AdvGetChipVersion(iop_base, asc_dvc->bus_type); AdvInitGetConfig()
10743 (ushort)AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1), AdvInitGetConfig()
10747 (ushort)AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0), AdvInitGetConfig()
10753 if (AdvFindSignature(iop_base) == 0) { AdvInitGetConfig()
10770 AdvWriteWordRegister(iop_base, IOPW_CTRL_REG, AdvInitGetConfig()
10773 AdvWriteWordRegister(iop_base, IOPW_CTRL_REG, AdvInitGetConfig()
10938 asc_dvc_varp->iop_base = iop; advansys_board_found()
10965 adv_dvc_varp->iop_base = (AdvPortAddr)boardp->ioremap_addr; advansys_board_found()
10966 ASC_DBG(1, "iop_base: 0x%p\n", adv_dvc_varp->iop_base); advansys_board_found()
11189 shost->io_port = asc_dvc_varp->iop_base; advansys_board_found()
11246 shost->base = AscGetChipBiosAddress(asc_dvc_varp->iop_base, advansys_board_found()
11253 AdvReadWordLram(adv_dvc_varp->iop_base, advansys_board_found()
11255 AdvReadWordLram(adv_dvc_varp->iop_base, advansys_board_found()
11257 AdvReadWordLram(adv_dvc_varp->iop_base, advansys_board_found()
11259 AdvReadWordLram(adv_dvc_varp->iop_base, advansys_board_found()
11434 static unsigned int advansys_isa_irq_no(PortAddr iop_base) advansys_isa_irq_no() argument
11436 unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); advansys_isa_irq_no()
11446 PortAddr iop_base = _asc_def_iop_base[id]; advansys_isa_probe() local
11450 if (!request_region(iop_base, ASC_IOADR_GAP, DRV_NAME)) { advansys_isa_probe()
11451 ASC_DBG(1, "I/O port 0x%x busy\n", iop_base); advansys_isa_probe()
11454 ASC_DBG(1, "probing I/O port 0x%x\n", iop_base); advansys_isa_probe()
11455 if (!AscFindSignature(iop_base)) advansys_isa_probe()
11457 if (!(AscGetChipVersion(iop_base, ASC_IS_ISA) & ASC_CHIP_VER_ISA_BIT)) advansys_isa_probe()
11466 board->irq = advansys_isa_irq_no(iop_base); advansys_isa_probe()
11470 err = advansys_board_found(shost, iop_base, ASC_IS_ISA); advansys_isa_probe()
11480 release_region(iop_base, ASC_IOADR_GAP); advansys_isa_probe()
11512 static unsigned int advansys_vlb_irq_no(PortAddr iop_base) advansys_vlb_irq_no() argument
11514 unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); advansys_vlb_irq_no()
11524 PortAddr iop_base = _asc_def_iop_base[id]; advansys_vlb_probe() local
11528 if (!request_region(iop_base, ASC_IOADR_GAP, DRV_NAME)) { advansys_vlb_probe()
11529 ASC_DBG(1, "I/O port 0x%x busy\n", iop_base); advansys_vlb_probe()
11532 ASC_DBG(1, "probing I/O port 0x%x\n", iop_base); advansys_vlb_probe()
11533 if (!AscFindSignature(iop_base)) advansys_vlb_probe()
11540 if (AscGetChipVersion(iop_base, ASC_IS_VL) > ASC_CHIP_MAX_VER_VL) advansys_vlb_probe()
11549 board->irq = advansys_vlb_irq_no(iop_base); advansys_vlb_probe()
11553 err = advansys_board_found(shost, iop_base, ASC_IS_VL); advansys_vlb_probe()
11563 release_region(iop_base, ASC_IOADR_GAP); advansys_vlb_probe()
7432 advansys_wide_enable_ppr(ADV_DVC_VAR *adv_dvc, AdvPortAddr iop_base, unsigned short tidmask) advansys_wide_enable_ppr() argument
/linux-4.4.14/arch/m68k/mac/
H A Diop.c138 static volatile struct mac_iop *iop_base[NUM_IOPS]; variable in typeref:struct:mac_iop
238 iop_base[IOP_NUM_SCC] = (struct mac_iop *) SCC_IOP_BASE_IIFX; iop_preinit()
240 iop_base[IOP_NUM_SCC] = (struct mac_iop *) SCC_IOP_BASE_QUADRA; iop_preinit()
242 iop_base[IOP_NUM_SCC]->status_ctrl = 0x87; iop_preinit()
245 iop_base[IOP_NUM_SCC] = NULL; iop_preinit()
250 iop_base[IOP_NUM_ISM] = (struct mac_iop *) ISM_IOP_BASE_IIFX; iop_preinit()
252 iop_base[IOP_NUM_ISM] = (struct mac_iop *) ISM_IOP_BASE_QUADRA; iop_preinit()
254 iop_base[IOP_NUM_ISM]->status_ctrl = 0; iop_preinit()
257 iop_base[IOP_NUM_ISM] = NULL; iop_preinit()
271 printk("IOP: detected SCC IOP at %p\n", iop_base[IOP_NUM_SCC]); iop_init()
274 printk("IOP: detected ISM IOP at %p\n", iop_base[IOP_NUM_ISM]); iop_init()
275 iop_start(iop_base[IOP_NUM_ISM]); iop_init()
276 iop_alive(iop_base[IOP_NUM_ISM]); /* clears the alive flag */ iop_init()
312 if (!iop_alive(iop_base[IOP_NUM_ISM])) { iop_register_interrupts()
332 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; iop_listen()
359 iop_writeb(iop_base[iop_num], offset, msg->reply[i]); iop_complete_message()
362 iop_writeb(iop_base[iop_num], iop_complete_message()
364 iop_interrupt(iop_base[msg->iop_num]); iop_complete_message()
375 volatile struct mac_iop *iop = iop_base[msg->iop_num]; iop_do_send()
396 volatile struct mac_iop *iop = iop_base[iop_num]; iop_handle_send()
429 volatile struct mac_iop *iop = iop_base[iop_num]; iop_handle_recv()
483 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; iop_send_message()
505 if (iop_readb(iop_base[iop_num], iop_send_message()
520 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; iop_upload_code()
522 iop_loadaddr(iop_base[iop_num], shared_ram_start); iop_upload_code()
525 iop_base[iop_num]->ram_data = *code_start++; iop_upload_code()
536 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; iop_download_code()
538 iop_loadaddr(iop_base[iop_num], shared_ram_start); iop_download_code()
541 *code_start++ = iop_base[iop_num]->ram_data; iop_download_code()
554 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return code_start; iop_compare_code()
556 iop_loadaddr(iop_base[iop_num], shared_ram_start); iop_compare_code()
559 if (*code_start != iop_base[iop_num]->ram_data) { iop_compare_code()
574 volatile struct mac_iop *iop = iop_base[iop_num]; iop_ism_irq()
/linux-4.4.14/arch/parisc/include/asm/
H A Dropes.h213 void __iomem *iop_base; /* PA_VIEW - for IO port accessor funcs */ member in struct:lba_device
/linux-4.4.14/drivers/parisc/
H A Dlba_pci.c917 ((lba)->iop_base + (((addr)&0xFFFC)<<10) + ((addr)&3))
1100 lba_dev->iop_base = ioremap_nocache(p->start, 64 * 1024 * 1024); lba_pat_resources()

Completed in 281 milliseconds