linux/drivers/scsi/qla2xxx/qla_nx.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * QLogic Fibre Channel HBA Driver
 * Copyright (c)  2003-2014 QLogic Corporation
 */
#ifndef __QLA_NX_H
#define __QLA_NX_H

#include <scsi/scsi.h>

/*
 * Following are the states of the Phantom. Phantom will set them and
 * Host will read to check if the fields are correct.
*/
#define PHAN_INITIALIZE_FAILED
#define PHAN_INITIALIZE_COMPLETE

/* Host writes the following to notify that it has done the init-handshake */
#define PHAN_INITIALIZE_ACK
#define PHAN_PEG_RCV_INITIALIZED

/*CRB_RELATED*/
#define QLA82XX_CRB_BASE
#define QLA82XX_REG(X)

#define CRB_CMDPEG_STATE
#define CRB_RCVPEG_STATE
#define BOOT_LOADER_DIMM_STATUS
#define CRB_DMA_SHIFT
#define CRB_TEMP_STATE
#define QLA82XX_DMA_SHIFT_VALUE

#define QLA82XX_HW_H0_CH_HUB_ADR
#define QLA82XX_HW_H1_CH_HUB_ADR
#define QLA82XX_HW_H2_CH_HUB_ADR
#define QLA82XX_HW_H3_CH_HUB_ADR
#define QLA82XX_HW_H4_CH_HUB_ADR
#define QLA82XX_HW_H5_CH_HUB_ADR
#define QLA82XX_HW_H6_CH_HUB_ADR

/*  Hub 0 */
#define QLA82XX_HW_MN_CRB_AGT_ADR
#define QLA82XX_HW_MS_CRB_AGT_ADR

/*  Hub 1 */
#define QLA82XX_HW_PS_CRB_AGT_ADR
#define QLA82XX_HW_QMS_CRB_AGT_ADR
#define QLA82XX_HW_RPMX3_CRB_AGT_ADR
#define QLA82XX_HW_SQGS0_CRB_AGT_ADR
#define QLA82XX_HW_SQGS1_CRB_AGT_ADR
#define QLA82XX_HW_SQGS2_CRB_AGT_ADR
#define QLA82XX_HW_SQGS3_CRB_AGT_ADR
#define QLA82XX_HW_C2C0_CRB_AGT_ADR
#define QLA82XX_HW_C2C1_CRB_AGT_ADR
#define QLA82XX_HW_C2C2_CRB_AGT_ADR
#define QLA82XX_HW_RPMX2_CRB_AGT_ADR
#define QLA82XX_HW_RPMX4_CRB_AGT_ADR
#define QLA82XX_HW_RPMX7_CRB_AGT_ADR
#define QLA82XX_HW_RPMX9_CRB_AGT_ADR
#define QLA82XX_HW_SMB_CRB_AGT_ADR

/*  Hub 2 */
#define QLA82XX_HW_NIU_CRB_AGT_ADR
#define QLA82XX_HW_I2C0_CRB_AGT_ADR
#define QLA82XX_HW_I2C1_CRB_AGT_ADR

#define QLA82XX_HW_SN_CRB_AGT_ADR
#define QLA82XX_HW_I2Q_CRB_AGT_ADR
#define QLA82XX_HW_LPC_CRB_AGT_ADR
#define QLA82XX_HW_ROMUSB_CRB_AGT_ADR
#define QLA82XX_HW_QM_CRB_AGT_ADR
#define QLA82XX_HW_SQG0_CRB_AGT_ADR
#define QLA82XX_HW_SQG1_CRB_AGT_ADR
#define QLA82XX_HW_SQG2_CRB_AGT_ADR
#define QLA82XX_HW_SQG3_CRB_AGT_ADR
#define QLA82XX_HW_RPMX1_CRB_AGT_ADR
#define QLA82XX_HW_RPMX5_CRB_AGT_ADR
#define QLA82XX_HW_RPMX6_CRB_AGT_ADR
#define QLA82XX_HW_RPMX8_CRB_AGT_ADR

