linux/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_arm.h

/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/* Copyright (C) 2015-2017 Netronome Systems, Inc. */

/*
 * nfp_arm.h
 * Definitions for ARM-based registers and memory spaces
 */

#ifndef NFP_ARM_H
#define NFP_ARM_H

#define NFP_ARM_QUEUE(_q)
#define NFP_ARM_IM
#define NFP_ARM_EM
#define NFP_ARM_GCSR
#define NFP_ARM_MPCORE
#define NFP_ARM_PL310
/* Register Type: BulkBARConfig */
#define NFP_ARM_GCSR_BULK_BAR(_bar)
#define NFP_ARM_GCSR_BULK_BAR_TYPE
#define NFP_ARM_GCSR_BULK_BAR_TYPE_BULK
#define NFP_ARM_GCSR_BULK_BAR_TYPE_EXPA
#define NFP_ARM_GCSR_BULK_BAR_TGT(_x)
#define NFP_ARM_GCSR_BULK_BAR_TGT_of(_x)
#define NFP_ARM_GCSR_BULK_BAR_TOK(_x)
#define NFP_ARM_GCSR_BULK_BAR_TOK_of(_x)
#define NFP_ARM_GCSR_BULK_BAR_LEN
#define NFP_ARM_GCSR_BULK_BAR_LEN_32BIT
#define NFP_ARM_GCSR_BULK_BAR_LEN_64BIT
#define NFP_ARM_GCSR_BULK_BAR_ADDR(_x)
#define NFP_ARM_GCSR_BULK_BAR_ADDR_of(_x)
/* Register Type: ExpansionBARConfig */
#define NFP_ARM_GCSR_EXPA_BAR(_bar)
#define NFP_ARM_GCSR_EXPA_BAR_TYPE
#define NFP_ARM_GCSR_EXPA_BAR_TYPE_EXPA
#define NFP_ARM_GCSR_EXPA_BAR_TYPE_EXPL
#define NFP_ARM_GCSR_EXPA_BAR_TGT(_x)
#define NFP_ARM_GCSR_EXPA_BAR_TGT_of(_x)
#define NFP_ARM_GCSR_EXPA_BAR_TOK(_x)
#define NFP_ARM_GCSR_EXPA_BAR_TOK_of(_x)
#define NFP_ARM_GCSR_EXPA_BAR_LEN
#define NFP_ARM_GCSR_EXPA_BAR_LEN_32BIT
#define NFP_ARM_GCSR_EXPA_BAR_LEN_64BIT
#define NFP_ARM_GCSR_EXPA_BAR_ACT(_x)
#define NFP_ARM_GCSR_EXPA_BAR_ACT_of(_x)
#define NFP_ARM_GCSR_EXPA_BAR_ACT_DERIVED
#define NFP_ARM_GCSR_EXPA_BAR_ADDR(_x)
#define NFP_ARM_GCSR_EXPA_BAR_ADDR_of(_x)
/* Register Type: ExplicitBARConfig0_Reg */
#define NFP_ARM_GCSR_EXPL0_BAR(_bar)
#define NFP_ARM_GCSR_EXPL0_BAR_ADDR(_x)
#define NFP_ARM_GCSR_EXPL0_BAR_ADDR_of(_x)
/* Register Type: ExplicitBARConfig1_Reg */
#define NFP_ARM_GCSR_EXPL1_BAR(_bar)
#define NFP_ARM_GCSR_EXPL1_BAR_POSTED
#define NFP_ARM_GCSR_EXPL1_BAR_SIGNAL_REF(_x)
#define NFP_ARM_GCSR_EXPL1_BAR_SIGNAL_REF_of(_x)
#define NFP_ARM_GCSR_EXPL1_BAR_DATA_MASTER(_x)
#define NFP_ARM_GCSR_EXPL1_BAR_DATA_MASTER_of(_x)
#define NFP_ARM_GCSR_EXPL1_BAR_DATA_REF(_x)
#define NFP_ARM_GCSR_EXPL1_BAR_DATA_REF_of(_x)
/* Register Type: ExplicitBARConfig2_Reg */
#define NFP_ARM_GCSR_EXPL2_BAR(_bar)
#define NFP_ARM_GCSR_EXPL2_BAR_TGT(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_TGT_of(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_ACT(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_ACT_of(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_LEN(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_LEN_of(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_BYTE_MASK(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_BYTE_MASK_of(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_TOK(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_TOK_of(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_SIGNAL_MASTER(_x)
#define NFP_ARM_GCSR_EXPL2_BAR_SIGNAL_MASTER_of(_x)
/* Register Type: PostedCommandSignal */
#define NFP_ARM_GCSR_EXPL_POST(_bar)
#define NFP_ARM_GCSR_EXPL_POST_SIG_B(_x)
#define NFP_ARM_GCSR_EXPL_POST_SIG_B_of(_x)
#define NFP_ARM_GCSR_EXPL_POST_SIG_B_BUS
#define NFP_ARM_GCSR_EXPL_POST_SIG_B_BUS_PULL
#define NFP_ARM_GCSR_EXPL_POST_SIG_B_BUS_PUSH
#define NFP_ARM_GCSR_EXPL_POST_SIG_A(_x)
#define NFP_ARM_GCSR_EXPL_POST_SIG_A_of(_x)
#define NFP_ARM_GCSR_EXPL_POST_SIG_A_BUS
#define NFP_ARM_GCSR_EXPL_POST_SIG_A_BUS_PULL
#define NFP_ARM_GCSR_EXPL_POST_SIG_A_BUS_PUSH
#define NFP_ARM_GCSR_EXPL_POST_SIG_B_RCVD
#define NFP_ARM_GCSR_EXPL_POST_SIG_B_VALID
#define NFP_ARM_GCSR_EXPL_POST_SIG_A_RCVD
#define NFP_ARM_GCSR_EXPL_POST_SIG_A_VALID
#define NFP_ARM_GCSR_EXPL_POST_CMD_COMPLETE
/* Register Type: MPCoreBaseAddress */
#define NFP_ARM_GCSR_MPCORE_BASE
#define NFP_ARM_GCSR_MPCORE_BASE_ADDR(_x)
#define NFP_ARM_GCSR_MPCORE_BASE_ADDR_of(_x)
/* Register Type: PL310BaseAddress */
#define NFP_ARM_GCSR_PL310_BASE
#define NFP_ARM_GCSR_PL310_BASE_ADDR(_x)
#define NFP_ARM_GCSR_PL310_BASE_ADDR_of(_x)
/* Register Type: MPCoreConfig */
#define NFP_ARM_GCSR_MP0_CFG
#define NFP_ARM_GCSR_MP0_CFG_SPI_BOOT
#define NFP_ARM_GCSR_MP0_CFG_ENDIAN(_x)
#define NFP_ARM_GCSR_MP0_CFG_ENDIAN_of(_x)
#define NFP_ARM_GCSR_MP0_CFG_ENDIAN_LITTLE
#define NFP_ARM_GCSR_MP0_CFG_ENDIAN_BIG
#define NFP_ARM_GCSR_MP0_CFG_RESET_VECTOR
#define NFP_ARM_GCSR_MP0_CFG_RESET_VECTOR_LO
#define NFP_ARM_GCSR_MP0_CFG_RESET_VECTOR_HI
#define NFP_ARM_GCSR_MP0_CFG_OUTCLK_EN(_x)
#define NFP_ARM_GCSR_MP0_CFG_OUTCLK_EN_of(_x)
#define NFP_ARM_GCSR_MP0_CFG_ARMID(_x)
#define NFP_ARM_GCSR_MP0_CFG_ARMID_of(_x)
/* Register Type: MPCoreIDCacheDataError */
#define NFP_ARM_GCSR_MP0_CACHE_ERR
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D7
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D6
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D5
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D4
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D3
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D2
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D1
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_D0
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I7
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I6
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I5
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I4
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I3
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I2
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I1
#define NFP_ARM_GCSR_MP0_CACHE_ERR_MP0_I0
/* Register Type: ARMDFT */
#define NFP_ARM_GCSR_DFT
#define NFP_ARM_GCSR_DFT_DBG_REQ
#define NFP_ARM_GCSR_DFT_DBG_EN
#define NFP_ARM_GCSR_DFT_WFE_EVT_TRG
#define NFP_ARM_GCSR_DFT_ETM_WFI_RDY
#define NFP_ARM_GCSR_DFT_ETM_PWR_ON
#define NFP_ARM_GCSR_DFT_BIST_FAIL_of(_x)
#define NFP_ARM_GCSR_DFT_BIST_DONE_of(_x)
#define NFP_ARM_GCSR_DFT_BIST_RUN(_x)
#define NFP_ARM_GCSR_DFT_BIST_RUN_of(_x)

