linux/drivers/scsi/wd719x.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _WD719X_H_
#define _WD719X_H_

#define WD719X_SG

struct wd719x_sglist {} __packed;

enum wd719x_card_type {};

wd719x_regs;

/* Spider Command Block (SCB) */
struct wd719x_scb {} __packed;

struct wd719x {};

/* timeout delays in microsecs */
#define WD719X_WAIT_FOR_CMD_READY
#define WD719X_WAIT_FOR_RISC
#define WD719X_WAIT_FOR_SCSI_RESET

/* All commands except 0x00 generate an interrupt */
#define WD719X_CMD_READY
#define WD719X_CMD_INIT_RISC
/* 0x02 is reserved */
#define WD719X_CMD_BUSRESET
#define WD719X_CMD_READ_FIRMVER
#define WD719X_CMD_ECHO_BYTES
/* 0x06 is reserved */
/* 0x07 is reserved */
#define WD719X_CMD_GET_PARAM
#define WD719X_CMD_SET_PARAM
#define WD719X_CMD_SLEEP
#define WD719X_CMD_READ_INIT
#define WD719X_CMD_RESTORE_INIT
/* 0x0d is reserved */
/* 0x0e is reserved */
/* 0x0f is reserved */
#define WD719X_CMD_ABORT_TAG
#define WD719X_CMD_ABORT
#define WD719X_CMD_RESET
#define WD719X_CMD_INIT_SCAM
#define WD719X_CMD_GET_SYNC
#define WD719X_CMD_SET_SYNC
#define WD719X_CMD_GET_WIDTH
#define WD719X_CMD_SET_WIDTH
#define WD719X_CMD_GET_TAGS
#define WD719X_CMD_SET_TAGS
#define WD719X_CMD_GET_PARAM2
#define WD719X_CMD_SET_PARAM2
/* Commands with request pointers (mailbox) */
#define WD719X_CMD_PROCESS_SCB
/* No interrupt generated on acceptance of SCB pointer */

/* interrupt status defines */
#define WD719X_INT_NONE
#define WD719X_INT_NOERRORS
#define WD719X_INT_LINKNOERRORS
#define WD719X_INT_LINKNOSTATUS
#define WD719X_INT_ERRORSLOGGED
#define WD719X_INT_SPIDERFAILED
#define WD719X_INT_BADINT
#define WD719X_INT_PIOREADY

/* Spider Unique Error Codes (SUE) */
#define WD719X_SUE_NOERRORS
#define WD719X_SUE_REJECTED
#define WD719X_SUE_SCBQFULL
/* 0x03 is reserved */
#define WD719X_SUE_TERM
#define WD719X_SUE_CHAN1PAR
#define WD719X_SUE_CHAN1ABORT
#define WD719X_SUE_CHAN23PAR
#define WD719X_SUE_CHAN23ABORT
#define WD719X_SUE_TIMEOUT
#define WD719X_SUE_RESET
#define WD719X_SUE_BUSERROR
#define WD719X_SUE_WRONGWAY
#define WD719X_SUE_BADPHASE
#define WD719X_SUE_TOOLONG
#define WD719X_SUE_BUSFREE
#define WD719X_SUE_ARSDONE
#define WD719X_SUE_IGNORED
#define WD719X_SUE_WRONGTAGS
#define WD719X_SUE_BADTAGS
#define WD719X_SUE_NOSCAMID

/* code sizes */
#define WD719X_HASH_TABLE_SIZE

/* Advanced Mode Registers */
/* Regs 0x00..0x1f are for Advanced Mode of the card (RISC is running). */
#define WD719X_AMR_COMMAND
#define WD719X_AMR_CMD_PARAM
#define WD719X_AMR_CMD_PARAM_2
#define WD719X_AMR_CMD_PARAM_3
#define WD719X_AMR_SCB_IN

#define WD719X_AMR_BIOS_SHARE_INT

#define WD719X_AMR_SCB_OUT
#define WD719X_AMR_OP_CODE
#define WD719X_AMR_SCSI_STATUS
#define WD719X_AMR_SCB_ERROR
#define WD719X_AMR_INT_STATUS

#define WD719X_DISABLE_INT

/* SCB flags */
#define WD719X_SCB_FLAGS_CHECK_DIRECTION
#define WD719X_SCB_FLAGS_PCI_TO_SCSI
#define WD719X_SCB_FLAGS_AUTO_REQUEST_SENSE
#define WD719X_SCB_FLAGS_DO_SCATTER_GATHER
#define WD719X_SCB_FLAGS_NO_DISCONNECT

/* PCI Registers used for reset, initial code download */
/* Regs 0x20..0x3f are for Normal (DOS) mode (RISC is asleep). */
#define WD719X_PCI_GPIO_CONTROL
#define WD719X_PCI_GPIO_DATA
#define WD719X_PCI_PORT_RESET
#define WD719X_PCI_MODE_SELECT

#define WD719X_PCI_EXTERNAL_ADDR
#define WD719X_PCI_INTERNAL_ADDR
#define WD719X_PCI_DMA_TRANSFER_SIZE
#define WD719X_PCI_CHANNEL2_3CMD
#define WD719X_PCI_CHANNEL2_3STATUS

#define WD719X_GPIO_ID_BITS
#define WD719X_PRAM_BASE_ADDR

/* codes written to or read from the card */
#define WD719X_PCI_RESET
#define WD719X_ENABLE_ADVANCE_MODE

#define WD719X_START_CHANNEL2_3DMA
#define WD719X_START_CHANNEL2_3DONE
#define WD719X_START_CHANNEL2_3ABORT

/* 33C296 GPIO bits for EEPROM pins */
#define WD719X_EE_DI
#define WD719X_EE_CS
#define WD719X_EE_CLK
#define WD719X_EE_DO

/* EEPROM contents */
struct wd719x_eeprom_header {} __packed;

#define WD719X_EE_SIG1
#define WD719X_EE_SIG2
#define WD719X_EE_VERSION
#define WD719X_EE_CHECKSUM
#define WD719X_EE_CFG_OFFSET
#define WD719X_EE_CFG_SIZE
#define WD719X_EE_SETUP_OFFSET
#define WD719X_EE_SETUP_SIZE

#define WD719X_EE_SCSI_ID_MASK

/* SPIDER Host Parameters Block (=EEPROM configuration block) */
struct wd719x_host_param {} __packed;

#endif /* _WD719X_H_ */