/*  Hub 3 */
#define QLA82XX_HW_PH_CRB_AGT_ADR
#define QLA82XX_HW_SRE_CRB_AGT_ADR
#define QLA82XX_HW_EG_CRB_AGT_ADR
#define QLA82XX_HW_RPMX0_CRB_AGT_ADR

/*  Hub 4 */
#define QLA82XX_HW_PEGN0_CRB_AGT_ADR
#define QLA82XX_HW_PEGN1_CRB_AGT_ADR
#define QLA82XX_HW_PEGN2_CRB_AGT_ADR
#define QLA82XX_HW_PEGN3_CRB_AGT_ADR
#define QLA82XX_HW_PEGNI_CRB_AGT_ADR
#define QLA82XX_HW_PEGND_CRB_AGT_ADR
#define QLA82XX_HW_PEGNC_CRB_AGT_ADR
#define QLA82XX_HW_PEGR0_CRB_AGT_ADR
#define QLA82XX_HW_PEGR1_CRB_AGT_ADR
#define QLA82XX_HW_PEGR2_CRB_AGT_ADR
#define QLA82XX_HW_PEGR3_CRB_AGT_ADR
#define QLA82XX_HW_PEGN4_CRB_AGT_ADR

/*  Hub 5 */
#define QLA82XX_HW_PEGS0_CRB_AGT_ADR
#define QLA82XX_HW_PEGS1_CRB_AGT_ADR
#define QLA82XX_HW_PEGS2_CRB_AGT_ADR
#define QLA82XX_HW_PEGS3_CRB_AGT_ADR
#define QLA82XX_HW_PEGSI_CRB_AGT_ADR
#define QLA82XX_HW_PEGSD_CRB_AGT_ADR
#define QLA82XX_HW_PEGSC_CRB_AGT_ADR

/*  Hub 6 */
#define QLA82XX_HW_CAS0_CRB_AGT_ADR
#define QLA82XX_HW_CAS1_CRB_AGT_ADR
#define QLA82XX_HW_CAS2_CRB_AGT_ADR
#define QLA82XX_HW_CAS3_CRB_AGT_ADR
#define QLA82XX_HW_NCM_CRB_AGT_ADR
#define QLA82XX_HW_TMR_CRB_AGT_ADR
#define QLA82XX_HW_XDMA_CRB_AGT_ADR
#define QLA82XX_HW_OCM0_CRB_AGT_ADR
#define QLA82XX_HW_OCM1_CRB_AGT_ADR

