linux/drivers/scsi/qla4xxx/ql4_83xx.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2013 QLogic Corporation
 */

#ifndef __QL483XX_H
#define __QL483XX_H

/* Indirectly Mapped Registers */
#define QLA83XX_FLASH_SPI_STATUS
#define QLA83XX_FLASH_SPI_CONTROL
#define QLA83XX_FLASH_STATUS
#define QLA83XX_FLASH_CONTROL
#define QLA83XX_FLASH_ADDR
#define QLA83XX_FLASH_WRDATA
#define QLA83XX_FLASH_RDDATA
#define QLA83XX_FLASH_DIRECT_WINDOW
#define QLA83XX_FLASH_DIRECT_DATA(DATA)

/* Directly Mapped Registers in 83xx register table */

/* Flash access regs */
#define QLA83XX_FLASH_LOCK
#define QLA83XX_FLASH_UNLOCK
#define QLA83XX_FLASH_LOCK_ID

/* Driver Lock regs */
#define QLA83XX_DRV_LOCK
#define QLA83XX_DRV_UNLOCK
#define QLA83XX_DRV_LOCK_ID
#define QLA83XX_DRV_LOCKRECOVERY

/* IDC version */
#define QLA83XX_IDC_VER_MAJ_VALUE
#define QLA83XX_IDC_VER_MIN_VALUE

/* IDC Registers : Driver Coexistence Defines */
#define QLA83XX_CRB_IDC_VER_MAJOR
#define QLA83XX_CRB_IDC_VER_MINOR
#define QLA83XX_IDC_DRV_CTRL
#define QLA83XX_IDC_DRV_AUDIT
#define QLA83XX_SRE_SHIM_CONTROL
#define QLA83XX_PORT0_RXB_PAUSE_THRS
#define QLA83XX_PORT1_RXB_PAUSE_THRS
#define QLA83XX_PORT0_RXB_TC_MAX_CELL
#define QLA83XX_PORT1_RXB_TC_MAX_CELL
#define QLA83XX_PORT0_RXB_TC_STATS
#define QLA83XX_PORT1_RXB_TC_STATS
#define QLA83XX_PORT2_IFB_PAUSE_THRS
#define QLA83XX_PORT3_IFB_PAUSE_THRS

/* set value to pause threshold value */
#define QLA83XX_SET_PAUSE_VAL
#define QLA83XX_SET_TC_MAX_CELL_VAL

#define QLA83XX_RESET_CONTROL
#define QLA83XX_RESET_REG
#define QLA83XX_RESET_PORT0
#define QLA83XX_RESET_PORT1
#define QLA83XX_RESET_PORT2
#define QLA83XX_RESET_PORT3
#define QLA83XX_RESET_SRE_SHIM
#define QLA83XX_RESET_EPG_SHIM
#define QLA83XX_RESET_ETHER_PCS

/* qla_83xx_reg_tbl registers */
#define QLA83XX_PEG_HALT_STATUS1
#define QLA83XX_PEG_HALT_STATUS2
#define QLA83XX_PEG_ALIVE_COUNTER
#define QLA83XX_FW_CAPABILITIES
#define QLA83XX_CRB_DRV_ACTIVE
#define QLA83XX_CRB_DEV_STATE
#define QLA83XX_CRB_DRV_STATE
#define QLA83XX_CRB_DRV_SCRATCH
#define QLA83XX_CRB_DEV_PART_INFO1
#define QLA83XX_CRB_DEV_PART_INFO2

#define QLA83XX_FW_VER_MAJOR
#define QLA83XX_FW_VER_MINOR
#define QLA83XX_FW_VER_SUB
#define QLA83XX_NPAR_STATE
#define QLA83XX_FW_IMAGE_VALID
#define QLA83XX_CMDPEG_STATE
#define QLA83XX_ASIC_TEMP
#define QLA83XX_FW_API
#define QLA83XX_DRV_OP_MODE

#define QLA83XX_CRB_WIN_BASE
#define QLA83XX_CRB_WIN_FUNC(f)
#define QLA83XX_SEM_LOCK_BASE
#define QLA83XX_SEM_UNLOCK_BASE
#define QLA83XX_SEM_LOCK_FUNC(f)
#define QLA83XX_SEM_UNLOCK_FUNC(f)
#define QLA83XX_LINK_STATE(f)
#define QLA83XX_LINK_SPEED(f)
#define QLA83XX_MAX_LINK_SPEED(f)
#define QLA83XX_LINK_SPEED_FACTOR