/* Gasket CSRs */
/* NOTE: These cannot be remapped, and are always at this location.
 */
#define NFP_ARM_GCSR_START
#define NFP_ARM_GCSR_SIZE

/* BAR CSRs
 */
#define NFP_ARM_GCSR_BULK_BITS
#define NFP_ARM_GCSR_EXPA_BITS
#define NFP_ARM_GCSR_EXPL_BITS

#define NFP_ARM_GCSR_BULK_SHIFT
#define NFP_ARM_GCSR_EXPA_SHIFT
#define NFP_ARM_GCSR_EXPL_SHIFT

#define NFP_ARM_GCSR_BULK_SIZE
#define NFP_ARM_GCSR_EXPA_SIZE
#define NFP_ARM_GCSR_EXPL_SIZE

#define NFP_ARM_GCSR_EXPL2_CSR(target, action, length, \
			       byte_mask, token, signal_master)
#define NFP_ARM_GCSR_EXPL1_CSR(posted, signal_ref, data_master, data_ref)
#define NFP_ARM_GCSR_EXPL0_CSR(address)
#define NFP_ARM_GCSR_EXPL_POST_EXPECT_A(sig_ref, is_push, is_required)
#define NFP_ARM_GCSR_EXPL_POST_EXPECT_B(sig_ref, is_push, is_required)

#define NFP_ARM_GCSR_EXPA_CSR(mode, target, token, is_64, action, address)

#define NFP_ARM_GCSR_BULK_CSR(mode, target, token, is_64, address)

	/* MP Core CSRs */
#define NFP_ARM_MPCORE_SIZE

	/* PL320 CSRs */
#define NFP_ARM_PCSR_SIZE

#endif /* NFP_ARM_H */