/*  This field defines PCI/X adr [25:20] of agents on the CRB */
/*  */
#define QLA82XX_HW_PX_MAP_CRB_PH
#define QLA82XX_HW_PX_MAP_CRB_PS
#define QLA82XX_HW_PX_MAP_CRB_MN
#define QLA82XX_HW_PX_MAP_CRB_MS
#define QLA82XX_HW_PX_MAP_CRB_SRE
#define QLA82XX_HW_PX_MAP_CRB_NIU
#define QLA82XX_HW_PX_MAP_CRB_QMN
#define QLA82XX_HW_PX_MAP_CRB_SQN0
#define QLA82XX_HW_PX_MAP_CRB_SQN1
#define QLA82XX_HW_PX_MAP_CRB_SQN2
#define QLA82XX_HW_PX_MAP_CRB_SQN3
#define QLA82XX_HW_PX_MAP_CRB_QMS
#define QLA82XX_HW_PX_MAP_CRB_SQS0
#define QLA82XX_HW_PX_MAP_CRB_SQS1
#define QLA82XX_HW_PX_MAP_CRB_SQS2
#define QLA82XX_HW_PX_MAP_CRB_SQS3
#define QLA82XX_HW_PX_MAP_CRB_PGN0
#define QLA82XX_HW_PX_MAP_CRB_PGN1
#define QLA82XX_HW_PX_MAP_CRB_PGN2
#define QLA82XX_HW_PX_MAP_CRB_PGN3
#define QLA82XX_HW_PX_MAP_CRB_PGN4
#define QLA82XX_HW_PX_MAP_CRB_PGND
#define QLA82XX_HW_PX_MAP_CRB_PGNI
#define QLA82XX_HW_PX_MAP_CRB_PGS0
#define QLA82XX_HW_PX_MAP_CRB_PGS1
#define QLA82XX_HW_PX_MAP_CRB_PGS2
#define QLA82XX_HW_PX_MAP_CRB_PGS3
#define QLA82XX_HW_PX_MAP_CRB_PGSD
#define QLA82XX_HW_PX_MAP_CRB_PGSI
#define QLA82XX_HW_PX_MAP_CRB_SN
#define QLA82XX_HW_PX_MAP_CRB_EG
#define QLA82XX_HW_PX_MAP_CRB_PH2
#define QLA82XX_HW_PX_MAP_CRB_PS2
#define QLA82XX_HW_PX_MAP_CRB_CAM
#define QLA82XX_HW_PX_MAP_CRB_CAS0
#define QLA82XX_HW_PX_MAP_CRB_CAS1
#define QLA82XX_HW_PX_MAP_CRB_CAS2
#define QLA82XX_HW_PX_MAP_CRB_C2C0
#define QLA82XX_HW_PX_MAP_CRB_C2C1
#define QLA82XX_HW_PX_MAP_CRB_TIMR
#define QLA82XX_HW_PX_MAP_CRB_RPMX1
#define QLA82XX_HW_PX_MAP_CRB_RPMX2
#define QLA82XX_HW_PX_MAP_CRB_RPMX3
#define QLA82XX_HW_PX_MAP_CRB_RPMX4
#define QLA82XX_HW_PX_MAP_CRB_RPMX5
#define QLA82XX_HW_PX_MAP_CRB_RPMX6
#define QLA82XX_HW_PX_MAP_CRB_RPMX7
#define QLA82XX_HW_PX_MAP_CRB_XDMA
#define QLA82XX_HW_PX_MAP_CRB_I2Q
#define QLA82XX_HW_PX_MAP_CRB_ROMUSB
#define QLA82XX_HW_PX_MAP_CRB_CAS3
#define QLA82XX_HW_PX_MAP_CRB_RPMX0
#define QLA82XX_HW_PX_MAP_CRB_RPMX8
#define QLA82XX_HW_PX_MAP_CRB_RPMX9
#define QLA82XX_HW_PX_MAP_CRB_OCM0
#define QLA82XX_HW_PX_MAP_CRB_OCM1
#define QLA82XX_HW_PX_MAP_CRB_SMB
#define QLA82XX_HW_PX_MAP_CRB_I2C0
#define QLA82XX_HW_PX_MAP_CRB_I2C1
#define QLA82XX_HW_PX_MAP_CRB_LPC
#define QLA82XX_HW_PX_MAP_CRB_PGNC
#define QLA82XX_HW_PX_MAP_CRB_PGR0
#define QLA82XX_HW_PX_MAP_CRB_PGR1
#define QLA82XX_HW_PX_MAP_CRB_PGR2
#define QLA82XX_HW_PX_MAP_CRB_PGR3

/*  This field defines CRB adr [31:20] of the agents */
/*  */

#define QLA82XX_HW_CRB_HUB_AGT_ADR_MN
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PH
#define QLA82XX_HW_CRB_HUB_AGT_ADR_MS
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PS
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SS
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_QMS
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQS0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQS1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQS2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQS3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_C2C0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_C2C1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX4
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX7
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX9
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SMB
#define QLA82XX_HW_CRB_HUB_AGT_ADR_NIU
#define QLA82XX_HW_CRB_HUB_AGT_ADR_I2C0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_I2C1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SRE
#define QLA82XX_HW_CRB_HUB_AGT_ADR_EG
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_QMN
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQN0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQN1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQN2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SQN3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX5
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX6
#define QLA82XX_HW_CRB_HUB_AGT_ADR_RPMX8
#define QLA82XX_HW_CRB_HUB_AGT_ADR_CAS0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_CAS1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_CAS2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_CAS3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGNI
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGND
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGN0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGN1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGN2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGN3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGN4
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGNC
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGR0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGR1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGR2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGR3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGSI
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGSD
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGS0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGS1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGS2
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGS3
#define QLA82XX_HW_CRB_HUB_AGT_ADR_PGSC
#define QLA82XX_HW_CRB_HUB_AGT_ADR_CAM
#define QLA82XX_HW_CRB_HUB_AGT_ADR_TIMR
#define QLA82XX_HW_CRB_HUB_AGT_ADR_XDMA
#define QLA82XX_HW_CRB_HUB_AGT_ADR_SN
#define QLA82XX_HW_CRB_HUB_AGT_ADR_I2Q
#define QLA82XX_HW_CRB_HUB_AGT_ADR_ROMUSB
#define QLA82XX_HW_CRB_HUB_AGT_ADR_OCM0
#define QLA82XX_HW_CRB_HUB_AGT_ADR_OCM1
#define QLA82XX_HW_CRB_HUB_AGT_ADR_LPC

