ql_nx.h revision eb82ff87b34e625264561b2d267577cf9821dab0
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 QLogic Corporation. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _QL_NX_H
#define _QL_NX_H
/*
* ISP2xxx Solaris Fibre Channel Adapter (FCA) driver header file.
*
* ***********************************************************************
* * **
* * NOTICE **
* * COPYRIGHT (C) 1996-2010 QLOGIC CORPORATION **
* * ALL RIGHTS RESERVED **
* * **
* ***********************************************************************
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#define NX_P3_A0 0x30
#define NX_P3_A2 0x32
#define NX_P3_B0 0x40
#define NX_P3_B1 0x41
#define NX_P3_B2 0x42
#define NX_P3P_A0 0x50
/*
* 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_START 0xff00
#define PHAN_INITIALIZE_FAILED 0xffff
#define PHAN_INITIALIZE_COMPLETE 0xff01
/* Host writes the following to notify that it has done the init-handshake */
#define PHAN_INITIALIZE_ACK 0xf00f
#define PHAN_PEG_RCV_INITIALIZED 0xff01
#define PHAN_PEG_RCV_START_INITIALIZE 0xff00
/* CRB_RELATED */
#define UNM_NIC_REG(X) (NIC_CRB_BASE + (X))
#define UNM_NIC_REG_2(X) (NIC_CRB_BASE_2 + (X))
/* Every driver should use these Device State */
#define NX_DEV_COLD 1
#define NX_DEV_INITIALIZING 2
#define NX_DEV_READY 3
#define NX_DEV_NEED_RESET 4
#define NX_DEV_NEED_QUIESCENT 5
#define NX_DEV_FAILED 6
#define NX_DEV_QUIESCENT 7
#define NX_IDC_VERSION 0x1
/* used for ethtool tests */
/* 12 registers to store MAC addresses for 8 PCI functions */
#define CRB_SW_INT_MASK_OFFSET_0 0x1d8
#define CRB_SW_INT_MASK_OFFSET_1 0x1e0
#define CRB_SW_INT_MASK_OFFSET_2 0x1e4
#define CRB_SW_INT_MASK_OFFSET_3 0x1e8
#define CRB_SW_INT_MASK_OFFSET_4 0x450
#define CRB_SW_INT_MASK_OFFSET_5 0x454
#define CRB_SW_INT_MASK_OFFSET_6 0x458
#define CRB_SW_INT_MASK_OFFSET_7 0x45c
#define INTR_SCHEME_PERPORT 0x1
#define MSI_MODE_MULTIFUNC 0x1
/* ends here */
#define UNM_HW_H0_CH_HUB_ADR 0x05
#define UNM_HW_H1_CH_HUB_ADR 0x0E
#define UNM_HW_H2_CH_HUB_ADR 0x03
#define UNM_HW_H3_CH_HUB_ADR 0x01
#define UNM_HW_H4_CH_HUB_ADR 0x06
#define UNM_HW_H5_CH_HUB_ADR 0x07
#define UNM_HW_H6_CH_HUB_ADR 0x08
/*
* WARNING: pex_tgt_adr.v assumes if MSB of hub adr is set then it is an
* ILLEGAL hub!!!!!
*/
/* Hub 0 */
#define UNM_HW_MN_CRB_AGT_ADR 0x15
#define UNM_HW_MS_CRB_AGT_ADR 0x25
/* Hub 1 */
#define UNM_HW_PS_CRB_AGT_ADR 0x73
#define UNM_HW_SS_CRB_AGT_ADR 0x20
#define UNM_HW_RPMX3_CRB_AGT_ADR 0x0b
#define UNM_HW_QMS_CRB_AGT_ADR 0x00
#define UNM_HW_SQGS0_CRB_AGT_ADR 0x01
#define UNM_HW_SQGS1_CRB_AGT_ADR 0x02
#define UNM_HW_SQGS2_CRB_AGT_ADR 0x03
#define UNM_HW_SQGS3_CRB_AGT_ADR 0x04
#define UNM_HW_C2C0_CRB_AGT_ADR 0x58
#define UNM_HW_C2C1_CRB_AGT_ADR 0x59
#define UNM_HW_C2C2_CRB_AGT_ADR 0x5a
#define UNM_HW_RPMX2_CRB_AGT_ADR 0x0a
#define UNM_HW_RPMX4_CRB_AGT_ADR 0x0c
#define UNM_HW_RPMX7_CRB_AGT_ADR 0x0f
#define UNM_HW_RPMX9_CRB_AGT_ADR 0x12
#define UNM_HW_SMB_CRB_AGT_ADR 0x18
/* Hub 2 */
#define UNM_HW_NIU_CRB_AGT_ADR 0x31
#define UNM_HW_I2C0_CRB_AGT_ADR 0x19
#define UNM_HW_I2C1_CRB_AGT_ADR 0x29
#define UNM_HW_SN_CRB_AGT_ADR 0x10
#define UNM_HW_I2Q_CRB_AGT_ADR 0x20
#define UNM_HW_LPC_CRB_AGT_ADR 0x22
#define UNM_HW_ROMUSB_CRB_AGT_ADR 0x21
#define UNM_HW_QM_CRB_AGT_ADR 0x66
#define UNM_HW_SQG0_CRB_AGT_ADR 0x60
#define UNM_HW_SQG1_CRB_AGT_ADR 0x61
#define UNM_HW_SQG2_CRB_AGT_ADR 0x62
#define UNM_HW_SQG3_CRB_AGT_ADR 0x63
#define UNM_HW_RPMX1_CRB_AGT_ADR 0x09
#define UNM_HW_RPMX5_CRB_AGT_ADR 0x0d
#define UNM_HW_RPMX6_CRB_AGT_ADR 0x0e
#define UNM_HW_RPMX8_CRB_AGT_ADR 0x11
/* Hub 3 */
#define UNM_HW_PH_CRB_AGT_ADR 0x1A
#define UNM_HW_SRE_CRB_AGT_ADR 0x50
#define UNM_HW_EG_CRB_AGT_ADR 0x51
#define UNM_HW_RPMX0_CRB_AGT_ADR 0x08
/* Hub 4 */
#define UNM_HW_PEGN0_CRB_AGT_ADR 0x40
#define UNM_HW_PEGN1_CRB_AGT_ADR 0x41
#define UNM_HW_PEGN2_CRB_AGT_ADR 0x42
#define UNM_HW_PEGN3_CRB_AGT_ADR 0x43
#define UNM_HW_PEGNI_CRB_AGT_ADR 0x44
#define UNM_HW_PEGND_CRB_AGT_ADR 0x45
#define UNM_HW_PEGNC_CRB_AGT_ADR 0x46
#define UNM_HW_PEGR0_CRB_AGT_ADR 0x47
#define UNM_HW_PEGR1_CRB_AGT_ADR 0x48
#define UNM_HW_PEGR2_CRB_AGT_ADR 0x49
#define UNM_HW_PEGR3_CRB_AGT_ADR 0x4a
#define UNM_HW_PEGN4_CRB_AGT_ADR 0x4b
/* Hub 5 */
#define UNM_HW_PEGS0_CRB_AGT_ADR 0x40
#define UNM_HW_PEGS1_CRB_AGT_ADR 0x41
#define UNM_HW_PEGS2_CRB_AGT_ADR 0x42
#define UNM_HW_PEGS3_CRB_AGT_ADR 0x43
#define UNM_HW_PEGSI_CRB_AGT_ADR 0x44
#define UNM_HW_PEGSD_CRB_AGT_ADR 0x45
#define UNM_HW_PEGSC_CRB_AGT_ADR 0x46
/* Hub 6 */
#define UNM_HW_CAS0_CRB_AGT_ADR 0x46
#define UNM_HW_CAS1_CRB_AGT_ADR 0x47
#define UNM_HW_CAS2_CRB_AGT_ADR 0x48
#define UNM_HW_CAS3_CRB_AGT_ADR 0x49
#define UNM_HW_NCM_CRB_AGT_ADR 0x16
#define UNM_HW_TMR_CRB_AGT_ADR 0x17
#define UNM_HW_XDMA_CRB_AGT_ADR 0x05
#define UNM_HW_OCM0_CRB_AGT_ADR 0x06
#define UNM_HW_OCM1_CRB_AGT_ADR 0x07
/* This field defines PCI/X adr [25:20] of agents on the CRB */
#define UNM_HW_PX_MAP_CRB_PH 0
#define UNM_HW_PX_MAP_CRB_PS 1
#define UNM_HW_PX_MAP_CRB_MN 2
#define UNM_HW_PX_MAP_CRB_MS 3
#define UNM_HW_PX_MAP_CRB_SRE 5
#define UNM_HW_PX_MAP_CRB_NIU 6
#define UNM_HW_PX_MAP_CRB_QMN 7
#define UNM_HW_PX_MAP_CRB_SQN0 8
#define UNM_HW_PX_MAP_CRB_SQN1 9
#define UNM_HW_PX_MAP_CRB_SQN2 10
#define UNM_HW_PX_MAP_CRB_SQN3 11
#define UNM_HW_PX_MAP_CRB_QMS 12
#define UNM_HW_PX_MAP_CRB_SQS0 13
#define UNM_HW_PX_MAP_CRB_SQS1 14
#define UNM_HW_PX_MAP_CRB_SQS2 15
#define UNM_HW_PX_MAP_CRB_SQS3 16
#define UNM_HW_PX_MAP_CRB_PGN0 17
#define UNM_HW_PX_MAP_CRB_PGN1 18
#define UNM_HW_PX_MAP_CRB_PGN2 19
#define UNM_HW_PX_MAP_CRB_PGN3 20
#define UNM_HW_PX_MAP_CRB_PGN4 (UNM_HW_PX_MAP_CRB_SQS2)
#define UNM_HW_PX_MAP_CRB_PGND 21
#define UNM_HW_PX_MAP_CRB_PGNI 22
#define UNM_HW_PX_MAP_CRB_PGS0 23
#define UNM_HW_PX_MAP_CRB_PGS1 24
#define UNM_HW_PX_MAP_CRB_PGS2 25
#define UNM_HW_PX_MAP_CRB_PGS3 26
#define UNM_HW_PX_MAP_CRB_PGSD 27
#define UNM_HW_PX_MAP_CRB_PGSI 28
#define UNM_HW_PX_MAP_CRB_SN 29
#define UNM_HW_PX_MAP_CRB_EG 31
#define UNM_HW_PX_MAP_CRB_PH2 32
#define UNM_HW_PX_MAP_CRB_PS2 33
#define UNM_HW_PX_MAP_CRB_CAM 34
#define UNM_HW_PX_MAP_CRB_CAS0 35
#define UNM_HW_PX_MAP_CRB_CAS1 36
#define UNM_HW_PX_MAP_CRB_CAS2 37
#define UNM_HW_PX_MAP_CRB_C2C0 38
#define UNM_HW_PX_MAP_CRB_C2C1 39
#define UNM_HW_PX_MAP_CRB_TIMR 40
/*
* #define PX_MAP_CRB_SS 41
*/
#define UNM_HW_PX_MAP_CRB_RPMX1 42
#define UNM_HW_PX_MAP_CRB_RPMX2 43
#define UNM_HW_PX_MAP_CRB_RPMX3 44
#define UNM_HW_PX_MAP_CRB_RPMX4 45
#define UNM_HW_PX_MAP_CRB_RPMX5 46
#define UNM_HW_PX_MAP_CRB_RPMX6 47
#define UNM_HW_PX_MAP_CRB_RPMX7 48
#define UNM_HW_PX_MAP_CRB_XDMA 49
#define UNM_HW_PX_MAP_CRB_I2Q 50
#define UNM_HW_PX_MAP_CRB_ROMUSB 51
#define UNM_HW_PX_MAP_CRB_CAS3 52
#define UNM_HW_PX_MAP_CRB_RPMX0 53
#define UNM_HW_PX_MAP_CRB_RPMX8 54
#define UNM_HW_PX_MAP_CRB_RPMX9 55
#define UNM_HW_PX_MAP_CRB_OCM0 56
#define UNM_HW_PX_MAP_CRB_OCM1 57
#define UNM_HW_PX_MAP_CRB_SMB 58
#define UNM_HW_PX_MAP_CRB_I2C0 59
#define UNM_HW_PX_MAP_CRB_I2C1 60
#define UNM_HW_PX_MAP_CRB_LPC 61
#define UNM_HW_PX_MAP_CRB_PGNC 62
#define UNM_HW_PX_MAP_CRB_PGR0 63
#define UNM_HW_PX_MAP_CRB_PGR1 4
#define UNM_HW_PX_MAP_CRB_PGR2 30
#define UNM_HW_PX_MAP_CRB_PGR3 41
/* This field defines CRB adr [31:20] of the agents */
/*
* ROM USB CRB space is divided into 4 regions depending on decode of
* address bits [19:16]
*/
/* ROMUSB GLB register definitions */
#define UNM_ROMUSB_ROM_WRSR_INSTR 0x01
#define UNM_ROMUSB_ROM_PP_INSTR 0x02
#define UNM_ROMUSB_ROM_READ_INSTR 0x03
#define UNM_ROMUSB_ROM_WRDI_INSTR 0x04
#define UNM_ROMUSB_ROM_RDSR_INSTR 0x05
#define UNM_ROMUSB_ROM_WREN_INSTR 0x06
#define UNM_ROMUSB_ROM_FAST_RD_INSTR 0x0B
#define UNM_ROMUSB_ROM_RES_INSTR 0xAB
#define UNM_ROMUSB_ROM_BE_INSTR 0xC7
#define UNM_ROMUSB_ROM_DP_INSTR 0xC9
#define UNM_ROMUSB_ROM_SE_INSTR 0xD8
/* Lock IDs for ROM lock */
#define ROM_LOCK_DRIVER 0x0d417340
/* Lock IDs for PHY lock */
#define PHY_LOCK_DRIVER 0x44524956
/* HACK upon HACK upon HACK (for PCIE builds) */
#define UNM_CRB_PCIE (UNM_CRB_PCIX_MD)
/* window 1 pcie slot */
/*
* ====================== BASE ADDRESSES ON-CHIP ======================
* Base addresses of major components on-chip.
* ====================== BASE ADDRESSES ON-CHIP ======================
*/
#define UNM_ADDR_DDR_NET 0x0000000000000000
#define UNM_ADDR_DDR_NET_MAX 0x000000000fffffff
/*
* 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 NX_P2_ADDR_PCIE 0x0000000800000000
#define NX_P3_ADDR_PCIE 0x0000008000000000
#define UNM_ADDR_PCIE_MAX 0x0000000FFFFFFFFF
#define UNM_ADDR_OCM0 0x0000000200000000
#define UNM_ADDR_OCM0_MAX 0x00000002000fffff
#define UNM_ADDR_OCM1 0x0000000200400000
#define UNM_ADDR_OCM1_MAX 0x00000002004fffff
#define UNM_ADDR_QDR_NET 0x0000000300000000
#define NX_P2_ADDR_QDR_NET_MAX 0x00000003001fffff
#define NX_P3_ADDR_QDR_NET_MAX 0x0000000303ffffff
/*
* The ifdef at the bottom should go. All drivers should start using the above
* 2 defines.
*/
#ifdef P3
#define UNM_ADDR_QDR_NET_MAX (NX_P3_ADDR_QDR_NET_MAX)
#else
#define UNM_ADDR_QDR_NET_MAX (NX_P2_ADDR_QDR_NET_MAX)
#endif
#define UNM_PCI_ARCH_CRB_BASE (UNM_PCI_DIRECT_CRB)
#define UNM_PCI_DDR_NET 0x00000000
#define UNM_PCI_DDR_NET_MAX 0x01ffffff
#define UNM_PCI_DDR_MD 0x02000000
#define UNM_PCI_DDR_MD_MAX 0x03ffffff
#define UNM_PCI_QDR_NET 0x04000000
#define UNM_PCI_QDR_NET_MAX 0x043fffff
#define UNM_PCI_DIRECT_CRB 0x04400000
#define UNM_PCI_DIRECT_CRB_MAX 0x047fffff
#define UNM_PCI_CAMQM 0x04800000
#define UNM_PCI_CAMQM_MAX 0x04ffffff
#define UNM_PCI_OCM0 0x05000000
#define UNM_PCI_OCM0_MAX 0x050fffff
#define UNM_PCI_OCM1 0x05100000
#define UNM_PCI_OCM1_MAX 0x051fffff
#define UNM_PCI_CRBSPACE 0x06000000
#define UNM_PCI_CRBSPACE_MAX 0x07ffffff
#define UNM_PCI_128MB_SIZE 0x08000000
#define UNM_PCI_32MB_SIZE 0x02000000
#define UNM_PCI_2MB_SIZE 0x00200000
/*
* h/w block.
*/
/*
* Configuration registers.
*/
/*
* Register offsets for MN
*/
#define MIU_CONTROL (0x000)
#define MIU_TAG (0x004)
#define MIU_TEST_AGT_CTRL (0x090)
#define MIU_TEST_AGT_ADDR_LO (0x094)
#define MIU_TEST_AGT_ADDR_HI (0x098)
#define MIU_TEST_AGT_WRDATA_LO (0x0a0)
#define MIU_TEST_AGT_WRDATA_HI (0x0a4)
#define MIU_TEST_AGT_RDDATA_LO (0x0a8)
#define MIU_TEST_AGT_RDDATA_HI (0x0ac)
#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)
#define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4)
#define MIU_TEST_AGT_RDDATA_UPPER_LO (0x0b8)
#define MIU_TEST_AGT_RDDATA_UPPER_HI (0x0bc)
#define MIU_TEST_AGT_ADDR_MASK 0xfffffff8
#define MIU_TEST_AGT_UPPER_ADDR(off) (0)
/* MIU_TEST_AGT_CTRL flags. work for SIU as well */
#define MIU_TA_CTL_START 1
#define MIU_TA_CTL_ENABLE 2
#define MIU_TA_CTL_WRITE 4
#define MIU_TA_CTL_BUSY 8
#define SIU_TEST_AGT_CTRL (0x060)
#define SIU_TEST_AGT_ADDR_LO (0x064)
#define SIU_TEST_AGT_ADDR_HI (0x078)
#define SIU_TEST_AGT_WRDATA_LO (0x068)
#define SIU_TEST_AGT_WRDATA_HI (0x06c)
#define SIU_TEST_AGT_RDDATA_LO (0x070)
#define SIU_TEST_AGT_RDDATA_HI (0x074)
#define SIU_TEST_AGT_ADDR_MASK 0x3ffff8
#define XG_LINK_UP 0x10
/* ====================== Configuration Constants ======================== */
#define UNM_NIU_MAX_GBE_PORTS 4
#define UNM_NIU_MAX_XG_PORTS 2
#define MIN_CORE_CLK_SPEED 200
#define MAX_CORE_CLK_SPEED 400
(speed <= MAX_CORE_CLK_SPEED))
#define P2_TICKS_PER_SEC 2048
(ticks <= P2_MAX_TICKS_PER_SEC))
/* CAM RAM */
#define UNM_PORT_MODE_NONE 0
#define UNM_PORT_MODE_XG 1
#define UNM_PORT_MODE_GB 2
#define UNM_PORT_MODE_802_3_AP 3
#define UNM_PORT_MODE_AUTO_NEG 4
#define UNM_PORT_MODE_AUTO_NEG_1G 5
#define UNM_PORT_MODE_AUTO_NEG_XG 6
#define NX_PEG_TUNE_MN_SPD_ZEROED 0x80000000
#define NX_BOOT_LOADER_MN_ISSUE 0xff00ffff
#define NX_PEG_TUNE_MN_PRESENT 0x1
#define PCIE_DCR (0x00d8)
#define PCIE_DB_DATA2 (0x10070)
#define PCIE_DB_CTRL (0x100a0)
#define PCIE_DB_ADDR (0x100a4)
#define PCIE_DB_DATA (0x100a8)
#define PCIE_IMBUS_CONTROL (0x101b8)
#define PCIE_SETUP_FUNCTION (0x12040)
#define PCIE_SETUP_FUNCTION2 (0x12048)
#define PCIE_TGT_SPLIT_CHICKEN (0x12080)
#define PCIE_CHICKEN3 (0x120c8)
#define PCIE_MAX_MASTER_SPLIT (0x14048)
#define PCIE_MAX_DMA_XFER_SIZE (0x1404c)
/*
* Following define address space withing PCIX CRB space to talk with
* devices on the storage side PCI bus.
*/
#define PCIX_PS_MEM_SPACE (0x90000)
/*
* Configuration registers. These are the same offsets on both host and
* storage side PCI blocks.
*/
#define PCIX_CRB_WINDOW (0x10210)
#define PCIX_CRB_WINDOW_F0 (0x10210)
#define PCIX_CRB_WINDOW_F1 (0x10230)
#define PCIX_CRB_WINDOW_F2 (0x10250)
#define PCIX_CRB_WINDOW_F3 (0x10270)
#define PCIX_CRB_WINDOW_F4 (0x102ac)
#define PCIX_CRB_WINDOW_F5 (0x102bc)
#define PCIX_CRB_WINDOW_F6 (0x102cc)
#define PCIX_CRB_WINDOW_F7 (0x102dc)
#define PCIX_MN_WINDOW (0x10200)
#define PCIX_MN_WINDOW_F0 (0x10200)
#define PCIX_MN_WINDOW_F1 (0x10220)
#define PCIX_MN_WINDOW_F2 (0x10240)
#define PCIX_MN_WINDOW_F3 (0x10260)
#define PCIX_MN_WINDOW_F4 (0x102a0)
#define PCIX_MN_WINDOW_F5 (0x102b0)
#define PCIX_MN_WINDOW_F6 (0x102c0)
#define PCIX_MN_WINDOW_F7 (0x102d0)
#define PCIX_SN_WINDOW (0x10208)
#define PCIX_SN_WINDOW_F0 (0x10208)
#define PCIX_SN_WINDOW_F1 (0x10228)
#define PCIX_SN_WINDOW_F2 (0x10248)
#define PCIX_SN_WINDOW_F3 (0x10268)
#define PCIX_SN_WINDOW_F4 (0x102a8)
#define PCIX_SN_WINDOW_F5 (0x102b8)
#define PCIX_SN_WINDOW_F6 (0x102c8)
#define PCIX_SN_WINDOW_F7 (0x102d8)
/*
*/
/*
* Configuration registers.
*/
#ifdef PCIX
#else
#endif
#define PCIE_PS_STRAP_RESET (0x18000)
#define M25P_INSTR_WREN 0x06
#define M25P_INSTR_RDSR 0x05
#define M25P_INSTR_PP 0x02
#define M25P_INSTR_SE 0xd8
#define CAM_RAM_P2I_ENABLE 0xc
#define CAM_RAM_P2D_ENABLE 0x8
#define PCIX_IMBTAG (0x18004)
#define CAM_RAM_PEG_ENABLES 0x4
/*
* The PCI VendorID and DeviceID for our board.
*/
#define PCI_VENDOR_ID_NX8021 0x4040
#define PCI_DEVICE_ID_NX8021_FC 0x0101
/* ISP 3031 related declarations */
#define NX_MSIX_MEM_REGION_THRESHOLD 0x2000000
#define UNM_MSIX_TBL_SPACE 8192
#define UNM_PCI_REG_MSIX_TBL 0x44
#define NX_PCI_MSIX_CONTROL 0x40
typedef struct {
typedef struct {
struct crb_addr_pair {
};
#define ADDR_ERROR ((unsigned long) 0xffffffff)
#define MAX_CTL_CHECK 1000
/*
* ************************************************************************
* PCI related defines.
* ************************************************************************
*/
/*
* Interrupt related defines.
*/
#define PCIX_TARGET_STATUS (0x10118)
#define PCIX_TARGET_STATUS_F1 (0x10160)
#define PCIX_TARGET_STATUS_F2 (0x10164)
#define PCIX_TARGET_STATUS_F3 (0x10168)
#define PCIX_TARGET_STATUS_F4 (0x10360)
#define PCIX_TARGET_STATUS_F5 (0x10364)
#define PCIX_TARGET_STATUS_F6 (0x10368)
#define PCIX_TARGET_STATUS_F7 (0x1036c)
#define PCIX_TARGET_MASK (0x10128)
#define PCIX_TARGET_MASK_F1 (0x10170)
#define PCIX_TARGET_MASK_F2 (0x10174)
#define PCIX_TARGET_MASK_F3 (0x10178)
#define PCIX_TARGET_MASK_F4 (0x10370)
#define PCIX_TARGET_MASK_F5 (0x10374)
#define PCIX_TARGET_MASK_F6 (0x10378)
#define PCIX_TARGET_MASK_F7 (0x1037c)
/*
* Message Signaled Interrupts
*/
#define PCIX_MSI_F0 (0x13000)
#define PCIX_MSI_F1 (0x13004)
#define PCIX_MSI_F2 (0x13008)
#define PCIX_MSI_F3 (0x1300c)
#define PCIX_MSI_F4 (0x13010)
#define PCIX_MSI_F5 (0x13014)
#define PCIX_MSI_F6 (0x13018)
#define PCIX_MSI_F7 (0x1301c)
/*
*
*/
#define PCIX_INT_VECTOR (0x10100)
#define PCIX_INT_MASK (0x10104)
/*
* Interrupt state machine and other bits.
*/
#define PCIE_MISCCFG_RC (0x1206c)
/*
* PCI Interrupt Vector Values.
*/
#define PCIX_INT_VECTOR_BIT_F0 0x0080
#define PCIX_INT_VECTOR_BIT_F1 0x0100
#define PCIX_INT_VECTOR_BIT_F2 0x0200
#define PCIX_INT_VECTOR_BIT_F3 0x0400
#define PCIX_INT_VECTOR_BIT_F4 0x0800
#define PCIX_INT_VECTOR_BIT_F5 0x1000
#define PCIX_INT_VECTOR_BIT_F6 0x2000
#define PCIX_INT_VECTOR_BIT_F7 0x4000
#define NX_LEGACY_INTR_CONFIG \
{ \
{ \
.pci_int_reg = ISR_MSI_INT_TRIGGER(0) }, \
\
{ \
\
{ \
\
{ \
\
{ \
\
{ \
\
{ \
\
{ \
}
#define BOOTLD_START 0x10000
#define IMAGE_START 0x43000
/* Magic number to let user know flash is programmed */
#define UNM_BDINFO_MAGIC 0x12345678
#define FW_SIZE_OFFSET 0x3e840c
#define PCI_CAP_ID_GEN 0x10
#define MAX_CRB_XFORM 60
#define MTU_FUDGE_FACTOR 100
#define crb_addr_transform(name) \
/* 64K? */
#define UNM_PCI_MN_2M (0)
#define UNM_PCI_MS_2M (0x80000)
#define UNM_PCI_OCM0_2M (0xc0000)
#define UNM_BOARDTYPE 0x4008
#define UNM_BOARDNUM 0x400c
#define UNM_CHIPNUM 0x4010
/* CRB window related */
#define CRB_WINDOW_2M (0x130060)
#define UNM_PCI_CAMQM_2M_END (0x04800800UL)
((off) & 0xf0000))
#define UNM_PCI_CAMQM_2M_BASE (0x000ff800UL)
#define CRB_INDIRECT_2M (0x1e0000UL)
/* #define ADDR_ERROR ((unsigned long ) 0xffffffff) */
/* PCI Windowing for DDR regions. */
#define CRB_WIN_LOCK_TIMEOUT 100000000
#define ROM_LOCK_TIMEOUT 100
#define ROM_MAX_TIMEOUT 100
#define IDC_LOCK_TIMEOUT 100000000
/*
* IDC parameters are defined in �user area� in the flash
*/
#define ROM_DEV_INIT_TIMEOUT 0x3e885c
#define ROM_DRV_RESET_ACK_TIMEOUT 0x3e8860
/*
* Global Data in ql_nx.c source file.
*/
/*
* Global Function Prototypes in ql_nx.c source file.
*/
void ql_8021_reset_chip(ql_adapter_state_t *);
int ql_8021_load_risc(ql_adapter_state_t *);
void ql_8021_clr_hw_intr(ql_adapter_state_t *);
void ql_8021_clr_fw_intr(ql_adapter_state_t *);
void ql_8021_enable_intrs(ql_adapter_state_t *);
void ql_8021_disable_intrs(ql_adapter_state_t *);
void ql_8021_set_drv_active(ql_adapter_state_t *);
void ql_8021_clr_drv_active(ql_adapter_state_t *);
#ifdef __cplusplus
}
#endif
#endif /* _QL_NX_H */