/* FLASH API Defines */
#define QLA83xx_FLASH_MAX_WAIT_USEC
#define QLA83XX_FLASH_LOCK_TIMEOUT
#define QLA83XX_FLASH_SECTOR_SIZE
#define QLA83XX_DRV_LOCK_TIMEOUT
#define QLA83XX_FLASH_SECTOR_ERASE_CMD
#define QLA83XX_FLASH_WRITE_CMD
#define QLA83XX_FLASH_BUFFER_WRITE_CMD
#define QLA83XX_FLASH_READ_RETRY_COUNT
#define QLA83XX_FLASH_STATUS_READY
#define QLA83XX_FLASH_BUFFER_WRITE_MIN
#define QLA83XX_FLASH_BUFFER_WRITE_MAX
#define QLA83XX_FLASH_STATUS_REG_POLL_DELAY
#define QLA83XX_ERASE_MODE
#define QLA83XX_WRITE_MODE
#define QLA83XX_DWORD_WRITE_MODE

#define QLA83XX_GLOBAL_RESET
#define QLA83XX_WILDCARD
#define QLA83XX_INFORMANT
#define QLA83XX_HOST_MBX_CTRL
#define QLA83XX_FW_MBX_CTRL
#define QLA83XX_BOOTLOADER_ADDR
#define QLA83XX_BOOTLOADER_SIZE
#define QLA83XX_FW_IMAGE_ADDR
#define QLA83XX_MBX_INTR_ENABLE
#define QLA83XX_MBX_INTR_MASK

/* IDC Control Register bit defines */
#define DONTRESET_BIT0
#define GRACEFUL_RESET_BIT1

#define QLA83XX_HALT_STATUS_INFORMATIONAL
#define QLA83XX_HALT_STATUS_FW_RESET
#define QLA83XX_HALT_STATUS_UNRECOVERABLE

/* Firmware image definitions */
#define QLA83XX_BOOTLOADER_FLASH_ADDR
#define QLA83XX_BOOT_FROM_FLASH

#define QLA83XX_IDC_PARAM_ADDR
/* Reset template definitions */
#define QLA83XX_MAX_RESET_SEQ_ENTRIES
#define QLA83XX_RESTART_TEMPLATE_SIZE
#define QLA83XX_RESET_TEMPLATE_ADDR
#define QLA83XX_RESET_SEQ_VERSION

/* Reset template entry opcodes */
#define OPCODE_NOP
#define OPCODE_WRITE_LIST
#define OPCODE_READ_WRITE_LIST
#define OPCODE_POLL_LIST
#define OPCODE_POLL_WRITE_LIST
#define OPCODE_READ_MODIFY_WRITE
#define OPCODE_SEQ_PAUSE
#define OPCODE_SEQ_END
#define OPCODE_TMPL_END
#define OPCODE_POLL_READ_LIST

/* Template Header */
#define RESET_TMPLT_HDR_SIGNATURE
struct qla4_83xx_reset_template_hdr {} __packed;

/* Common Entry Header. */
struct qla4_83xx_reset_entry_hdr {} __packed;

/* Generic poll entry type. */
struct qla4_83xx_poll {} __packed;

/* Read modify write entry type. */
struct qla4_83xx_rmw {} __packed;

/* Generic Entry Item with 2 DWords. */
struct qla4_83xx_entry {} __packed;

/* Generic Entry Item with 4 DWords.*/
struct qla4_83xx_quad_entry {} __packed;

struct qla4_83xx_reset_template {};

/* POLLRD Entry */
struct qla83xx_minidump_entry_pollrd {};

struct qla8044_minidump_entry_rddfe {} __packed;

struct qla8044_minidump_entry_rdmdio {} __packed;

struct qla8044_minidump_entry_pollwr {} __packed;

/* RDMUX2 Entry */
struct qla83xx_minidump_entry_rdmux2 {};

/* POLLRDMWR Entry */
struct qla83xx_minidump_entry_pollrdmwr {};

/* IDC additional information */
struct qla4_83xx_idc_information {};

#define QLA83XX_PEX_DMA_ENGINE_INDEX
#define QLA83XX_PEX_DMA_BASE_ADDRESS
#define QLA83XX_PEX_DMA_NUM_OFFSET
#define QLA83XX_PEX_DMA_CMD_ADDR_LOW
#define QLA83XX_PEX_DMA_CMD_ADDR_HIGH
#define QLA83XX_PEX_DMA_CMD_STS_AND_CNTRL

#define QLA83XX_PEX_DMA_READ_SIZE
#define QLA83XX_PEX_DMA_MAX_WAIT

/* Read Memory: For Pex-DMA */
struct qla4_83xx_minidump_entry_rdmem_pex_dma {};

struct qla4_83xx_pex_dma_descriptor {} __packed;

#endif