#define ROMUSB_GLB
#define QLA82XX_ROMUSB_GLB_PEGTUNE_DONE
#define QLA82XX_ROMUSB_GLB_STATUS
#define QLA82XX_ROMUSB_GLB_SW_RESET
#define QLA82XX_ROMUSB_ROM_ADDRESS
#define QLA82XX_ROMUSB_ROM_WDATA
#define QLA82XX_ROMUSB_ROM_ABYTE_CNT
#define QLA82XX_ROMUSB_ROM_DUMMY_BYTE_CNT
#define QLA82XX_ROMUSB_ROM_RDATA

#define ROMUSB_ROM
#define QLA82XX_ROMUSB_ROM_INSTR_OPCODE
#define QLA82XX_ROMUSB_GLB_CAS_RST

#define QLA82XX_PCI_CRB_WINDOWSIZE
#define QLA82XX_PCI_CRB_WINDOW(A)
#define QLA82XX_CRB_C2C_0
#define QLA82XX_CRB_C2C_1
#define QLA82XX_CRB_C2C_2
#define QLA82XX_CRB_CAM
#define QLA82XX_CRB_CASPER
#define QLA82XX_CRB_CASPER_0
#define QLA82XX_CRB_CASPER_1
#define QLA82XX_CRB_CASPER_2
#define QLA82XX_CRB_DDR_MD
#define QLA82XX_CRB_DDR_NET
#define QLA82XX_CRB_EPG
#define QLA82XX_CRB_I2Q
#define QLA82XX_CRB_NIU

#define QLA82XX_CRB_PCIX_HOST
#define QLA82XX_CRB_PCIX_HOST2
#define QLA82XX_CRB_PCIX_MD
#define QLA82XX_CRB_PCIE

/* window 1 pcie slot */
#define QLA82XX_CRB_PCIE2
#define QLA82XX_CRB_PEG_MD_0
#define QLA82XX_CRB_PEG_MD_1
#define QLA82XX_CRB_PEG_MD_2
#define QLA82XX_CRB_PEG_MD_3
#define QLA82XX_CRB_PEG_MD_3
#define QLA82XX_CRB_PEG_MD_D
#define QLA82XX_CRB_PEG_MD_I
#define QLA82XX_CRB_PEG_NET_0
#define QLA82XX_CRB_PEG_NET_1
#define QLA82XX_CRB_PEG_NET_2
#define QLA82XX_CRB_PEG_NET_3
#define QLA82XX_CRB_PEG_NET_4
#define QLA82XX_CRB_PEG_NET_D
#define QLA82XX_CRB_PEG_NET_I
#define QLA82XX_CRB_PQM_MD
#define QLA82XX_CRB_PQM_NET
#define QLA82XX_CRB_QDR_MD
#define QLA82XX_CRB_QDR_NET
#define QLA82XX_CRB_ROMUSB
#define QLA82XX_CRB_RPMX_0
#define QLA82XX_CRB_RPMX_1
#define QLA82XX_CRB_RPMX_2
#define QLA82XX_CRB_RPMX_3
#define QLA82XX_CRB_RPMX_4
#define QLA82XX_CRB_RPMX_5
#define QLA82XX_CRB_RPMX_6
#define QLA82XX_CRB_RPMX_7
#define QLA82XX_CRB_SQM_MD_0
#define QLA82XX_CRB_SQM_MD_1
#define QLA82XX_CRB_SQM_MD_2
#define QLA82XX_CRB_SQM_MD_3
#define QLA82XX_CRB_SQM_NET_0
#define QLA82XX_CRB_SQM_NET_1
#define QLA82XX_CRB_SQM_NET_2
#define QLA82XX_CRB_SQM_NET_3
#define QLA82XX_CRB_SRE
#define QLA82XX_CRB_TIMER
#define QLA82XX_CRB_XDMA
#define QLA82XX_CRB_I2C0
#define QLA82XX_CRB_I2C1
#define QLA82XX_CRB_OCM0
#define QLA82XX_CRB_SMB
#define QLA82XX_CRB_MAX

