53c700_d.h_shipped

来自「Linux Kernel 2.6.9 for OMAP1710」· H_SHIPPED 代码 · 共 1,330 行 · 第 1/2 页

H_SHIPPED
1,330
字号
/* DO NOT EDIT - Generated automatically by script_asm.pl */static u32 SCRIPT[] = {/*; Script for the NCR (or symbios) 53c700 and 53c700-66 chip;; Copyright (C) 2001 James.Bottomley@HansenPartnership.com;;-----------------------------------------------------------------------------;;  ;;  This program is free software; you can redistribute it and/or modify;;  it under the terms of the GNU General Public License as published by;;  the Free Software Foundation; either version 2 of the License, or;;  (at your option) any later version.;;;;  This program is distributed in the hope that it will be useful,;;  but WITHOUT ANY WARRANTY; without even the implied warranty of;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the;;  GNU General Public License for more details.;;;;  You should have received a copy of the GNU General Public License;;  along with this program; if not, write to the Free Software;;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.;;;;-----------------------------------------------------------------------------;; This script is designed to be modified for the particular command in; operation.  The particular variables pertaining to the commands are:;ABSOLUTE	Device_ID = 0		; ID of target for commandABSOLUTE	MessageCount = 0	; Number of bytes in messageABSOLUTE	MessageLocation = 0	; Addr of messageABSOLUTE	CommandCount = 0	; Number of bytes in commandABSOLUTE	CommandAddress = 0	; Addr of CommandABSOLUTE	StatusAddress = 0	; Addr to receive status returnABSOLUTE	ReceiveMsgAddress = 0	; Addr to receive msg;; This is the magic component for handling scatter-gather.  Each of the; SG components is preceeded by a script fragment which moves the; necessary amount of data and jumps to the next SG segment.  The final; SG segment jumps back to .  However, this address is the first SG script; segment.;ABSOLUTE	SGScriptStartAddress = 0; The following represent status interrupts we use 3 hex digits for; this: 0xPRS where ; P:ABSOLUTE	AFTER_SELECTION 	= 0x100ABSOLUTE	BEFORE_CMD 		= 0x200ABSOLUTE	AFTER_CMD 		= 0x300ABSOLUTE	AFTER_STATUS 		= 0x400ABSOLUTE	AFTER_DATA_IN		= 0x500ABSOLUTE	AFTER_DATA_OUT		= 0x600ABSOLUTE	DURING_DATA_IN		= 0x700; R:ABSOLUTE	NOT_MSG_OUT 		= 0x10ABSOLUTE	UNEXPECTED_PHASE 	= 0x20ABSOLUTE	NOT_MSG_IN 		= 0x30ABSOLUTE	UNEXPECTED_MSG		= 0x40ABSOLUTE	MSG_IN			= 0x50ABSOLUTE	SDTR_MSG_R		= 0x60ABSOLUTE	REJECT_MSG_R		= 0x70ABSOLUTE	DISCONNECT		= 0x80ABSOLUTE	MSG_OUT			= 0x90ABSOLUTE	WDTR_MSG_R		= 0xA0; S:ABSOLUTE	GOOD_STATUS 		= 0x1; Combinations, since the script assembler can't process |ABSOLUTE	NOT_MSG_OUT_AFTER_SELECTION = 0x110ABSOLUTE	UNEXPECTED_PHASE_BEFORE_CMD = 0x220ABSOLUTE	UNEXPECTED_PHASE_AFTER_CMD = 0x320ABSOLUTE	NOT_MSG_IN_AFTER_STATUS = 0x430ABSOLUTE	GOOD_STATUS_AFTER_STATUS = 0x401ABSOLUTE	UNEXPECTED_PHASE_AFTER_DATA_IN = 0x520ABSOLUTE	UNEXPECTED_PHASE_AFTER_DATA_OUT = 0x620ABSOLUTE	UNEXPECTED_MSG_BEFORE_CMD = 0x240ABSOLUTE	MSG_IN_BEFORE_CMD = 0x250ABSOLUTE	MSG_IN_AFTER_CMD = 0x350ABSOLUTE	SDTR_MSG_BEFORE_CMD = 0x260ABSOLUTE	REJECT_MSG_BEFORE_CMD = 0x270ABSOLUTE	DISCONNECT_AFTER_CMD = 0x380ABSOLUTE	SDTR_MSG_AFTER_CMD = 0x360ABSOLUTE	WDTR_MSG_AFTER_CMD = 0x3A0ABSOLUTE	MSG_IN_AFTER_STATUS = 0x440ABSOLUTE	DISCONNECT_AFTER_DATA = 0x580ABSOLUTE	MSG_IN_AFTER_DATA_IN = 0x550ABSOLUTE	MSG_IN_AFTER_DATA_OUT = 0x650ABSOLUTE	MSG_OUT_AFTER_DATA_IN = 0x590ABSOLUTE	DATA_IN_AFTER_DATA_IN = 0x5a0ABSOLUTE	MSG_IN_DURING_DATA_IN = 0x750ABSOLUTE	DISCONNECT_DURING_DATA = 0x780;; Other interrupt conditions; ABSOLUTE	RESELECTED_DURING_SELECTION = 0x1000ABSOLUTE	COMPLETED_SELECTION_AS_TARGET = 0x1001ABSOLUTE	RESELECTION_IDENTIFIED = 0x1003;; Fatal interrupt conditions.  If you add to this, also add to the; array of corresponding messages;ABSOLUTE	FATAL = 0x2000ABSOLUTE	FATAL_UNEXPECTED_RESELECTION_MSG = 0x2000ABSOLUTE	FATAL_SEND_MSG = 0x2001ABSOLUTE	FATAL_NOT_MSG_IN_AFTER_SELECTION = 0x2002ABSOLUTE	FATAL_ILLEGAL_MSG_LENGTH = 0x2003ABSOLUTE	DEBUG_INTERRUPT	= 0x3000ABSOLUTE	DEBUG_INTERRUPT1 = 0x3001ABSOLUTE	DEBUG_INTERRUPT2 = 0x3002ABSOLUTE	DEBUG_INTERRUPT3 = 0x3003ABSOLUTE	DEBUG_INTERRUPT4 = 0x3004ABSOLUTE	DEBUG_INTERRUPT5 = 0x3005ABSOLUTE	DEBUG_INTERRUPT6 = 0x3006;; SCSI Messages we interpret in the script;ABSOLUTE	COMMAND_COMPLETE_MSG	= 0x00ABSOLUTE	EXTENDED_MSG		= 0x01ABSOLUTE	SDTR_MSG		= 0x01ABSOLUTE	SAVE_DATA_PTRS_MSG	= 0x02ABSOLUTE	RESTORE_DATA_PTRS_MSG	= 0x03ABSOLUTE	WDTR_MSG		= 0x03ABSOLUTE	DISCONNECT_MSG		= 0x04ABSOLUTE	REJECT_MSG		= 0x07ABSOLUTE	PARITY_ERROR_MSG	= 0x09ABSOLUTE	SIMPLE_TAG_MSG		= 0x20ABSOLUTE	IDENTIFY_MSG		= 0x80ABSOLUTE	IDENTIFY_MSG_MASK	= 0x7FABSOLUTE	TWO_BYTE_MSG		= 0x20ABSOLUTE	TWO_BYTE_MSG_MASK	= 0x0F; This is where the script beginsENTRY	StartUpStartUp:	SELECT	ATN Device_ID, Reselectat 0x00000000 : */	0x41000000,0x00000020,/*	JUMP	Finish, WHEN STATUSat 0x00000002 : */	0x830b0000,0x00000460,/*	JUMP	SendIdentifyMsg, IF MSG_OUTat 0x00000004 : */	0x860a0000,0x000001b0,/*	INT	NOT_MSG_OUT_AFTER_SELECTIONat 0x00000006 : */	0x98080000,0x00000110,/*Reselect:	WAIT	RESELECT SelectedAsTargetat 0x00000008 : */	0x50000000,0x00000058,/*	INT	RESELECTED_DURING_SELECTION, WHEN MSG_INat 0x0000000a : */	0x9f0b0000,0x00001000,/*	INT	FATAL_NOT_MSG_IN_AFTER_SELECTIONat 0x0000000c : */	0x98080000,0x00002002,/*	ENTRY	GetReselectionDataGetReselectionData:	MOVE	1, ReceiveMsgAddress, WHEN MSG_INat 0x0000000e : */	0x0f000001,0x00000000,/*	INT	RESELECTION_IDENTIFIEDat 0x00000010 : */	0x98080000,0x00001003,/*	ENTRY	GetReselectionWithTagGetReselectionWithTag:	MOVE	3, ReceiveMsgAddress, WHEN MSG_INat 0x00000012 : */	0x0f000003,0x00000000,/*	INT	RESELECTION_IDENTIFIEDat 0x00000014 : */	0x98080000,0x00001003,/*		ENTRY	SelectedAsTargetSelectedAsTarget:; Basically tell the selecting device that there's nothing here	SET	TARGETat 0x00000016 : */	0x58000200,0x00000000,/*	DISCONNECTat 0x00000018 : */	0x48000000,0x00000000,/*	CLEAR	TARGETat 0x0000001a : */	0x60000200,0x00000000,/*	INT	COMPLETED_SELECTION_AS_TARGETat 0x0000001c : */	0x98080000,0x00001001,/*;; These are the messaging entries;; Send a message.  Message count should be correctly patched	ENTRY	SendMessageSendMessage:	MOVE	MessageCount, MessageLocation, WHEN MSG_OUTat 0x0000001e : */	0x0e000000,0x00000000,/*ResumeSendMessage:	RETURN,	WHEN NOT MSG_OUTat 0x00000020 : */	0x96030000,0x00000000,/*	INT	FATAL_SEND_MSGat 0x00000022 : */	0x98080000,0x00002001,/*	ENTRY	SendMessagePhaseMismatchSendMessagePhaseMismatch:	CLEAR	ACKat 0x00000024 : */	0x60000040,0x00000000,/*	JUMP	ResumeSendMessageat 0x00000026 : */	0x80080000,0x00000080,/*;; Receive a message.  Need to identify the message to; receive it correctly	ENTRY	ReceiveMessageReceiveMessage:	MOVE	1, ReceiveMsgAddress, WHEN MSG_INat 0x00000028 : */	0x0f000001,0x00000000,/*;; Use this entry if we've just tried to look at the first byte; of the message and want to process it furtherProcessReceiveMessage:	JUMP	ReceiveExtendedMessage, IF EXTENDED_MSGat 0x0000002a : */	0x800c0001,0x000000d0,/*	RETURN,	IF NOT TWO_BYTE_MSG, AND MASK TWO_BYTE_MSG_MASKat 0x0000002c : */	0x90040f20,0x00000000,/*	CLEAR	ACKat 0x0000002e : */	0x60000040,0x00000000,/*	MOVE	1, ReceiveMsgAddress + 1, WHEN MSG_INat 0x00000030 : */	0x0f000001,0x00000001,/*	RETURNat 0x00000032 : */	0x90080000,0x00000000,/*ReceiveExtendedMessage:	CLEAR	ACKat 0x00000034 : */	0x60000040,0x00000000,/*	MOVE	1, ReceiveMsgAddress + 1, WHEN MSG_INat 0x00000036 : */	0x0f000001,0x00000001,/*	JUMP	Receive1Byte, IF 0x01at 0x00000038 : */	0x800c0001,0x00000110,/*	JUMP	Receive2Byte, IF 0x02at 0x0000003a : */	0x800c0002,0x00000128,/*	JUMP	Receive3Byte, IF 0x03at 0x0000003c : */	0x800c0003,0x00000140,/*	JUMP	Receive4Byte, IF 0x04at 0x0000003e : */	0x800c0004,0x00000158,/*	JUMP	Receive5Byte, IF 0x05at 0x00000040 : */	0x800c0005,0x00000170,/*	INT	FATAL_ILLEGAL_MSG_LENGTHat 0x00000042 : */	0x98080000,0x00002003,/*Receive1Byte:	CLEAR	ACKat 0x00000044 : */	0x60000040,0x00000000,/*	MOVE	1, ReceiveMsgAddress + 2, WHEN MSG_INat 0x00000046 : */	0x0f000001,0x00000002,/*	RETURNat 0x00000048 : */	0x90080000,0x00000000,/*Receive2Byte:	CLEAR	ACKat 0x0000004a : */	0x60000040,0x00000000,/*	MOVE	2, ReceiveMsgAddress + 2, WHEN MSG_INat 0x0000004c : */	0x0f000002,0x00000002,/*	RETURNat 0x0000004e : */	0x90080000,0x00000000,/*Receive3Byte:	CLEAR	ACKat 0x00000050 : */	0x60000040,0x00000000,/*	MOVE	3, ReceiveMsgAddress + 2, WHEN MSG_INat 0x00000052 : */	0x0f000003,0x00000002,/*	RETURNat 0x00000054 : */	0x90080000,0x00000000,/*Receive4Byte:	CLEAR	ACKat 0x00000056 : */	0x60000040,0x00000000,/*	MOVE	4, ReceiveMsgAddress + 2, WHEN MSG_INat 0x00000058 : */	0x0f000004,0x00000002,/*	RETURNat 0x0000005a : */	0x90080000,0x00000000,/*Receive5Byte:	CLEAR	ACKat 0x0000005c : */	0x60000040,0x00000000,/*	MOVE	5, ReceiveMsgAddress + 2, WHEN MSG_INat 0x0000005e : */	0x0f000005,0x00000002,/*	RETURNat 0x00000060 : */	0x90080000,0x00000000,/*;; Come here from the message processor to ignore the message;	ENTRY	IgnoreMessageIgnoreMessage:	CLEAR	ACKat 0x00000062 : */	0x60000040,0x00000000,/*	RETURNat 0x00000064 : */	0x90080000,0x00000000,/*;; Come here to send a reply to a message;	ENTRY	SendMessageWithATNSendMessageWithATN:	SET	ATNat 0x00000066 : */	0x58000008,0x00000000,/*	CLEAR	ACKat 0x00000068 : */	0x60000040,0x00000000,/*	JUMP	SendMessageat 0x0000006a : */	0x80080000,0x00000078,/*SendIdentifyMsg:	CALL	SendMessageat 0x0000006c : */	0x88080000,0x00000078,/*	CLEAR	ATNat 0x0000006e : */	0x60000008,0x00000000,/*IgnoreMsgBeforeCommand:	CLEAR	ACKat 0x00000070 : */	0x60000040,0x00000000,/*	ENTRY	SendCommandSendCommand:	JUMP	Finish, WHEN STATUSat 0x00000072 : */	0x830b0000,0x00000460,/*	JUMP	MsgInBeforeCommand, IF MSG_INat 0x00000074 : */	0x870a0000,0x000002c0,/*	INT	UNEXPECTED_PHASE_BEFORE_CMD, IF NOT CMDat 0x00000076 : */	0x9a020000,0x00000220,/*	MOVE	CommandCount, CommandAddress, WHEN CMDat 0x00000078 : */	0x0a000000,0x00000000,/*ResumeSendCommand:	JUMP	Finish, WHEN STATUSat 0x0000007a : */	0x830b0000,0x00000460,/*	JUMP	MsgInAfterCmd, IF MSG_INat 0x0000007c : */	0x870a0000,0x00000248,/*	JUMP	DataIn, IF DATA_INat 0x0000007e : */	0x810a0000,0x000002f8,/*	JUMP	DataOut, IF DATA_OUTat 0x00000080 : */	0x800a0000,0x00000338,/*	INT	UNEXPECTED_PHASE_AFTER_CMDat 0x00000082 : */	0x98080000,0x00000320,/*IgnoreMsgDuringData:	CLEAR	ACKat 0x00000084 : */	0x60000040,0x00000000,/*	; fall through to MsgInDuringDataEntry MsgInDuringDataMsgInDuringData:;; Could be we have nothing more to transfer;	JUMP	Finish, WHEN STATUSat 0x00000086 : */	0x830b0000,0x00000460,/*	MOVE	1, ReceiveMsgAddress, WHEN MSG_INat 0x00000088 : */	0x0f000001,0x00000000,/*	JUMP	DisconnectDuringDataIn, IF DISCONNECT_MSGat 0x0000008a : */	0x800c0004,0x00000398,/*	JUMP	IgnoreMsgDuringData, IF SAVE_DATA_PTRS_MSGat 0x0000008c : */	0x800c0002,0x00000210,/*	JUMP	IgnoreMsgDuringData, IF RESTORE_DATA_PTRS_MSGat 0x0000008e : */	0x800c0003,0x00000210,/*	INT	MSG_IN_DURING_DATA_INat 0x00000090 : */	0x98080000,0x00000750,/*MsgInAfterCmd:	MOVE	1, ReceiveMsgAddress, WHEN MSG_INat 0x00000092 : */	0x0f000001,0x00000000,/*	JUMP	DisconnectAfterCmd, IF DISCONNECT_MSGat 0x00000094 : */	0x800c0004,0x00000298,/*	JUMP	IgnoreMsgInAfterCmd, IF SAVE_DATA_PTRS_MSGat 0x00000096 : */	0x800c0002,0x00000288,/*	JUMP	IgnoreMsgInAfterCmd, IF RESTORE_DATA_PTRS_MSGat 0x00000098 : */	0x800c0003,0x00000288,/*	CALL	ProcessReceiveMessageat 0x0000009a : */	0x88080000,0x000000a8,/*	INT	MSG_IN_AFTER_CMDat 0x0000009c : */	0x98080000,0x00000350,/*	CLEAR	ACKat 0x0000009e : */	0x60000040,0x00000000,/*	JUMP	ResumeSendCommandat 0x000000a0 : */	0x80080000,0x000001e8,/*IgnoreMsgInAfterCmd:	CLEAR	ACKat 0x000000a2 : */	0x60000040,0x00000000,/*	JUMP	ResumeSendCommandat 0x000000a4 : */	0x80080000,0x000001e8,/*DisconnectAfterCmd:	CLEAR	ACKat 0x000000a6 : */	0x60000040,0x00000000,/*	WAIT	DISCONNECTat 0x000000a8 : */	0x48000000,0x00000000,/*	ENTRY	Disconnect1Disconnect1:	INT	DISCONNECT_AFTER_CMDat 0x000000aa : */	0x98080000,0x00000380,/*	ENTRY	Disconnect2Disconnect2:; We return here after a reselection	CLEAR	ACKat 0x000000ac : */	0x60000040,0x00000000,/*	JUMP	ResumeSendCommandat 0x000000ae : */	0x80080000,0x000001e8,/*MsgInBeforeCommand:	MOVE	1, ReceiveMsgAddress, WHEN MSG_INat 0x000000b0 : */	0x0f000001,0x00000000,/*	JUMP	IgnoreMsgBeforeCommand, IF SAVE_DATA_PTRS_MSGat 0x000000b2 : */	0x800c0002,0x000001c0,/*	JUMP	IgnoreMsgBeforeCommand, IF RESTORE_DATA_PTRS_MSGat 0x000000b4 : */	0x800c0003,0x000001c0,/*	CALL	ProcessReceiveMessageat 0x000000b6 : */	0x88080000,0x000000a8,/*	INT	MSG_IN_BEFORE_CMDat 0x000000b8 : */	0x98080000,0x00000250,/*	CLEAR	ACKat 0x000000ba : */	0x60000040,0x00000000,/*	JUMP	SendCommandat 0x000000bc : */	0x80080000,0x000001c8,/*DataIn:	CALL	SGScriptStartAddressat 0x000000be : */	0x88080000,0x00000000,/*ResumeDataIn:	JUMP	Finish, WHEN STATUSat 0x000000c0 : */	0x830b0000,0x00000460,/*	JUMP	MsgInAfterDataIn, IF MSG_INat 0x000000c2 : */	0x870a0000,0x00000358,/*	JUMP	DataInAfterDataIn, if DATA_INat 0x000000c4 : */	0x810a0000,0x00000328,/*	INT	MSG_OUT_AFTER_DATA_IN, if MSG_OUTat 0x000000c6 : */	0x9e0a0000,0x00000590,/*	INT	UNEXPECTED_PHASE_AFTER_DATA_INat 0x000000c8 : */	0x98080000,0x00000520,/*DataInAfterDataIn:	INT	DATA_IN_AFTER_DATA_INat 0x000000ca : */	0x98080000,0x000005a0,/*	JUMP	ResumeDataInat 0x000000cc : */	0x80080000,0x00000300,/*DataOut:	CALL	SGScriptStartAddressat 0x000000ce : */	0x88080000,0x00000000,/*ResumeDataOut:	JUMP	Finish, WHEN STATUSat 0x000000d0 : */	0x830b0000,0x00000460,/*	JUMP	MsgInAfterDataOut, IF MSG_INat 0x000000d2 : */	0x870a0000,0x000003e8,/*	INT	UNEXPECTED_PHASE_AFTER_DATA_OUTat 0x000000d4 : */	0x98080000,0x00000620,/*MsgInAfterDataIn:	MOVE	1, ReceiveMsgAddress, WHEN MSG_INat 0x000000d6 : */	0x0f000001,0x00000000,/*	JUMP	DisconnectAfterDataIn, IF DISCONNECT_MSGat 0x000000d8 : */	0x800c0004,0x000003c0,/*

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?