/*
 * ====================== BASE ADDRESSES ON-CHIP ======================
 * Base addresses of major components on-chip.
 * ====================== BASE ADDRESSES ON-CHIP ======================
 */
#define QLA82XX_ADDR_DDR_NET
#define QLA82XX_ADDR_DDR_NET_MAX

/* Imbus address bit used to indicate a host address. This bit is
 * eliminated by the pcie bar and bar select before presentation
 * over pcie. */
/* host memory via IMBUS */
#define QLA82XX_P2_ADDR_PCIE
#define QLA82XX_P3_ADDR_PCIE
#define QLA82XX_ADDR_PCIE_MAX
#define QLA82XX_ADDR_OCM0
#define QLA82XX_ADDR_OCM0_MAX
#define QLA82XX_ADDR_OCM1
#define QLA82XX_ADDR_OCM1_MAX
#define QLA82XX_ADDR_QDR_NET
#define QLA82XX_P3_ADDR_QDR_NET_MAX

#define QLA82XX_PCI_CRBSPACE
#define QLA82XX_PCI_DIRECT_CRB
#define QLA82XX_PCI_CAMQM
#define QLA82XX_PCI_CAMQM_MAX
#define QLA82XX_PCI_DDR_NET
#define QLA82XX_PCI_QDR_NET
#define QLA82XX_PCI_QDR_NET_MAX

/*
 *   Register offsets for MN
 */
#define MIU_CONTROL
#define MIU_TAG
#define MIU_TEST_AGT_CTRL
#define MIU_TEST_AGT_ADDR_LO
#define MIU_TEST_AGT_ADDR_HI
#define MIU_TEST_AGT_WRDATA_LO
#define MIU_TEST_AGT_WRDATA_HI
#define MIU_TEST_AGT_WRDATA(i)
#define MIU_TEST_AGT_RDDATA_LO
#define MIU_TEST_AGT_RDDATA_HI
#define MIU_TEST_AGT_RDDATA(i)
#define MIU_TEST_AGT_ADDR_MASK
#define MIU_TEST_AGT_UPPER_ADDR(off)

/* MIU_TEST_AGT_CTRL flags. work for SIU as well */
#define MIU_TA_CTL_START
#define MIU_TA_CTL_ENABLE
#define MIU_TA_CTL_WRITE
#define MIU_TA_CTL_BUSY

/*CAM RAM */
#define QLA82XX_CAM_RAM_BASE
#define QLA82XX_CAM_RAM(reg)

#define QLA82XX_PORT_MODE_ADDR
#define QLA82XX_PEG_HALT_STATUS1
#define QLA82XX_PEG_HALT_STATUS2
#define QLA82XX_PEG_ALIVE_COUNTER

#define QLA82XX_CAMRAM_DB1
#define QLA82XX_CAMRAM_DB2

#define HALT_STATUS_UNRECOVERABLE
#define HALT_STATUS_RECOVERABLE

/* Driver Coexistence Defines */
#define QLA82XX_CRB_DRV_ACTIVE
#define QLA82XX_CRB_DEV_STATE
#define QLA82XX_CRB_DRV_STATE
#define QLA82XX_CRB_DRV_SCRATCH
#define QLA82XX_CRB_DEV_PART_INFO
#define QLA82XX_CRB_DRV_IDC_VERSION

/* Every driver should use these Device State */
enum {};

#define QLA8XXX_BAD_VALUE

#define QLA82XX_IDC_VERSION
#define QLA82XX_ROM_DEV_INIT_TIMEOUT
#define QLA82XX_ROM_DRV_RESET_ACK_TIMEOUT

#define QLA82XX_ROM_LOCK_ID
#define QLA82XX_CRB_WIN_LOCK_ID
#define QLA82XX_FW_VERSION_MAJOR
#define QLA82XX_FW_VERSION_MINOR
#define QLA82XX_FW_VERSION_SUB
#define QLA82XX_PCIE_REG(reg)

#define PCIE_SETUP_FUNCTION
#define PCIE_SETUP_FUNCTION2

#define QLA82XX_PCIX_PS_REG(reg)
#define QLA82XX_PCIX_PS2_REG(reg)

#define PCIE_SEM2_LOCK
#define PCIE_SEM2_UNLOCK
#define PCIE_SEM5_LOCK
#define PCIE_SEM5_UNLOCK
#define PCIE_SEM7_LOCK
#define PCIE_SEM7_UNLOCK

/* Different drive state */
#define QLA82XX_DRVST_NOT_RDY
#define QLA82XX_DRVST_RST_RDY
#define QLA82XX_DRVST_QSNT_RDY

/* Different drive active state */
#define QLA82XX_DRV_NOT_ACTIVE
#define QLA82XX_DRV_ACTIVE

/*
 * The PCI VendorID and DeviceID for our board.
 */
#define PCI_DEVICE_ID_QLOGIC_ISP8021
#define PCI_DEVICE_ID_QLOGIC_ISP8044

#define QLA82XX_MSIX_TBL_SPACE
#define QLA82XX_PCI_REG_MSIX_TBL
#define QLA82XX_PCI_MSIX_CONTROL

struct crb_128M_2M_sub_block_map {};

struct crb_128M_2M_block_map {};

struct crb_addr_pair {};

#define ADDR_ERROR
#define MAX_CTL_CHECK

/***************************************************************************
 *		PCI related defines.
 **************************************************************************/

/*
 * Interrupt related defines.
 */
#define PCIX_TARGET_STATUS
#define PCIX_TARGET_STATUS_F1
#define PCIX_TARGET_STATUS_F2
#define PCIX_TARGET_STATUS_F3
#define PCIX_TARGET_STATUS_F4
#define PCIX_TARGET_STATUS_F5
#define PCIX_TARGET_STATUS_F6
#define PCIX_TARGET_STATUS_F7

#define PCIX_TARGET_MASK
#define PCIX_TARGET_MASK_F1
#define PCIX_TARGET_MASK_F2
#define PCIX_TARGET_MASK_F3
#define PCIX_TARGET_MASK_F4
#define PCIX_TARGET_MASK_F5
#define PCIX_TARGET_MASK_F6
#define PCIX_TARGET_MASK_F7

/*
 * Message Signaled Interrupts
 */
#define PCIX_MSI_F0
#define PCIX_MSI_F1
#define PCIX_MSI_F2
#define PCIX_MSI_F3
#define PCIX_MSI_F4
#define PCIX_MSI_F5
#define PCIX_MSI_F6
#define PCIX_MSI_F7
#define PCIX_MSI_F(FUNC)
#define PCIX_INT_VECTOR
#define PCIX_INT_MASK

/*
 * Interrupt state machine and other bits.
 */
#define PCIE_MISCCFG_RC

#define ISR_INT_TARGET_STATUS
#define ISR_INT_TARGET_STATUS_F1
#define ISR_INT_TARGET_STATUS_F2
#define ISR_INT_TARGET_STATUS_F3
#define ISR_INT_TARGET_STATUS_F4
#define ISR_INT_TARGET_STATUS_F5
#define ISR_INT_TARGET_STATUS_F6
#define ISR_INT_TARGET_STATUS_F7

#define ISR_INT_TARGET_MASK
#define ISR_INT_TARGET_MASK_F1
#define ISR_INT_TARGET_MASK_F2
#define ISR_INT_TARGET_MASK_F3
#define ISR_INT_TARGET_MASK_F4
#define ISR_INT_TARGET_MASK_F5
#define ISR_INT_TARGET_MASK_F6
#define ISR_INT_TARGET_MASK_F7

#define ISR_INT_VECTOR
#define ISR_INT_MASK
#define ISR_INT_STATE_REG

#define ISR_MSI_INT_TRIGGER(FUNC)

#define ISR_IS_LEGACY_INTR_IDLE(VAL)
#define ISR_IS_LEGACY_INTR_TRIGGERED(VAL)

/*
 * PCI Interrupt Vector Values.
 */
#define PCIX_INT_VECTOR_BIT_F0
#define PCIX_INT_VECTOR_BIT_F1
#define PCIX_INT_VECTOR_BIT_F2
#define PCIX_INT_VECTOR_BIT_F3
#define PCIX_INT_VECTOR_BIT_F4
#define PCIX_INT_VECTOR_BIT_F5
#define PCIX_INT_VECTOR_BIT_F6
#define PCIX_INT_VECTOR_BIT_F7

struct qla82xx_legacy_intr_set {};

#define QLA82XX_LEGACY_INTR_CONFIG

#define BRDCFG_START
#define BOOTLD_START
#define IMAGE_START
#define FLASH_ADDR_START

/* Magic number to let user know flash is programmed */
#define QLA82XX_BDINFO_MAGIC
#define QLA82XX_FW_MAGIC_OFFSET
#define FW_SIZE_OFFSET
#define QLA82XX_FW_MIN_SIZE

/* UNIFIED ROMIMAGE START */
#define QLA82XX_URI_FW_MIN_SIZE
#define QLA82XX_URI_DIR_SECT_PRODUCT_TBL
#define QLA82XX_URI_DIR_SECT_BOOTLD
#define QLA82XX_URI_DIR_SECT_FW

/* Offsets */
#define QLA82XX_URI_CHIP_REV_OFF
#define QLA82XX_URI_FLAGS_OFF
#define QLA82XX_URI_BIOS_VERSION_OFF
#define QLA82XX_URI_BOOTLD_IDX_OFF
#define QLA82XX_URI_FIRMWARE_IDX_OFF

struct qla82xx_uri_table_desc{};

struct qla82xx_uri_data_desc{};

/* UNIFIED ROMIMAGE END */

#define QLA82XX_UNIFIED_ROMIMAGE
#define QLA82XX_FLASH_ROMIMAGE
#define QLA82XX_UNKNOWN_ROMIMAGE

#define MIU_TEST_AGT_WRDATA_UPPER_LO
#define MIU_TEST_AGT_WRDATA_UPPER_HI

/* Request and response queue size */
#define REQUEST_ENTRY_CNT_82XX
#define RESPONSE_ENTRY_CNT_82XX

/*
 * ISP 8021 I/O Register Set structure definitions.
 */
struct device_reg_82xx {};

struct fcp_cmnd {};

struct dsd_dma {};

#define QLA_DSDS_PER_IOCB
#define QLA_DSD_SIZE
struct ct6_dsd {};

#define MBC_TOGGLE_INTERRUPT
#define MBC_SET_LED_CONFIG
#define MBC_GET_LED_CONFIG

/* Flash  offset */
#define FLT_REG_BOOTLOAD_82XX
#define FLT_REG_BOOT_CODE_82XX
#define FLT_REG_FW_82XX
#define FLT_REG_GOLD_FW_82XX
#define FLT_REG_VPD_8XXX

#define FA_VPD_SIZE_82XX

#define FA_FLASH_LAYOUT_ADDR_82

/******************************************************************************
*
*    Definitions specific to M25P flash
*
*******************************************************************************
*   Instructions
*/
#define M25P_INSTR_WREN
#define M25P_INSTR_WRDI
#define M25P_INSTR_RDID
#define M25P_INSTR_RDSR
#define M25P_INSTR_WRSR
#define M25P_INSTR_READ
#define M25P_INSTR_FAST_READ
#define M25P_INSTR_PP
#define M25P_INSTR_SE
#define M25P_INSTR_BE
#define M25P_INSTR_DP
#define M25P_INSTR_RES

/* Minidump related */

/*
 * Version of the template
 * 4 Bytes
 * X.Major.Minor.RELEASE
 */
#define QLA82XX_MINIDUMP_VERSION

/*
 * Entry Type Defines
 */
#define QLA82XX_RDNOP
#define QLA82XX_RDCRB
#define QLA82XX_RDMUX
#define QLA82XX_QUEUE
#define QLA82XX_BOARD
#define QLA82XX_RDSRE
#define QLA82XX_RDOCM
#define QLA82XX_CACHE
#define QLA82XX_L1DAT
#define QLA82XX_L1INS
#define QLA82XX_L2DTG
#define QLA82XX_L2ITG
#define QLA82XX_L2DAT
#define QLA82XX_L2INS
#define QLA82XX_RDROM
#define QLA82XX_RDMEM
#define QLA82XX_CNTRL
#define QLA82XX_TLHDR
#define QLA82XX_RDEND
#define QLA8044_POLLRD
#define QLA8044_RDMUX2
#define QLA8044_L1DTG
#define QLA8044_L1ITG
#define QLA8044_POLLRDMWR

/*
 * Opcodes for Control Entries.
 * These Flags are bit fields.
 */
#define QLA82XX_DBG_OPCODE_WR
#define QLA82XX_DBG_OPCODE_RW
#define QLA82XX_DBG_OPCODE_AND
#define QLA82XX_DBG_OPCODE_OR
#define QLA82XX_DBG_OPCODE_POLL
#define QLA82XX_DBG_OPCODE_RDSTATE
#define QLA82XX_DBG_OPCODE_WRSTATE
#define QLA82XX_DBG_OPCODE_MDSTATE

/*
 * Template Header and Entry Header definitions start here.
 */

/*
 * Template Header
 * Parts of the template header can be modified by the driver.
 * These include the saved_state_array, capture_debug_level, driver_timestamp
 */

#define QLA82XX_DBG_STATE_ARRAY_LEN
#define QLA82XX_DBG_CAP_SIZE_ARRAY_LEN
#define QLA82XX_DBG_RSVD_ARRAY_LEN

/*
 * Driver Flags
 */
#define QLA82XX_DBG_SKIPPED_FLAG
#define QLA82XX_DEFAULT_CAP_MASK

struct qla82xx_md_template_hdr {} __packed;

/*
 * Entry Header:  Common to All Entry Types
 */

/*
 * Driver Code is for driver to write some info about the entry.
 * Currently not used.
 */
qla82xx_md_entry_hdr_t;

/*
 *  Read CRB entry header
 */
struct qla82xx_md_entry_crb {} __packed;

/*
 * Cache entry header
 */
struct qla82xx_md_entry_cache {} __packed;

/*
 * Read OCM
 */
struct qla82xx_md_entry_rdocm {} __packed;

/*
 * Read Memory
 */
struct qla82xx_md_entry_rdmem {} __packed;

/*
 * Read ROM
 */
struct qla82xx_md_entry_rdrom {} __packed;

struct qla82xx_md_entry_mux {} __packed;

struct qla82xx_md_entry_queue {} __packed;

#define MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE
#define RQST_TMPLT_SIZE
#define RQST_TMPLT
#define MD_DIRECT_ROM_WINDOW
#define MD_DIRECT_ROM_READ_BASE
#define MD_MIU_TEST_AGT_CTRL
#define MD_MIU_TEST_AGT_ADDR_LO
#define MD_MIU_TEST_AGT_ADDR_HI

extern const int MD_MIU_TEST_AGT_RDDATA[4];

#define CRB_NIU_XG_PAUSE_CTL_P0
#define CRB_NIU_XG_PAUSE_CTL_P1

#define qla82xx_get_temp_val(x)
#define qla82xx_get_temp_state(x)
#define qla82xx_encode_temp(val, state)

/*
 * Temperature control.
 */
enum {};

#define LEG_INTR_PTR_OFFSET
#define LEG_INTR_TRIG_OFFSET
#define LEG_INTR_MASK_OFFSET
#endif