mips: octeon: Add serdes and device helper support incl. DM PCIe driver
PATCH 10/50 mips: octeon: Add cvmx-fpa-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-fpa-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../mach-octeon/include/mach/cvmx-fpa-defs.h | 1866 +++++++++++++++++ 1 file changed, 1866 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-fpa-defs.h
arch/mips/mach-octeon/include/mach/cvmx-fpa-defs.h new file +1866 -0
@@ -0,0 +1,1866 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +* +* Configuration and status register (CSR) type definitions for +* Octeon fpa. +*/ + +#ifndef __CVMX_FPA_DEFS_H__ +#define __CVMX_FPA_DEFS_H__ + +#define CVMX_FPA_ADDR_RANGE_ERROR CVMX_FPA_ADDR_RANGE_ERROR_FUNC() +static inline u64 CVMX_FPA_ADDR_RANGE_ERROR_FUNC (void ) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180028000458ull ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +case OCTEON_CN78XX &OCTEON_FAMILY_MASK : +if (OCTEON_IS_MODEL (OCTEON_CN78XX_PASS1_X )) +return 0x0001280000000458ull ; +if (OCTEON_IS_MODEL (OCTEON_CN78XX )) +return 0x0001280000000458ull ; +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x0001280000000458ull ; + } +return 0x0001280000000458ull ; +} + +#define CVMX_FPA_AURAX_CFG (offset) (0x0001280020100000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_CNT (offset) (0x0001280020200000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_CNT_ADD (offset) (0x0001280020300000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_CNT_LEVELS (offset) (0x0001280020800000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_CNT_LIMIT (offset) (0x0001280020400000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_CNT_THRESHOLD (offset) (0x0001280020500000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_INT (offset) (0x0001280020600000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_POOL (offset) (0x0001280020000000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_AURAX_POOL_LEVELS (offset) (0x0001280020700000ull + ((offset) & 1023) * 8) +#define CVMX_FPA_BIST_STATUS CVMX_FPA_BIST_STATUS_FUNC() +static inline u64 CVMX_FPA_BIST_STATUS_FUNC (void ) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800280000E8ull ; +case OCTEON_CN78XX &OCTEON_FAMILY_MASK : +if (OCTEON_IS_MODEL (OCTEON_CN78XX_PASS1_X )) +return 0x00012800000000E8ull ; +if (OCTEON_IS_MODEL (OCTEON_CN78XX )) +return 0x00012800000000E8ull ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x00012800000000E8ull ; + } +return 0x00012800000000E8ull ; +} + +#ifndef CVMX_FPA_CLK_COUNT // test-only (also in octeon_ddr.h) +#define CVMX_FPA_CLK_COUNT (0x00012800000000F0ull) +#endif +#define CVMX_FPA_CTL_STATUS (0x0001180028000050ull) +#define CVMX_FPA_ECC_CTL (0x0001280000000058ull) +#define CVMX_FPA_ECC_INT (0x0001280000000068ull) +#define CVMX_FPA_ERR_INT (0x0001280000000040ull) +#define CVMX_FPA_FPF0_MARKS (0x0001180028000000ull) +#define CVMX_FPA_FPF0_SIZE (0x0001180028000058ull) +#define CVMX_FPA_FPF1_MARKS CVMX_FPA_FPFX_MARKS(1) +#define CVMX_FPA_FPF2_MARKS CVMX_FPA_FPFX_MARKS(2) +#define CVMX_FPA_FPF3_MARKS CVMX_FPA_FPFX_MARKS(3) +#define CVMX_FPA_FPF4_MARKS CVMX_FPA_FPFX_MARKS(4) +#define CVMX_FPA_FPF5_MARKS CVMX_FPA_FPFX_MARKS(5) +#define CVMX_FPA_FPF6_MARKS CVMX_FPA_FPFX_MARKS(6) +#define CVMX_FPA_FPF7_MARKS CVMX_FPA_FPFX_MARKS(7) +#define CVMX_FPA_FPF8_MARKS (0x0001180028000240ull) +#define CVMX_FPA_FPF8_SIZE (0x0001180028000248ull) +#define CVMX_FPA_FPFX_MARKS (offset) (0x0001180028000008ull + ((offset) & 7) * 8 - 8 * 1) +#define CVMX_FPA_FPFX_SIZE (offset) (0x0001180028000060ull + ((offset) & 7) * 8 - 8 * 1) +#define CVMX_FPA_GEN_CFG (0x0001280000000050ull) +#define CVMX_FPA_INT_ENB (0x0001180028000048ull) +#define CVMX_FPA_INT_SUM (0x0001180028000040ull) +#define CVMX_FPA_PACKET_THRESHOLD (0x0001180028000460ull) +#define CVMX_FPA_POOLX_AVAILABLE (offset) (0x0001280010300000ull + ((offset) & 63) * 8) +#define CVMX_FPA_POOLX_CFG (offset) (0x0001280010000000ull + ((offset) & 63) * 8) +static inline u64 CVMX_FPA_POOLX_END_ADDR (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180028000358ull + (offset) *8 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180028000358ull + (offset) *8 ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x0001280010600000ull + (offset) *8 ; +case OCTEON_CN78XX &OCTEON_FAMILY_MASK : +if (OCTEON_IS_MODEL (OCTEON_CN78XX_PASS1_X )) +return 0x0001280010600000ull + (offset) *8 ; +if (OCTEON_IS_MODEL (OCTEON_CN78XX )) +return 0x0001280010600000ull + (offset) *8 ; + } +return 0x0001280010600000ull + (offset) *8 ; +} + +#define CVMX_FPA_POOLX_FPF_MARKS (offset) (0x0001280010100000ull + ((offset) & 63) * 8) +#define CVMX_FPA_POOLX_INT (offset) (0x0001280010A00000ull + ((offset) & 63) * 8) +#define CVMX_FPA_POOLX_OP_PC (offset) (0x0001280010F00000ull + ((offset) & 63) * 8) +#define CVMX_FPA_POOLX_STACK_ADDR (offset) (0x0001280010900000ull + ((offset) & 63) * 8) +#define CVMX_FPA_POOLX_STACK_BASE (offset) (0x0001280010700000ull + ((offset) & 63) * 8) +#define CVMX_FPA_POOLX_STACK_END (offset) (0x0001280010800000ull + ((offset) & 63) * 8) +static inline u64 CVMX_FPA_POOLX_START_ADDR (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180028000258ull + (offset) *8 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180028000258ull + (offset) *8 ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x0001280010500000ull + (offset) *8 ; +case OCTEON_CN78XX &OCTEON_FAMILY_MASK : +if (OCTEON_IS_MODEL (OCTEON_CN78XX_PASS1_X )) +return 0x0001280010500000ull + (offset) *8 ; +if (OCTEON_IS_MODEL (OCTEON_CN78XX )) +return 0x0001280010500000ull + (offset) *8 ; + } +return 0x0001280010500000ull + (offset) *8 ; +} + +static inline u64 CVMX_FPA_POOLX_THRESHOLD (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180028000140ull + (offset) *8 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180028000140ull + (offset) *8 ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x0001280010400000ull + (offset) *8 ; +case OCTEON_CN78XX &OCTEON_FAMILY_MASK : +if (OCTEON_IS_MODEL (OCTEON_CN78XX_PASS1_X )) +return 0x0001280010400000ull + (offset) *8 ; +if (OCTEON_IS_MODEL (OCTEON_CN78XX )) +return 0x0001280010400000ull + (offset) *8 ; + } +return 0x0001280010400000ull + (offset) *8 ; +} + +#define CVMX_FPA_QUE0_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(0) +#define CVMX_FPA_QUE1_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(1) +#define CVMX_FPA_QUE2_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(2) +#define CVMX_FPA_QUE3_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(3) +#define CVMX_FPA_QUE4_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(4) +#define CVMX_FPA_QUE5_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(5) +#define CVMX_FPA_QUE6_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(6) +#define CVMX_FPA_QUE7_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(7) +#define CVMX_FPA_QUE8_PAGE_INDEX (0x0001180028000250ull) +#define CVMX_FPA_QUEX_AVAILABLE (offset) (0x0001180028000098ull + ((offset) & 15) * 8) +#define CVMX_FPA_QUEX_PAGE_INDEX (offset) (0x00011800280000F0ull + ((offset) & 7) * 8) +#define CVMX_FPA_QUE_ACT (0x0001180028000138ull) +#define CVMX_FPA_QUE_EXP (0x0001180028000130ull) +#define CVMX_FPA_RD_LATENCY_PC (0x0001280000000610ull) +#define CVMX_FPA_RD_REQ_PC (0x0001280000000600ull) +#define CVMX_FPA_RED_DELAY (0x0001280000000100ull) +#define CVMX_FPA_SFT_RST (0x0001280000000000ull) +#define CVMX_FPA_WART_CTL (0x00011800280000D8ull) +#define CVMX_FPA_WART_STATUS (0x00011800280000E0ull) +#define CVMX_FPA_WQE_THRESHOLD (0x0001180028000468ull) + +/** +* cvmx_fpa_addr_range_error +* +* When any FPA_POOL()_INT[RANGE] error occurs, this register is latched with additional +* error information. +*/ +union cvmx_fpa_addr_range_error { +u64 u64; +struct cvmx_fpa_addr_range_error_s { +u64 reserved_0_63 :64 ; + } s; +struct cvmx_fpa_addr_range_error_cn61xx { +u64 reserved_38_63 :26 ; +u64 pool :5 ; +u64 addr :33 ; + } cn61xx; +struct cvmx_fpa_addr_range_error_cn61xx cn66xx; +struct cvmx_fpa_addr_range_error_cn61xx cn68xx; +struct cvmx_fpa_addr_range_error_cn61xx cn68xxp1; +struct cvmx_fpa_addr_range_error_cn61xx cn70xx; +struct cvmx_fpa_addr_range_error_cn61xx cn70xxp1; +struct cvmx_fpa_addr_range_error_cn73xx { +u64 reserved_54_63 :10 ; +u64 pool :6 ; +u64 reserved_42_47 :6 ; +u64 addr :42 ; + } cn73xx; +struct cvmx_fpa_addr_range_error_cn73xx cn78xx; +struct cvmx_fpa_addr_range_error_cn73xx cn78xxp1; +struct cvmx_fpa_addr_range_error_cn61xx cnf71xx; +struct cvmx_fpa_addr_range_error_cn73xx cnf75xx; +}; + +typedef union cvmx_fpa_addr_range_error cvmx_fpa_addr_range_error_t ; + +/** +* cvmx_fpa_aura#_cfg +* +* This register configures aura backpressure, etc. +* +*/ +union cvmx_fpa_aurax_cfg { +u64 u64; +struct cvmx_fpa_aurax_cfg_s { +u64 reserved_10_63 :54 ; +u64 ptr_dis :1 ; +u64 avg_con :9 ; + } s; +struct cvmx_fpa_aurax_cfg_s cn73xx; +struct cvmx_fpa_aurax_cfg_s cn78xx; +struct cvmx_fpa_aurax_cfg_s cn78xxp1; +struct cvmx_fpa_aurax_cfg_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_cfg cvmx_fpa_aurax_cfg_t ; + +/** +* cvmx_fpa_aura#_cnt +*/ +union cvmx_fpa_aurax_cnt { +u64 u64; +struct cvmx_fpa_aurax_cnt_s { +u64 reserved_40_63 :24 ; +u64 cnt :40 ; + } s; +struct cvmx_fpa_aurax_cnt_s cn73xx; +struct cvmx_fpa_aurax_cnt_s cn78xx; +struct cvmx_fpa_aurax_cnt_s cn78xxp1; +struct cvmx_fpa_aurax_cnt_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_cnt cvmx_fpa_aurax_cnt_t ; + +/** +* cvmx_fpa_aura#_cnt_add +*/ +union cvmx_fpa_aurax_cnt_add { +u64 u64; +struct cvmx_fpa_aurax_cnt_add_s { +u64 reserved_40_63 :24 ; +u64 cnt :40 ; + } s; +struct cvmx_fpa_aurax_cnt_add_s cn73xx; +struct cvmx_fpa_aurax_cnt_add_s cn78xx; +struct cvmx_fpa_aurax_cnt_add_s cn78xxp1; +struct cvmx_fpa_aurax_cnt_add_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_cnt_add cvmx_fpa_aurax_cnt_add_t ; + +/** +* cvmx_fpa_aura#_cnt_levels +*/ +union cvmx_fpa_aurax_cnt_levels { +u64 u64; +struct cvmx_fpa_aurax_cnt_levels_s { +u64 reserved_41_63 :23 ; +u64 drop_dis :1 ; +u64 bp_ena :1 ; +u64 red_ena :1 ; +u64 shift :6 ; +u64 bp :8 ; +u64 drop :8 ; +u64 pass :8 ; +u64 level :8 ; + } s; +struct cvmx_fpa_aurax_cnt_levels_s cn73xx; +struct cvmx_fpa_aurax_cnt_levels_s cn78xx; +struct cvmx_fpa_aurax_cnt_levels_s cn78xxp1; +struct cvmx_fpa_aurax_cnt_levels_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_cnt_levels cvmx_fpa_aurax_cnt_levels_t ; + +/** +* cvmx_fpa_aura#_cnt_limit +*/ +union cvmx_fpa_aurax_cnt_limit { +u64 u64; +struct cvmx_fpa_aurax_cnt_limit_s { +u64 reserved_40_63 :24 ; +u64 limit :40 ; + } s; +struct cvmx_fpa_aurax_cnt_limit_s cn73xx; +struct cvmx_fpa_aurax_cnt_limit_s cn78xx; +struct cvmx_fpa_aurax_cnt_limit_s cn78xxp1; +struct cvmx_fpa_aurax_cnt_limit_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_cnt_limit cvmx_fpa_aurax_cnt_limit_t ; + +/** +* cvmx_fpa_aura#_cnt_threshold +*/ +union cvmx_fpa_aurax_cnt_threshold { +u64 u64; +struct cvmx_fpa_aurax_cnt_threshold_s { +u64 reserved_40_63 :24 ; +u64 thresh :40 ; + } s; +struct cvmx_fpa_aurax_cnt_threshold_s cn73xx; +struct cvmx_fpa_aurax_cnt_threshold_s cn78xx; +struct cvmx_fpa_aurax_cnt_threshold_s cn78xxp1; +struct cvmx_fpa_aurax_cnt_threshold_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_cnt_threshold cvmx_fpa_aurax_cnt_threshold_t ; + +/** +* cvmx_fpa_aura#_int +*/ +union cvmx_fpa_aurax_int { +u64 u64; +struct cvmx_fpa_aurax_int_s { +u64 reserved_1_63 :63 ; +u64 thresh :1 ; + } s; +struct cvmx_fpa_aurax_int_s cn73xx; +struct cvmx_fpa_aurax_int_s cn78xx; +struct cvmx_fpa_aurax_int_s cn78xxp1; +struct cvmx_fpa_aurax_int_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_int cvmx_fpa_aurax_int_t ; + +/** +* cvmx_fpa_aura#_pool +* +* Provides the mapping from each aura to the pool number. +* +*/ +union cvmx_fpa_aurax_pool { +u64 u64; +struct cvmx_fpa_aurax_pool_s { +u64 reserved_6_63 :58 ; +u64 pool :6 ; + } s; +struct cvmx_fpa_aurax_pool_s cn73xx; +struct cvmx_fpa_aurax_pool_s cn78xx; +struct cvmx_fpa_aurax_pool_s cn78xxp1; +struct cvmx_fpa_aurax_pool_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_pool cvmx_fpa_aurax_pool_t ; + +/** +* cvmx_fpa_aura#_pool_levels +*/ +union cvmx_fpa_aurax_pool_levels { +u64 u64; +struct cvmx_fpa_aurax_pool_levels_s { +u64 reserved_41_63 :23 ; +u64 drop_dis :1 ; +u64 bp_ena :1 ; +u64 red_ena :1 ; +u64 shift :6 ; +u64 bp :8 ; +u64 drop :8 ; +u64 pass :8 ; +u64 level :8 ; + } s; +struct cvmx_fpa_aurax_pool_levels_s cn73xx; +struct cvmx_fpa_aurax_pool_levels_s cn78xx; +struct cvmx_fpa_aurax_pool_levels_s cn78xxp1; +struct cvmx_fpa_aurax_pool_levels_s cnf75xx; +}; + +typedef union cvmx_fpa_aurax_pool_levels cvmx_fpa_aurax_pool_levels_t ; + +/** +* cvmx_fpa_bist_status +* +* This register provides the result of the BIST run on the FPA memories. +* +*/ +union cvmx_fpa_bist_status { +u64 u64; +struct cvmx_fpa_bist_status_s { +u64 reserved_0_63 :64 ; + } s; +struct cvmx_fpa_bist_status_cn30xx { +u64 reserved_5_63 :59 ; +u64 frd :1 ; +u64 fpf0 :1 ; +u64 fpf1 :1 ; +u64 ffr :1 ; +u64 fdr :1 ; + } cn30xx; +struct cvmx_fpa_bist_status_cn30xx cn31xx; +struct cvmx_fpa_bist_status_cn30xx cn38xx; +struct cvmx_fpa_bist_status_cn30xx cn38xxp2; +struct cvmx_fpa_bist_status_cn30xx cn50xx; +struct cvmx_fpa_bist_status_cn30xx cn52xx; +struct cvmx_fpa_bist_status_cn30xx cn52xxp1; +struct cvmx_fpa_bist_status_cn30xx cn56xx; +struct cvmx_fpa_bist_status_cn30xx cn56xxp1; +struct cvmx_fpa_bist_status_cn30xx cn58xx; +struct cvmx_fpa_bist_status_cn30xx cn58xxp1; +struct cvmx_fpa_bist_status_cn30xx cn61xx; +struct cvmx_fpa_bist_status_cn30xx cn63xx; +struct cvmx_fpa_bist_status_cn30xx cn63xxp1; +struct cvmx_fpa_bist_status_cn30xx cn66xx; +struct cvmx_fpa_bist_status_cn30xx cn68xx; +struct cvmx_fpa_bist_status_cn30xx cn68xxp1; +struct cvmx_fpa_bist_status_cn30xx cn70xx; +struct cvmx_fpa_bist_status_cn30xx cn70xxp1; +struct cvmx_fpa_bist_status_cn73xx { +u64 reserved_38_63 :26 ; +u64 status :38 ; + } cn73xx; +struct cvmx_fpa_bist_status_cn73xx cn78xx; +struct cvmx_fpa_bist_status_cn73xx cn78xxp1; +struct cvmx_fpa_bist_status_cn30xx cnf71xx; +struct cvmx_fpa_bist_status_cn73xx cnf75xx; +}; + +typedef union cvmx_fpa_bist_status cvmx_fpa_bist_status_t ; + +/** +* cvmx_fpa_clk_count +* +* This register counts the number of coprocessor-clock cycles since the deassertion of reset. +* +*/ +union cvmx_fpa_clk_count { +u64 u64; +struct cvmx_fpa_clk_count_s { +u64 clk_cnt :64 ; + } s; +struct cvmx_fpa_clk_count_s cn73xx; +struct cvmx_fpa_clk_count_s cn78xx; +struct cvmx_fpa_clk_count_s cn78xxp1; +struct cvmx_fpa_clk_count_s cnf75xx; +}; + +typedef union cvmx_fpa_clk_count cvmx_fpa_clk_count_t ; + +/** +* cvmx_fpa_ctl_status +* +* The FPA's interrupt enable register. +* +*/ +union cvmx_fpa_ctl_status { +u64 u64; +struct cvmx_fpa_ctl_status_s { +u64 reserved_21_63 :43 ; +u64 free_en :1 ; +u64 ret_off :1 ; +u64 req_off :1 ; +u64 reset :1 ; +u64 use_ldt :1 ; +u64 use_stt :1 ; +u64 enb :1 ; +u64 mem1_err :7 ; +u64 mem0_err :7 ; + } s; +struct cvmx_fpa_ctl_status_cn30xx { +u64 reserved_18_63 :46 ; +u64 reset :1 ; +u64 use_ldt :1 ; +u64 use_stt :1 ; +u64 enb :1 ; +u64 mem1_err :7 ; +u64 mem0_err :7 ; + } cn30xx; +struct cvmx_fpa_ctl_status_cn30xx cn31xx; +struct cvmx_fpa_ctl_status_cn30xx cn38xx; +struct cvmx_fpa_ctl_status_cn30xx cn38xxp2; +struct cvmx_fpa_ctl_status_cn30xx cn50xx; +struct cvmx_fpa_ctl_status_cn30xx cn52xx; +struct cvmx_fpa_ctl_status_cn30xx cn52xxp1; +struct cvmx_fpa_ctl_status_cn30xx cn56xx; +struct cvmx_fpa_ctl_status_cn30xx cn56xxp1; +struct cvmx_fpa_ctl_status_cn30xx cn58xx; +struct cvmx_fpa_ctl_status_cn30xx cn58xxp1; +struct cvmx_fpa_ctl_status_s cn61xx; +struct cvmx_fpa_ctl_status_s cn63xx; +struct cvmx_fpa_ctl_status_cn30xx cn63xxp1; +struct cvmx_fpa_ctl_status_s cn66xx; +struct cvmx_fpa_ctl_status_s cn68xx; +struct cvmx_fpa_ctl_status_s cn68xxp1; +struct cvmx_fpa_ctl_status_s cn70xx; +struct cvmx_fpa_ctl_status_s cn70xxp1; +struct cvmx_fpa_ctl_status_s cnf71xx; +}; + +typedef union cvmx_fpa_ctl_status cvmx_fpa_ctl_status_t ; + +/** +* cvmx_fpa_ecc_ctl +* +* This register allows inserting ECC errors for testing. +* +*/ +union cvmx_fpa_ecc_ctl { +u64 u64; +struct cvmx_fpa_ecc_ctl_s { +u64 reserved_62_63 :2 ; +u64 ram_flip1 :20 ; +u64 reserved_41_41 :1 ; +u64 ram_flip0 :20 ; +u64 reserved_20_20 :1 ; +u64 ram_cdis :20 ; + } s; +struct cvmx_fpa_ecc_ctl_s cn73xx; +struct cvmx_fpa_ecc_ctl_s cn78xx; +struct cvmx_fpa_ecc_ctl_s cn78xxp1; +struct cvmx_fpa_ecc_ctl_s cnf75xx; +}; + +typedef union cvmx_fpa_ecc_ctl cvmx_fpa_ecc_ctl_t ; + +/** +* cvmx_fpa_ecc_int +* +* This register contains ECC error interrupt summary bits. +* +*/ +union cvmx_fpa_ecc_int { +u64 u64; +struct cvmx_fpa_ecc_int_s { +u64 reserved_52_63 :12 ; +u64 ram_dbe :20 ; +u64 reserved_20_31 :12 ; +u64 ram_sbe :20 ; + } s; +struct cvmx_fpa_ecc_int_s cn73xx; +struct cvmx_fpa_ecc_int_s cn78xx; +struct cvmx_fpa_ecc_int_s cn78xxp1; +struct cvmx_fpa_ecc_int_s cnf75xx; +}; + +typedef union cvmx_fpa_ecc_int cvmx_fpa_ecc_int_t ; + +/** +* cvmx_fpa_err_int +* +* This register contains the global (non-pool) error interrupt summary bits of the FPA. +* +*/ +union cvmx_fpa_err_int { +u64 u64; +struct cvmx_fpa_err_int_s { +u64 reserved_4_63 :60 ; +u64 hw_sub :1 ; +u64 hw_add :1 ; +u64 cnt_sub :1 ; +u64 cnt_add :1 ; + } s; +struct cvmx_fpa_err_int_s cn73xx; +struct cvmx_fpa_err_int_s cn78xx; +struct cvmx_fpa_err_int_s cn78xxp1; +struct cvmx_fpa_err_int_s cnf75xx; +}; + +typedef union cvmx_fpa_err_int cvmx_fpa_err_int_t ; + +/** +* cvmx_fpa_fpf#_marks +* +* "The high and low watermark register that determines when we write and read free pages from +* L2C +* for Queue 1. The value of FPF_RD and FPF_WR should have at least a 33 difference. Recommend +* value +* is FPF_RD == (FPA_FPF#_SIZE[FPF_SIZ] * .25) and FPF_WR == (FPA_FPF#_SIZE[FPF_SIZ] * .75)" +*/ +union cvmx_fpa_fpfx_marks { +u64 u64; +struct cvmx_fpa_fpfx_marks_s { +u64 reserved_22_63 :42 ; +u64 fpf_wr :11 ; +u64 fpf_rd :11 ; + } s; +struct cvmx_fpa_fpfx_marks_s cn38xx; +struct cvmx_fpa_fpfx_marks_s cn38xxp2; +struct cvmx_fpa_fpfx_marks_s cn56xx; +struct cvmx_fpa_fpfx_marks_s cn56xxp1; +struct cvmx_fpa_fpfx_marks_s cn58xx; +struct cvmx_fpa_fpfx_marks_s cn58xxp1; +struct cvmx_fpa_fpfx_marks_s cn61xx; +struct cvmx_fpa_fpfx_marks_s cn63xx; +struct cvmx_fpa_fpfx_marks_s cn63xxp1; +struct cvmx_fpa_fpfx_marks_s cn66xx; +struct cvmx_fpa_fpfx_marks_s cn68xx; +struct cvmx_fpa_fpfx_marks_s cn68xxp1; +struct cvmx_fpa_fpfx_marks_s cn70xx; +struct cvmx_fpa_fpfx_marks_s cn70xxp1; +struct cvmx_fpa_fpfx_marks_s cnf71xx; +}; + +typedef union cvmx_fpa_fpfx_marks cvmx_fpa_fpfx_marks_t ; + +/** +* cvmx_fpa_fpf#_size +* +* "FPA_FPFX_SIZE = FPA's Queue 1-7 Free Page FIFO Size +* The number of page pointers that will be kept local to the FPA for this Queue. FPA Queues are +* assigned in order from Queue 0 to Queue 7, though only Queue 0 through Queue x can be used. +* The sum of the 8 (0-7) FPA_FPF#_SIZE registers must be limited to 2048." +*/ +union cvmx_fpa_fpfx_size { +u64 u64; +struct cvmx_fpa_fpfx_size_s { +u64 reserved_11_63 :53 ; +u64 fpf_siz :11 ; + } s; +struct cvmx_fpa_fpfx_size_s cn38xx; +struct cvmx_fpa_fpfx_size_s cn38xxp2; +struct cvmx_fpa_fpfx_size_s cn56xx; +struct cvmx_fpa_fpfx_size_s cn56xxp1; +struct cvmx_fpa_fpfx_size_s cn58xx; +struct cvmx_fpa_fpfx_size_s cn58xxp1; +struct cvmx_fpa_fpfx_size_s cn61xx; +struct cvmx_fpa_fpfx_size_s cn63xx; +struct cvmx_fpa_fpfx_size_s cn63xxp1; +struct cvmx_fpa_fpfx_size_s cn66xx; +struct cvmx_fpa_fpfx_size_s cn68xx; +struct cvmx_fpa_fpfx_size_s cn68xxp1; +struct cvmx_fpa_fpfx_size_s cn70xx; +struct cvmx_fpa_fpfx_size_s cn70xxp1; +struct cvmx_fpa_fpfx_size_s cnf71xx; +}; + +typedef union cvmx_fpa_fpfx_size cvmx_fpa_fpfx_size_t ; + +/** +* cvmx_fpa_fpf0_marks +* +* "The high and low watermark register that determines when we write and read free pages from +* L2C +* for Queue 0. The value of FPF_RD and FPF_WR should have at least a 33 difference. Recommend +* value +* is FPF_RD == (FPA_FPF#_SIZE[FPF_SIZ] * .25) and FPF_WR == (FPA_FPF#_SIZE[FPF_SIZ] * .75)" +*/ +union cvmx_fpa_fpf0_marks { +u64 u64; +struct cvmx_fpa_fpf0_marks_s { +u64 reserved_24_63 :40 ; +u64 fpf_wr :12 ; +u64 fpf_rd :12 ; + } s; +struct cvmx_fpa_fpf0_marks_s cn38xx; +struct cvmx_fpa_fpf0_marks_s cn38xxp2; +struct cvmx_fpa_fpf0_marks_s cn56xx; +struct cvmx_fpa_fpf0_marks_s cn56xxp1; +struct cvmx_fpa_fpf0_marks_s cn58xx; +struct cvmx_fpa_fpf0_marks_s cn58xxp1; +struct cvmx_fpa_fpf0_marks_s cn61xx; +struct cvmx_fpa_fpf0_marks_s cn63xx; +struct cvmx_fpa_fpf0_marks_s cn63xxp1; +struct cvmx_fpa_fpf0_marks_s cn66xx; +struct cvmx_fpa_fpf0_marks_s cn68xx; +struct cvmx_fpa_fpf0_marks_s cn68xxp1; +struct cvmx_fpa_fpf0_marks_s cn70xx; +struct cvmx_fpa_fpf0_marks_s cn70xxp1; +struct cvmx_fpa_fpf0_marks_s cnf71xx; +}; + +typedef union cvmx_fpa_fpf0_marks cvmx_fpa_fpf0_marks_t ; + +/** +* cvmx_fpa_fpf0_size +* +* "The number of page pointers that will be kept local to the FPA for this Queue. FPA Queues are +* assigned in order from Queue 0 to Queue 7, though only Queue 0 through Queue x can be used. +* The sum of the 8 (0-7) FPA_FPF#_SIZE registers must be limited to 2048." +*/ +union cvmx_fpa_fpf0_size { +u64 u64; +struct cvmx_fpa_fpf0_size_s { +u64 reserved_12_63 :52 ; +u64 fpf_siz :12 ; + } s; +struct cvmx_fpa_fpf0_size_s cn38xx; +struct cvmx_fpa_fpf0_size_s cn38xxp2; +struct cvmx_fpa_fpf0_size_s cn56xx; +struct cvmx_fpa_fpf0_size_s cn56xxp1; +struct cvmx_fpa_fpf0_size_s cn58xx; +struct cvmx_fpa_fpf0_size_s cn58xxp1; +struct cvmx_fpa_fpf0_size_s cn61xx; +struct cvmx_fpa_fpf0_size_s cn63xx; +struct cvmx_fpa_fpf0_size_s cn63xxp1; +struct cvmx_fpa_fpf0_size_s cn66xx; +struct cvmx_fpa_fpf0_size_s cn68xx; +struct cvmx_fpa_fpf0_size_s cn68xxp1; +struct cvmx_fpa_fpf0_size_s cn70xx; +struct cvmx_fpa_fpf0_size_s cn70xxp1; +struct cvmx_fpa_fpf0_size_s cnf71xx; +}; + +typedef union cvmx_fpa_fpf0_size cvmx_fpa_fpf0_size_t ; + +/** +* cvmx_fpa_fpf8_marks +* +* Reserved through 0x238 for additional thresholds +* +* FPA_FPF8_MARKS = FPA's Queue 8 Free Page FIFO Read Write Marks +* +* The high and low watermark register that determines when we write and read free pages from L2C +* for Queue 8. The value of FPF_RD and FPF_WR should have at least a 33 difference. Recommend value +* is FPF_RD == (FPA_FPF#_SIZE[FPF_SIZ] * .25) and FPF_WR == (FPA_FPF#_SIZE[FPF_SIZ] * .75) +*/ +union cvmx_fpa_fpf8_marks { +u64 u64; +struct cvmx_fpa_fpf8_marks_s { +u64 reserved_22_63 :42 ; +u64 fpf_wr :11 ; +u64 fpf_rd :11 ; + } s; +struct cvmx_fpa_fpf8_marks_s cn68xx; +struct cvmx_fpa_fpf8_marks_s cn68xxp1; +}; + +typedef union cvmx_fpa_fpf8_marks cvmx_fpa_fpf8_marks_t ; + +/** +* cvmx_fpa_fpf8_size +* +* FPA_FPF8_SIZE = FPA's Queue 8 Free Page FIFO Size +* +* The number of page pointers that will be kept local to the FPA for this Queue. FPA Queues are +* assigned in order from Queue 0 to Queue 7, though only Queue 0 through Queue x can be used. +* The sum of the 9 (0-8) FPA_FPF#_SIZE registers must be limited to 2048. +*/ +union cvmx_fpa_fpf8_size { +u64 u64; +struct cvmx_fpa_fpf8_size_s { +u64 reserved_12_63 :52 ; +u64 fpf_siz :12 ; + } s; +struct cvmx_fpa_fpf8_size_s cn68xx; +struct cvmx_fpa_fpf8_size_s cn68xxp1; +}; + +typedef union cvmx_fpa_fpf8_size cvmx_fpa_fpf8_size_t ; + +/** +* cvmx_fpa_gen_cfg +* +* This register provides FPA control and status information. +* +*/ +union cvmx_fpa_gen_cfg { +u64 u64; +struct cvmx_fpa_gen_cfg_s { +u64 reserved_12_63 :52 ; +u64 halfrate :1 ; +u64 ocla_bp :1 ; +u64 lvl_dly :6 ; +u64 pools :2 ; +u64 avg_en :1 ; +u64 clk_override :1 ; + } s; +struct cvmx_fpa_gen_cfg_s cn73xx; +struct cvmx_fpa_gen_cfg_s cn78xx; +struct cvmx_fpa_gen_cfg_s cn78xxp1; +struct cvmx_fpa_gen_cfg_s cnf75xx; +}; + +typedef union cvmx_fpa_gen_cfg cvmx_fpa_gen_cfg_t ; + +/** +* cvmx_fpa_int_enb +* +* The FPA's interrupt enable register. +* +*/ +union cvmx_fpa_int_enb { +u64 u64; +struct cvmx_fpa_int_enb_s { +u64 reserved_50_63 :14 ; +u64 paddr_e :1 ; +u64 reserved_44_48 :5 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } s; +struct cvmx_fpa_int_enb_cn30xx { +u64 reserved_28_63 :36 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn30xx; +struct cvmx_fpa_int_enb_cn30xx cn31xx; +struct cvmx_fpa_int_enb_cn30xx cn38xx; +struct cvmx_fpa_int_enb_cn30xx cn38xxp2; +struct cvmx_fpa_int_enb_cn30xx cn50xx; +struct cvmx_fpa_int_enb_cn30xx cn52xx; +struct cvmx_fpa_int_enb_cn30xx cn52xxp1; +struct cvmx_fpa_int_enb_cn30xx cn56xx; +struct cvmx_fpa_int_enb_cn30xx cn56xxp1; +struct cvmx_fpa_int_enb_cn30xx cn58xx; +struct cvmx_fpa_int_enb_cn30xx cn58xxp1; +struct cvmx_fpa_int_enb_cn61xx { +u64 reserved_50_63 :14 ; +u64 paddr_e :1 ; +u64 res_44 :5 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn61xx; +struct cvmx_fpa_int_enb_cn63xx { +u64 reserved_44_63 :20 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn63xx; +struct cvmx_fpa_int_enb_cn30xx cn63xxp1; +struct cvmx_fpa_int_enb_cn61xx cn66xx; +struct cvmx_fpa_int_enb_cn68xx { +u64 reserved_50_63 :14 ; +u64 paddr_e :1 ; +u64 pool8th :1 ; +u64 q8_perr :1 ; +u64 q8_coff :1 ; +u64 q8_und :1 ; +u64 free8 :1 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn68xx; +struct cvmx_fpa_int_enb_cn68xx cn68xxp1; +struct cvmx_fpa_int_enb_cn61xx cn70xx; +struct cvmx_fpa_int_enb_cn61xx cn70xxp1; +struct cvmx_fpa_int_enb_cn61xx cnf71xx; +}; + +typedef union cvmx_fpa_int_enb cvmx_fpa_int_enb_t ; + +/** +* cvmx_fpa_int_sum +* +* Contains the different interrupt summary bits of the FPA. +* +*/ +union cvmx_fpa_int_sum { +u64 u64; +struct cvmx_fpa_int_sum_s { +u64 reserved_50_63 :14 ; +u64 paddr_e :1 ; +u64 pool8th :1 ; +u64 q8_perr :1 ; +u64 q8_coff :1 ; +u64 q8_und :1 ; +u64 free8 :1 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } s; +struct cvmx_fpa_int_sum_cn30xx { +u64 reserved_28_63 :36 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn30xx; +struct cvmx_fpa_int_sum_cn30xx cn31xx; +struct cvmx_fpa_int_sum_cn30xx cn38xx; +struct cvmx_fpa_int_sum_cn30xx cn38xxp2; +struct cvmx_fpa_int_sum_cn30xx cn50xx; +struct cvmx_fpa_int_sum_cn30xx cn52xx; +struct cvmx_fpa_int_sum_cn30xx cn52xxp1; +struct cvmx_fpa_int_sum_cn30xx cn56xx; +struct cvmx_fpa_int_sum_cn30xx cn56xxp1; +struct cvmx_fpa_int_sum_cn30xx cn58xx; +struct cvmx_fpa_int_sum_cn30xx cn58xxp1; +struct cvmx_fpa_int_sum_cn61xx { +u64 reserved_50_63 :14 ; +u64 paddr_e :1 ; +u64 reserved_44_48 :5 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn61xx; +struct cvmx_fpa_int_sum_cn63xx { +u64 reserved_44_63 :20 ; +u64 free7 :1 ; +u64 free6 :1 ; +u64 free5 :1 ; +u64 free4 :1 ; +u64 free3 :1 ; +u64 free2 :1 ; +u64 free1 :1 ; +u64 free0 :1 ; +u64 pool7th :1 ; +u64 pool6th :1 ; +u64 pool5th :1 ; +u64 pool4th :1 ; +u64 pool3th :1 ; +u64 pool2th :1 ; +u64 pool1th :1 ; +u64 pool0th :1 ; +u64 q7_perr :1 ; +u64 q7_coff :1 ; +u64 q7_und :1 ; +u64 q6_perr :1 ; +u64 q6_coff :1 ; +u64 q6_und :1 ; +u64 q5_perr :1 ; +u64 q5_coff :1 ; +u64 q5_und :1 ; +u64 q4_perr :1 ; +u64 q4_coff :1 ; +u64 q4_und :1 ; +u64 q3_perr :1 ; +u64 q3_coff :1 ; +u64 q3_und :1 ; +u64 q2_perr :1 ; +u64 q2_coff :1 ; +u64 q2_und :1 ; +u64 q1_perr :1 ; +u64 q1_coff :1 ; +u64 q1_und :1 ; +u64 q0_perr :1 ; +u64 q0_coff :1 ; +u64 q0_und :1 ; +u64 fed1_dbe :1 ; +u64 fed1_sbe :1 ; +u64 fed0_dbe :1 ; +u64 fed0_sbe :1 ; + } cn63xx; +struct cvmx_fpa_int_sum_cn30xx cn63xxp1; +struct cvmx_fpa_int_sum_cn61xx cn66xx; +struct cvmx_fpa_int_sum_s cn68xx; +struct cvmx_fpa_int_sum_s cn68xxp1; +struct cvmx_fpa_int_sum_cn61xx cn70xx; +struct cvmx_fpa_int_sum_cn61xx cn70xxp1; +struct cvmx_fpa_int_sum_cn61xx cnf71xx; +}; + +typedef union cvmx_fpa_int_sum cvmx_fpa_int_sum_t ; + +/** +* cvmx_fpa_packet_threshold +* +* When the value of FPA_QUE0_AVAILABLE[QUE_SIZ] is Less than the value of this register a low +* pool count signal is sent to the +* PCIe packet instruction engine (to make it stop reading instructions) and to the Packet- +* Arbiter informing it to not give grants +* to packets MAC with the exception of the PCIe MAC. +*/ +union cvmx_fpa_packet_threshold { +u64 u64; +struct cvmx_fpa_packet_threshold_s { +u64 reserved_32_63 :32 ; +u64 thresh :32 ; + } s; +struct cvmx_fpa_packet_threshold_s cn61xx; +struct cvmx_fpa_packet_threshold_s cn63xx; +struct cvmx_fpa_packet_threshold_s cn66xx; +struct cvmx_fpa_packet_threshold_s cn68xx; +struct cvmx_fpa_packet_threshold_s cn68xxp1; +struct cvmx_fpa_packet_threshold_s cn70xx; +struct cvmx_fpa_packet_threshold_s cn70xxp1; +struct cvmx_fpa_packet_threshold_s cnf71xx; +}; + +typedef union cvmx_fpa_packet_threshold cvmx_fpa_packet_threshold_t ; + +/** +* cvmx_fpa_pool#_available +*/ +union cvmx_fpa_poolx_available { +u64 u64; +struct cvmx_fpa_poolx_available_s { +u64 reserved_36_63 :28 ; +u64 count :36 ; + } s; +struct cvmx_fpa_poolx_available_s cn73xx; +struct cvmx_fpa_poolx_available_s cn78xx; +struct cvmx_fpa_poolx_available_s cn78xxp1; +struct cvmx_fpa_poolx_available_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_available cvmx_fpa_poolx_available_t ; + +/** +* cvmx_fpa_pool#_cfg +*/ +union cvmx_fpa_poolx_cfg { +u64 u64; +struct cvmx_fpa_poolx_cfg_s { +u64 reserved_43_63 :21 ; +u64 buf_size :11 ; +u64 reserved_31_31 :1 ; +u64 buf_offset :15 ; +u64 reserved_5_15 :11 ; +u64 l_type :2 ; +u64 s_type :1 ; +u64 nat_align :1 ; +u64 ena :1 ; + } s; +struct cvmx_fpa_poolx_cfg_s cn73xx; +struct cvmx_fpa_poolx_cfg_s cn78xx; +struct cvmx_fpa_poolx_cfg_s cn78xxp1; +struct cvmx_fpa_poolx_cfg_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_cfg cvmx_fpa_poolx_cfg_t ; + +/** +* cvmx_fpa_pool#_end_addr +* +* Pointers sent to this pool after alignment must be equal to or less than this address. +* +*/ +union cvmx_fpa_poolx_end_addr { +u64 u64; +struct cvmx_fpa_poolx_end_addr_s { +u64 reserved_0_63 :64 ; + } s; +struct cvmx_fpa_poolx_end_addr_cn61xx { +u64 reserved_33_63 :31 ; +u64 addr :33 ; + } cn61xx; +struct cvmx_fpa_poolx_end_addr_cn61xx cn66xx; +struct cvmx_fpa_poolx_end_addr_cn61xx cn68xx; +struct cvmx_fpa_poolx_end_addr_cn61xx cn68xxp1; +struct cvmx_fpa_poolx_end_addr_cn61xx cn70xx; +struct cvmx_fpa_poolx_end_addr_cn61xx cn70xxp1; +struct cvmx_fpa_poolx_end_addr_cn73xx { +u64 reserved_42_63 :22 ; +u64 addr :35 ; +u64 reserved_0_6 :7 ; + } cn73xx; +struct cvmx_fpa_poolx_end_addr_cn73xx cn78xx; +struct cvmx_fpa_poolx_end_addr_cn73xx cn78xxp1; +struct cvmx_fpa_poolx_end_addr_cn61xx cnf71xx; +struct cvmx_fpa_poolx_end_addr_cn73xx cnf75xx; +}; + +typedef union cvmx_fpa_poolx_end_addr cvmx_fpa_poolx_end_addr_t ; + +/** +* cvmx_fpa_pool#_fpf_marks +* +* The low watermark register that determines when we read free pages from L2C. +* +*/ +union cvmx_fpa_poolx_fpf_marks { +u64 u64; +struct cvmx_fpa_poolx_fpf_marks_s { +u64 reserved_27_63 :37 ; +u64 fpf_rd :11 ; +u64 reserved_11_15 :5 ; +u64 fpf_level :11 ; + } s; +struct cvmx_fpa_poolx_fpf_marks_s cn73xx; +struct cvmx_fpa_poolx_fpf_marks_s cn78xx; +struct cvmx_fpa_poolx_fpf_marks_s cn78xxp1; +struct cvmx_fpa_poolx_fpf_marks_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_fpf_marks cvmx_fpa_poolx_fpf_marks_t ; + +/** +* cvmx_fpa_pool#_int +* +* This register indicates pool interrupts. +* +*/ +union cvmx_fpa_poolx_int { +u64 u64; +struct cvmx_fpa_poolx_int_s { +u64 reserved_4_63 :60 ; +u64 thresh :1 ; +u64 range :1 ; +u64 crcerr :1 ; +u64 ovfls :1 ; + } s; +struct cvmx_fpa_poolx_int_s cn73xx; +struct cvmx_fpa_poolx_int_s cn78xx; +struct cvmx_fpa_poolx_int_s cn78xxp1; +struct cvmx_fpa_poolx_int_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_int cvmx_fpa_poolx_int_t ; + +/** +* cvmx_fpa_pool#_op_pc +*/ +union cvmx_fpa_poolx_op_pc { +u64 u64; +struct cvmx_fpa_poolx_op_pc_s { +u64 count :64 ; + } s; +struct cvmx_fpa_poolx_op_pc_s cn73xx; +struct cvmx_fpa_poolx_op_pc_s cn78xx; +struct cvmx_fpa_poolx_op_pc_s cn78xxp1; +struct cvmx_fpa_poolx_op_pc_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_op_pc cvmx_fpa_poolx_op_pc_t ; + +/** +* cvmx_fpa_pool#_stack_addr +*/ +union cvmx_fpa_poolx_stack_addr { +u64 u64; +struct cvmx_fpa_poolx_stack_addr_s { +u64 reserved_42_63 :22 ; +u64 addr :35 ; +u64 reserved_0_6 :7 ; + } s; +struct cvmx_fpa_poolx_stack_addr_s cn73xx; +struct cvmx_fpa_poolx_stack_addr_s cn78xx; +struct cvmx_fpa_poolx_stack_addr_s cn78xxp1; +struct cvmx_fpa_poolx_stack_addr_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_stack_addr cvmx_fpa_poolx_stack_addr_t ; + +/** +* cvmx_fpa_pool#_stack_base +*/ +union cvmx_fpa_poolx_stack_base { +u64 u64; +struct cvmx_fpa_poolx_stack_base_s { +u64 reserved_42_63 :22 ; +u64 addr :35 ; +u64 reserved_0_6 :7 ; + } s; +struct cvmx_fpa_poolx_stack_base_s cn73xx; +struct cvmx_fpa_poolx_stack_base_s cn78xx; +struct cvmx_fpa_poolx_stack_base_s cn78xxp1; +struct cvmx_fpa_poolx_stack_base_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_stack_base cvmx_fpa_poolx_stack_base_t ; + +/** +* cvmx_fpa_pool#_stack_end +*/ +union cvmx_fpa_poolx_stack_end { +u64 u64; +struct cvmx_fpa_poolx_stack_end_s { +u64 reserved_42_63 :22 ; +u64 addr :35 ; +u64 reserved_0_6 :7 ; + } s; +struct cvmx_fpa_poolx_stack_end_s cn73xx; +struct cvmx_fpa_poolx_stack_end_s cn78xx; +struct cvmx_fpa_poolx_stack_end_s cn78xxp1; +struct cvmx_fpa_poolx_stack_end_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_stack_end cvmx_fpa_poolx_stack_end_t ; + +/** +* cvmx_fpa_pool#_start_addr +* +* Pointers sent to this pool after alignment must be equal to or greater than this address. +* +*/ +union cvmx_fpa_poolx_start_addr { +u64 u64; +struct cvmx_fpa_poolx_start_addr_s { +u64 reserved_0_63 :64 ; + } s; +struct cvmx_fpa_poolx_start_addr_cn61xx { +u64 reserved_33_63 :31 ; +u64 addr :33 ; + } cn61xx; +struct cvmx_fpa_poolx_start_addr_cn61xx cn66xx; +struct cvmx_fpa_poolx_start_addr_cn61xx cn68xx; +struct cvmx_fpa_poolx_start_addr_cn61xx cn68xxp1; +struct cvmx_fpa_poolx_start_addr_cn61xx cn70xx; +struct cvmx_fpa_poolx_start_addr_cn61xx cn70xxp1; +struct cvmx_fpa_poolx_start_addr_cn73xx { +u64 reserved_42_63 :22 ; +u64 addr :35 ; +u64 reserved_0_6 :7 ; + } cn73xx; +struct cvmx_fpa_poolx_start_addr_cn73xx cn78xx; +struct cvmx_fpa_poolx_start_addr_cn73xx cn78xxp1; +struct cvmx_fpa_poolx_start_addr_cn61xx cnf71xx; +struct cvmx_fpa_poolx_start_addr_cn73xx cnf75xx; +}; + +typedef union cvmx_fpa_poolx_start_addr cvmx_fpa_poolx_start_addr_t ; + +/** +* cvmx_fpa_pool#_threshold +* +* FPA_POOLX_THRESHOLD = FPA's Pool 0-7 Threshold +* When the value of FPA_QUEX_AVAILABLE is equal to FPA_POOLX_THRESHOLD[THRESH] when a pointer is +* allocated +* or deallocated, set interrupt FPA_INT_SUM[POOLXTH]. +*/ +union cvmx_fpa_poolx_threshold { +u64 u64; +struct cvmx_fpa_poolx_threshold_s { +u64 reserved_36_63 :28 ; +u64 thresh :36 ; + } s; +struct cvmx_fpa_poolx_threshold_cn61xx { +u64 reserved_29_63 :35 ; +u64 thresh :29 ; + } cn61xx; +struct cvmx_fpa_poolx_threshold_cn61xx cn63xx; +struct cvmx_fpa_poolx_threshold_cn61xx cn66xx; +struct cvmx_fpa_poolx_threshold_cn68xx { +u64 reserved_32_63 :32 ; +u64 thresh :32 ; + } cn68xx; +struct cvmx_fpa_poolx_threshold_cn68xx cn68xxp1; +struct cvmx_fpa_poolx_threshold_cn61xx cn70xx; +struct cvmx_fpa_poolx_threshold_cn61xx cn70xxp1; +struct cvmx_fpa_poolx_threshold_s cn73xx; +struct cvmx_fpa_poolx_threshold_s cn78xx; +struct cvmx_fpa_poolx_threshold_s cn78xxp1; +struct cvmx_fpa_poolx_threshold_cn61xx cnf71xx; +struct cvmx_fpa_poolx_threshold_s cnf75xx; +}; + +typedef union cvmx_fpa_poolx_threshold cvmx_fpa_poolx_threshold_t ; + +/** +* cvmx_fpa_que#_available +* +* FPA_QUEX_PAGES_AVAILABLE = FPA's Queue 0-7 Free Page Available Register +* The number of page pointers that are available in the FPA and local DRAM. +*/ +union cvmx_fpa_quex_available { +u64 u64; +struct cvmx_fpa_quex_available_s { +u64 reserved_32_63 :32 ; +u64 que_siz :32 ; + } s; +struct cvmx_fpa_quex_available_cn30xx { +u64 reserved_29_63 :35 ; +u64 que_siz :29 ; + } cn30xx; +struct cvmx_fpa_quex_available_cn30xx cn31xx; +struct cvmx_fpa_quex_available_cn30xx cn38xx; +struct cvmx_fpa_quex_available_cn30xx cn38xxp2; +struct cvmx_fpa_quex_available_cn30xx cn50xx; +struct cvmx_fpa_quex_available_cn30xx cn52xx; +struct cvmx_fpa_quex_available_cn30xx cn52xxp1; +struct cvmx_fpa_quex_available_cn30xx cn56xx; +struct cvmx_fpa_quex_available_cn30xx cn56xxp1; +struct cvmx_fpa_quex_available_cn30xx cn58xx; +struct cvmx_fpa_quex_available_cn30xx cn58xxp1; +struct cvmx_fpa_quex_available_cn30xx cn61xx; +struct cvmx_fpa_quex_available_cn30xx cn63xx; +struct cvmx_fpa_quex_available_cn30xx cn63xxp1; +struct cvmx_fpa_quex_available_cn30xx cn66xx; +struct cvmx_fpa_quex_available_s cn68xx; +struct cvmx_fpa_quex_available_s cn68xxp1; +struct cvmx_fpa_quex_available_cn30xx cn70xx; +struct cvmx_fpa_quex_available_cn30xx cn70xxp1; +struct cvmx_fpa_quex_available_cn30xx cnf71xx; +}; + +typedef union cvmx_fpa_quex_available cvmx_fpa_quex_available_t ; + +/** +* cvmx_fpa_que#_page_index +* +* The present index page for queue 0 of the FPA. +* This number reflects the number of pages of pointers that have been written to memory +* for this queue. +*/ +union cvmx_fpa_quex_page_index { +u64 u64; +struct cvmx_fpa_quex_page_index_s { +u64 reserved_25_63 :39 ; +u64 pg_num :25 ; + } s; +struct cvmx_fpa_quex_page_index_s cn30xx; +struct cvmx_fpa_quex_page_index_s cn31xx; +struct cvmx_fpa_quex_page_index_s cn38xx; +struct cvmx_fpa_quex_page_index_s cn38xxp2; +struct cvmx_fpa_quex_page_index_s cn50xx; +struct cvmx_fpa_quex_page_index_s cn52xx; +struct cvmx_fpa_quex_page_index_s cn52xxp1; +struct cvmx_fpa_quex_page_index_s cn56xx; +struct cvmx_fpa_quex_page_index_s cn56xxp1; +struct cvmx_fpa_quex_page_index_s cn58xx; +struct cvmx_fpa_quex_page_index_s cn58xxp1; +struct cvmx_fpa_quex_page_index_s cn61xx; +struct cvmx_fpa_quex_page_index_s cn63xx; +struct cvmx_fpa_quex_page_index_s cn63xxp1; +struct cvmx_fpa_quex_page_index_s cn66xx; +struct cvmx_fpa_quex_page_index_s cn68xx; +struct cvmx_fpa_quex_page_index_s cn68xxp1; +struct cvmx_fpa_quex_page_index_s cn70xx; +struct cvmx_fpa_quex_page_index_s cn70xxp1; +struct cvmx_fpa_quex_page_index_s cnf71xx; +}; + +typedef union cvmx_fpa_quex_page_index cvmx_fpa_quex_page_index_t ; + +/** +* cvmx_fpa_que8_page_index +* +* FPA_QUE8_PAGE_INDEX = FPA's Queue7 Page Index +* +* The present index page for queue 7 of the FPA. +* This number reflects the number of pages of pointers that have been written to memory +* for this queue. +* Because the address space is 38-bits the number of 128 byte pages could cause this register value to wrap. +*/ +union cvmx_fpa_que8_page_index { +u64 u64; +struct cvmx_fpa_que8_page_index_s { +u64 reserved_25_63 :39 ; +u64 pg_num :25 ; + } s; +struct cvmx_fpa_que8_page_index_s cn68xx; +struct cvmx_fpa_que8_page_index_s cn68xxp1; +}; + +typedef union cvmx_fpa_que8_page_index cvmx_fpa_que8_page_index_t ; + +/** +* cvmx_fpa_que_act +* +* "When a INT_SUM[PERR#] occurs this will be latched with the value read from L2C. +* This is latched on the first error and will not latch again unitl all errors are cleared." +*/ +union cvmx_fpa_que_act { +u64 u64; +struct cvmx_fpa_que_act_s { +u64 reserved_29_63 :35 ; +u64 act_que :3 ; +u64 act_indx :26 ; + } s; +struct cvmx_fpa_que_act_s cn30xx; +struct cvmx_fpa_que_act_s cn31xx; +struct cvmx_fpa_que_act_s cn38xx; +struct cvmx_fpa_que_act_s cn38xxp2; +struct cvmx_fpa_que_act_s cn50xx; +struct cvmx_fpa_que_act_s cn52xx; +struct cvmx_fpa_que_act_s cn52xxp1; +struct cvmx_fpa_que_act_s cn56xx; +struct cvmx_fpa_que_act_s cn56xxp1; +struct cvmx_fpa_que_act_s cn58xx; +struct cvmx_fpa_que_act_s cn58xxp1; +struct cvmx_fpa_que_act_s cn61xx; +struct cvmx_fpa_que_act_s cn63xx; +struct cvmx_fpa_que_act_s cn63xxp1; +struct cvmx_fpa_que_act_s cn66xx; +struct cvmx_fpa_que_act_s cn68xx; +struct cvmx_fpa_que_act_s cn68xxp1; +struct cvmx_fpa_que_act_s cn70xx; +struct cvmx_fpa_que_act_s cn70xxp1; +struct cvmx_fpa_que_act_s cnf71xx; +}; + +typedef union cvmx_fpa_que_act cvmx_fpa_que_act_t ; + +/** +* cvmx_fpa_que_exp +* +* "When a INT_SUM[PERR#] occurs this will be latched with the expected value. +* This is latched on the first error and will not latch again unitl all errors are cleared." +*/ +union cvmx_fpa_que_exp { +u64 u64; +struct cvmx_fpa_que_exp_s { +u64 reserved_29_63 :35 ; +u64 exp_que :3 ; +u64 exp_indx :26 ; + } s; +struct cvmx_fpa_que_exp_s cn30xx; +struct cvmx_fpa_que_exp_s cn31xx; +struct cvmx_fpa_que_exp_s cn38xx; +struct cvmx_fpa_que_exp_s cn38xxp2; +struct cvmx_fpa_que_exp_s cn50xx; +struct cvmx_fpa_que_exp_s cn52xx; +struct cvmx_fpa_que_exp_s cn52xxp1; +struct cvmx_fpa_que_exp_s cn56xx; +struct cvmx_fpa_que_exp_s cn56xxp1; +struct cvmx_fpa_que_exp_s cn58xx; +struct cvmx_fpa_que_exp_s cn58xxp1; +struct cvmx_fpa_que_exp_s cn61xx; +struct cvmx_fpa_que_exp_s cn63xx; +struct cvmx_fpa_que_exp_s cn63xxp1; +struct cvmx_fpa_que_exp_s cn66xx; +struct cvmx_fpa_que_exp_s cn68xx; +struct cvmx_fpa_que_exp_s cn68xxp1; +struct cvmx_fpa_que_exp_s cn70xx; +struct cvmx_fpa_que_exp_s cn70xxp1; +struct cvmx_fpa_que_exp_s cnf71xx; +}; + +typedef union cvmx_fpa_que_exp cvmx_fpa_que_exp_t ; + +/** +* cvmx_fpa_rd_latency_pc +*/ +union cvmx_fpa_rd_latency_pc { +u64 u64; +struct cvmx_fpa_rd_latency_pc_s { +u64 count :64 ; + } s; +struct cvmx_fpa_rd_latency_pc_s cn73xx; +struct cvmx_fpa_rd_latency_pc_s cn78xx; +struct cvmx_fpa_rd_latency_pc_s cn78xxp1; +struct cvmx_fpa_rd_latency_pc_s cnf75xx; +}; + +typedef union cvmx_fpa_rd_latency_pc cvmx_fpa_rd_latency_pc_t ; + +/** +* cvmx_fpa_rd_req_pc +*/ +union cvmx_fpa_rd_req_pc { +u64 u64; +struct cvmx_fpa_rd_req_pc_s { +u64 count :64 ; + } s; +struct cvmx_fpa_rd_req_pc_s cn73xx; +struct cvmx_fpa_rd_req_pc_s cn78xx; +struct cvmx_fpa_rd_req_pc_s cn78xxp1; +struct cvmx_fpa_rd_req_pc_s cnf75xx; +}; + +typedef union cvmx_fpa_rd_req_pc cvmx_fpa_rd_req_pc_t ; + +/** +* cvmx_fpa_red_delay +*/ +union cvmx_fpa_red_delay { +u64 u64; +struct cvmx_fpa_red_delay_s { +u64 reserved_14_63 :50 ; +u64 avg_dly :14 ; + } s; +struct cvmx_fpa_red_delay_s cn73xx; +struct cvmx_fpa_red_delay_s cn78xx; +struct cvmx_fpa_red_delay_s cn78xxp1; +struct cvmx_fpa_red_delay_s cnf75xx; +}; + +typedef union cvmx_fpa_red_delay cvmx_fpa_red_delay_t ; + +/** +* cvmx_fpa_sft_rst +* +* Allows soft reset. +* +*/ +union cvmx_fpa_sft_rst { +u64 u64; +struct cvmx_fpa_sft_rst_s { +u64 busy :1 ; +u64 reserved_1_62 :62 ; +u64 rst :1 ; + } s; +struct cvmx_fpa_sft_rst_s cn73xx; +struct cvmx_fpa_sft_rst_s cn78xx; +struct cvmx_fpa_sft_rst_s cn78xxp1; +struct cvmx_fpa_sft_rst_s cnf75xx; +}; + +typedef union cvmx_fpa_sft_rst cvmx_fpa_sft_rst_t ; + +/** +* cvmx_fpa_wart_ctl +* +* FPA_WART_CTL = FPA's WART Control +* +* Control and status for the WART block. +*/ +union cvmx_fpa_wart_ctl { +u64 u64; +struct cvmx_fpa_wart_ctl_s { +u64 reserved_16_63 :48 ; +u64 ctl :16 ; + } s; +struct cvmx_fpa_wart_ctl_s cn30xx; +struct cvmx_fpa_wart_ctl_s cn31xx; +struct cvmx_fpa_wart_ctl_s cn38xx; +struct cvmx_fpa_wart_ctl_s cn38xxp2; +struct cvmx_fpa_wart_ctl_s cn50xx; +struct cvmx_fpa_wart_ctl_s cn52xx; +struct cvmx_fpa_wart_ctl_s cn52xxp1; +struct cvmx_fpa_wart_ctl_s cn56xx; +struct cvmx_fpa_wart_ctl_s cn56xxp1; +struct cvmx_fpa_wart_ctl_s cn58xx; +struct cvmx_fpa_wart_ctl_s cn58xxp1; +}; + +typedef union cvmx_fpa_wart_ctl cvmx_fpa_wart_ctl_t ; + +/** +* cvmx_fpa_wart_status +* +* FPA_WART_STATUS = FPA's WART Status +* +* Control and status for the WART block. +*/ +union cvmx_fpa_wart_status { +u64 u64; +struct cvmx_fpa_wart_status_s { +u64 reserved_32_63 :32 ; +u64 status :32 ; + } s; +struct cvmx_fpa_wart_status_s cn30xx; +struct cvmx_fpa_wart_status_s cn31xx; +struct cvmx_fpa_wart_status_s cn38xx; +struct cvmx_fpa_wart_status_s cn38xxp2; +struct cvmx_fpa_wart_status_s cn50xx; +struct cvmx_fpa_wart_status_s cn52xx; +struct cvmx_fpa_wart_status_s cn52xxp1; +struct cvmx_fpa_wart_status_s cn56xx; +struct cvmx_fpa_wart_status_s cn56xxp1; +struct cvmx_fpa_wart_status_s cn58xx; +struct cvmx_fpa_wart_status_s cn58xxp1; +}; + +typedef union cvmx_fpa_wart_status cvmx_fpa_wart_status_t ; + +/** +* cvmx_fpa_wqe_threshold +* +* "When the value of FPA_QUE#_AVAILABLE[QUE_SIZ] (\# is determined by the value of +* IPD_WQE_FPA_QUEUE) is Less than the value of this +* register a low pool count signal is sent to the PCIe packet instruction engine (to make it +* stop reading instructions) and to the +* Packet-Arbiter informing it to not give grants to packets MAC with the exception of the PCIe +* MAC." +*/ +union cvmx_fpa_wqe_threshold { +u64 u64; +struct cvmx_fpa_wqe_threshold_s { +u64 reserved_32_63 :32 ; +u64 thresh :32 ; + } s; +struct cvmx_fpa_wqe_threshold_s cn61xx; +struct cvmx_fpa_wqe_threshold_s cn63xx; +struct cvmx_fpa_wqe_threshold_s cn66xx; +struct cvmx_fpa_wqe_threshold_s cn68xx; +struct cvmx_fpa_wqe_threshold_s cn68xxp1; +struct cvmx_fpa_wqe_threshold_s cn70xx; +struct cvmx_fpa_wqe_threshold_s cn70xxp1; +struct cvmx_fpa_wqe_threshold_s cnf71xx; +}; + +typedef union cvmx_fpa_wqe_threshold cvmx_fpa_wqe_threshold_t ; + +#endif
Signature · 1 line
2.29.2
PATCH 11/50 mips: octeon: Add cvmx-gmxx-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-gmxx-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../mach-octeon/include/mach/cvmx-gmxx-defs.h | 6378 +++++++++++++++++ 1 file changed, 6378 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-gmxx-defs.h
arch/mips/mach-octeon/include/mach/cvmx-gmxx-defs.h new file +6378 -0
@@ -0,0 +1,6378 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +* +* Configuration and status register (CSR) type definitions for +* Octeon gmxx. +*/ + +#ifndef __CVMX_GMXX_DEFS_H__ +#define __CVMX_GMXX_DEFS_H__ + +static inline u64 CVMX_GMXX_BAD_REG (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000518ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000518ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000518ull + (offset) *0x1000000ull ; + } +return 0x0001180008000518ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_BIST (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000400ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000400ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000400ull + (offset) *0x1000000ull ; + } +return 0x0001180008000400ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_BPID_MAPX (offset, block_id) \ + (0x0001180008000680ull + (((offset) & 15) + ((block_id) & 7) * 0x200000ull) * 8) +#define CVMX_GMXX_BPID_MSK (offset) (0x0001180008000700ull + ((offset) & 7) * 0x1000000ull) +static inline u64 CVMX_GMXX_CLK_EN (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x00011800080007F0ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080007F0ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080007F0ull + (offset) *0x1000000ull ; + } +return 0x00011800080007F0ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_EBP_DIS (offset) (0x0001180008000608ull + ((offset) & 7) * 0x1000000ull) +#define CVMX_GMXX_EBP_MSK (offset) (0x0001180008000600ull + ((offset) & 7) * 0x1000000ull) +static inline u64 CVMX_GMXX_HG2_CONTROL (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000550ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000550ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000550ull + (offset) *0x1000000ull ; + } +return 0x0001180008000550ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_INF_MODE (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080007F8ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080007F8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080007F8ull + (offset) *0x1000000ull ; + } +return 0x00011800080007F8ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_NXA_ADR (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000510ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000510ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000510ull + (offset) *0x1000000ull ; + } +return 0x0001180008000510ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_PIPE_STATUS (offset) (0x0001180008000760ull + ((offset) & 7) * 0x1000000ull) +static inline u64 CVMX_GMXX_PRTX_CBFC_CTL (unsigned long __attribute__((unused)) offset, +unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000580ull + (block_id) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000580ull + (block_id) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000580ull + (block_id) *0x1000000ull ; + } +return 0x0001180008000580ull + (block_id) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_PRTX_CFG (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000010ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000010ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000010ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +#define CVMX_GMXX_QSGMII_CTL (offset) (0x0001180008000760ull + ((offset) & 1) * 0x8000000ull) +static inline u64 CVMX_GMXX_RXAUI_CTL (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +return 0x0001180008000740ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000740ull + (offset) *0x1000000ull ; + } +return 0x0001180008000740ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM0 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000180ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000180ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000180ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM1 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000188ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000188ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000188ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM2 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000190ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000190ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000190ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM3 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000198ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000198ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000198ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM4 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080001A0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080001A0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080001A0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM5 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080001A8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080001A8ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080001A8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM_ALL_EN (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000110ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000110ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000110ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000110ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CAM_EN (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000108ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000108ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000108ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_ADR_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000100ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000100ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000100ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_DECISION (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000040ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000040ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000040ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_FRM_CHK (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000020ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000020ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000020ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_FRM_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000018ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000018ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000018ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +#define CVMX_GMXX_RXX_FRM_MAX (offset, block_id) \ + (0x0001180008000030ull + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048) +#define CVMX_GMXX_RXX_FRM_MIN (offset, block_id) \ + (0x0001180008000028ull + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048) +static inline u64 CVMX_GMXX_RXX_IFG (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000058ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000058ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000058ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_INT_EN (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000008ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000008ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000008ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_INT_REG (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000000ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000000ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000000ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_JABBER (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000038ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000038ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000038ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_PAUSE_DROP_TIME (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000068ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000068ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000068ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000068ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000068ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +#define CVMX_GMXX_RXX_RX_INBND (offset, block_id) \ + (0x0001180008000060ull + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048) +static inline u64 CVMX_GMXX_RXX_STATS_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000050ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000050ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000050ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_OCTS (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000088ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000088ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000088ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_OCTS_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000098ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000098ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000098ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_OCTS_DMAC (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080000A8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080000A8ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080000A8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_OCTS_DRP (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080000B8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080000B8ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080000B8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_PKTS (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000080ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000080ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000080ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_PKTS_BAD (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080000C0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080000C0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080000C0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_PKTS_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000090ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000090ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000090ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_PKTS_DMAC (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080000A0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080000A0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080000A0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_STATS_PKTS_DRP (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080000B0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080000B0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080000B0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RXX_UDD_SKP (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000048ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000048ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000048ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_RX_BP_DROPX (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000420ull + ((offset ) + (block_id) *0x1000000ull ) *8 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000420ull + ((offset ) + (block_id) *0x200000ull ) *8 ; + } +return 0x0001180008000420ull + ((offset ) + (block_id) *0x1000000ull ) *8 ; +} + +static inline u64 CVMX_GMXX_RX_BP_OFFX (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000460ull + ((offset ) + (block_id) *0x1000000ull ) *8 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000460ull + ((offset ) + (block_id) *0x200000ull ) *8 ; + } +return 0x0001180008000460ull + ((offset ) + (block_id) *0x1000000ull ) *8 ; +} + +static inline u64 CVMX_GMXX_RX_BP_ONX (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000440ull + ((offset ) + (block_id) *0x1000000ull ) *8 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000440ull + ((offset ) + (block_id) *0x200000ull ) *8 ; + } +return 0x0001180008000440ull + ((offset ) + (block_id) *0x1000000ull ) *8 ; +} + +static inline u64 CVMX_GMXX_RX_HG2_STATUS (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000548ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000548ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000548ull + (offset) *0x1000000ull ; + } +return 0x0001180008000548ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_RX_PASS_EN (offset) (0x00011800080005F8ull + ((offset) & 1) * 0x8000000ull) +#define CVMX_GMXX_RX_PASS_MAPX (offset, block_id) \ + (0x0001180008000600ull + (((offset) & 15) + ((block_id) & 1) * 0x1000000ull) * 8) +static inline u64 CVMX_GMXX_RX_PRTS (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000410ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000410ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000410ull + (offset) *0x1000000ull ; + } +return 0x0001180008000410ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_RX_PRT_INFO (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004E8ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004E8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004E8ull + (offset) *0x1000000ull ; + } +return 0x00011800080004E8ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_RX_TX_STATUS (offset) (0x00011800080007E8ull) +static inline u64 CVMX_GMXX_RX_XAUI_BAD_COL (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000538ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000538ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000538ull + (offset) *0x1000000ull ; + } +return 0x0001180008000538ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_RX_XAUI_CTL (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000530ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000530ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000530ull + (offset) *0x1000000ull ; + } +return 0x0001180008000530ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_SMACX (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000230ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000230ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000230ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_SOFT_BIST (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x00011800080007E8ull + (offset) *0x8000000ull ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080007E8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080007E8ull + (offset) *0x1000000ull ; + } +return 0x00011800080007E8ull + (offset) *0x1000000ull ; +} + +static inline u64 CVMX_GMXX_STAT_BP (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000520ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000520ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000520ull + (offset) *0x1000000ull ; + } +return 0x0001180008000520ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TB_REG (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080007E0ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080007E0ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080007E0ull + (offset) *0x1000000ull ; + } +return 0x00011800080007E0ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TXX_APPEND (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000218ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000218ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000218ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +#define CVMX_GMXX_TXX_BCK_CRDT (offset, block_id) \ + (0x0001180008000388ull + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048) +static inline u64 CVMX_GMXX_TXX_BURST (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000228ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000228ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000228ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_CBFC_XOFF (unsigned long __attribute__((unused)) offset, +unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x00011800080005A0ull + (block_id) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080005A0ull + (block_id) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080005A0ull + (block_id) *0x1000000ull ; + } +return 0x00011800080005A0ull + (block_id) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TXX_CBFC_XON (unsigned long __attribute__((unused)) offset, +unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x00011800080005C0ull + (block_id) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080005C0ull + (block_id) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080005C0ull + (block_id) *0x1000000ull ; + } +return 0x00011800080005C0ull + (block_id) *0x8000000ull ; +} + +#define CVMX_GMXX_TXX_CLK (offset, block_id) \ + (0x0001180008000208ull + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048) +static inline u64 CVMX_GMXX_TXX_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000270ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000270ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000270ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +#define CVMX_GMXX_TXX_JAM_MODE (offset, block_id) \ + (0x0001180008000380ull + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048) +static inline u64 CVMX_GMXX_TXX_MIN_PKT (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000240ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000240ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000240ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_PAUSE_PKT_INTERVAL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000248ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000248ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000248ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_PAUSE_PKT_TIME (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000238ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000238ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000238ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_PAUSE_TOGO (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000258ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000258ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000258ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_PAUSE_ZERO (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000260ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000260ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000260ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +#define CVMX_GMXX_TXX_PIPE (offset, block_id) \ + (0x0001180008000310ull + (((offset) & 3) + ((block_id) & 7) * 0x2000ull) * 2048) +static inline u64 CVMX_GMXX_TXX_SGMII_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000300ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000300ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000300ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000300ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_SLOT (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000220ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000220ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000220ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_SOFT_PAUSE (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000250ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000250ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000250ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT0 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000280ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000280ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000280ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT1 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000288ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000288ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000288ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT2 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000290ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000290ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000290ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT3 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000298ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000298ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000298ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT4 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080002A0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080002A0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080002A0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT5 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080002A8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080002A8ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080002A8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT6 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080002B0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080002B0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080002B0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT7 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080002B8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080002B8ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080002B8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT8 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080002C0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080002C0ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080002C0ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STAT9 (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x00011800080002C8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080002C8ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x00011800080002C8ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_STATS_CTL (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000268ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000268ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000268ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TXX_THRESH (unsigned long offset,unsigned long block_id) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +return 0x0001180008000210ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000210ull + ((offset ) + (block_id) *0x2000ull ) *2048 ; + } +return 0x0001180008000210ull + ((offset ) + (block_id) *0x10000ull ) *2048 ; +} + +static inline u64 CVMX_GMXX_TX_BP (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004D0ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004D0ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004D0ull + (offset) *0x1000000ull ; + } +return 0x00011800080004D0ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_TX_CLK_MSKX (offset, block_id) \ + (0x0001180008000780ull + (((offset) & 1) + ((block_id) & 0) * 0x0ull) * 8) +static inline u64 CVMX_GMXX_TX_COL_ATTEMPT (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000498ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000498ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000498ull + (offset) *0x1000000ull ; + } +return 0x0001180008000498ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_CORRUPT (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004D8ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004D8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004D8ull + (offset) *0x1000000ull ; + } +return 0x00011800080004D8ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_HG2_REG1 (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000558ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000558ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000558ull + (offset) *0x1000000ull ; + } +return 0x0001180008000558ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_HG2_REG2 (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000560ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000560ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000560ull + (offset) *0x1000000ull ; + } +return 0x0001180008000560ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_IFG (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000488ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000488ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000488ull + (offset) *0x1000000ull ; + } +return 0x0001180008000488ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_INT_EN (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000508ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000508ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000508ull + (offset) *0x1000000ull ; + } +return 0x0001180008000508ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_INT_REG (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000500ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000500ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000500ull + (offset) *0x1000000ull ; + } +return 0x0001180008000500ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_JAM (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000490ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000490ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000490ull + (offset) *0x1000000ull ; + } +return 0x0001180008000490ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_LFSR (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004F8ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004F8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004F8ull + (offset) *0x1000000ull ; + } +return 0x00011800080004F8ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_OVR_BP (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004C8ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004C8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004C8ull + (offset) *0x1000000ull ; + } +return 0x00011800080004C8ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_PAUSE_PKT_DMAC (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004A0ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004A0ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004A0ull + (offset) *0x1000000ull ; + } +return 0x00011800080004A0ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_PAUSE_PKT_TYPE (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x00011800080004A8ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x00011800080004A8ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x00011800080004A8ull + (offset) *0x1000000ull ; + } +return 0x00011800080004A8ull + (offset) *0x8000000ull ; +} + +static inline u64 CVMX_GMXX_TX_PRTS (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +return 0x0001180008000480ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000480ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000480ull + (offset) *0x1000000ull ; + } +return 0x0001180008000480ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_TX_SPI_CTL (offset) (0x00011800080004C0ull + ((offset) & 1) * 0x8000000ull) +#define CVMX_GMXX_TX_SPI_DRAIN (offset) (0x00011800080004E0ull + ((offset) & 1) * 0x8000000ull) +#define CVMX_GMXX_TX_SPI_MAX (offset) (0x00011800080004B0ull + ((offset) & 1) * 0x8000000ull) +#define CVMX_GMXX_TX_SPI_ROUNDX (offset, block_id) \ + (0x0001180008000680ull + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8) +#define CVMX_GMXX_TX_SPI_THRESH (offset) (0x00011800080004B8ull + ((offset) & 1) * 0x8000000ull) +static inline u64 CVMX_GMXX_TX_XAUI_CTL (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000528ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000528ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000528ull + (offset) *0x1000000ull ; + } +return 0x0001180008000528ull + (offset) *0x8000000ull ; +} + +#define CVMX_GMXX_WOL_CTL (offset) (0x0001180008000780ull + ((offset) & 1) * 0x8000000ull) +static inline u64 CVMX_GMXX_XAUI_EXT_LOOPBACK (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +case OCTEON_CN61XX &OCTEON_FAMILY_MASK : +case OCTEON_CN66XX &OCTEON_FAMILY_MASK : +return 0x0001180008000540ull + (offset) *0x8000000ull ; +case OCTEON_CNF71XX &OCTEON_FAMILY_MASK : +case OCTEON_CN63XX &OCTEON_FAMILY_MASK : +return 0x0001180008000540ull + (offset) *0x8000000ull ; +case OCTEON_CN68XX &OCTEON_FAMILY_MASK : +return 0x0001180008000540ull + (offset) *0x1000000ull ; + } +return 0x0001180008000540ull + (offset) *0x8000000ull ; +} + +/** +* cvmx_gmx#_bad_reg +* +* GMX_BAD_REG = A collection of things that have gone very, very wrong +* +* +* Notes: +* In XAUI mode, only the lsb (corresponding to port0) of INB_NXA, LOSTSTAT, OUT_OVR, are used. +* +*/ +union cvmx_gmxx_bad_reg { +u64 u64; +struct cvmx_gmxx_bad_reg_s { +u64 reserved_31_63 :33 ; +u64 inb_nxa :4 ; +u64 statovr :1 ; +u64 loststat :4 ; +u64 reserved_18_21 :4 ; +u64 out_ovr :16 ; +u64 ncb_ovr :1 ; +u64 out_col :1 ; + } s; +struct cvmx_gmxx_bad_reg_cn30xx { +u64 reserved_31_63 :33 ; +u64 inb_nxa :4 ; +u64 statovr :1 ; +u64 reserved_25_25 :1 ; +u64 loststat :3 ; +u64 reserved_5_21 :17 ; +u64 out_ovr :3 ; +u64 reserved_0_1 :2 ; + } cn30xx; +struct cvmx_gmxx_bad_reg_cn30xx cn31xx; +struct cvmx_gmxx_bad_reg_s cn38xx; +struct cvmx_gmxx_bad_reg_s cn38xxp2; +struct cvmx_gmxx_bad_reg_cn30xx cn50xx; +struct cvmx_gmxx_bad_reg_cn52xx { +u64 reserved_31_63 :33 ; +u64 inb_nxa :4 ; +u64 statovr :1 ; +u64 loststat :4 ; +u64 reserved_6_21 :16 ; +u64 out_ovr :4 ; +u64 reserved_0_1 :2 ; + } cn52xx; +struct cvmx_gmxx_bad_reg_cn52xx cn52xxp1; +struct cvmx_gmxx_bad_reg_cn52xx cn56xx; +struct cvmx_gmxx_bad_reg_cn52xx cn56xxp1; +struct cvmx_gmxx_bad_reg_s cn58xx; +struct cvmx_gmxx_bad_reg_s cn58xxp1; +struct cvmx_gmxx_bad_reg_cn52xx cn61xx; +struct cvmx_gmxx_bad_reg_cn52xx cn63xx; +struct cvmx_gmxx_bad_reg_cn52xx cn63xxp1; +struct cvmx_gmxx_bad_reg_cn52xx cn66xx; +struct cvmx_gmxx_bad_reg_cn52xx cn68xx; +struct cvmx_gmxx_bad_reg_cn52xx cn68xxp1; +struct cvmx_gmxx_bad_reg_cn52xx cn70xx; +struct cvmx_gmxx_bad_reg_cn52xx cn70xxp1; +struct cvmx_gmxx_bad_reg_cn52xx cnf71xx; +}; + +typedef union cvmx_gmxx_bad_reg cvmx_gmxx_bad_reg_t ; + +/** +* cvmx_gmx#_bist +* +* GMX_BIST = GMX BIST Results +* +*/ +union cvmx_gmxx_bist { +u64 u64; +struct cvmx_gmxx_bist_s { +u64 reserved_25_63 :39 ; +u64 status :25 ; + } s; +struct cvmx_gmxx_bist_cn30xx { +u64 reserved_10_63 :54 ; +u64 status :10 ; + } cn30xx; +struct cvmx_gmxx_bist_cn30xx cn31xx; +struct cvmx_gmxx_bist_cn30xx cn38xx; +struct cvmx_gmxx_bist_cn30xx cn38xxp2; +struct cvmx_gmxx_bist_cn50xx { +u64 reserved_12_63 :52 ; +u64 status :12 ; + } cn50xx; +struct cvmx_gmxx_bist_cn52xx { +u64 reserved_16_63 :48 ; +u64 status :16 ; + } cn52xx; +struct cvmx_gmxx_bist_cn52xx cn52xxp1; +struct cvmx_gmxx_bist_cn52xx cn56xx; +struct cvmx_gmxx_bist_cn52xx cn56xxp1; +struct cvmx_gmxx_bist_cn58xx { +u64 reserved_17_63 :47 ; +u64 status :17 ; + } cn58xx; +struct cvmx_gmxx_bist_cn58xx cn58xxp1; +struct cvmx_gmxx_bist_s cn61xx; +struct cvmx_gmxx_bist_s cn63xx; +struct cvmx_gmxx_bist_s cn63xxp1; +struct cvmx_gmxx_bist_s cn66xx; +struct cvmx_gmxx_bist_s cn68xx; +struct cvmx_gmxx_bist_s cn68xxp1; +struct cvmx_gmxx_bist_s cn70xx; +struct cvmx_gmxx_bist_s cn70xxp1; +struct cvmx_gmxx_bist_s cnf71xx; +}; + +typedef union cvmx_gmxx_bist cvmx_gmxx_bist_t ; + +/** +* cvmx_gmx#_bpid_map# +* +* Notes: +* GMX will build BPID_VECTOR<15:0> using the 16 GMX_BPID_MAP entries and the BPID +* state from IPD. In XAUI/RXAUI mode when PFC/CBFC/HiGig2 is used, the +* BPID_VECTOR becomes the logical backpressure. In XAUI/RXAUI mode when +* PFC/CBFC/HiGig2 is not used or when in 4xSGMII mode, the BPID_VECTOR can be used +* with the GMX_BPID_MSK register to determine the physical backpressure. +* +* In XAUI/RXAUI mode, the entire BPID_VECTOR<15:0> is available determining physical +* backpressure for the single XAUI/RXAUI interface. +* +* In SGMII mode, BPID_VECTOR is broken up as follows: +* SGMII interface0 uses BPID_VECTOR<3:0> +* SGMII interface1 uses BPID_VECTOR<7:4> +* SGMII interface2 uses BPID_VECTOR<11:8> +* SGMII interface3 uses BPID_VECTOR<15:12> +* +* In all SGMII configurations, and in some XAUI/RXAUI configurations, the +* interface protocols only support physical backpressure. In these cases, a single +* BPID will commonly drive the physical backpressure for the physical +* interface. We provide example programmings for these simple cases. +* +* In XAUI/RXAUI mode where PFC/CBFC/HiGig2 is not used, an example programming +* would be as follows: +* +* @verbatim +* GMX_BPID_MAP0[VAL] = 1; +* GMX_BPID_MAP0[BPID] = xaui_bpid; +* GMX_BPID_MSK[MSK_OR] = 1; +* GMX_BPID_MSK[MSK_AND] = 0; +* @endverbatim +* +* In SGMII mode, an example programming would be as follows: +* +* @verbatim +* for (i=0; i<4; i++) [ +* if (GMX_PRTi_CFG[EN]) [ +* GMX_BPID_MAP(i*4)[VAL] = 1; +* GMX_BPID_MAP(i*4)[BPID] = sgmii_bpid(i); +* GMX_BPID_MSK[MSK_OR] = (1 << (i*4)) | GMX_BPID_MSK[MSK_OR]; +* ] +* ] +* GMX_BPID_MSK[MSK_AND] = 0; +* @endverbatim +*/ +union cvmx_gmxx_bpid_mapx { +u64 u64; +struct cvmx_gmxx_bpid_mapx_s { +u64 reserved_17_63 :47 ; +u64 status :1 ; +u64 reserved_9_15 :7 ; +u64 val :1 ; +u64 reserved_6_7 :2 ; +u64 bpid :6 ; + } s; +struct cvmx_gmxx_bpid_mapx_s cn68xx; +struct cvmx_gmxx_bpid_mapx_s cn68xxp1; +}; + +typedef union cvmx_gmxx_bpid_mapx cvmx_gmxx_bpid_mapx_t ; + +/** +* cvmx_gmx#_bpid_msk +*/ +union cvmx_gmxx_bpid_msk { +u64 u64; +struct cvmx_gmxx_bpid_msk_s { +u64 reserved_48_63 :16 ; +u64 msk_or :16 ; +u64 reserved_16_31 :16 ; +u64 msk_and :16 ; + } s; +struct cvmx_gmxx_bpid_msk_s cn68xx; +struct cvmx_gmxx_bpid_msk_s cn68xxp1; +}; + +typedef union cvmx_gmxx_bpid_msk cvmx_gmxx_bpid_msk_t ; + +/** +* cvmx_gmx#_clk_en +* +* DON'T PUT IN HRM* +* +*/ +union cvmx_gmxx_clk_en { +u64 u64; +struct cvmx_gmxx_clk_en_s { +u64 reserved_1_63 :63 ; +u64 clk_en :1 ; + } s; +struct cvmx_gmxx_clk_en_s cn52xx; +struct cvmx_gmxx_clk_en_s cn52xxp1; +struct cvmx_gmxx_clk_en_s cn56xx; +struct cvmx_gmxx_clk_en_s cn56xxp1; +struct cvmx_gmxx_clk_en_s cn61xx; +struct cvmx_gmxx_clk_en_s cn63xx; +struct cvmx_gmxx_clk_en_s cn63xxp1; +struct cvmx_gmxx_clk_en_s cn66xx; +struct cvmx_gmxx_clk_en_s cn68xx; +struct cvmx_gmxx_clk_en_s cn68xxp1; +struct cvmx_gmxx_clk_en_s cn70xx; +struct cvmx_gmxx_clk_en_s cn70xxp1; +struct cvmx_gmxx_clk_en_s cnf71xx; +}; + +typedef union cvmx_gmxx_clk_en cvmx_gmxx_clk_en_t ; + +/** +* cvmx_gmx#_ebp_dis +*/ +union cvmx_gmxx_ebp_dis { +u64 u64; +struct cvmx_gmxx_ebp_dis_s { +u64 reserved_16_63 :48 ; +u64 dis :16 ; + } s; +struct cvmx_gmxx_ebp_dis_s cn68xx; +struct cvmx_gmxx_ebp_dis_s cn68xxp1; +}; + +typedef union cvmx_gmxx_ebp_dis cvmx_gmxx_ebp_dis_t ; + +/** +* cvmx_gmx#_ebp_msk +*/ +union cvmx_gmxx_ebp_msk { +u64 u64; +struct cvmx_gmxx_ebp_msk_s { +u64 reserved_16_63 :48 ; +u64 msk :16 ; + } s; +struct cvmx_gmxx_ebp_msk_s cn68xx; +struct cvmx_gmxx_ebp_msk_s cn68xxp1; +}; + +typedef union cvmx_gmxx_ebp_msk cvmx_gmxx_ebp_msk_t ; + +/** +* cvmx_gmx#_hg2_control +* +* Notes: +* The HiGig2 TX and RX enable would normally be both set together for HiGig2 messaging. However +* setting just the TX or RX bit will result in only the HG2 message transmit or the receive +* capability. +* PHYS_EN and LOGL_EN bits when 1, allow link pause or back pressure to PKO as per received +* HiGig2 message. When 0, link pause and back pressure to PKO in response to received messages +* are disabled. +* +* GMX*_TX_XAUI_CTL[HG_EN] must be set to one(to enable HiGig) whenever either HG2TX_EN or HG2RX_EN +* are set. +* +* GMX*_RX0_UDD_SKP[LEN] must be set to 16 (to select HiGig2) whenever either HG2TX_EN or HG2RX_EN +* are set. +* +* GMX*_TX_OVR_BP[EN<0>] must be set to one and GMX*_TX_OVR_BP[BP<0>] must be cleared to zero +* (to forcibly disable HW-automatic 802.3 pause packet generation) with the HiGig2 Protocol when +* GMX*_HG2_CONTROL[HG2TX_EN]=0. (The HiGig2 protocol is indicated by GMX*_TX_XAUI_CTL[HG_EN]=1 +* and GMX*_RX0_UDD_SKP[LEN]=16.) The HW can only auto-generate backpressure via HiGig2 messages +* (optionally, when HG2TX_EN=1) with the HiGig2 protocol. +*/ +union cvmx_gmxx_hg2_control { +u64 u64; +struct cvmx_gmxx_hg2_control_s { +u64 reserved_19_63 :45 ; +u64 hg2tx_en :1 ; +u64 hg2rx_en :1 ; +u64 phys_en :1 ; +u64 logl_en :16 ; + } s; +struct cvmx_gmxx_hg2_control_s cn52xx; +struct cvmx_gmxx_hg2_control_s cn52xxp1; +struct cvmx_gmxx_hg2_control_s cn56xx; +struct cvmx_gmxx_hg2_control_s cn61xx; +struct cvmx_gmxx_hg2_control_s cn63xx; +struct cvmx_gmxx_hg2_control_s cn63xxp1; +struct cvmx_gmxx_hg2_control_s cn66xx; +struct cvmx_gmxx_hg2_control_s cn68xx; +struct cvmx_gmxx_hg2_control_s cn68xxp1; +struct cvmx_gmxx_hg2_control_s cn70xx; +struct cvmx_gmxx_hg2_control_s cn70xxp1; +struct cvmx_gmxx_hg2_control_s cnf71xx; +}; + +typedef union cvmx_gmxx_hg2_control cvmx_gmxx_hg2_control_t ; + +/** +* cvmx_gmx#_inf_mode +* +* GMX_INF_MODE = Interface Mode +* +*/ +union cvmx_gmxx_inf_mode { +u64 u64; +struct cvmx_gmxx_inf_mode_s { +u64 reserved_20_63 :44 ; +u64 rate :4 ; +u64 reserved_12_15 :4 ; +u64 speed :4 ; +u64 reserved_7_7 :1 ; +u64 mode :3 ; +u64 reserved_3_3 :1 ; +u64 p0mii :1 ; +u64 en :1 ; +u64 type :1 ; + } s; +struct cvmx_gmxx_inf_mode_cn30xx { +u64 reserved_3_63 :61 ; +u64 p0mii :1 ; +u64 en :1 ; +u64 type :1 ; + } cn30xx; +struct cvmx_gmxx_inf_mode_cn31xx { +u64 reserved_2_63 :62 ; +u64 en :1 ; +u64 type :1 ; + } cn31xx; +struct cvmx_gmxx_inf_mode_cn31xx cn38xx; +struct cvmx_gmxx_inf_mode_cn31xx cn38xxp2; +struct cvmx_gmxx_inf_mode_cn30xx cn50xx; +struct cvmx_gmxx_inf_mode_cn52xx { +u64 reserved_10_63 :54 ; +u64 speed :2 ; +u64 reserved_6_7 :2 ; +u64 mode :2 ; +u64 reserved_2_3 :2 ; +u64 en :1 ; +u64 type :1 ; + } cn52xx; +struct cvmx_gmxx_inf_mode_cn52xx cn52xxp1; +struct cvmx_gmxx_inf_mode_cn52xx cn56xx; +struct cvmx_gmxx_inf_mode_cn52xx cn56xxp1; +struct cvmx_gmxx_inf_mode_cn31xx cn58xx; +struct cvmx_gmxx_inf_mode_cn31xx cn58xxp1; +struct cvmx_gmxx_inf_mode_cn61xx { +u64 reserved_12_63 :52 ; +u64 speed :4 ; +u64 reserved_5_7 :3 ; +u64 mode :1 ; +u64 reserved_2_3 :2 ; +u64 en :1 ; +u64 type :1 ; + } cn61xx; +struct cvmx_gmxx_inf_mode_cn61xx cn63xx; +struct cvmx_gmxx_inf_mode_cn61xx cn63xxp1; +struct cvmx_gmxx_inf_mode_cn66xx { +u64 reserved_20_63 :44 ; +u64 rate :4 ; +u64 reserved_12_15 :4 ; +u64 speed :4 ; +u64 reserved_5_7 :3 ; +u64 mode :1 ; +u64 reserved_2_3 :2 ; +u64 en :1 ; +u64 type :1 ; + } cn66xx; +struct cvmx_gmxx_inf_mode_cn68xx { +u64 reserved_12_63 :52 ; +u64 speed :4 ; +u64 reserved_7_7 :1 ; +u64 mode :3 ; +u64 reserved_2_3 :2 ; +u64 en :1 ; +u64 type :1 ; + } cn68xx; +struct cvmx_gmxx_inf_mode_cn68xx cn68xxp1; +struct cvmx_gmxx_inf_mode_cn70xx { +u64 reserved_6_63 :58 ; +u64 mode :2 ; +u64 reserved_2_3 :2 ; +u64 en :1 ; +u64 reserved_0_0 :1 ; + } cn70xx; +struct cvmx_gmxx_inf_mode_cn70xx cn70xxp1; +struct cvmx_gmxx_inf_mode_cn61xx cnf71xx; +}; + +typedef union cvmx_gmxx_inf_mode cvmx_gmxx_inf_mode_t ; + +/** +* cvmx_gmx#_nxa_adr +* +* GMX_NXA_ADR = NXA Port Address +* +*/ +union cvmx_gmxx_nxa_adr { +u64 u64; +struct cvmx_gmxx_nxa_adr_s { +u64 reserved_23_63 :41 ; +u64 pipe :7 ; +u64 reserved_6_15 :10 ; +u64 prt :6 ; + } s; +struct cvmx_gmxx_nxa_adr_cn30xx { +u64 reserved_6_63 :58 ; +u64 prt :6 ; + } cn30xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn31xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn38xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn38xxp2; +struct cvmx_gmxx_nxa_adr_cn30xx cn50xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn52xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn52xxp1; +struct cvmx_gmxx_nxa_adr_cn30xx cn56xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn56xxp1; +struct cvmx_gmxx_nxa_adr_cn30xx cn58xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn58xxp1; +struct cvmx_gmxx_nxa_adr_cn30xx cn61xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn63xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn63xxp1; +struct cvmx_gmxx_nxa_adr_cn30xx cn66xx; +struct cvmx_gmxx_nxa_adr_s cn68xx; +struct cvmx_gmxx_nxa_adr_s cn68xxp1; +struct cvmx_gmxx_nxa_adr_cn30xx cn70xx; +struct cvmx_gmxx_nxa_adr_cn30xx cn70xxp1; +struct cvmx_gmxx_nxa_adr_cn30xx cnf71xx; +}; + +typedef union cvmx_gmxx_nxa_adr cvmx_gmxx_nxa_adr_t ; + +/** +* cvmx_gmx#_pipe_status +* +* DON'T PUT IN HRM* +* +*/ +union cvmx_gmxx_pipe_status { +u64 u64; +struct cvmx_gmxx_pipe_status_s { +u64 reserved_20_63 :44 ; +u64 ovr :4 ; +u64 reserved_12_15 :4 ; +u64 bp :4 ; +u64 reserved_4_7 :4 ; +u64 stop :4 ; + } s; +struct cvmx_gmxx_pipe_status_s cn68xx; +struct cvmx_gmxx_pipe_status_s cn68xxp1; +}; + +typedef union cvmx_gmxx_pipe_status cvmx_gmxx_pipe_status_t ; + +/** +* cvmx_gmx#_prt#_cbfc_ctl +* +* ** HG2 message CSRs end +* +*/ +union cvmx_gmxx_prtx_cbfc_ctl { +u64 u64; +struct cvmx_gmxx_prtx_cbfc_ctl_s { +u64 phys_en :16 ; +u64 logl_en :16 ; +u64 phys_bp :16 ; +u64 reserved_4_15 :12 ; +u64 bck_en :1 ; +u64 drp_en :1 ; +u64 tx_en :1 ; +u64 rx_en :1 ; + } s; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn52xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn56xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn61xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn63xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn63xxp1; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn66xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn68xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn68xxp1; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn70xx; +struct cvmx_gmxx_prtx_cbfc_ctl_s cn70xxp1; +struct cvmx_gmxx_prtx_cbfc_ctl_s cnf71xx; +}; + +typedef union cvmx_gmxx_prtx_cbfc_ctl cvmx_gmxx_prtx_cbfc_ctl_t ; + +/** +* cvmx_gmx#_prt#_cfg +* +* GMX_PRT_CFG = Port description +* +*/ +union cvmx_gmxx_prtx_cfg { +u64 u64; +struct cvmx_gmxx_prtx_cfg_s { +u64 reserved_22_63 :42 ; +u64 pknd :6 ; +u64 reserved_14_15 :2 ; +u64 tx_idle :1 ; +u64 rx_idle :1 ; +u64 reserved_9_11 :3 ; +u64 speed_msb :1 ; +u64 reserved_4_7 :4 ; +u64 slottime :1 ; +u64 duplex :1 ; +u64 speed :1 ; +u64 en :1 ; + } s; +struct cvmx_gmxx_prtx_cfg_cn30xx { +u64 reserved_4_63 :60 ; +u64 slottime :1 ; +u64 duplex :1 ; +u64 speed :1 ; +u64 en :1 ; + } cn30xx; +struct cvmx_gmxx_prtx_cfg_cn30xx cn31xx; +struct cvmx_gmxx_prtx_cfg_cn30xx cn38xx; +struct cvmx_gmxx_prtx_cfg_cn30xx cn38xxp2; +struct cvmx_gmxx_prtx_cfg_cn30xx cn50xx; +struct cvmx_gmxx_prtx_cfg_cn52xx { +u64 reserved_14_63 :50 ; +u64 tx_idle :1 ; +u64 rx_idle :1 ; +u64 reserved_9_11 :3 ; +u64 speed_msb :1 ; +u64 reserved_4_7 :4 ; +u64 slottime :1 ; +u64 duplex :1 ; +u64 speed :1 ; +u64 en :1 ; + } cn52xx; +struct cvmx_gmxx_prtx_cfg_cn52xx cn52xxp1; +struct cvmx_gmxx_prtx_cfg_cn52xx cn56xx; +struct cvmx_gmxx_prtx_cfg_cn52xx cn56xxp1; +struct cvmx_gmxx_prtx_cfg_cn30xx cn58xx; +struct cvmx_gmxx_prtx_cfg_cn30xx cn58xxp1; +struct cvmx_gmxx_prtx_cfg_cn52xx cn61xx; +struct cvmx_gmxx_prtx_cfg_cn52xx cn63xx; +struct cvmx_gmxx_prtx_cfg_cn52xx cn63xxp1; +struct cvmx_gmxx_prtx_cfg_cn52xx cn66xx; +struct cvmx_gmxx_prtx_cfg_s cn68xx; +struct cvmx_gmxx_prtx_cfg_s cn68xxp1; +struct cvmx_gmxx_prtx_cfg_cn52xx cn70xx; +struct cvmx_gmxx_prtx_cfg_cn52xx cn70xxp1; +struct cvmx_gmxx_prtx_cfg_cn52xx cnf71xx; +}; + +typedef union cvmx_gmxx_prtx_cfg cvmx_gmxx_prtx_cfg_t ; + +/** +* cvmx_gmx#_qsgmii_ctl +*/ +union cvmx_gmxx_qsgmii_ctl { +u64 u64; +struct cvmx_gmxx_qsgmii_ctl_s { +u64 reserved_1_63 :63 ; +u64 disparity :1 ; + } s; +struct cvmx_gmxx_qsgmii_ctl_s cn70xx; +struct cvmx_gmxx_qsgmii_ctl_s cn70xxp1; +}; + +typedef union cvmx_gmxx_qsgmii_ctl cvmx_gmxx_qsgmii_ctl_t ; + +/** +* cvmx_gmx#_rx#_adr_cam0 +* +* GMX_RX_ADR_CAM = Address Filtering Control +* +*/ +union cvmx_gmxx_rxx_adr_cam0 { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam0_s { +u64 adr :64 ; + } s; +struct cvmx_gmxx_rxx_adr_cam0_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam0_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam0_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam0_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam0_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam0_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam0_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam0_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam0_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam0 cvmx_gmxx_rxx_adr_cam0_t ; + +/** +* cvmx_gmx#_rx#_adr_cam1 +* +* GMX_RX_ADR_CAM = Address Filtering Control +* +*/ +union cvmx_gmxx_rxx_adr_cam1 { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam1_s { +u64 adr :64 ; + } s; +struct cvmx_gmxx_rxx_adr_cam1_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam1_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam1_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam1_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam1_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam1_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam1_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam1_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam1_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam1 cvmx_gmxx_rxx_adr_cam1_t ; + +/** +* cvmx_gmx#_rx#_adr_cam2 +* +* GMX_RX_ADR_CAM = Address Filtering Control +* +*/ +union cvmx_gmxx_rxx_adr_cam2 { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam2_s { +u64 adr :64 ; + } s; +struct cvmx_gmxx_rxx_adr_cam2_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam2_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam2_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam2_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam2_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam2_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam2_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam2_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam2_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam2 cvmx_gmxx_rxx_adr_cam2_t ; + +/** +* cvmx_gmx#_rx#_adr_cam3 +* +* GMX_RX_ADR_CAM = Address Filtering Control +* +*/ +union cvmx_gmxx_rxx_adr_cam3 { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam3_s { +u64 adr :64 ; + } s; +struct cvmx_gmxx_rxx_adr_cam3_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam3_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam3_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam3_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam3_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam3_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam3_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam3_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam3_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam3 cvmx_gmxx_rxx_adr_cam3_t ; + +/** +* cvmx_gmx#_rx#_adr_cam4 +* +* GMX_RX_ADR_CAM = Address Filtering Control +* +*/ +union cvmx_gmxx_rxx_adr_cam4 { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam4_s { +u64 adr :64 ; + } s; +struct cvmx_gmxx_rxx_adr_cam4_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam4_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam4_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam4_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam4_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam4_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam4_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam4_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam4_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam4 cvmx_gmxx_rxx_adr_cam4_t ; + +/** +* cvmx_gmx#_rx#_adr_cam5 +* +* GMX_RX_ADR_CAM = Address Filtering Control +* +*/ +union cvmx_gmxx_rxx_adr_cam5 { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam5_s { +u64 adr :64 ; + } s; +struct cvmx_gmxx_rxx_adr_cam5_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam5_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam5_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam5_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam5_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam5_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam5_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam5_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam5_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam5 cvmx_gmxx_rxx_adr_cam5_t ; + +/** +* cvmx_gmx#_rx#_adr_cam_all_en +* +* GMX_RX_ADR_CAM_ALL_EN = Address Filtering Control Enable +* +*/ +union cvmx_gmxx_rxx_adr_cam_all_en { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam_all_en_s { +u64 reserved_32_63 :32 ; +u64 en :32 ; + } s; +struct cvmx_gmxx_rxx_adr_cam_all_en_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam_all_en_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam_all_en_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam_all_en_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam_all_en_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam_all_en_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam_all_en cvmx_gmxx_rxx_adr_cam_all_en_t ; + +/** +* cvmx_gmx#_rx#_adr_cam_en +* +* GMX_RX_ADR_CAM_EN = Address Filtering Control Enable +* +*/ +union cvmx_gmxx_rxx_adr_cam_en { +u64 u64; +struct cvmx_gmxx_rxx_adr_cam_en_s { +u64 reserved_8_63 :56 ; +u64 en :8 ; + } s; +struct cvmx_gmxx_rxx_adr_cam_en_s cn30xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn31xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn38xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_cam_en_s cn50xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn52xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_cam_en_s cn56xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_cam_en_s cn58xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_cam_en_s cn61xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn63xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_cam_en_s cn66xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn68xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_cam_en_s cn70xx; +struct cvmx_gmxx_rxx_adr_cam_en_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_cam_en_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_cam_en cvmx_gmxx_rxx_adr_cam_en_t ; + +/** +* cvmx_gmx#_rx#_adr_ctl +* +* GMX_RX_ADR_CTL = Address Filtering Control +* +* +* Notes: +* * ALGORITHM +* Here is some pseudo code that represents the address filter behavior. +* +* @verbatim +* bool dmac_addr_filter(uint8 prt, uint48 dmac) [ +* ASSERT(prt >= 0 && prt <= 3); +* if (is_bcst(dmac)) // broadcast accept +* return (GMX_RX[prt]_ADR_CTL[BCST] ? ACCEPT : REJECT); +* if (is_mcst(dmac) & GMX_RX[prt]_ADR_CTL[MCST] == 1) // multicast reject +* return REJECT; +* if (is_mcst(dmac) & GMX_RX[prt]_ADR_CTL[MCST] == 2) // multicast accept +* return ACCEPT; +* +* cam_hit = 0; +* +* for (i=0; i<32; i++) [ +* if (GMX_RX[prt]_ADR_CAM_ALL_EN[EN<i>] == 0) +* continue; +* uint48 unswizzled_mac_adr = 0x0; +* for (j=5; j>=0; j--) [ +* unswizzled_mac_adr = (unswizzled_mac_adr << 8) | GMX_RX[i>>3]_ADR_CAM[j][ADR<(i&7)*8+7:(i&7)*8>]; +* ] +* if (unswizzled_mac_adr == dmac) [ +* cam_hit = 1; +* break; +* ] +* ] +* +* if (cam_hit) +* return (GMX_RX[prt]_ADR_CTL[CAM_MODE] ? ACCEPT : REJECT); +* else +* return (GMX_RX[prt]_ADR_CTL[CAM_MODE] ? REJECT : ACCEPT); +* ] +* @endverbatim +* +* * XAUI Mode +* +* In XAUI mode, only GMX_RX0_ADR_CTL is used. GMX_RX[1,2,3]_ADR_CTL should not be used. +*/ +union cvmx_gmxx_rxx_adr_ctl { +u64 u64; +struct cvmx_gmxx_rxx_adr_ctl_s { +u64 reserved_4_63 :60 ; +u64 cam_mode :1 ; +u64 mcst :2 ; +u64 bcst :1 ; + } s; +struct cvmx_gmxx_rxx_adr_ctl_s cn30xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn31xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn38xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn38xxp2; +struct cvmx_gmxx_rxx_adr_ctl_s cn50xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn52xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn52xxp1; +struct cvmx_gmxx_rxx_adr_ctl_s cn56xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn56xxp1; +struct cvmx_gmxx_rxx_adr_ctl_s cn58xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn58xxp1; +struct cvmx_gmxx_rxx_adr_ctl_s cn61xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn63xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn63xxp1; +struct cvmx_gmxx_rxx_adr_ctl_s cn66xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn68xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn68xxp1; +struct cvmx_gmxx_rxx_adr_ctl_s cn70xx; +struct cvmx_gmxx_rxx_adr_ctl_s cn70xxp1; +struct cvmx_gmxx_rxx_adr_ctl_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_adr_ctl cvmx_gmxx_rxx_adr_ctl_t ; + +/** +* cvmx_gmx#_rx#_decision +* +* GMX_RX_DECISION = The byte count to decide when to accept or filter a packet +* +* +* Notes: +* As each byte in a packet is received by GMX, the L2 byte count is compared +* against the GMX_RX_DECISION[CNT]. The L2 byte count is the number of bytes +* from the beginning of the L2 header (DMAC). In normal operation, the L2 +* header begins after the PREAMBLE+SFD (GMX_RX_FRM_CTL[PRE_CHK]=1) and any +* optional UDD skip data (GMX_RX_UDD_SKP[LEN]). +* +* When GMX_RX_FRM_CTL[PRE_CHK] is clear, PREAMBLE+SFD are prepended to the +* packet and would require UDD skip length to account for them. +* +* L2 Size +* Port Mode <GMX_RX_DECISION bytes (default=24) >=GMX_RX_DECISION bytes (default=24) +* +* Full Duplex accept packet apply filters +* no filtering is applied accept packet based on DMAC and PAUSE packet filters +* +* Half Duplex drop packet apply filters +* packet is unconditionally dropped accept packet based on DMAC +* +* where l2_size = MAX(0, total_packet_size - GMX_RX_UDD_SKP[LEN] - ((GMX_RX_FRM_CTL[PRE_CHK]==1)*8) +*/ +union cvmx_gmxx_rxx_decision { +u64 u64; +struct cvmx_gmxx_rxx_decision_s { +u64 reserved_5_63 :59 ; +u64 cnt :5 ; + } s; +struct cvmx_gmxx_rxx_decision_s cn30xx; +struct cvmx_gmxx_rxx_decision_s cn31xx; +struct cvmx_gmxx_rxx_decision_s cn38xx; +struct cvmx_gmxx_rxx_decision_s cn38xxp2; +struct cvmx_gmxx_rxx_decision_s cn50xx; +struct cvmx_gmxx_rxx_decision_s cn52xx; +struct cvmx_gmxx_rxx_decision_s cn52xxp1; +struct cvmx_gmxx_rxx_decision_s cn56xx; +struct cvmx_gmxx_rxx_decision_s cn56xxp1; +struct cvmx_gmxx_rxx_decision_s cn58xx; +struct cvmx_gmxx_rxx_decision_s cn58xxp1; +struct cvmx_gmxx_rxx_decision_s cn61xx; +struct cvmx_gmxx_rxx_decision_s cn63xx; +struct cvmx_gmxx_rxx_decision_s cn63xxp1; +struct cvmx_gmxx_rxx_decision_s cn66xx; +struct cvmx_gmxx_rxx_decision_s cn68xx; +struct cvmx_gmxx_rxx_decision_s cn68xxp1; +struct cvmx_gmxx_rxx_decision_s cn70xx; +struct cvmx_gmxx_rxx_decision_s cn70xxp1; +struct cvmx_gmxx_rxx_decision_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_decision cvmx_gmxx_rxx_decision_t ; + +/** +* cvmx_gmx#_rx#_frm_chk +* +* GMX_RX_FRM_CHK = Which frame errors will set the ERR bit of the frame +* +* +* Notes: +* If GMX_RX_UDD_SKP[LEN] != 0, then LENERR will be forced to zero in HW. +* +* In XAUI mode prt0 is used for checking. +*/ +union cvmx_gmxx_rxx_frm_chk { +u64 u64; +struct cvmx_gmxx_rxx_frm_chk_s { +u64 reserved_10_63 :54 ; +u64 niberr :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 lenerr :1 ; +u64 alnerr :1 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 maxerr :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } s; +struct cvmx_gmxx_rxx_frm_chk_s cn30xx; +struct cvmx_gmxx_rxx_frm_chk_s cn31xx; +struct cvmx_gmxx_rxx_frm_chk_s cn38xx; +struct cvmx_gmxx_rxx_frm_chk_s cn38xxp2; +struct cvmx_gmxx_rxx_frm_chk_cn50xx { +u64 reserved_10_63 :54 ; +u64 niberr :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_6_6 :1 ; +u64 alnerr :1 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 reserved_0_0 :1 ; + } cn50xx; +struct cvmx_gmxx_rxx_frm_chk_cn52xx { +u64 reserved_9_63 :55 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_5_6 :2 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 reserved_0_0 :1 ; + } cn52xx; +struct cvmx_gmxx_rxx_frm_chk_cn52xx cn52xxp1; +struct cvmx_gmxx_rxx_frm_chk_cn52xx cn56xx; +struct cvmx_gmxx_rxx_frm_chk_cn52xx cn56xxp1; +struct cvmx_gmxx_rxx_frm_chk_s cn58xx; +struct cvmx_gmxx_rxx_frm_chk_s cn58xxp1; +struct cvmx_gmxx_rxx_frm_chk_cn61xx { +u64 reserved_9_63 :55 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_5_6 :2 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } cn61xx; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn63xx; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn63xxp1; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn66xx; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn68xx; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn68xxp1; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn70xx; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cn70xxp1; +struct cvmx_gmxx_rxx_frm_chk_cn61xx cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_frm_chk cvmx_gmxx_rxx_frm_chk_t ; + +/** +* cvmx_gmx#_rx#_frm_ctl +* +* GMX_RX_FRM_CTL = Frame Control +* +* +* Notes: +* * PRE_STRP +* When PRE_CHK is set (indicating that the PREAMBLE will be sent), PRE_STRP +* determines if the PREAMBLE+SFD bytes are thrown away or sent to the Octane +* core as part of the packet. +* +* In either mode, the PREAMBLE+SFD bytes are not counted toward the packet +* size when checking against the MIN and MAX bounds. Furthermore, the bytes +* are skipped when locating the start of the L2 header for DMAC and Control +* frame recognition. +* +* * CTL_BCK/CTL_DRP +* These bits control how the HW handles incoming PAUSE packets. Here are +* the most common modes of operation: +* CTL_BCK=1,CTL_DRP=1 - HW does it all +* CTL_BCK=0,CTL_DRP=0 - SW sees all pause frames +* CTL_BCK=0,CTL_DRP=1 - all pause frames are completely ignored +* +* These control bits should be set to CTL_BCK=0,CTL_DRP=0 in halfdup mode. +* Since PAUSE packets only apply to fulldup operation, any PAUSE packet +* would constitute an exception which should be handled by the processing +* cores. PAUSE packets should not be forwarded. +*/ +union cvmx_gmxx_rxx_frm_ctl { +u64 u64; +struct cvmx_gmxx_rxx_frm_ctl_s { +u64 reserved_13_63 :51 ; +u64 ptp_mode :1 ; +u64 reserved_11_11 :1 ; +u64 null_dis :1 ; +u64 pre_align :1 ; +u64 pad_len :1 ; +u64 vlan_len :1 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } s; +struct cvmx_gmxx_rxx_frm_ctl_cn30xx { +u64 reserved_9_63 :55 ; +u64 pad_len :1 ; +u64 vlan_len :1 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } cn30xx; +struct cvmx_gmxx_rxx_frm_ctl_cn31xx { +u64 reserved_8_63 :56 ; +u64 vlan_len :1 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } cn31xx; +struct cvmx_gmxx_rxx_frm_ctl_cn30xx cn38xx; +struct cvmx_gmxx_rxx_frm_ctl_cn31xx cn38xxp2; +struct cvmx_gmxx_rxx_frm_ctl_cn50xx { +u64 reserved_11_63 :53 ; +u64 null_dis :1 ; +u64 pre_align :1 ; +u64 reserved_7_8 :2 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } cn50xx; +struct cvmx_gmxx_rxx_frm_ctl_cn50xx cn52xx; +struct cvmx_gmxx_rxx_frm_ctl_cn50xx cn52xxp1; +struct cvmx_gmxx_rxx_frm_ctl_cn50xx cn56xx; +struct cvmx_gmxx_rxx_frm_ctl_cn56xxp1 { +u64 reserved_10_63 :54 ; +u64 pre_align :1 ; +u64 reserved_7_8 :2 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } cn56xxp1; +struct cvmx_gmxx_rxx_frm_ctl_cn58xx { +u64 reserved_11_63 :53 ; +u64 null_dis :1 ; +u64 pre_align :1 ; +u64 pad_len :1 ; +u64 vlan_len :1 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } cn58xx; +struct cvmx_gmxx_rxx_frm_ctl_cn30xx cn58xxp1; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx { +u64 reserved_13_63 :51 ; +u64 ptp_mode :1 ; +u64 reserved_11_11 :1 ; +u64 null_dis :1 ; +u64 pre_align :1 ; +u64 reserved_7_8 :2 ; +u64 pre_free :1 ; +u64 ctl_smac :1 ; +u64 ctl_mcst :1 ; +u64 ctl_bck :1 ; +u64 ctl_drp :1 ; +u64 pre_strp :1 ; +u64 pre_chk :1 ; + } cn61xx; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn63xx; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn63xxp1; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn66xx; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn68xx; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn68xxp1; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn70xx; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cn70xxp1; +struct cvmx_gmxx_rxx_frm_ctl_cn61xx cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_frm_ctl cvmx_gmxx_rxx_frm_ctl_t ; + +/** +* cvmx_gmx#_rx#_frm_max +* +* GMX_RX_FRM_MAX = Frame Max length +* +* +* Notes: +* In spi4 mode, all spi4 ports use prt0 for checking. +* +* When changing the LEN field, be sure that LEN does not exceed +* GMX_RX_JABBER[CNT]. Failure to meet this constraint will cause packets that +* are within the maximum length parameter to be rejected because they exceed +* the GMX_RX_JABBER[CNT] limit. +*/ +union cvmx_gmxx_rxx_frm_max { +u64 u64; +struct cvmx_gmxx_rxx_frm_max_s { +u64 reserved_16_63 :48 ; +u64 len :16 ; + } s; +struct cvmx_gmxx_rxx_frm_max_s cn30xx; +struct cvmx_gmxx_rxx_frm_max_s cn31xx; +struct cvmx_gmxx_rxx_frm_max_s cn38xx; +struct cvmx_gmxx_rxx_frm_max_s cn38xxp2; +struct cvmx_gmxx_rxx_frm_max_s cn58xx; +struct cvmx_gmxx_rxx_frm_max_s cn58xxp1; +}; + +typedef union cvmx_gmxx_rxx_frm_max cvmx_gmxx_rxx_frm_max_t ; + +/** +* cvmx_gmx#_rx#_frm_min +* +* GMX_RX_FRM_MIN = Frame Min length +* +* +* Notes: +* In spi4 mode, all spi4 ports use prt0 for checking. +* +*/ +union cvmx_gmxx_rxx_frm_min { +u64 u64; +struct cvmx_gmxx_rxx_frm_min_s { +u64 reserved_16_63 :48 ; +u64 len :16 ; + } s; +struct cvmx_gmxx_rxx_frm_min_s cn30xx; +struct cvmx_gmxx_rxx_frm_min_s cn31xx; +struct cvmx_gmxx_rxx_frm_min_s cn38xx; +struct cvmx_gmxx_rxx_frm_min_s cn38xxp2; +struct cvmx_gmxx_rxx_frm_min_s cn58xx; +struct cvmx_gmxx_rxx_frm_min_s cn58xxp1; +}; + +typedef union cvmx_gmxx_rxx_frm_min cvmx_gmxx_rxx_frm_min_t ; + +/** +* cvmx_gmx#_rx#_ifg +* +* GMX_RX_IFG = RX Min IFG +* +*/ +union cvmx_gmxx_rxx_ifg { +u64 u64; +struct cvmx_gmxx_rxx_ifg_s { +u64 reserved_4_63 :60 ; +u64 ifg :4 ; + } s; +struct cvmx_gmxx_rxx_ifg_s cn30xx; +struct cvmx_gmxx_rxx_ifg_s cn31xx; +struct cvmx_gmxx_rxx_ifg_s cn38xx; +struct cvmx_gmxx_rxx_ifg_s cn38xxp2; +struct cvmx_gmxx_rxx_ifg_s cn50xx; +struct cvmx_gmxx_rxx_ifg_s cn52xx; +struct cvmx_gmxx_rxx_ifg_s cn52xxp1; +struct cvmx_gmxx_rxx_ifg_s cn56xx; +struct cvmx_gmxx_rxx_ifg_s cn56xxp1; +struct cvmx_gmxx_rxx_ifg_s cn58xx; +struct cvmx_gmxx_rxx_ifg_s cn58xxp1; +struct cvmx_gmxx_rxx_ifg_s cn61xx; +struct cvmx_gmxx_rxx_ifg_s cn63xx; +struct cvmx_gmxx_rxx_ifg_s cn63xxp1; +struct cvmx_gmxx_rxx_ifg_s cn66xx; +struct cvmx_gmxx_rxx_ifg_s cn68xx; +struct cvmx_gmxx_rxx_ifg_s cn68xxp1; +struct cvmx_gmxx_rxx_ifg_s cn70xx; +struct cvmx_gmxx_rxx_ifg_s cn70xxp1; +struct cvmx_gmxx_rxx_ifg_s cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_ifg cvmx_gmxx_rxx_ifg_t ; + +/** +* cvmx_gmx#_rx#_int_en +* +* GMX_RX_INT_EN = Interrupt Enable +* +* +* Notes: +* In XAUI mode prt0 is used for checking. +* +*/ +union cvmx_gmxx_rxx_int_en { +u64 u64; +struct cvmx_gmxx_rxx_int_en_s { +u64 reserved_30_63 :34 ; +u64 wol :1 ; +u64 hg2cc :1 ; +u64 hg2fld :1 ; +u64 undat :1 ; +u64 uneop :1 ; +u64 unsop :1 ; +u64 bad_term :1 ; +u64 bad_seq :1 ; +u64 rem_fault :1 ; +u64 loc_fault :1 ; +u64 pause_drp :1 ; +u64 phy_dupx :1 ; +u64 phy_spd :1 ; +u64 phy_link :1 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 niberr :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 lenerr :1 ; +u64 alnerr :1 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 maxerr :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } s; +struct cvmx_gmxx_rxx_int_en_cn30xx { +u64 reserved_19_63 :45 ; +u64 phy_dupx :1 ; +u64 phy_spd :1 ; +u64 phy_link :1 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 niberr :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 lenerr :1 ; +u64 alnerr :1 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 maxerr :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } cn30xx; +struct cvmx_gmxx_rxx_int_en_cn30xx cn31xx; +struct cvmx_gmxx_rxx_int_en_cn30xx cn38xx; +struct cvmx_gmxx_rxx_int_en_cn30xx cn38xxp2; +struct cvmx_gmxx_rxx_int_en_cn50xx { +u64 reserved_20_63 :44 ; +u64 pause_drp :1 ; +u64 phy_dupx :1 ; +u64 phy_spd :1 ; +u64 phy_link :1 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 niberr :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_6_6 :1 ; +u64 alnerr :1 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 reserved_0_0 :1 ; + } cn50xx; +struct cvmx_gmxx_rxx_int_en_cn52xx { +u64 reserved_29_63 :35 ; +u64 hg2cc :1 ; +u64 hg2fld :1 ; +u64 undat :1 ; +u64 uneop :1 ; +u64 unsop :1 ; +u64 bad_term :1 ; +u64 bad_seq :1 ; +u64 rem_fault :1 ; +u64 loc_fault :1 ; +u64 pause_drp :1 ; +u64 reserved_16_18 :3 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 reserved_9_9 :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_5_6 :2 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 reserved_0_0 :1 ; + } cn52xx; +struct cvmx_gmxx_rxx_int_en_cn52xx cn52xxp1; +struct cvmx_gmxx_rxx_int_en_cn52xx cn56xx; +struct cvmx_gmxx_rxx_int_en_cn56xxp1 { +u64 reserved_27_63 :37 ; +u64 undat :1 ; +u64 uneop :1 ; +u64 unsop :1 ; +u64 bad_term :1 ; +u64 bad_seq :1 ; +u64 rem_fault :1 ; +u64 loc_fault :1 ; +u64 pause_drp :1 ; +u64 reserved_16_18 :3 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 reserved_9_9 :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_5_6 :2 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 reserved_0_0 :1 ; + } cn56xxp1; +struct cvmx_gmxx_rxx_int_en_cn58xx { +u64 reserved_20_63 :44 ; +u64 pause_drp :1 ; +u64 phy_dupx :1 ; +u64 phy_spd :1 ; +u64 phy_link :1 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 niberr :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 lenerr :1 ; +u64 alnerr :1 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 maxerr :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } cn58xx; +struct cvmx_gmxx_rxx_int_en_cn58xx cn58xxp1; +struct cvmx_gmxx_rxx_int_en_cn61xx { +u64 reserved_29_63 :35 ; +u64 hg2cc :1 ; +u64 hg2fld :1 ; +u64 undat :1 ; +u64 uneop :1 ; +u64 unsop :1 ; +u64 bad_term :1 ; +u64 bad_seq :1 ; +u64 rem_fault :1 ; +u64 loc_fault :1 ; +u64 pause_drp :1 ; +u64 reserved_16_18 :3 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 reserved_9_9 :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_5_6 :2 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } cn61xx; +struct cvmx_gmxx_rxx_int_en_cn61xx cn63xx; +struct cvmx_gmxx_rxx_int_en_cn61xx cn63xxp1; +struct cvmx_gmxx_rxx_int_en_cn61xx cn66xx; +struct cvmx_gmxx_rxx_int_en_cn61xx cn68xx; +struct cvmx_gmxx_rxx_int_en_cn61xx cn68xxp1; +struct cvmx_gmxx_rxx_int_en_cn70xx { +u64 reserved_30_63 :34 ; +u64 wol :1 ; +u64 hg2cc :1 ; +u64 hg2fld :1 ; +u64 undat :1 ; +u64 uneop :1 ; +u64 unsop :1 ; +u64 bad_term :1 ; +u64 bad_seq :1 ; +u64 rem_fault :1 ; +u64 loc_fault :1 ; +u64 pause_drp :1 ; +u64 reserved_16_18 :3 ; +u64 ifgerr :1 ; +u64 coldet :1 ; +u64 falerr :1 ; +u64 rsverr :1 ; +u64 pcterr :1 ; +u64 ovrerr :1 ; +u64 reserved_9_9 :1 ; +u64 skperr :1 ; +u64 rcverr :1 ; +u64 reserved_5_6 :2 ; +u64 fcserr :1 ; +u64 jabber :1 ; +u64 reserved_2_2 :1 ; +u64 carext :1 ; +u64 minerr :1 ; + } cn70xx; +struct cvmx_gmxx_rxx_int_en_cn70xx cn70xxp1; +struct cvmx_gmxx_rxx_int_en_cn61xx cnf71xx; +}; + +typedef union cvmx_gmxx_rxx_int_en cvmx_gmxx_rxx_int_en_t ; + +/** +* cvmx_gmx#_rx#_int_reg +* +* GMX_RX_INT_REG = Interrupt Register +* +* +* Notes: +* (1) exceptions will only be raised to the control processor if the +* corresponding bit in the GMX_RX_INT_EN register is set. +* +* (2) exception conditions 10:0 can also set the rcv/opcode in the received +* packet's workQ entry. The GMX_RX_FRM_CHK register provides a bit mask +* for configuring which conditions set the error. +* +* (3) in half duplex operation, the expectation is that collisions will appear +* as either MINERR o r CAREXT errors. +* +* (4) JABBER - An RX Jabber error indicates that a packet was received which +* is longer than the maximum allowed packet as defined by the +* system. GMX will truncate the packet at the JABBER count. +* Failure to do so could lead to system instabilty. +* +* (5) NIBERR - This error is illegal at 1000Mbs speeds +* (GMX_RX_PRT_CFG[SPEED]==0) and will never assert. +* +* (6) MAXERR - for untagged frames, the total frame DA+SA+TL+DATA+PAD+FCS > +* GMX_RX_FRM_MAX. For tagged frames, DA+SA+VLAN+TL+DATA+PAD+FCS +* > GMX_RX_FRM_MAX + 4*VLAN_VAL + 4*VLAN_STACKED. +* +* (7) MINERR - total frame DA+SA+TL+DATA+PAD+FCS < 64 +* +* (8) ALNERR - Indicates that the packet received was not an integer number of +* bytes. If FCS checking is enabled, ALNERR will only assert if +* the FCS is bad. If FCS checking is disabled, ALNERR will +* assert in all non-integer frame cases. +* +* (9) Collisions - Collisions can only occur in half-duplex mode. A collision +* is assumed by the receiver when the slottime +* (GMX_PRT_CFG[SLOTTIME]) is not satisfied. In 10/100 mode, +* this will result in a frame < SLOTTIME. In 1000 mode, it +* could result either in frame < SLOTTIME or a carrier extend +* error with the SLOTTIME. These conditions are visible by... +* +* . transfer ended before slottime - COLDET +* . carrier extend error - CAREXT
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.29.2
Part of the diff is not shown here. View the raw message.
PATCH 12/50 mips: octeon: Add cvmx-gserx-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-gserx-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../include/mach/cvmx-gserx-defs.h | 2191 +++++++++++++++++ 1 file changed, 2191 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-gserx-defs.h
arch/mips/mach-octeon/include/mach/cvmx-gserx-defs.h new file +2191 -0
@@ -0,0 +1,2191 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +*/ + +#ifndef __CVMX_GSERX_DEFS_H__ +#define __CVMX_GSERX_DEFS_H__ + +#define CVMX_GSERX_DLMX_TX_AMPLITUDE (offset, block_id) (0x0001180090003008ull) +#define CVMX_GSERX_DLMX_TX_PREEMPH (offset, block_id) (0x0001180090003028ull) +#define CVMX_GSERX_DLMX_MPLL_EN (offset, block_id) (0x0001180090001020ull) +#define CVMX_GSERX_DLMX_REF_SSP_EN (offset, block_id) (0x0001180090001048ull) +#define CVMX_GSERX_DLMX_TX_RATE (offset, block_id) (0x0001180090003030ull) +#define CVMX_GSERX_DLMX_TX_EN (offset, block_id) (0x0001180090003020ull) +#define CVMX_GSERX_DLMX_TX_CM_EN (offset, block_id) (0x0001180090003010ull) +#define CVMX_GSERX_DLMX_TX_RESET (offset, block_id) (0x0001180090003038ull) +#define CVMX_GSERX_DLMX_TX_DATA_EN (offset, block_id) (0x0001180090003018ull) +#define CVMX_GSERX_DLMX_RX_RATE (offset, block_id) (0x0001180090002028ull) +#define CVMX_GSERX_DLMX_RX_PLL_EN (offset, block_id) (0x0001180090002020ull) +#define CVMX_GSERX_DLMX_RX_DATA_EN (offset, block_id) (0x0001180090002008ull) +#define CVMX_GSERX_DLMX_RX_RESET (offset, block_id) (0x0001180090002030ull) + +#define CVMX_GSERX_DLMX_TX_STATUS (offset, block_id) \ + (0x0001180090003000ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_RX_STATUS (offset, block_id) \ + (0x0001180090002000ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) + +static inline u64 CVMX_GSERX_SATA_STATUS (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +return 0x0001180090100200ull + (offset) *0x1000000ull ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +return 0x0001180090100900ull + (offset) *0x1000000ull ; +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x0001180090100900ull + (offset) *0x1000000ull ; + } +return 0x0001180090100900ull + (offset) *0x1000000ull ; +} + +#define CVMX_GSERX_DLMX_RX_EQ (offset, block_id) \ + (0x0001180090002010ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_REF_USE_PAD (offset, block_id) \ + (0x0001180090001050ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_REFCLK_SEL (offset, block_id) \ + (0x0001180090000008ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_PHY_RESET (offset, block_id) \ + (0x0001180090001038ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_TEST_POWERDOWN (offset, block_id) \ + (0x0001180090001060ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_REF_CLKDIV2 (offset, block_id) \ + (0x0001180090001040ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_MPLL_MULTIPLIER (offset, block_id) \ + (0x0001180090001030ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) +#define CVMX_GSERX_DLMX_MPLL_STATUS (offset, block_id) \ + (0x0001180090001000ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) + +#define CVMX_GSERX_BR_RXX_CTL (offset, block_id) \ + (0x0001180090000400ull + (((offset) & 3) + ((block_id) & 15) * 0x20000ull) * 128) +#define CVMX_GSERX_BR_RXX_EER (offset, block_id) \ + (0x0001180090000418ull + (((offset) & 3) + ((block_id) & 15) * 0x20000ull) * 128) + +#define CVMX_GSERX_PCIE_PIPE_PORT_SEL (offset) (0x0001180090080460ull) +#define CVMX_GSERX_PCIE_PIPE_RST (offset) (0x0001180090080448ull) + +#define CVMX_GSERX_SATA_CFG (offset) (0x0001180090100208ull) +#define CVMX_GSERX_SATA_REF_SSP_EN (offset) (0x0001180090100600ull) + +static inline u64 CVMX_GSERX_SATA_LANE_RST (unsigned long offset) +{ +switch (cvmx_get_octeon_family ()) { +case OCTEON_CN70XX &OCTEON_FAMILY_MASK : +return 0x0001180090100210ull + (offset) *0x1000000ull ; +case OCTEON_CNF75XX &OCTEON_FAMILY_MASK : +return 0x0001180090000908ull + (offset) *0x1000000ull ; +case OCTEON_CN73XX &OCTEON_FAMILY_MASK : +return 0x0001180090000908ull + (offset) *0x1000000ull ; + } +return 0x0001180090000908ull + (offset) *0x1000000ull ; +} + +#define CVMX_GSERX_EQ_WAIT_TIME (offset) (0x00011800904E0000ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_GLBL_MISC_CONFIG_1 (offset) (0x0001180090460030ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_GLBL_PLL_CFG_3 (offset) (0x0001180090460018ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_PHYX_OVRD_IN_LO (offset, block_id) \ + (0x0001180090400088ull + (((offset) & 3) + ((block_id) & 0) * 0x0ull) * 524288) + +#define CVMX_GSERX_RX_PWR_CTRL_P1 (offset) (0x00011800904600B0ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_RX_PWR_CTRL_P2 (offset) (0x00011800904600B8ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_RX_EIE_DETSTS (offset) (0x0001180090000150ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_LANE_MODE (offset) (0x0001180090000118ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_LANE_VMA_FINE_CTRL_0 (offset) \ + (0x00011800904E01C8ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_LANEX_LBERT_CFG (offset, block_id) \ + (0x00011800904C0020ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_LANEX_MISC_CFG_0 (offset, block_id) \ + (0x00011800904C0000ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_LANE_PX_MODE_0 (offset, block_id) \ + (0x00011800904E0040ull + (((offset) & 15) + ((block_id) & 15) * 0x80000ull) * 32) +#define CVMX_GSERX_LANE_PX_MODE_1 (offset, block_id) \ + (0x00011800904E0048ull + (((offset) & 15) + ((block_id) & 15) * 0x80000ull) * 32) + +#define CVMX_GSERX_LANEX_RX_CFG_0 (offset, block_id) \ + (0x0001180090440000ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_CFG_1 (offset, block_id) \ + (0x0001180090440008ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_CFG_2 (offset, block_id) \ + (0x0001180090440010ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_CFG_3 (offset, block_id) \ + (0x0001180090440018ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_CFG_4 (offset, block_id) \ + (0x0001180090440020ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_CFG_5 (offset, block_id) \ + (0x0001180090440028ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_CTLE_CTRL (offset, block_id) \ + (0x0001180090440058ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_LANEX_RX_LOOP_CTRL (offset, block_id) \ + (0x0001180090440048ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_VALBBD_CTRL_0 (offset, block_id) \ + (0x0001180090440240ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_VALBBD_CTRL_1 (offset, block_id) \ + (0x0001180090440248ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_VALBBD_CTRL_2 (offset, block_id) \ + (0x0001180090440250ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_RX_MISC_OVRRD (offset, block_id) \ + (0x0001180090440258ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_LANEX_TX_CFG_0 (offset, block_id) \ + (0x00011800904400A8ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_TX_CFG_1 (offset, block_id) \ + (0x00011800904400B0ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_TX_CFG_2 (offset, block_id) \ + (0x00011800904400B8ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_TX_CFG_3 (offset, block_id) \ + (0x00011800904400C0ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_TX_PRE_EMPHASIS (offset, block_id) \ + (0x00011800904400C8ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_RX_TXDIR_CTRL_0 (offset) (0x00011800904600E8ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_RX_TXDIR_CTRL_1 (offset) (0x00011800904600F0ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_RX_TXDIR_CTRL_2 (offset) (0x00011800904600F8ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_LANEX_PCS_CTLIFC_0 (offset, block_id) \ + (0x00011800904C0060ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_PCS_CTLIFC_1 (offset, block_id) \ + (0x00011800904C0068ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) +#define CVMX_GSERX_LANEX_PCS_CTLIFC_2 (offset, block_id) \ + (0x00011800904C0070ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_LANEX_PWR_CTRL (offset, block_id) \ + (0x00011800904400D8ull + (((offset) & 3) + ((block_id) & 15) * 0x10ull) * 1048576) + +#define CVMX_GSERX_LANE_VMA_FINE_CTRL_2 (offset) \ + (0x00011800904E01D8ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_PLL_STAT (offset) (0x0001180090000010ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_QLM_STAT (offset) (0x00011800900000A0ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_PLL_PX_MODE_0 (offset, block_id) \ + (0x00011800904E0030ull + (((offset) & 15) + ((block_id) & 15) * 0x80000ull) * 32) +#define CVMX_GSERX_PLL_PX_MODE_1 (offset, block_id) \ + (0x00011800904E0038ull + (((offset) & 15) + ((block_id) & 15) * 0x80000ull) * 32) + +#define CVMX_GSERX_SLICE_CFG (offset) (0x0001180090460060ull + ((offset) & 15) * 0x1000000ull) + +#define CVMX_GSERX_SLICEX_PCIE1_MODE (offset, block_id) \ + (0x0001180090460228ull + (((offset) & 1) + ((block_id) & 15) * 0x8ull) * 2097152) +#define CVMX_GSERX_SLICEX_PCIE2_MODE (offset, block_id) \ + (0x0001180090460230ull + (((offset) & 1) + ((block_id) & 15) * 0x8ull) * 2097152) +#define CVMX_GSERX_SLICEX_PCIE3_MODE (offset, block_id) \ + (0x0001180090460238ull + (((offset) & 1) + ((block_id) & 15) * 0x8ull) * 2097152) +#define CVMX_GSERX_SLICEX_RX_SDLL_CTRL (offset, block_id) \ + (0x0001180090460220ull + (((offset) & 1) + ((block_id) & 15) * 0x8ull) * 2097152) + +#define CVMX_GSERX_REFCLK_SEL (offset) (0x0001180090000008ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_PHY_CTL (offset) (0x0001180090000000ull + ((offset) & 15) * 0x1000000ull) +#define CVMX_GSERX_CFG (offset) (0x0001180090000080ull + ((offset) & 15) * 0x1000000ull) + +/** +* cvmx_gser#_cfg +*/ +union cvmx_gserx_cfg { +u64 u64; +struct cvmx_gserx_cfg_s { +u64 reserved_9_63 :55 ; +u64 rmac_pipe :1 ; +u64 rmac :1 ; +u64 srio :1 ; +u64 sata :1 ; +u64 bgx_quad :1 ; +u64 bgx_dual :1 ; +u64 bgx :1 ; +u64 ila :1 ; +u64 pcie :1 ; + } s; +struct cvmx_gserx_cfg_cn73xx { +u64 reserved_6_63 :58 ; +u64 sata :1 ; +u64 bgx_quad :1 ; +u64 bgx_dual :1 ; +u64 bgx :1 ; +u64 ila :1 ; +u64 pcie :1 ; + } cn73xx; +struct cvmx_gserx_cfg_cn78xx { +u64 reserved_5_63 :59 ; +u64 bgx_quad :1 ; +u64 bgx_dual :1 ; +u64 bgx :1 ; +u64 ila :1 ; +u64 pcie :1 ; + } cn78xx; +struct cvmx_gserx_cfg_cn78xx cn78xxp1; +struct cvmx_gserx_cfg_s cnf75xx; +}; + +typedef union cvmx_gserx_cfg cvmx_gserx_cfg_t ; + +/** +* cvmx_gser#_eq_wait_time +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_eq_wait_time { +u64 u64; +struct cvmx_gserx_eq_wait_time_s { +u64 reserved_8_63 :56 ; +u64 rxeq_wait_cnt :4 ; +u64 txeq_wait_cnt :4 ; + } s; +struct cvmx_gserx_eq_wait_time_s cn73xx; +struct cvmx_gserx_eq_wait_time_s cn78xx; +struct cvmx_gserx_eq_wait_time_s cn78xxp1; +struct cvmx_gserx_eq_wait_time_s cnf75xx; +}; + +typedef union cvmx_gserx_eq_wait_time cvmx_gserx_eq_wait_time_t ; + +/** +* cvmx_gser#_glbl_misc_config_1 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_glbl_misc_config_1 { +u64 u64; +struct cvmx_gserx_glbl_misc_config_1_s { +u64 reserved_10_63 :54 ; +u64 pcs_sds_vref_tr :4 ; +u64 pcs_sds_trim_chp_reg :2 ; +u64 pcs_sds_vco_reg_tr :2 ; +u64 pcs_sds_cvbg_en :1 ; +u64 pcs_sds_extvbg_en :1 ; + } s; +struct cvmx_gserx_glbl_misc_config_1_s cn73xx; +struct cvmx_gserx_glbl_misc_config_1_s cn78xx; +struct cvmx_gserx_glbl_misc_config_1_s cn78xxp1; +struct cvmx_gserx_glbl_misc_config_1_s cnf75xx; +}; + +typedef union cvmx_gserx_glbl_misc_config_1 cvmx_gserx_glbl_misc_config_1_t ; + +/** +* cvmx_gser#_glbl_pll_cfg_3 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_glbl_pll_cfg_3 { +u64 u64; +struct cvmx_gserx_glbl_pll_cfg_3_s { +u64 reserved_10_63 :54 ; +u64 pcs_sds_pll_vco_amp :2 ; +u64 pll_bypass_uq :1 ; +u64 pll_vctrl_sel_ovrrd_en :1 ; +u64 pll_vctrl_sel_ovrrd_val :2 ; +u64 pll_vctrl_sel_lcvco_val :2 ; +u64 pll_vctrl_sel_rovco_val :2 ; + } s; +struct cvmx_gserx_glbl_pll_cfg_3_s cn73xx; +struct cvmx_gserx_glbl_pll_cfg_3_s cn78xx; +struct cvmx_gserx_glbl_pll_cfg_3_s cn78xxp1; +struct cvmx_gserx_glbl_pll_cfg_3_s cnf75xx; +}; + +typedef union cvmx_gserx_glbl_pll_cfg_3 cvmx_gserx_glbl_pll_cfg_3_t ; + +/** +* cvmx_gser#_dlm#_rx_data_en +* +* DLM Receiver Enable. +* +*/ +union cvmx_gserx_dlmx_rx_data_en { +u64 u64; +struct cvmx_gserx_dlmx_rx_data_en_s { +u64 reserved_9_63 :55 ; +u64 rx1_data_en :1 ; +u64 reserved_1_7 :7 ; +u64 rx0_data_en :1 ; + } s; +struct cvmx_gserx_dlmx_rx_data_en_s cn70xx; +struct cvmx_gserx_dlmx_rx_data_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_rx_data_en cvmx_gserx_dlmx_rx_data_en_t ; + +/** +* cvmx_gser#_dlm#_rx_pll_en +* +* DLM0 DPLL Enable. +* +*/ +union cvmx_gserx_dlmx_rx_pll_en { +u64 u64; +struct cvmx_gserx_dlmx_rx_pll_en_s { +u64 reserved_9_63 :55 ; +u64 rx1_pll_en :1 ; +u64 reserved_1_7 :7 ; +u64 rx0_pll_en :1 ; + } s; +struct cvmx_gserx_dlmx_rx_pll_en_s cn70xx; +struct cvmx_gserx_dlmx_rx_pll_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_rx_pll_en cvmx_gserx_dlmx_rx_pll_en_t ; + +/** +* cvmx_gser#_dlm#_rx_rate +* +* DLM0 Rx Data Rate. +* +*/ +union cvmx_gserx_dlmx_rx_rate { +u64 u64; +struct cvmx_gserx_dlmx_rx_rate_s { +u64 reserved_10_63 :54 ; +u64 rx1_rate :2 ; +u64 reserved_2_7 :6 ; +u64 rx0_rate :2 ; + } s; +struct cvmx_gserx_dlmx_rx_rate_s cn70xx; +struct cvmx_gserx_dlmx_rx_rate_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_rx_rate cvmx_gserx_dlmx_rx_rate_t ; + +/** +* cvmx_gser#_dlm#_rx_reset +* +* DLM0 Receiver Reset. +* +*/ +union cvmx_gserx_dlmx_rx_reset { +u64 u64; +struct cvmx_gserx_dlmx_rx_reset_s { +u64 reserved_9_63 :55 ; +u64 rx1_reset :1 ; +u64 reserved_1_7 :7 ; +u64 rx0_reset :1 ; + } s; +struct cvmx_gserx_dlmx_rx_reset_s cn70xx; +struct cvmx_gserx_dlmx_rx_reset_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_rx_reset cvmx_gserx_dlmx_rx_reset_t ; + +/** +* cvmx_gser#_dlm#_test_powerdown +* +* DLM Test Powerdown. +* +*/ +union cvmx_gserx_dlmx_test_powerdown { +u64 u64; +struct cvmx_gserx_dlmx_test_powerdown_s { +u64 reserved_1_63 :63 ; +u64 test_powerdown :1 ; + } s; +struct cvmx_gserx_dlmx_test_powerdown_s cn70xx; +struct cvmx_gserx_dlmx_test_powerdown_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_test_powerdown cvmx_gserx_dlmx_test_powerdown_t ; + +/** +* cvmx_gser#_dlm#_tx_amplitude +* +* DLM0 Tx Amplitude (Full Swing Mode). +* +*/ +union cvmx_gserx_dlmx_tx_amplitude { +u64 u64; +struct cvmx_gserx_dlmx_tx_amplitude_s { +u64 reserved_15_63 :49 ; +u64 tx1_amplitude :7 ; +u64 reserved_7_7 :1 ; +u64 tx0_amplitude :7 ; + } s; +struct cvmx_gserx_dlmx_tx_amplitude_s cn70xx; +struct cvmx_gserx_dlmx_tx_amplitude_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_amplitude cvmx_gserx_dlmx_tx_amplitude_t ; + +/** +* cvmx_gser#_dlm#_tx_en +* +* DLM Transmit Clocking and Data Sampling Enable. +* +*/ +union cvmx_gserx_dlmx_tx_en { +u64 u64; +struct cvmx_gserx_dlmx_tx_en_s { +u64 reserved_9_63 :55 ; +u64 tx1_en :1 ; +u64 reserved_1_7 :7 ; +u64 tx0_en :1 ; + } s; +struct cvmx_gserx_dlmx_tx_en_s cn70xx; +struct cvmx_gserx_dlmx_tx_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_en cvmx_gserx_dlmx_tx_en_t ; + +/** +* cvmx_gser#_dlm#_tx_preemph +* +* DLM0 Tx Deemphasis. +* +*/ +union cvmx_gserx_dlmx_tx_preemph { +u64 u64; +struct cvmx_gserx_dlmx_tx_preemph_s { +u64 reserved_15_63 :49 ; +u64 tx1_preemph :7 ; +u64 reserved_7_7 :1 ; +u64 tx0_preemph :7 ; + } s; +struct cvmx_gserx_dlmx_tx_preemph_s cn70xx; +struct cvmx_gserx_dlmx_tx_preemph_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_preemph cvmx_gserx_dlmx_tx_preemph_t ; + +/** +* cvmx_gser#_dlm#_tx_status +* +* DLM Transmit Common Mode Control Status. +* +*/ +union cvmx_gserx_dlmx_tx_status { +u64 u64; +struct cvmx_gserx_dlmx_tx_status_s { +u64 reserved_10_63 :54 ; +u64 tx1_cm_status :1 ; +u64 tx1_status :1 ; +u64 reserved_2_7 :6 ; +u64 tx0_cm_status :1 ; +u64 tx0_status :1 ; + } s; +struct cvmx_gserx_dlmx_tx_status_s cn70xx; +struct cvmx_gserx_dlmx_tx_status_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_status cvmx_gserx_dlmx_tx_status_t ; + +/** +* cvmx_gser#_dlm#_rx_status +* +* DLM Receive DPLL State Indicator. +* +*/ +union cvmx_gserx_dlmx_rx_status { +u64 u64; +struct cvmx_gserx_dlmx_rx_status_s { +u64 reserved_9_63 :55 ; +u64 rx1_status :1 ; +u64 reserved_1_7 :7 ; +u64 rx0_status :1 ; + } s; +struct cvmx_gserx_dlmx_rx_status_s cn70xx; +struct cvmx_gserx_dlmx_rx_status_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_rx_status cvmx_gserx_dlmx_rx_status_t ; + +/** +* cvmx_gser#_dlm#_tx_rate +* +* DLM0 Tx Data Rate. +* +*/ +union cvmx_gserx_dlmx_tx_rate { +u64 u64; +struct cvmx_gserx_dlmx_tx_rate_s { +u64 reserved_10_63 :54 ; +u64 tx1_rate :2 ; +u64 reserved_2_7 :6 ; +u64 tx0_rate :2 ; + } s; +struct cvmx_gserx_dlmx_tx_rate_s cn70xx; +struct cvmx_gserx_dlmx_tx_rate_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_rate cvmx_gserx_dlmx_tx_rate_t ; + +/** +* cvmx_gser#_sata_status +* +* SATA PHY Ready Status. +* +*/ +union cvmx_gserx_sata_status { +u64 u64; +struct cvmx_gserx_sata_status_s { +u64 reserved_2_63 :62 ; +u64 p1_rdy :1 ; +u64 p0_rdy :1 ; + } s; +struct cvmx_gserx_sata_status_s cn70xx; +struct cvmx_gserx_sata_status_s cn70xxp1; +struct cvmx_gserx_sata_status_s cn73xx; +struct cvmx_gserx_sata_status_s cnf75xx; +}; + +typedef union cvmx_gserx_sata_status cvmx_gserx_sata_status_t ; + +/** +* cvmx_gser#_dlm#_tx_data_en +* +* DLM0 Transmit Driver Enable. +* +*/ +union cvmx_gserx_dlmx_tx_data_en { +u64 u64; +struct cvmx_gserx_dlmx_tx_data_en_s { +u64 reserved_9_63 :55 ; +u64 tx1_data_en :1 ; +u64 reserved_1_7 :7 ; +u64 tx0_data_en :1 ; + } s; +struct cvmx_gserx_dlmx_tx_data_en_s cn70xx; +struct cvmx_gserx_dlmx_tx_data_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_data_en cvmx_gserx_dlmx_tx_data_en_t ; + +/** +* cvmx_gser#_dlm#_tx_cm_en +* +* DLM0 Transmit Common-Mode Control Enable. +* +*/ +union cvmx_gserx_dlmx_tx_cm_en { +u64 u64; +struct cvmx_gserx_dlmx_tx_cm_en_s { +u64 reserved_9_63 :55 ; +u64 tx1_cm_en :1 ; +u64 reserved_1_7 :7 ; +u64 tx0_cm_en :1 ; + } s; +struct cvmx_gserx_dlmx_tx_cm_en_s cn70xx; +struct cvmx_gserx_dlmx_tx_cm_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_cm_en cvmx_gserx_dlmx_tx_cm_en_t ; + +/** +* cvmx_gser#_dlm#_tx_reset +* +* DLM0 Tx Reset. +* +*/ +union cvmx_gserx_dlmx_tx_reset { +u64 u64; +struct cvmx_gserx_dlmx_tx_reset_s { +u64 reserved_9_63 :55 ; +u64 tx1_reset :1 ; +u64 reserved_1_7 :7 ; +u64 tx0_reset :1 ; + } s; +struct cvmx_gserx_dlmx_tx_reset_s cn70xx; +struct cvmx_gserx_dlmx_tx_reset_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_tx_reset cvmx_gserx_dlmx_tx_reset_t ; + +/** +* cvmx_gser#_dlm#_mpll_status +* +* DLM PLL Lock Status. +* +*/ +union cvmx_gserx_dlmx_mpll_status { +u64 u64; +struct cvmx_gserx_dlmx_mpll_status_s { +u64 reserved_1_63 :63 ; +u64 mpll_status :1 ; + } s; +struct cvmx_gserx_dlmx_mpll_status_s cn70xx; +struct cvmx_gserx_dlmx_mpll_status_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_mpll_status cvmx_gserx_dlmx_mpll_status_t ; + +/** +* cvmx_gser#_dlm#_phy_reset +* +* DLM Core and State Machine Reset. +* +*/ +union cvmx_gserx_dlmx_phy_reset { +u64 u64; +struct cvmx_gserx_dlmx_phy_reset_s { +u64 reserved_1_63 :63 ; +u64 phy_reset :1 ; + } s; +struct cvmx_gserx_dlmx_phy_reset_s cn70xx; +struct cvmx_gserx_dlmx_phy_reset_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_phy_reset cvmx_gserx_dlmx_phy_reset_t ; + +/** +* cvmx_gser#_dlm#_ref_clkdiv2 +* +* DLM Input Reference Clock Divider Control. +* +*/ +union cvmx_gserx_dlmx_ref_clkdiv2 { +u64 u64; +struct cvmx_gserx_dlmx_ref_clkdiv2_s { +u64 reserved_1_63 :63 ; +u64 ref_clkdiv2 :1 ; + } s; +struct cvmx_gserx_dlmx_ref_clkdiv2_s cn70xx; +struct cvmx_gserx_dlmx_ref_clkdiv2_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_ref_clkdiv2 cvmx_gserx_dlmx_ref_clkdiv2_t ; + +/** +* cvmx_gser#_dlm#_ref_ssp_en +* +* DLM0 Reference Clock Enable for the PHY. +* +*/ +union cvmx_gserx_dlmx_ref_ssp_en { +u64 u64; +struct cvmx_gserx_dlmx_ref_ssp_en_s { +u64 reserved_1_63 :63 ; +u64 ref_ssp_en :1 ; + } s; +struct cvmx_gserx_dlmx_ref_ssp_en_s cn70xx; +struct cvmx_gserx_dlmx_ref_ssp_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_ref_ssp_en cvmx_gserx_dlmx_ref_ssp_en_t ; + +union cvmx_gserx_dlmx_mpll_en { +u64 u64; +struct cvmx_gserx_dlmx_mpll_en_s { +u64 reserved_1_63 :63 ; +u64 mpll_en :1 ; + } s; +struct cvmx_gserx_dlmx_mpll_en_s cn70xx; +struct cvmx_gserx_dlmx_mpll_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_mpll_en cvmx_gserx_dlmx_mpll_en_t ; + +/** +* cvmx_gser#_dlm#_rx_eq +* +* DLM Receiver Equalization Setting. +* +*/ +union cvmx_gserx_dlmx_rx_eq { +u64 u64; +struct cvmx_gserx_dlmx_rx_eq_s { +u64 reserved_11_63 :53 ; +u64 rx1_eq :3 ; +u64 reserved_3_7 :5 ; +u64 rx0_eq :3 ; + } s; +struct cvmx_gserx_dlmx_rx_eq_s cn70xx; +struct cvmx_gserx_dlmx_rx_eq_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_rx_eq cvmx_gserx_dlmx_rx_eq_t ; + +/** +* cvmx_gser#_dlm#_mpll_multiplier +* +* DLM MPLL Frequency Multiplier Control. +* +*/ +union cvmx_gserx_dlmx_mpll_multiplier { +u64 u64; +struct cvmx_gserx_dlmx_mpll_multiplier_s { +u64 reserved_7_63 :57 ; +u64 mpll_multiplier :7 ; + } s; +struct cvmx_gserx_dlmx_mpll_multiplier_s cn70xx; +struct cvmx_gserx_dlmx_mpll_multiplier_s cn70xxp1; +}; + +typedef union cvmx_gserx_dlmx_mpll_multiplier cvmx_gserx_dlmx_mpll_multiplier_t ; + +/** +* cvmx_gser#_br_rx#_ctl +*/ +union cvmx_gserx_br_rxx_ctl { +u64 u64; +struct cvmx_gserx_br_rxx_ctl_s { +u64 reserved_4_63 :60 ; +u64 rxt_adtmout_disable :1 ; +u64 rxt_swm :1 ; +u64 rxt_preset :1 ; +u64 rxt_initialize :1 ; + } s; +struct cvmx_gserx_br_rxx_ctl_s cn73xx; +struct cvmx_gserx_br_rxx_ctl_s cn78xx; +struct cvmx_gserx_br_rxx_ctl_cn78xxp1 { +u64 reserved_3_63 :61 ; +u64 rxt_swm :1 ; +u64 rxt_preset :1 ; +u64 rxt_initialize :1 ; + } cn78xxp1; +struct cvmx_gserx_br_rxx_ctl_s cnf75xx; +}; + +typedef union cvmx_gserx_br_rxx_ctl cvmx_gserx_br_rxx_ctl_t ; + +/** +* cvmx_gser#_br_rx#_eer +* +* GSER software BASE-R RX link training equalization evaluation request (EER). A write to +* [RXT_EER] initiates a equalization request to the RAW PCS. A read of this register returns the +* equalization status message and a valid bit indicating it was updated. These registers are for +* diagnostic use only. +*/ +union cvmx_gserx_br_rxx_eer { +u64 u64; +struct cvmx_gserx_br_rxx_eer_s { +u64 reserved_16_63 :48 ; +u64 rxt_eer :1 ; +u64 rxt_esv :1 ; +u64 rxt_esm :14 ; + } s; +struct cvmx_gserx_br_rxx_eer_s cn73xx; +struct cvmx_gserx_br_rxx_eer_s cn78xx; +struct cvmx_gserx_br_rxx_eer_s cn78xxp1; +struct cvmx_gserx_br_rxx_eer_s cnf75xx; +}; + +typedef union cvmx_gserx_br_rxx_eer cvmx_gserx_br_rxx_eer_t ; + +/** +* cvmx_gser#_pcie_pipe_port_sel +* +* PCIE PIPE Enable Request. +* +*/ +union cvmx_gserx_pcie_pipe_port_sel { +u64 u64; +struct cvmx_gserx_pcie_pipe_port_sel_s { +u64 reserved_3_63 :61 ; +u64 cfg_pem1_dlm2 :1 ; +u64 pipe_port_sel :2 ; + } s; +struct cvmx_gserx_pcie_pipe_port_sel_s cn70xx; +struct cvmx_gserx_pcie_pipe_port_sel_s cn70xxp1; +}; + +typedef union cvmx_gserx_pcie_pipe_port_sel cvmx_gserx_pcie_pipe_port_sel_t ; + +/** +* cvmx_gser#_pcie_pipe_rst +* +* PCIE PIPE Reset. +* +*/ +union cvmx_gserx_pcie_pipe_rst { +u64 u64; +struct cvmx_gserx_pcie_pipe_rst_s { +u64 reserved_4_63 :60 ; +u64 pipe3_rst :1 ; +u64 pipe2_rst :1 ; +u64 pipe1_rst :1 ; +u64 pipe0_rst :1 ; + } s; +struct cvmx_gserx_pcie_pipe_rst_s cn70xx; +struct cvmx_gserx_pcie_pipe_rst_s cn70xxp1; +}; + +typedef union cvmx_gserx_pcie_pipe_rst cvmx_gserx_pcie_pipe_rst_t ; + +/** +* cvmx_gser#_sata_cfg +* +* SATA Config Enable. +* +*/ +union cvmx_gserx_sata_cfg { +u64 u64; +struct cvmx_gserx_sata_cfg_s { +u64 reserved_1_63 :63 ; +u64 sata_en :1 ; + } s; +struct cvmx_gserx_sata_cfg_s cn70xx; +struct cvmx_gserx_sata_cfg_s cn70xxp1; +}; + +typedef union cvmx_gserx_sata_cfg cvmx_gserx_sata_cfg_t ; + +/** +* cvmx_gser#_sata_lane_rst +* +* Lane Reset Control. +* +*/ +union cvmx_gserx_sata_lane_rst { +u64 u64; +struct cvmx_gserx_sata_lane_rst_s { +u64 reserved_2_63 :62 ; +u64 l1_rst :1 ; +u64 l0_rst :1 ; + } s; +struct cvmx_gserx_sata_lane_rst_s cn70xx; +struct cvmx_gserx_sata_lane_rst_s cn70xxp1; +struct cvmx_gserx_sata_lane_rst_s cn73xx; +struct cvmx_gserx_sata_lane_rst_s cnf75xx; +}; + +typedef union cvmx_gserx_sata_lane_rst cvmx_gserx_sata_lane_rst_t ; + +/** +* cvmx_gser#_sata_ref_ssp_en +* +* SATA Reference Clock Enable for the PHY. +* +*/ +union cvmx_gserx_sata_ref_ssp_en { +u64 u64; +struct cvmx_gserx_sata_ref_ssp_en_s { +u64 reserved_1_63 :63 ; +u64 ref_ssp_en :1 ; + } s; +struct cvmx_gserx_sata_ref_ssp_en_s cn70xx; +struct cvmx_gserx_sata_ref_ssp_en_s cn70xxp1; +}; + +typedef union cvmx_gserx_sata_ref_ssp_en cvmx_gserx_sata_ref_ssp_en_t ; + +/** +* cvmx_gser#_phy#_ovrd_in_lo +* +* PHY Override Input Low Register. +* +*/ +union cvmx_gserx_phyx_ovrd_in_lo { +u64 u64; +struct cvmx_gserx_phyx_ovrd_in_lo_s { +u64 reserved_16_63 :48 ; +u64 res_ack_in_ovrd :1 ; +u64 res_ack_in :1 ; +u64 res_req_in_ovrd :1 ; +u64 res_req_in :1 ; +u64 rtune_req_ovrd :1 ; +u64 rtune_req :1 ; +u64 mpll_multiplier_ovrd :1 ; +u64 mpll_multiplier :7 ; +u64 mpll_en_ovrd :1 ; +u64 mpll_en :1 ; + } s; +struct cvmx_gserx_phyx_ovrd_in_lo_s cn70xx; +struct cvmx_gserx_phyx_ovrd_in_lo_s cn70xxp1; +}; + +typedef union cvmx_gserx_phyx_ovrd_in_lo cvmx_gserx_phyx_ovrd_in_lo_t ; + +/** +* cvmx_gser#_phy_ctl +* +* This register contains general PHY/PLL control of the RAW PCS. +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_phy_ctl { +u64 u64; +struct cvmx_gserx_phy_ctl_s { +u64 reserved_2_63 :62 ; +u64 phy_reset :1 ; +u64 phy_pd :1 ; + } s; +struct cvmx_gserx_phy_ctl_s cn73xx; +struct cvmx_gserx_phy_ctl_s cn78xx; +struct cvmx_gserx_phy_ctl_s cn78xxp1; +struct cvmx_gserx_phy_ctl_s cnf75xx; +}; + +typedef union cvmx_gserx_phy_ctl cvmx_gserx_phy_ctl_t ; + +/** +* cvmx_gser#_rx_pwr_ctrl_p1 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_rx_pwr_ctrl_p1 { +u64 u64; +struct cvmx_gserx_rx_pwr_ctrl_p1_s { +u64 reserved_14_63 :50 ; +u64 p1_rx_resetn :1 ; +u64 pq_rx_allow_pll_pd :1 ; +u64 pq_rx_pcs_reset :1 ; +u64 p1_rx_agc_en :1 ; +u64 p1_rx_dfe_en :1 ; +u64 p1_rx_cdr_en :1 ; +u64 p1_rx_cdr_coast :1 ; +u64 p1_rx_cdr_clr :1 ; +u64 p1_rx_subblk_pd :5 ; +u64 p1_rx_chpd :1 ; + } s; +struct cvmx_gserx_rx_pwr_ctrl_p1_s cn73xx; +struct cvmx_gserx_rx_pwr_ctrl_p1_s cn78xx; +struct cvmx_gserx_rx_pwr_ctrl_p1_s cn78xxp1; +struct cvmx_gserx_rx_pwr_ctrl_p1_s cnf75xx; +}; + +typedef union cvmx_gserx_rx_pwr_ctrl_p1 cvmx_gserx_rx_pwr_ctrl_p1_t ; + +/** +* cvmx_gser#_rx_pwr_ctrl_p2 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_rx_pwr_ctrl_p2 { +u64 u64; +struct cvmx_gserx_rx_pwr_ctrl_p2_s { +u64 reserved_14_63 :50 ; +u64 p2_rx_resetn :1 ; +u64 p2_rx_allow_pll_pd :1 ; +u64 p2_rx_pcs_reset :1 ; +u64 p2_rx_agc_en :1 ; +u64 p2_rx_dfe_en :1 ; +u64 p2_rx_cdr_en :1 ; +u64 p2_rx_cdr_coast :1 ; +u64 p2_rx_cdr_clr :1 ; +u64 p2_rx_subblk_pd :5 ; +u64 p2_rx_chpd :1 ; + } s; +struct cvmx_gserx_rx_pwr_ctrl_p2_s cn73xx; +struct cvmx_gserx_rx_pwr_ctrl_p2_s cn78xx; +struct cvmx_gserx_rx_pwr_ctrl_p2_s cn78xxp1; +struct cvmx_gserx_rx_pwr_ctrl_p2_s cnf75xx; +}; + +typedef union cvmx_gserx_rx_pwr_ctrl_p2 cvmx_gserx_rx_pwr_ctrl_p2_t ; + +/** +* cvmx_gser#_rx_txdir_ctrl_0 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_rx_txdir_ctrl_0 { +u64 u64; +struct cvmx_gserx_rx_txdir_ctrl_0_s { +u64 reserved_13_63 :51 ; +u64 rx_boost_hi_thrs :4 ; +u64 rx_boost_lo_thrs :4 ; +u64 rx_boost_hi_val :5 ; + } s; +struct cvmx_gserx_rx_txdir_ctrl_0_s cn73xx; +struct cvmx_gserx_rx_txdir_ctrl_0_s cn78xx; +struct cvmx_gserx_rx_txdir_ctrl_0_s cn78xxp1; +struct cvmx_gserx_rx_txdir_ctrl_0_s cnf75xx; +}; + +typedef union cvmx_gserx_rx_txdir_ctrl_0 cvmx_gserx_rx_txdir_ctrl_0_t ; + +/** +* cvmx_gser#_rx_txdir_ctrl_1 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_rx_txdir_ctrl_1 { +u64 u64; +struct cvmx_gserx_rx_txdir_ctrl_1_s { +u64 reserved_12_63 :52 ; +u64 rx_precorr_chg_dir :1 ; +u64 rx_tap1_chg_dir :1 ; +u64 rx_tap1_hi_thrs :5 ; +u64 rx_tap1_lo_thrs :5 ; + } s; +struct cvmx_gserx_rx_txdir_ctrl_1_s cn73xx; +struct cvmx_gserx_rx_txdir_ctrl_1_s cn78xx; +struct cvmx_gserx_rx_txdir_ctrl_1_s cn78xxp1; +struct cvmx_gserx_rx_txdir_ctrl_1_s cnf75xx; +}; + +typedef union cvmx_gserx_rx_txdir_ctrl_1 cvmx_gserx_rx_txdir_ctrl_1_t ; + +/** +* cvmx_gser#_rx_txdir_ctrl_2 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_rx_txdir_ctrl_2 { +u64 u64; +struct cvmx_gserx_rx_txdir_ctrl_2_s { +u64 reserved_16_63 :48 ; +u64 rx_precorr_hi_thrs :8 ; +u64 rx_precorr_lo_thrs :8 ; + } s; +struct cvmx_gserx_rx_txdir_ctrl_2_s cn73xx; +struct cvmx_gserx_rx_txdir_ctrl_2_s cn78xx; +struct cvmx_gserx_rx_txdir_ctrl_2_s cn78xxp1; +struct cvmx_gserx_rx_txdir_ctrl_2_s cnf75xx; +}; + +typedef union cvmx_gserx_rx_txdir_ctrl_2 cvmx_gserx_rx_txdir_ctrl_2_t ; + +/** +* cvmx_gser#_rx_eie_detsts +*/ +union cvmx_gserx_rx_eie_detsts { +u64 u64; +struct cvmx_gserx_rx_eie_detsts_s { +u64 reserved_12_63 :52 ; +u64 cdrlock :4 ; +u64 eiests :4 ; +u64 eieltch :4 ; + } s; +struct cvmx_gserx_rx_eie_detsts_s cn73xx; +struct cvmx_gserx_rx_eie_detsts_s cn78xx; +struct cvmx_gserx_rx_eie_detsts_s cn78xxp1; +struct cvmx_gserx_rx_eie_detsts_s cnf75xx; +}; + +typedef union cvmx_gserx_rx_eie_detsts cvmx_gserx_rx_eie_detsts_t ; + +/** +* cvmx_gser#_refclk_sel +* +* This register selects the reference clock. +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +* +* Not used with GSER6, GSER7, and GSER8. +*/ +union cvmx_gserx_refclk_sel { +u64 u64; +struct cvmx_gserx_refclk_sel_s { +u64 reserved_3_63 :61 ; +u64 pcie_refclk125 :1 ; +u64 com_clk_sel :1 ; +u64 use_com1 :1 ; + } s; +struct cvmx_gserx_refclk_sel_s cn73xx; +struct cvmx_gserx_refclk_sel_s cn78xx; +struct cvmx_gserx_refclk_sel_s cn78xxp1; +struct cvmx_gserx_refclk_sel_s cnf75xx; +}; + +typedef union cvmx_gserx_refclk_sel cvmx_gserx_refclk_sel_t ; + +/** +* cvmx_gser#_lane#_lbert_cfg +* +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_lbert_cfg { +u64 u64; +struct cvmx_gserx_lanex_lbert_cfg_s { +u64 reserved_16_63 :48 ; +u64 lbert_pg_err_insert :1 ; +u64 lbert_pm_sync_start :1 ; +u64 lbert_pg_en :1 ; +u64 lbert_pg_width :2 ; +u64 lbert_pg_mode :4 ; +u64 lbert_pm_en :1 ; +u64 lbert_pm_width :2 ; +u64 lbert_pm_mode :4 ; + } s; +struct cvmx_gserx_lanex_lbert_cfg_s cn73xx; +struct cvmx_gserx_lanex_lbert_cfg_s cn78xx; +struct cvmx_gserx_lanex_lbert_cfg_s cn78xxp1; +struct cvmx_gserx_lanex_lbert_cfg_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_lbert_cfg cvmx_gserx_lanex_lbert_cfg_t ; + +/** +* cvmx_gser#_lane#_misc_cfg_0 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_misc_cfg_0 { +u64 u64; +struct cvmx_gserx_lanex_misc_cfg_0_s { +u64 reserved_16_63 :48 ; +u64 use_pma_polarity :1 ; +u64 cfg_pcs_loopback :1 ; +u64 pcs_tx_mode_ovrrd_en :1 ; +u64 pcs_rx_mode_ovrrd_en :1 ; +u64 cfg_eie_det_cnt :4 ; +u64 eie_det_stl_on_time :3 ; +u64 eie_det_stl_off_time :3 ; +u64 tx_bit_order :1 ; +u64 rx_bit_order :1 ; + } s; +struct cvmx_gserx_lanex_misc_cfg_0_s cn73xx; +struct cvmx_gserx_lanex_misc_cfg_0_s cn78xx; +struct cvmx_gserx_lanex_misc_cfg_0_s cn78xxp1; +struct cvmx_gserx_lanex_misc_cfg_0_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_misc_cfg_0 cvmx_gserx_lanex_misc_cfg_0_t ; + +/** +* cvmx_gser#_lane_p#_mode_0 +* +* These are the RAW PCS lane settings mode 0 registers. There is one register per +* 4 lanes per GSER per GSER_LMODE_E value (0..11). Only one entry is used at any given time in a +* given GSER lane - the one selected by the corresponding GSER()_LANE_MODE[LMODE]. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lane_px_mode_0 { +u64 u64; +struct cvmx_gserx_lane_px_mode_0_s { +u64 reserved_15_63 :49 ; +u64 ctle :2 ; +u64 pcie :1 ; +u64 tx_ldiv :2 ; +u64 rx_ldiv :2 ; +u64 srate :3 ; +u64 reserved_4_4 :1 ; +u64 tx_mode :2 ; +u64 rx_mode :2 ; + } s; +struct cvmx_gserx_lane_px_mode_0_s cn73xx; +struct cvmx_gserx_lane_px_mode_0_s cn78xx; +struct cvmx_gserx_lane_px_mode_0_s cn78xxp1; +struct cvmx_gserx_lane_px_mode_0_s cnf75xx; +}; + +typedef union cvmx_gserx_lane_px_mode_0 cvmx_gserx_lane_px_mode_0_t ; + +/** +* cvmx_gser#_lane_p#_mode_1 +* +* These are the RAW PCS lane settings mode 1 registers. There is one register per 4 lanes, +* (0..3) per GSER per GSER_LMODE_E value (0..11). Only one entry is used at any given time in a +* given +* GSER lane - the one selected by the corresponding GSER()_LANE_MODE[LMODE]. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lane_px_mode_1 { +u64 u64; +struct cvmx_gserx_lane_px_mode_1_s { +u64 reserved_16_63 :48 ; +u64 vma_fine_cfg_sel :1 ; +u64 vma_mm :1 ; +u64 cdr_fgain :4 ; +u64 ph_acc_adj :10 ; + } s; +struct cvmx_gserx_lane_px_mode_1_s cn73xx; +struct cvmx_gserx_lane_px_mode_1_s cn78xx; +struct cvmx_gserx_lane_px_mode_1_s cn78xxp1; +struct cvmx_gserx_lane_px_mode_1_s cnf75xx; +}; + +typedef union cvmx_gserx_lane_px_mode_1 cvmx_gserx_lane_px_mode_1_t ; + +/** +* cvmx_gser#_lane#_rx_loop_ctrl +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_loop_ctrl { +u64 u64; +struct cvmx_gserx_lanex_rx_loop_ctrl_s { +u64 reserved_12_63 :52 ; +u64 fast_dll_lock :1 ; +u64 fast_ofst_cncl :1 ; +u64 cfg_rx_lctrl :10 ; + } s; +struct cvmx_gserx_lanex_rx_loop_ctrl_s cn73xx; +struct cvmx_gserx_lanex_rx_loop_ctrl_s cn78xx; +struct cvmx_gserx_lanex_rx_loop_ctrl_s cn78xxp1; +struct cvmx_gserx_lanex_rx_loop_ctrl_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_loop_ctrl cvmx_gserx_lanex_rx_loop_ctrl_t ; + +/** +* cvmx_gser#_lane#_rx_valbbd_ctrl_0 +* +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_valbbd_ctrl_0 { +u64 u64; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_0_s { +u64 reserved_14_63 :50 ; +u64 agc_gain :2 ; +u64 dfe_gain :2 ; +u64 dfe_c5_mval :4 ; +u64 dfe_c5_msgn :1 ; +u64 dfe_c4_mval :4 ; +u64 dfe_c4_msgn :1 ; + } s; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_0_s cn73xx; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_0_s cn78xx; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_0_s cn78xxp1; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_0_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_valbbd_ctrl_0 cvmx_gserx_lanex_rx_valbbd_ctrl_0_t ; + +/** +* cvmx_gser#_lane#_rx_valbbd_ctrl_1 +* +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_valbbd_ctrl_1 { +u64 u64; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_1_s { +u64 reserved_15_63 :49 ; +u64 dfe_c3_mval :4 ; +u64 dfe_c3_msgn :1 ; +u64 dfe_c2_mval :4 ; +u64 dfe_c2_msgn :1 ; +u64 dfe_c1_mval :4 ; +u64 dfe_c1_msgn :1 ; + } s; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_1_s cn73xx; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_1_s cn78xx; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_1_s cn78xxp1; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_1_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_valbbd_ctrl_1 cvmx_gserx_lanex_rx_valbbd_ctrl_1_t ; + +/** +* cvmx_gser#_lane#_rx_valbbd_ctrl_2 +* +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_valbbd_ctrl_2 { +u64 u64; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_2_s { +u64 reserved_6_63 :58 ; +u64 dfe_ovrd_en :1 ; +u64 dfe_c5_ovrd_val :1 ; +u64 dfe_c4_ovrd_val :1 ; +u64 dfe_c3_ovrd_val :1 ; +u64 dfe_c2_ovrd_val :1 ; +u64 dfe_c1_ovrd_val :1 ; + } s; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_2_s cn73xx; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_2_s cn78xx; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_2_s cn78xxp1; +struct cvmx_gserx_lanex_rx_valbbd_ctrl_2_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_valbbd_ctrl_2 cvmx_gserx_lanex_rx_valbbd_ctrl_2_t ; + +/** +* cvmx_gser#_lane_vma_fine_ctrl_0 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lane_vma_fine_ctrl_0 { +u64 u64; +struct cvmx_gserx_lane_vma_fine_ctrl_0_s { +u64 reserved_16_63 :48 ; +u64 rx_sdll_iq_max_fine :4 ; +u64 rx_sdll_iq_min_fine :4 ; +u64 rx_sdll_iq_step_fine :2 ; +u64 vma_window_wait_fine :3 ; +u64 lms_wait_time_fine :3 ; + } s; +struct cvmx_gserx_lane_vma_fine_ctrl_0_s cn73xx; +struct cvmx_gserx_lane_vma_fine_ctrl_0_s cn78xx; +struct cvmx_gserx_lane_vma_fine_ctrl_0_s cn78xxp1; +struct cvmx_gserx_lane_vma_fine_ctrl_0_s cnf75xx; +}; + +typedef union cvmx_gserx_lane_vma_fine_ctrl_0 cvmx_gserx_lane_vma_fine_ctrl_0_t ; + +/** +* cvmx_gser#_lane_vma_fine_ctrl_1 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lane_vma_fine_ctrl_1 { +u64 u64; +struct cvmx_gserx_lane_vma_fine_ctrl_1_s { +u64 reserved_10_63 :54 ; +u64 rx_ctle_peak_max_fine :4 ; +u64 rx_ctle_peak_min_fine :4 ; +u64 rx_ctle_peak_step_fine :2 ; + } s; +struct cvmx_gserx_lane_vma_fine_ctrl_1_s cn73xx; +struct cvmx_gserx_lane_vma_fine_ctrl_1_s cn78xx; +struct cvmx_gserx_lane_vma_fine_ctrl_1_s cn78xxp1; +struct cvmx_gserx_lane_vma_fine_ctrl_1_s cnf75xx; +}; + +typedef union cvmx_gserx_lane_vma_fine_ctrl_1 cvmx_gserx_lane_vma_fine_ctrl_1_t ; + +/** +* cvmx_gser#_lane_vma_fine_ctrl_2 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lane_vma_fine_ctrl_2 { +u64 u64; +struct cvmx_gserx_lane_vma_fine_ctrl_2_s { +u64 reserved_10_63 :54 ; +u64 rx_prectle_gain_max_fine :4 ; +u64 rx_prectle_gain_min_fine :4 ; +u64 rx_prectle_gain_step_fine :2 ; + } s; +struct cvmx_gserx_lane_vma_fine_ctrl_2_s cn73xx; +struct cvmx_gserx_lane_vma_fine_ctrl_2_s cn78xx; +struct cvmx_gserx_lane_vma_fine_ctrl_2_s cn78xxp1; +struct cvmx_gserx_lane_vma_fine_ctrl_2_s cnf75xx; +}; + +typedef union cvmx_gserx_lane_vma_fine_ctrl_2 cvmx_gserx_lane_vma_fine_ctrl_2_t ; + +/** +* cvmx_gser#_lane#_pwr_ctrl +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_pwr_ctrl { +u64 u64; +struct cvmx_gserx_lanex_pwr_ctrl_s { +u64 reserved_15_63 :49 ; +u64 tx_sds_fifo_reset_ovrrd_en :1 ; +u64 tx_sds_fifo_reset_ovrrd_val :1 ; +u64 tx_pcs_reset_ovrrd_val :1 ; +u64 rx_pcs_reset_ovrrd_val :1 ; +u64 reserved_9_10 :2 ; +u64 rx_resetn_ovrrd_en :1 ; +u64 rx_resetn_ovrrd_val :1 ; +u64 rx_lctrl_ovrrd_en :1 ; +u64 rx_lctrl_ovrrd_val :1 ; +u64 tx_tristate_en_ovrrd_en :1 ; +u64 tx_pcs_reset_ovrrd_en :1 ; +u64 tx_elec_idle_ovrrd_en :1 ; +u64 tx_pd_ovrrd_en :1 ; +u64 tx_p2s_resetn_ovrrd_en :1 ; + } s; +struct cvmx_gserx_lanex_pwr_ctrl_cn73xx { +u64 reserved_15_63 :49 ; +u64 tx_sds_fifo_reset_ovrrd_en :1 ; +u64 tx_sds_fifo_reset_ovrrd_val :1 ; +u64 tx_pcs_reset_ovrrd_val :1 ; +u64 rx_pcs_reset_ovrrd_val :1 ; +u64 reserved_10_9 :2 ; +u64 rx_resetn_ovrrd_en :1 ; +u64 rx_resetn_ovrrd_val :1 ; +u64 rx_lctrl_ovrrd_en :1 ; +u64 rx_lctrl_ovrrd_val :1 ; +u64 tx_tristate_en_ovrrd_en :1 ; +u64 tx_pcs_reset_ovrrd_en :1 ; +u64 tx_elec_idle_ovrrd_en :1 ; +u64 tx_pd_ovrrd_en :1 ; +u64 tx_p2s_resetn_ovrrd_en :1 ; + } cn73xx; +struct cvmx_gserx_lanex_pwr_ctrl_cn73xx cn78xx; +struct cvmx_gserx_lanex_pwr_ctrl_s cn78xxp1; +struct cvmx_gserx_lanex_pwr_ctrl_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_pwr_ctrl cvmx_gserx_lanex_pwr_ctrl_t ; + +/** +* cvmx_gser#_lane#_rx_cfg_0 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_cfg_0 { +u64 u64; +struct cvmx_gserx_lanex_rx_cfg_0_s { +u64 reserved_16_63 :48 ; +u64 rx_datarate_ovrrd_en :1 ; +u64 reserved_14_14 :1 ; +u64 rx_resetn_ovrrd_val :1 ; +u64 pcs_sds_rx_eyemon_en :1 ; +u64 pcs_sds_rx_pcm_ctrl :4 ; +u64 rx_datarate_ovrrd_val :2 ; +u64 cfg_rx_pol_invert :1 ; +u64 rx_subblk_pd_ovrrd_val :5 ; + } s; +struct cvmx_gserx_lanex_rx_cfg_0_cn73xx { +u64 reserved_16_63 :48 ; +u64 rx_datarate_ovrrd_en :1 ; +u64 pcs_rx_tristate_enable :1 ; +u64 rx_resetn_ovrrd_val :1 ; +u64 pcs_sds_rx_eyemon_en :1 ; +u64 pcs_sds_rx_pcm_ctrl :4 ; +u64 rx_datarate_ovrrd_val :2 ; +u64 cfg_rx_pol_invert :1 ; +u64 rx_subblk_pd_ovrrd_val :5 ; + } cn73xx; +struct cvmx_gserx_lanex_rx_cfg_0_cn78xx { +u64 reserved_16_63 :48 ; +u64 rx_datarate_ovrrd_en :1 ; +u64 pcs_sds_rx_tristate_enable :1 ; +u64 rx_resetn_ovrrd_val :1 ; +u64 pcs_sds_rx_eyemon_en :1 ; +u64 pcs_sds_rx_pcm_ctrl :4 ; +u64 rx_datarate_ovrrd_val :2 ; +u64 cfg_rx_pol_invert :1 ; +u64 rx_subblk_pd_ovrrd_val :5 ; + } cn78xx; +struct cvmx_gserx_lanex_rx_cfg_0_cn78xx cn78xxp1; +struct cvmx_gserx_lanex_rx_cfg_0_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_cfg_0 cvmx_gserx_lanex_rx_cfg_0_t ; + +/** +* cvmx_gser#_lane#_rx_cfg_1 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_cfg_1 { +u64 u64; +struct cvmx_gserx_lanex_rx_cfg_1_s { +u64 reserved_16_63 :48 ; +u64 rx_chpd_ovrrd_val :1 ; +u64 pcs_sds_rx_os_men :1 ; +u64 eie_en_ovrrd_en :1 ; +u64 eie_en_ovrrd_val :1 ; +u64 reserved_11_11 :1 ; +u64 rx_pcie_mode_ovrrd_en :1 ; +u64 rx_pcie_mode_ovrrd_val :1 ; +u64 cfg_rx_dll_locken :1 ; +u64 pcs_sds_rx_cdr_ssc_mode :8 ; + } s; +struct cvmx_gserx_lanex_rx_cfg_1_s cn73xx; +struct cvmx_gserx_lanex_rx_cfg_1_s cn78xx; +struct cvmx_gserx_lanex_rx_cfg_1_s cn78xxp1; +struct cvmx_gserx_lanex_rx_cfg_1_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_cfg_1 cvmx_gserx_lanex_rx_cfg_1_t ; + +/** +* cvmx_gser#_lane#_rx_cfg_2 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_cfg_2 { +u64 u64; +struct cvmx_gserx_lanex_rx_cfg_2_s { +u64 reserved_15_63 :49 ; +u64 pcs_sds_rx_terminate_to_vdda :1 ; +u64 pcs_sds_rx_sampler_boost :2 ; +u64 pcs_sds_rx_sampler_boost_en :1 ; +u64 reserved_10_10 :1 ; +u64 rx_sds_rx_agc_mval :10 ; + } s; +struct cvmx_gserx_lanex_rx_cfg_2_s cn73xx; +struct cvmx_gserx_lanex_rx_cfg_2_s cn78xx; +struct cvmx_gserx_lanex_rx_cfg_2_s cn78xxp1; +struct cvmx_gserx_lanex_rx_cfg_2_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_cfg_2 cvmx_gserx_lanex_rx_cfg_2_t ; + +/** +* cvmx_gser#_lane#_rx_cfg_3 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_cfg_3 { +u64 u64; +struct cvmx_gserx_lanex_rx_cfg_3_s { +u64 reserved_16_63 :48 ; +u64 cfg_rx_errdet_ctrl :16 ; + } s; +struct cvmx_gserx_lanex_rx_cfg_3_s cn73xx; +struct cvmx_gserx_lanex_rx_cfg_3_s cn78xx; +struct cvmx_gserx_lanex_rx_cfg_3_s cn78xxp1; +struct cvmx_gserx_lanex_rx_cfg_3_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_cfg_3 cvmx_gserx_lanex_rx_cfg_3_t ; + +/** +* cvmx_gser#_lane#_rx_cfg_4 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_cfg_4 { +u64 u64; +struct cvmx_gserx_lanex_rx_cfg_4_s { +u64 reserved_16_63 :48 ; +u64 cfg_rx_errdet_ctrl :16 ; + } s; +struct cvmx_gserx_lanex_rx_cfg_4_s cn73xx; +struct cvmx_gserx_lanex_rx_cfg_4_s cn78xx; +struct cvmx_gserx_lanex_rx_cfg_4_s cn78xxp1; +struct cvmx_gserx_lanex_rx_cfg_4_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_cfg_4 cvmx_gserx_lanex_rx_cfg_4_t ; + +/** +* cvmx_gser#_lane#_rx_cfg_5 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_cfg_5 { +u64 u64; +struct cvmx_gserx_lanex_rx_cfg_5_s { +u64 reserved_5_63 :59 ; +u64 rx_agc_men_ovrrd_en :1 ; +u64 rx_agc_men_ovrrd_val :1 ; +u64 rx_widthsel_ovrrd_en :1 ; +u64 rx_widthsel_ovrrd_val :2 ; + } s; +struct cvmx_gserx_lanex_rx_cfg_5_s cn73xx; +struct cvmx_gserx_lanex_rx_cfg_5_s cn78xx; +struct cvmx_gserx_lanex_rx_cfg_5_s cn78xxp1; +struct cvmx_gserx_lanex_rx_cfg_5_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_cfg_5 cvmx_gserx_lanex_rx_cfg_5_t ; + +/** +* cvmx_gser#_lane#_rx_ctle_ctrl +* +* These are the RAW PCS per-lane RX CTLE control registers. +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_ctle_ctrl { +u64 u64; +struct cvmx_gserx_lanex_rx_ctle_ctrl_s { +u64 reserved_16_63 :48 ; +u64 pcs_sds_rx_ctle_bias_ctrl :2 ; +u64 pcs_sds_rx_ctle_zero :4 ; +u64 rx_ctle_pole_ovrrd_en :1 ; +u64 rx_ctle_pole_ovrrd_val :4 ; +u64 pcs_sds_rx_ctle_pole_max :2 ; +u64 pcs_sds_rx_ctle_pole_min :2 ; +u64 pcs_sds_rx_ctle_pole_step :1 ; + } s; +struct cvmx_gserx_lanex_rx_ctle_ctrl_s cn73xx; +struct cvmx_gserx_lanex_rx_ctle_ctrl_s cn78xx; +struct cvmx_gserx_lanex_rx_ctle_ctrl_s cn78xxp1; +struct cvmx_gserx_lanex_rx_ctle_ctrl_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_ctle_ctrl cvmx_gserx_lanex_rx_ctle_ctrl_t ; + +/** +* cvmx_gser#_lane#_rx_misc_ovrrd +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_rx_misc_ovrrd { +u64 u64; +struct cvmx_gserx_lanex_rx_misc_ovrrd_s { +u64 reserved_14_63 :50 ; +u64 cfg_rx_oob_clk_en_ovrrd_val :1 ; +u64 cfg_rx_oob_clk_en_ovrrd_en :1 ; +u64 cfg_rx_eie_det_ovrrd_val :1 ; +u64 cfg_rx_eie_det_ovrrd_en :1 ; +u64 cfg_rx_cdr_ctrl_ovrrd_en :1 ; +u64 cfg_rx_eq_eval_ovrrd_val :1 ; +u64 cfg_rx_eq_eval_ovrrd_en :1 ; +u64 reserved_6_6 :1 ; +u64 cfg_rx_dll_locken_ovrrd_en :1 ; +u64 cfg_rx_errdet_ctrl_ovrrd_en :1 ; +u64 reserved_1_3 :3 ; +u64 cfg_rxeq_eval_restore_en :1 ; + } s; +struct cvmx_gserx_lanex_rx_misc_ovrrd_cn73xx { +u64 reserved_14_63 :50 ; +u64 cfg_rx_oob_clk_en_ovrrd_val :1 ; +u64 cfg_rx_oob_clk_en_ovrrd_en :1 ; +u64 cfg_rx_eie_det_ovrrd_val :1 ; +u64 cfg_rx_eie_det_ovrrd_en :1 ; +u64 cfg_rx_cdr_ctrl_ovrrd_en :1 ; +u64 cfg_rx_eq_eval_ovrrd_val :1 ; +u64 cfg_rx_eq_eval_ovrrd_en :1 ; +u64 reserved_6_6 :1 ; +u64 cfg_rx_dll_locken_ovrrd_en :1 ; +u64 cfg_rx_errdet_ctrl_ovrrd_en :1 ; +u64 reserved_3_1 :3 ; +u64 cfg_rxeq_eval_restore_en :1 ; + } cn73xx; +struct cvmx_gserx_lanex_rx_misc_ovrrd_cn73xx cn78xx; +struct cvmx_gserx_lanex_rx_misc_ovrrd_cn78xxp1 { +u64 reserved_14_63 :50 ; +u64 cfg_rx_oob_clk_en_ovrrd_val :1 ; +u64 cfg_rx_oob_clk_en_ovrrd_en :1 ; +u64 cfg_rx_eie_det_ovrrd_val :1 ; +u64 cfg_rx_eie_det_ovrrd_en :1 ; +u64 cfg_rx_cdr_ctrl_ovrrd_en :1 ; +u64 cfg_rx_eq_eval_ovrrd_val :1 ; +u64 cfg_rx_eq_eval_ovrrd_en :1 ; +u64 reserved_6_6 :1 ; +u64 cfg_rx_dll_locken_ovrrd_en :1 ; +u64 cfg_rx_errdet_ctrl_ovrrd_en :1 ; +u64 reserved_0_3 :4 ; + } cn78xxp1; +struct cvmx_gserx_lanex_rx_misc_ovrrd_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_rx_misc_ovrrd cvmx_gserx_lanex_rx_misc_ovrrd_t ; + +/** +* cvmx_gser#_lane#_tx_cfg_0 +* +* These registers are reset by hardware only during chip cold reset. The +* values of the CSR fields in these registers do not change during chip +* warm or soft resets. +*/ +union cvmx_gserx_lanex_tx_cfg_0 { +u64 u64; +struct cvmx_gserx_lanex_tx_cfg_0_s { +u64 reserved_16_63 :48 ; +u64 tx_tristate_en_ovrrd_val :1 ; +u64 tx_chpd_ovrrd_val :1 ; +u64 reserved_10_13 :4 ; +u64 tx_resetn_ovrrd_val :1 ; +u64 tx_cm_mode :1 ; +u64 cfg_tx_swing :5 ; +u64 fast_rdet_mode :1 ; +u64 fast_tristate_mode :1 ; +u64 reserved_0_0 :1 ; + } s; +struct cvmx_gserx_lanex_tx_cfg_0_cn73xx { +u64 reserved_16_63 :48 ; +u64 tx_tristate_en_ovrrd_val :1 ; +u64 tx_chpd_ovrrd_val :1 ; +u64 reserved_13_10 :4 ; +u64 tx_resetn_ovrrd_val :1 ; +u64 tx_cm_mode :1 ; +u64 cfg_tx_swing :5 ; +u64 fast_rdet_mode :1 ; +u64 fast_tristate_mode :1 ; +u64 reserved_0_0 :1 ; + } cn73xx; +struct cvmx_gserx_lanex_tx_cfg_0_cn73xx cn78xx; +struct cvmx_gserx_lanex_tx_cfg_0_s cn78xxp1; +struct cvmx_gserx_lanex_tx_cfg_0_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_tx_cfg_0 cvmx_gserx_lanex_tx_cfg_0_t ; + +/** +* cvmx_gser#_lane#_tx_cfg_1 +* +* These registers are reset by hardware only during chip cold reset. The +* values of the CSR fields in these registers do not change during chip +* warm or soft resets. +*/ +union cvmx_gserx_lanex_tx_cfg_1 { +u64 u64; +struct cvmx_gserx_lanex_tx_cfg_1_s { +u64 reserved_15_63 :49 ; +u64 tx_widthsel_ovrrd_en :1 ; +u64 tx_widthsel_ovrrd_val :2 ; +u64 tx_vboost_en_ovrrd_en :1 ; +u64 tx_turbo_en_ovrrd_en :1 ; +u64 tx_swing_ovrrd_en :1 ; +u64 tx_premptap_ovrrd_val :1 ; +u64 tx_elec_idle_ovrrd_en :1 ; +u64 smpl_rate_ovrrd_en :1 ; +u64 smpl_rate_ovrrd_val :3 ; +u64 tx_datarate_ovrrd_en :1 ; +u64 tx_datarate_ovrrd_val :2 ; + } s; +struct cvmx_gserx_lanex_tx_cfg_1_s cn73xx; +struct cvmx_gserx_lanex_tx_cfg_1_s cn78xx; +struct cvmx_gserx_lanex_tx_cfg_1_s cn78xxp1; +struct cvmx_gserx_lanex_tx_cfg_1_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_tx_cfg_1 cvmx_gserx_lanex_tx_cfg_1_t ; + +/** +* cvmx_gser#_lane#_tx_cfg_2 +* +* These registers are for diagnostic use only. These registers are reset by hardware only during +* chip cold reset. The values of the CSR fields in these registers do not change during chip +* warm or soft resets. +*/ +union cvmx_gserx_lanex_tx_cfg_2 { +u64 u64; +struct cvmx_gserx_lanex_tx_cfg_2_s { +u64 reserved_16_63 :48 ; +u64 pcs_sds_tx_dcc_en :1 ; +u64 reserved_3_14 :12 ; +u64 rcvr_test_ovrrd_en :1 ; +u64 rcvr_test_ovrrd_val :1 ; +u64 tx_rx_detect_dis_ovrrd_val :1 ; + } s; +struct cvmx_gserx_lanex_tx_cfg_2_cn73xx { +u64 reserved_16_63 :48 ; +u64 pcs_sds_tx_dcc_en :1 ; +u64 reserved_14_3 :12 ; +u64 rcvr_test_ovrrd_en :1 ; +u64 rcvr_test_ovrrd_val :1 ; +u64 tx_rx_detect_dis_ovrrd_val :1 ; + } cn73xx; +struct cvmx_gserx_lanex_tx_cfg_2_cn73xx cn78xx; +struct cvmx_gserx_lanex_tx_cfg_2_s cn78xxp1; +struct cvmx_gserx_lanex_tx_cfg_2_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_tx_cfg_2 cvmx_gserx_lanex_tx_cfg_2_t ; + +/** +* cvmx_gser#_lane#_tx_cfg_3 +* +* These registers are for diagnostic use only. These registers are reset by hardware only during +* chip cold reset. The values of the CSR fields in these registers do not change during chip +* warm or soft resets. +*/ +union cvmx_gserx_lanex_tx_cfg_3 { +u64 u64; +struct cvmx_gserx_lanex_tx_cfg_3_s { +u64 reserved_15_63 :49 ; +u64 cfg_tx_vboost_en :1 ; +u64 reserved_7_13 :7 ; +u64 pcs_sds_tx_gain :3 ; +u64 pcs_sds_tx_srate_sel :3 ; +u64 cfg_tx_turbo_en :1 ; + } s; +struct cvmx_gserx_lanex_tx_cfg_3_cn73xx { +u64 reserved_15_63 :49 ; +u64 cfg_tx_vboost_en :1 ; +u64 reserved_13_7 :7 ; +u64 pcs_sds_tx_gain :3 ; +u64 pcs_sds_tx_srate_sel :3 ; +u64 cfg_tx_turbo_en :1 ; + } cn73xx; +struct cvmx_gserx_lanex_tx_cfg_3_cn73xx cn78xx; +struct cvmx_gserx_lanex_tx_cfg_3_s cn78xxp1; +struct cvmx_gserx_lanex_tx_cfg_3_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_tx_cfg_3 cvmx_gserx_lanex_tx_cfg_3_t ; + +/** +* cvmx_gser#_lane#_tx_pre_emphasis +* +* These registers are reset by hardware only during chip cold reset. The +* values of the CSR fields in these registers do not change during chip +* warm or soft resets. +*/ +union cvmx_gserx_lanex_tx_pre_emphasis { +u64 u64; +struct cvmx_gserx_lanex_tx_pre_emphasis_s { +u64 reserved_9_63 :55 ; +u64 cfg_tx_premptap :9 ; + } s; +struct cvmx_gserx_lanex_tx_pre_emphasis_s cn73xx; +struct cvmx_gserx_lanex_tx_pre_emphasis_s cn78xx; +struct cvmx_gserx_lanex_tx_pre_emphasis_s cn78xxp1; +struct cvmx_gserx_lanex_tx_pre_emphasis_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_tx_pre_emphasis cvmx_gserx_lanex_tx_pre_emphasis_t ; + +/** +* cvmx_gser#_lane#_pcs_ctlifc_0 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_pcs_ctlifc_0 { +u64 u64; +struct cvmx_gserx_lanex_pcs_ctlifc_0_s { +u64 reserved_14_63 :50 ; +u64 cfg_tx_vboost_en_ovrrd_val :1 ; +u64 cfg_tx_coeff_req_ovrrd_val :1 ; +u64 cfg_rx_cdr_coast_req_ovrrd_val :1 ; +u64 cfg_tx_detrx_en_req_ovrrd_val :1 ; +u64 cfg_soft_reset_req_ovrrd_val :1 ; +u64 cfg_lane_pwr_off_ovrrd_val :1 ; +u64 cfg_tx_mode_ovrrd_val :2 ; +u64 cfg_tx_pstate_req_ovrrd_val :2 ; +u64 cfg_lane_mode_req_ovrrd_val :4 ; + } s; +struct cvmx_gserx_lanex_pcs_ctlifc_0_s cn73xx; +struct cvmx_gserx_lanex_pcs_ctlifc_0_s cn78xx; +struct cvmx_gserx_lanex_pcs_ctlifc_0_s cn78xxp1; +struct cvmx_gserx_lanex_pcs_ctlifc_0_s cnf75xx; +}; + +typedef union cvmx_gserx_lanex_pcs_ctlifc_0 cvmx_gserx_lanex_pcs_ctlifc_0_t ; + +/** +* cvmx_gser#_lane#_pcs_ctlifc_1 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_pcs_ctlifc_1 { +u64 u64; +struct cvmx_gserx_lanex_pcs_ctlifc_1_s { +u64 reserved_9_63 :55 ; +u64 cfg_rx_pstate_req_ovrrd_val :2 ; +u64 reserved_2_6 :5 ; +u64 cfg_rx_mode_ovrrd_val :2 ; + } s; +struct cvmx_gserx_lanex_pcs_ctlifc_1_cn73xx { +u64 reserved_9_63 :55 ; +u64 cfg_rx_pstate_req_ovrrd_val :2 ; +u64 reserved_6_2 :5 ; +u64 cfg_rx_mode_ovrrd_val :2 ; + } cn73xx; +struct cvmx_gserx_lanex_pcs_ctlifc_1_cn73xx cn78xx; +struct cvmx_gserx_lanex_pcs_ctlifc_1_s cn78xxp1; +struct cvmx_gserx_lanex_pcs_ctlifc_1_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_pcs_ctlifc_1 cvmx_gserx_lanex_pcs_ctlifc_1_t ; + +/** +* cvmx_gser#_lane#_pcs_ctlifc_2 +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lanex_pcs_ctlifc_2 { +u64 u64; +struct cvmx_gserx_lanex_pcs_ctlifc_2_s { +u64 reserved_16_63 :48 ; +u64 ctlifc_ovrrd_req :1 ; +u64 reserved_9_14 :6 ; +u64 cfg_tx_vboost_en_ovrrd_en :1 ; +u64 cfg_tx_coeff_req_ovrrd_en :1 ; +u64 cfg_rx_cdr_coast_req_ovrrd_en :1 ; +u64 cfg_tx_detrx_en_req_ovrrd_en :1 ; +u64 cfg_soft_reset_req_ovrrd_en :1 ; +u64 cfg_lane_pwr_off_ovrrd_en :1 ; +u64 cfg_tx_pstate_req_ovrrd_en :1 ; +u64 cfg_rx_pstate_req_ovrrd_en :1 ; +u64 cfg_lane_mode_req_ovrrd_en :1 ; + } s; +struct cvmx_gserx_lanex_pcs_ctlifc_2_cn73xx { +u64 reserved_16_63 :48 ; +u64 ctlifc_ovrrd_req :1 ; +u64 reserved_14_9 :6 ; +u64 cfg_tx_vboost_en_ovrrd_en :1 ; +u64 cfg_tx_coeff_req_ovrrd_en :1 ; +u64 cfg_rx_cdr_coast_req_ovrrd_en :1 ; +u64 cfg_tx_detrx_en_req_ovrrd_en :1 ; +u64 cfg_soft_reset_req_ovrrd_en :1 ; +u64 cfg_lane_pwr_off_ovrrd_en :1 ; +u64 cfg_tx_pstate_req_ovrrd_en :1 ; +u64 cfg_rx_pstate_req_ovrrd_en :1 ; +u64 cfg_lane_mode_req_ovrrd_en :1 ; + } cn73xx; +struct cvmx_gserx_lanex_pcs_ctlifc_2_cn73xx cn78xx; +struct cvmx_gserx_lanex_pcs_ctlifc_2_s cn78xxp1; +struct cvmx_gserx_lanex_pcs_ctlifc_2_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_lanex_pcs_ctlifc_2 cvmx_gserx_lanex_pcs_ctlifc_2_t ; + +/** +* cvmx_gser#_lane_mode +* +* These registers are reset by hardware only during chip cold reset. The values of the CSR +* fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_lane_mode { +u64 u64; +struct cvmx_gserx_lane_mode_s { +u64 reserved_4_63 :60 ; +u64 lmode :4 ; + } s; +struct cvmx_gserx_lane_mode_s cn73xx; +struct cvmx_gserx_lane_mode_s cn78xx; +struct cvmx_gserx_lane_mode_s cn78xxp1; +struct cvmx_gserx_lane_mode_s cnf75xx; +}; + +typedef union cvmx_gserx_lane_mode cvmx_gserx_lane_mode_t ; + +/** +* cvmx_gser#_pll_p#_mode_0 +* +* These are the RAW PCS PLL global settings mode 0 registers. There is one register per GSER per +* GSER_LMODE_E value (0..11). Only one entry is used at any given time in a given GSER - the one +* selected by the corresponding GSER()_LANE_MODE[LMODE]. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during subsequent chip warm or +* soft resets. +*/ +union cvmx_gserx_pll_px_mode_0 { +u64 u64; +struct cvmx_gserx_pll_px_mode_0_s { +u64 reserved_16_63 :48 ; +u64 pll_icp :4 ; +u64 pll_rloop :3 ; +u64 pll_pcs_div :9 ; + } s; +struct cvmx_gserx_pll_px_mode_0_s cn73xx; +struct cvmx_gserx_pll_px_mode_0_s cn78xx; +struct cvmx_gserx_pll_px_mode_0_s cn78xxp1; +struct cvmx_gserx_pll_px_mode_0_s cnf75xx; +}; + +typedef union cvmx_gserx_pll_px_mode_0 cvmx_gserx_pll_px_mode_0_t ; + +/** +* cvmx_gser#_pll_p#_mode_1 +* +* These are the RAW PCS PLL global settings mode 1 registers. There is one register per GSER per +* GSER_LMODE_E value (0..11). Only one entry is used at any given time in a given GSER - the one +* selected by the corresponding GSER()_LANE_MODE[LMODE]. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in this register do not change during subsequent chip warm or +* soft resets. +*/ +union cvmx_gserx_pll_px_mode_1 { +u64 u64; +struct cvmx_gserx_pll_px_mode_1_s { +u64 reserved_14_63 :50 ; +u64 pll_16p5en :1 ; +u64 pll_cpadj :2 ; +u64 pll_pcie3en :1 ; +u64 pll_opr :1 ; +u64 pll_div :9 ; + } s; +struct cvmx_gserx_pll_px_mode_1_s cn73xx; +struct cvmx_gserx_pll_px_mode_1_s cn78xx; +struct cvmx_gserx_pll_px_mode_1_s cn78xxp1; +struct cvmx_gserx_pll_px_mode_1_s cnf75xx; +}; + +typedef union cvmx_gserx_pll_px_mode_1 cvmx_gserx_pll_px_mode_1_t ; + +/** +* cvmx_gser#_pll_stat +*/ +union cvmx_gserx_pll_stat { +u64 u64; +struct cvmx_gserx_pll_stat_s { +u64 reserved_1_63 :63 ; +u64 pll_lock :1 ; + } s; +struct cvmx_gserx_pll_stat_s cn73xx; +struct cvmx_gserx_pll_stat_s cn78xx; +struct cvmx_gserx_pll_stat_s cn78xxp1; +struct cvmx_gserx_pll_stat_s cnf75xx; +}; + +typedef union cvmx_gserx_pll_stat cvmx_gserx_pll_stat_t ; + +/** +* cvmx_gser#_qlm_stat +*/ +union cvmx_gserx_qlm_stat { +u64 u64; +struct cvmx_gserx_qlm_stat_s { +u64 reserved_2_63 :62 ; +u64 rst_rdy :1 ; +u64 dcok :1 ; + } s; +struct cvmx_gserx_qlm_stat_s cn73xx; +struct cvmx_gserx_qlm_stat_s cn78xx; +struct cvmx_gserx_qlm_stat_s cn78xxp1; +struct cvmx_gserx_qlm_stat_s cnf75xx; +}; + +typedef union cvmx_gserx_qlm_stat cvmx_gserx_qlm_stat_t ; + +/** +* cvmx_gser#_slice_cfg +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +*/ +union cvmx_gserx_slice_cfg { +u64 u64; +struct cvmx_gserx_slice_cfg_s { +u64 reserved_12_63 :52 ; +u64 tx_rx_detect_lvl_enc :4 ; +u64 reserved_6_7 :2 ; +u64 pcs_sds_rx_pcie_pterm :2 ; +u64 pcs_sds_rx_pcie_nterm :2 ; +u64 pcs_sds_tx_stress_eye :2 ; + } s; +struct cvmx_gserx_slice_cfg_cn73xx { +u64 reserved_12_63 :52 ; +u64 tx_rx_detect_lvl_enc :4 ; +u64 reserved_7_6 :2 ; +u64 pcs_sds_rx_pcie_pterm :2 ; +u64 pcs_sds_rx_pcie_nterm :2 ; +u64 pcs_sds_tx_stress_eye :2 ; + } cn73xx; +struct cvmx_gserx_slice_cfg_cn73xx cn78xx; +struct cvmx_gserx_slice_cfg_s cn78xxp1; +struct cvmx_gserx_slice_cfg_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_slice_cfg cvmx_gserx_slice_cfg_t ; + +/** +* cvmx_gser#_slice#_pcie1_mode +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +* +* Slice 1 does not exist on GSER0, GSER1, GSER4, GSER5, GSER6, GSER7, and GSER8. +*/ +union cvmx_gserx_slicex_pcie1_mode { +u64 u64; +struct cvmx_gserx_slicex_pcie1_mode_s { +u64 reserved_15_63 :49 ; +u64 slice_spare_1_0 :2 ; +u64 rx_ldll_isel :2 ; +u64 rx_sdll_isel :2 ; +u64 rx_pi_bwsel :3 ; +u64 rx_ldll_bwsel :3 ; +u64 rx_sdll_bwsel :3 ; + } s; +struct cvmx_gserx_slicex_pcie1_mode_s cn73xx; +struct cvmx_gserx_slicex_pcie1_mode_s cn78xx; +struct cvmx_gserx_slicex_pcie1_mode_s cn78xxp1; +struct cvmx_gserx_slicex_pcie1_mode_s cnf75xx; +}; + +typedef union cvmx_gserx_slicex_pcie1_mode cvmx_gserx_slicex_pcie1_mode_t ; + +/** +* cvmx_gser#_slice#_pcie2_mode +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +* +* Slice 1 does not exist on GSER0, GSER1, GSER4, GSER5, GSER6, GSER7, and GSER8. +*/ +union cvmx_gserx_slicex_pcie2_mode { +u64 u64; +struct cvmx_gserx_slicex_pcie2_mode_s { +u64 reserved_15_63 :49 ; +u64 slice_spare_1_0 :2 ; +u64 rx_ldll_isel :2 ; +u64 rx_sdll_isel :2 ; +u64 rx_pi_bwsel :3 ; +u64 rx_ldll_bwsel :3 ; +u64 rx_sdll_bwsel :3 ; + } s; +struct cvmx_gserx_slicex_pcie2_mode_s cn73xx; +struct cvmx_gserx_slicex_pcie2_mode_s cn78xx; +struct cvmx_gserx_slicex_pcie2_mode_s cn78xxp1; +struct cvmx_gserx_slicex_pcie2_mode_s cnf75xx; +}; + +typedef union cvmx_gserx_slicex_pcie2_mode cvmx_gserx_slicex_pcie2_mode_t ; + +/** +* cvmx_gser#_slice#_pcie3_mode +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +* +* Slice 1 does not exist on GSER0, GSER1, GSER4, GSER5, GSER6, GSER7, and GSER8. +*/ +union cvmx_gserx_slicex_pcie3_mode { +u64 u64; +struct cvmx_gserx_slicex_pcie3_mode_s { +u64 reserved_15_63 :49 ; +u64 slice_spare_1_0 :2 ; +u64 rx_ldll_isel :2 ; +u64 rx_sdll_isel :2 ; +u64 rx_pi_bwsel :3 ; +u64 rx_ldll_bwsel :3 ; +u64 rx_sdll_bwsel :3 ; + } s; +struct cvmx_gserx_slicex_pcie3_mode_s cn73xx; +struct cvmx_gserx_slicex_pcie3_mode_s cn78xx; +struct cvmx_gserx_slicex_pcie3_mode_s cn78xxp1; +struct cvmx_gserx_slicex_pcie3_mode_s cnf75xx; +}; + +typedef union cvmx_gserx_slicex_pcie3_mode cvmx_gserx_slicex_pcie3_mode_t ; + +/** +* cvmx_gser#_slice#_rx_sdll_ctrl +* +* These registers are for diagnostic use only. +* These registers are reset by hardware only during chip cold reset. +* The values of the CSR fields in these registers do not change during chip warm or soft resets. +* +* Slice 1 does not exist on GSER0, GSER1, GSER4, GSER5, GSER6, GSER7, and GSER8. +*/ +union cvmx_gserx_slicex_rx_sdll_ctrl { +u64 u64; +struct cvmx_gserx_slicex_rx_sdll_ctrl_s { +u64 reserved_16_63 :48 ; +u64 pcs_sds_oob_clk_ctrl :2 ; +u64 reserved_7_13 :7 ; +u64 pcs_sds_rx_sdll_tune :3 ; +u64 pcs_sds_rx_sdll_swsel :4 ; + } s; +struct cvmx_gserx_slicex_rx_sdll_ctrl_cn73xx { +u64 reserved_16_63 :48 ; +u64 pcs_sds_oob_clk_ctrl :2 ; +u64 reserved_13_7 :7 ; +u64 pcs_sds_rx_sdll_tune :3 ; +u64 pcs_sds_rx_sdll_swsel :4 ; + } cn73xx; +struct cvmx_gserx_slicex_rx_sdll_ctrl_cn73xx cn78xx; +struct cvmx_gserx_slicex_rx_sdll_ctrl_s cn78xxp1; +struct cvmx_gserx_slicex_rx_sdll_ctrl_cn73xx cnf75xx; +}; + +typedef union cvmx_gserx_slicex_rx_sdll_ctrl cvmx_gserx_slicex_rx_sdll_ctrl_t ; + +#endif
Signature · 1 line
2.29.2
PATCH 13/50 mips: octeon: Add cvmx-ipd-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-ipd-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../mach-octeon/include/mach/cvmx-ipd-defs.h | 1925 +++++++++++++++++ 1 file changed, 1925 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-ipd-defs.h
arch/mips/mach-octeon/include/mach/cvmx-ipd-defs.h new file +1925 -0
@@ -0,0 +1,1925 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +* +* Configuration and status register (CSR) type definitions for +* Octeon ipd. +*/ + +#ifndef __CVMX_IPD_DEFS_H__ +#define __CVMX_IPD_DEFS_H__ + +#define CVMX_IPD_1ST_MBUFF_SKIP (0x00014F0000000000ull) +#define CVMX_IPD_1st_NEXT_PTR_BACK (0x00014F0000000150ull) +#define CVMX_IPD_2nd_NEXT_PTR_BACK (0x00014F0000000158ull) +#define CVMX_IPD_BIST_STATUS (0x00014F00000007F8ull) +#define CVMX_IPD_BPIDX_MBUF_TH (offset) (0x00014F0000002000ull + ((offset) & 63) * 8) +#define CVMX_IPD_BPID_BP_COUNTERX (offset) (0x00014F0000003000ull + ((offset) & 63) * 8) +#define CVMX_IPD_BP_PRT_RED_END (0x00014F0000000328ull) +#define CVMX_IPD_CLK_COUNT (0x00014F0000000338ull) +#define CVMX_IPD_CREDITS (0x00014F0000004410ull) +#define CVMX_IPD_CTL_STATUS (0x00014F0000000018ull) +#define CVMX_IPD_ECC_CTL (0x00014F0000004408ull) +#define CVMX_IPD_FREE_PTR_FIFO_CTL (0x00014F0000000780ull) +#define CVMX_IPD_FREE_PTR_VALUE (0x00014F0000000788ull) +#define CVMX_IPD_HOLD_PTR_FIFO_CTL (0x00014F0000000790ull) +#define CVMX_IPD_INT_ENB (0x00014F0000000160ull) +#define CVMX_IPD_INT_SUM (0x00014F0000000168ull) +#define CVMX_IPD_NEXT_PKT_PTR (0x00014F00000007A0ull) +#define CVMX_IPD_NEXT_WQE_PTR (0x00014F00000007A8ull) +#define CVMX_IPD_NOT_1ST_MBUFF_SKIP (0x00014F0000000008ull) +#define CVMX_IPD_ON_BP_DROP_PKTX (offset) (0x00014F0000004100ull) +#define CVMX_IPD_PACKET_MBUFF_SIZE (0x00014F0000000010ull) +#define CVMX_IPD_PKT_ERR (0x00014F00000003F0ull) +#define CVMX_IPD_PKT_PTR_VALID (0x00014F0000000358ull) +#define CVMX_IPD_PORTX_BP_PAGE_CNT (offset) (0x00014F0000000028ull + ((offset) & 63) * 8) +#define CVMX_IPD_PORTX_BP_PAGE_CNT2 (offset) (0x00014F0000000368ull + ((offset) & 63) * 8 - 8 * 36) +#define CVMX_IPD_PORTX_BP_PAGE_CNT3 (offset) (0x00014F00000003D0ull + ((offset) & 63) * 8 - 8 * 40) +#define CVMX_IPD_PORT_BP_COUNTERS2_PAIRX (offset) \ + (0x00014F0000000388ull + ((offset) & 63) * 8 - 8 * 36) +#define CVMX_IPD_PORT_BP_COUNTERS3_PAIRX (offset) \ + (0x00014F00000003B0ull + ((offset) & 63) * 8 - 8 * 40) +#define CVMX_IPD_PORT_BP_COUNTERS4_PAIRX (offset) \ + (0x00014F0000000410ull + ((offset) & 63) * 8 - 8 * 44) +#define CVMX_IPD_PORT_BP_COUNTERS_PAIRX (offset) (0x00014F00000001B8ull + ((offset) & 63) * 8) +#define CVMX_IPD_PORT_PTR_FIFO_CTL (0x00014F0000000798ull) +#define CVMX_IPD_PORT_QOS_INTX (offset) (0x00014F0000000808ull + ((offset) & 7) * 8) +#define CVMX_IPD_PORT_QOS_INT_ENBX (offset) (0x00014F0000000848ull + ((offset) & 7) * 8) +#define CVMX_IPD_PORT_QOS_X_CNT (offset) (0x00014F0000000888ull + ((offset) & 511) * 8) +#define CVMX_IPD_PORT_SOPX (offset) (0x00014F0000004400ull) +#define CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL (0x00014F0000000348ull) +#define CVMX_IPD_PRC_PORT_PTR_FIFO_CTL (0x00014F0000000350ull) +#define CVMX_IPD_PTR_COUNT (0x00014F0000000320ull) +#define CVMX_IPD_PWP_PTR_FIFO_CTL (0x00014F0000000340ull) +#define CVMX_IPD_QOS0_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(0) +#define CVMX_IPD_QOS1_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(1) +#define CVMX_IPD_QOS2_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(2) +#define CVMX_IPD_QOS3_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(3) +#define CVMX_IPD_QOS4_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(4) +#define CVMX_IPD_QOS5_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(5) +#define CVMX_IPD_QOS6_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(6) +#define CVMX_IPD_QOS7_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(7) +#define CVMX_IPD_QOSX_RED_MARKS (offset) (0x00014F0000000178ull + ((offset) & 7) * 8) +#define CVMX_IPD_QUE0_FREE_PAGE_CNT (0x00014F0000000330ull) +#define CVMX_IPD_RED_BPID_ENABLEX (offset) (0x00014F0000004200ull) +#define CVMX_IPD_RED_DELAY (0x00014F0000004300ull) +#define CVMX_IPD_RED_PORT_ENABLE (0x00014F00000002D8ull) +#define CVMX_IPD_RED_PORT_ENABLE2 (0x00014F00000003A8ull) +#define CVMX_IPD_RED_QUE0_PARAM CVMX_IPD_RED_QUEX_PARAM(0) +#define CVMX_IPD_RED_QUE1_PARAM CVMX_IPD_RED_QUEX_PARAM(1) +#define CVMX_IPD_RED_QUE2_PARAM CVMX_IPD_RED_QUEX_PARAM(2) +#define CVMX_IPD_RED_QUE3_PARAM CVMX_IPD_RED_QUEX_PARAM(3) +#define CVMX_IPD_RED_QUE4_PARAM CVMX_IPD_RED_QUEX_PARAM(4) +#define CVMX_IPD_RED_QUE5_PARAM CVMX_IPD_RED_QUEX_PARAM(5) +#define CVMX_IPD_RED_QUE6_PARAM CVMX_IPD_RED_QUEX_PARAM(6) +#define CVMX_IPD_RED_QUE7_PARAM CVMX_IPD_RED_QUEX_PARAM(7) +#define CVMX_IPD_RED_QUEX_PARAM (offset) (0x00014F00000002E0ull + ((offset) & 7) * 8) +#define CVMX_IPD_REQ_WGT (0x00014F0000004418ull) +#define CVMX_IPD_SUB_PORT_BP_PAGE_CNT (0x00014F0000000148ull) +#define CVMX_IPD_SUB_PORT_FCS (0x00014F0000000170ull) +#define CVMX_IPD_SUB_PORT_QOS_CNT (0x00014F0000000800ull) +#define CVMX_IPD_WQE_FPA_QUEUE (0x00014F0000000020ull) +#define CVMX_IPD_WQE_PTR_VALID (0x00014F0000000360ull) + +/** +* cvmx_ipd_1st_mbuff_skip +* +* The number of words that the IPD will skip when writing the first MBUFF. +* +*/ +union cvmx_ipd_1st_mbuff_skip { +u64 u64; +struct cvmx_ipd_1st_mbuff_skip_s { +u64 reserved_6_63 :58 ; +u64 skip_sz :6 ; + } s; +struct cvmx_ipd_1st_mbuff_skip_s cn30xx; +struct cvmx_ipd_1st_mbuff_skip_s cn31xx; +struct cvmx_ipd_1st_mbuff_skip_s cn38xx; +struct cvmx_ipd_1st_mbuff_skip_s cn38xxp2; +struct cvmx_ipd_1st_mbuff_skip_s cn50xx; +struct cvmx_ipd_1st_mbuff_skip_s cn52xx; +struct cvmx_ipd_1st_mbuff_skip_s cn52xxp1; +struct cvmx_ipd_1st_mbuff_skip_s cn56xx; +struct cvmx_ipd_1st_mbuff_skip_s cn56xxp1; +struct cvmx_ipd_1st_mbuff_skip_s cn58xx; +struct cvmx_ipd_1st_mbuff_skip_s cn58xxp1; +struct cvmx_ipd_1st_mbuff_skip_s cn61xx; +struct cvmx_ipd_1st_mbuff_skip_s cn63xx; +struct cvmx_ipd_1st_mbuff_skip_s cn63xxp1; +struct cvmx_ipd_1st_mbuff_skip_s cn66xx; +struct cvmx_ipd_1st_mbuff_skip_s cn68xx; +struct cvmx_ipd_1st_mbuff_skip_s cn68xxp1; +struct cvmx_ipd_1st_mbuff_skip_s cn70xx; +struct cvmx_ipd_1st_mbuff_skip_s cn70xxp1; +struct cvmx_ipd_1st_mbuff_skip_s cnf71xx; +}; + +typedef union cvmx_ipd_1st_mbuff_skip cvmx_ipd_1st_mbuff_skip_t ; + +/** +* cvmx_ipd_1st_next_ptr_back +* +* IPD_1st_NEXT_PTR_BACK = IPD First Next Pointer Back Values +* Contains the Back Field for use in creating the Next Pointer Header for the First MBUF +*/ +union cvmx_ipd_1st_next_ptr_back { +u64 u64; +struct cvmx_ipd_1st_next_ptr_back_s { +u64 reserved_4_63 :60 ; +u64 back :4 ; + } s; +struct cvmx_ipd_1st_next_ptr_back_s cn30xx; +struct cvmx_ipd_1st_next_ptr_back_s cn31xx; +struct cvmx_ipd_1st_next_ptr_back_s cn38xx; +struct cvmx_ipd_1st_next_ptr_back_s cn38xxp2; +struct cvmx_ipd_1st_next_ptr_back_s cn50xx; +struct cvmx_ipd_1st_next_ptr_back_s cn52xx; +struct cvmx_ipd_1st_next_ptr_back_s cn52xxp1; +struct cvmx_ipd_1st_next_ptr_back_s cn56xx; +struct cvmx_ipd_1st_next_ptr_back_s cn56xxp1; +struct cvmx_ipd_1st_next_ptr_back_s cn58xx; +struct cvmx_ipd_1st_next_ptr_back_s cn58xxp1; +struct cvmx_ipd_1st_next_ptr_back_s cn61xx; +struct cvmx_ipd_1st_next_ptr_back_s cn63xx; +struct cvmx_ipd_1st_next_ptr_back_s cn63xxp1; +struct cvmx_ipd_1st_next_ptr_back_s cn66xx; +struct cvmx_ipd_1st_next_ptr_back_s cn68xx; +struct cvmx_ipd_1st_next_ptr_back_s cn68xxp1; +struct cvmx_ipd_1st_next_ptr_back_s cn70xx; +struct cvmx_ipd_1st_next_ptr_back_s cn70xxp1; +struct cvmx_ipd_1st_next_ptr_back_s cnf71xx; +}; + +typedef union cvmx_ipd_1st_next_ptr_back cvmx_ipd_1st_next_ptr_back_t ; + +/** +* cvmx_ipd_2nd_next_ptr_back +* +* Contains the Back Field for use in creating the Next Pointer Header for the First MBUF +* +*/ +union cvmx_ipd_2nd_next_ptr_back { +u64 u64; +struct cvmx_ipd_2nd_next_ptr_back_s { +u64 reserved_4_63 :60 ; +u64 back :4 ; + } s; +struct cvmx_ipd_2nd_next_ptr_back_s cn30xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn31xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn38xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn38xxp2; +struct cvmx_ipd_2nd_next_ptr_back_s cn50xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn52xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn52xxp1; +struct cvmx_ipd_2nd_next_ptr_back_s cn56xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn56xxp1; +struct cvmx_ipd_2nd_next_ptr_back_s cn58xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn58xxp1; +struct cvmx_ipd_2nd_next_ptr_back_s cn61xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn63xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn63xxp1; +struct cvmx_ipd_2nd_next_ptr_back_s cn66xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn68xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn68xxp1; +struct cvmx_ipd_2nd_next_ptr_back_s cn70xx; +struct cvmx_ipd_2nd_next_ptr_back_s cn70xxp1; +struct cvmx_ipd_2nd_next_ptr_back_s cnf71xx; +}; + +typedef union cvmx_ipd_2nd_next_ptr_back cvmx_ipd_2nd_next_ptr_back_t ; + +/** +* cvmx_ipd_bist_status +* +* BIST Status for IPD's Memories. +* +*/ +union cvmx_ipd_bist_status { +u64 u64; +struct cvmx_ipd_bist_status_s { +u64 reserved_23_63 :41 ; +u64 iiwo1 :1 ; +u64 iiwo0 :1 ; +u64 iio1 :1 ; +u64 iio0 :1 ; +u64 pbm4 :1 ; +u64 csr_mem :1 ; +u64 csr_ncmd :1 ; +u64 pwq_wqed :1 ; +u64 pwq_wp1 :1 ; +u64 pwq_pow :1 ; +u64 ipq_pbe1 :1 ; +u64 ipq_pbe0 :1 ; +u64 pbm3 :1 ; +u64 pbm2 :1 ; +u64 pbm1 :1 ; +u64 pbm0 :1 ; +u64 pbm_word :1 ; +u64 pwq1 :1 ; +u64 pwq0 :1 ; +u64 prc_off :1 ; +u64 ipd_old :1 ; +u64 ipd_new :1 ; +u64 pwp :1 ; + } s; +struct cvmx_ipd_bist_status_cn30xx { +u64 reserved_16_63 :48 ; +u64 pwq_wqed :1 ; +u64 pwq_wp1 :1 ; +u64 pwq_pow :1 ; +u64 ipq_pbe1 :1 ; +u64 ipq_pbe0 :1 ; +u64 pbm3 :1 ; +u64 pbm2 :1 ; +u64 pbm1 :1 ; +u64 pbm0 :1 ; +u64 pbm_word :1 ; +u64 pwq1 :1 ; +u64 pwq0 :1 ; +u64 prc_off :1 ; +u64 ipd_old :1 ; +u64 ipd_new :1 ; +u64 pwp :1 ; + } cn30xx; +struct cvmx_ipd_bist_status_cn30xx cn31xx; +struct cvmx_ipd_bist_status_cn30xx cn38xx; +struct cvmx_ipd_bist_status_cn30xx cn38xxp2; +struct cvmx_ipd_bist_status_cn30xx cn50xx; +struct cvmx_ipd_bist_status_cn52xx { +u64 reserved_18_63 :46 ; +u64 csr_mem :1 ; +u64 csr_ncmd :1 ; +u64 pwq_wqed :1 ; +u64 pwq_wp1 :1 ; +u64 pwq_pow :1 ; +u64 ipq_pbe1 :1 ; +u64 ipq_pbe0 :1 ; +u64 pbm3 :1 ; +u64 pbm2 :1 ; +u64 pbm1 :1 ; +u64 pbm0 :1 ; +u64 pbm_word :1 ; +u64 pwq1 :1 ; +u64 pwq0 :1 ; +u64 prc_off :1 ; +u64 ipd_old :1 ; +u64 ipd_new :1 ; +u64 pwp :1 ; + } cn52xx; +struct cvmx_ipd_bist_status_cn52xx cn52xxp1; +struct cvmx_ipd_bist_status_cn52xx cn56xx; +struct cvmx_ipd_bist_status_cn52xx cn56xxp1; +struct cvmx_ipd_bist_status_cn30xx cn58xx; +struct cvmx_ipd_bist_status_cn30xx cn58xxp1; +struct cvmx_ipd_bist_status_cn52xx cn61xx; +struct cvmx_ipd_bist_status_cn52xx cn63xx; +struct cvmx_ipd_bist_status_cn52xx cn63xxp1; +struct cvmx_ipd_bist_status_cn52xx cn66xx; +struct cvmx_ipd_bist_status_s cn68xx; +struct cvmx_ipd_bist_status_s cn68xxp1; +struct cvmx_ipd_bist_status_cn52xx cn70xx; +struct cvmx_ipd_bist_status_cn52xx cn70xxp1; +struct cvmx_ipd_bist_status_cn52xx cnf71xx; +}; + +typedef union cvmx_ipd_bist_status cvmx_ipd_bist_status_t ; + +/** +* cvmx_ipd_bp_prt_red_end +* +* When IPD applies backpressure to a PORT and the corresponding bit in this register is set, +* the RED Unit will drop packets for that port. +*/ +union cvmx_ipd_bp_prt_red_end { +u64 u64; +struct cvmx_ipd_bp_prt_red_end_s { +u64 reserved_48_63 :16 ; +u64 prt_enb :48 ; + } s; +struct cvmx_ipd_bp_prt_red_end_cn30xx { +u64 reserved_36_63 :28 ; +u64 prt_enb :36 ; + } cn30xx; +struct cvmx_ipd_bp_prt_red_end_cn30xx cn31xx; +struct cvmx_ipd_bp_prt_red_end_cn30xx cn38xx; +struct cvmx_ipd_bp_prt_red_end_cn30xx cn38xxp2; +struct cvmx_ipd_bp_prt_red_end_cn30xx cn50xx; +struct cvmx_ipd_bp_prt_red_end_cn52xx { +u64 reserved_40_63 :24 ; +u64 prt_enb :40 ; + } cn52xx; +struct cvmx_ipd_bp_prt_red_end_cn52xx cn52xxp1; +struct cvmx_ipd_bp_prt_red_end_cn52xx cn56xx; +struct cvmx_ipd_bp_prt_red_end_cn52xx cn56xxp1; +struct cvmx_ipd_bp_prt_red_end_cn30xx cn58xx; +struct cvmx_ipd_bp_prt_red_end_cn30xx cn58xxp1; +struct cvmx_ipd_bp_prt_red_end_s cn61xx; +struct cvmx_ipd_bp_prt_red_end_cn63xx { +u64 reserved_44_63 :20 ; +u64 prt_enb :44 ; + } cn63xx; +struct cvmx_ipd_bp_prt_red_end_cn63xx cn63xxp1; +struct cvmx_ipd_bp_prt_red_end_s cn66xx; +struct cvmx_ipd_bp_prt_red_end_s cn70xx; +struct cvmx_ipd_bp_prt_red_end_s cn70xxp1; +struct cvmx_ipd_bp_prt_red_end_s cnf71xx; +}; + +typedef union cvmx_ipd_bp_prt_red_end cvmx_ipd_bp_prt_red_end_t ; + +/** +* cvmx_ipd_bpid#_mbuf_th +* +* 0x2000 2FFF +* +* IPD_BPIDX_MBUF_TH = IPD BPID MBUFF Threshold +* +* The number of MBUFFs in use by the BPID, that when exceeded, backpressure will be applied to the BPID. +*/ +union cvmx_ipd_bpidx_mbuf_th { +u64 u64; +struct cvmx_ipd_bpidx_mbuf_th_s { +u64 reserved_18_63 :46 ; +u64 bp_enb :1 ; +u64 page_cnt :17 ; + } s; +struct cvmx_ipd_bpidx_mbuf_th_s cn68xx; +struct cvmx_ipd_bpidx_mbuf_th_s cn68xxp1; +}; + +typedef union cvmx_ipd_bpidx_mbuf_th cvmx_ipd_bpidx_mbuf_th_t ; + +/** +* cvmx_ipd_bpid_bp_counter# +* +* RESERVE SPACE UPTO 0x2FFF +* +* 0x3000 0x3ffff +* +* IPD_BPID_BP_COUNTERX = MBUF BPID Counters used to generate Back Pressure Per BPID. +*/ +union cvmx_ipd_bpid_bp_counterx { +u64 u64; +struct cvmx_ipd_bpid_bp_counterx_s { +u64 reserved_25_63 :39 ; +u64 cnt_val :25 ; + } s; +struct cvmx_ipd_bpid_bp_counterx_s cn68xx; +struct cvmx_ipd_bpid_bp_counterx_s cn68xxp1; +}; + +typedef union cvmx_ipd_bpid_bp_counterx cvmx_ipd_bpid_bp_counterx_t ; + +/** +* cvmx_ipd_clk_count +* +* Counts the number of core clocks periods since the de-asserition of reset. +* +*/ +union cvmx_ipd_clk_count { +u64 u64; +struct cvmx_ipd_clk_count_s { +u64 clk_cnt :64 ; + } s; +struct cvmx_ipd_clk_count_s cn30xx; +struct cvmx_ipd_clk_count_s cn31xx; +struct cvmx_ipd_clk_count_s cn38xx; +struct cvmx_ipd_clk_count_s cn38xxp2; +struct cvmx_ipd_clk_count_s cn50xx; +struct cvmx_ipd_clk_count_s cn52xx; +struct cvmx_ipd_clk_count_s cn52xxp1; +struct cvmx_ipd_clk_count_s cn56xx; +struct cvmx_ipd_clk_count_s cn56xxp1; +struct cvmx_ipd_clk_count_s cn58xx; +struct cvmx_ipd_clk_count_s cn58xxp1; +struct cvmx_ipd_clk_count_s cn61xx; +struct cvmx_ipd_clk_count_s cn63xx; +struct cvmx_ipd_clk_count_s cn63xxp1; +struct cvmx_ipd_clk_count_s cn66xx; +struct cvmx_ipd_clk_count_s cn68xx; +struct cvmx_ipd_clk_count_s cn68xxp1; +struct cvmx_ipd_clk_count_s cn70xx; +struct cvmx_ipd_clk_count_s cn70xxp1; +struct cvmx_ipd_clk_count_s cnf71xx; +}; + +typedef union cvmx_ipd_clk_count cvmx_ipd_clk_count_t ; + +/** +* cvmx_ipd_credits +* +* IPD_CREDITS = IPD Credits +* +* The credits allowed for IPD. +*/ +union cvmx_ipd_credits { +u64 u64; +struct cvmx_ipd_credits_s { +u64 reserved_16_63 :48 ; +u64 iob_wrc :8 ; +u64 iob_wr :8 ; + } s; +struct cvmx_ipd_credits_s cn68xx; +struct cvmx_ipd_credits_s cn68xxp1; +}; + +typedef union cvmx_ipd_credits cvmx_ipd_credits_t ; + +/** +* cvmx_ipd_ctl_status +* +* The number of words in a MBUFF used for packet data store. +* +*/ +union cvmx_ipd_ctl_status { +u64 u64; +struct cvmx_ipd_ctl_status_s { +u64 reserved_18_63 :46 ; +u64 use_sop :1 ; +u64 rst_done :1 ; +u64 clken :1 ; +u64 no_wptr :1 ; +u64 pq_apkt :1 ; +u64 pq_nabuf :1 ; +u64 ipd_full :1 ; +u64 pkt_off :1 ; +u64 len_m8 :1 ; +u64 reset :1 ; +u64 addpkt :1 ; +u64 naddbuf :1 ; +u64 pkt_lend :1 ; +u64 wqe_lend :1 ; +u64 pbp_en :1 ; +cvmx_ipd_mode_t opc_mode :2 ; +u64 ipd_en :1 ; + } s; +struct cvmx_ipd_ctl_status_cn30xx { +u64 reserved_10_63 :54 ; +u64 len_m8 :1 ; +u64 reset :1 ; +u64 addpkt :1 ; +u64 naddbuf :1 ; +u64 pkt_lend :1 ; +u64 wqe_lend :1 ; +u64 pbp_en :1 ; +cvmx_ipd_mode_t opc_mode :2 ; +u64 ipd_en :1 ; + } cn30xx; +struct cvmx_ipd_ctl_status_cn30xx cn31xx; +struct cvmx_ipd_ctl_status_cn30xx cn38xx; +struct cvmx_ipd_ctl_status_cn38xxp2 { +u64 reserved_9_63 :55 ; +u64 reset :1 ; +u64 addpkt :1 ; +u64 naddbuf :1 ; +u64 pkt_lend :1 ; +u64 wqe_lend :1 ; +u64 pbp_en :1 ; +cvmx_ipd_mode_t opc_mode :2 ; +u64 ipd_en :1 ; + } cn38xxp2; +struct cvmx_ipd_ctl_status_cn50xx { +u64 reserved_15_63 :49 ; +u64 no_wptr :1 ; +u64 pq_apkt :1 ; +u64 pq_nabuf :1 ; +u64 ipd_full :1 ; +u64 pkt_off :1 ; +u64 len_m8 :1 ; +u64 reset :1 ; +u64 addpkt :1 ; +u64 naddbuf :1 ; +u64 pkt_lend :1 ; +u64 wqe_lend :1 ; +u64 pbp_en :1 ; +cvmx_ipd_mode_t opc_mode :2 ; +u64 ipd_en :1 ; + } cn50xx; +struct cvmx_ipd_ctl_status_cn50xx cn52xx; +struct cvmx_ipd_ctl_status_cn50xx cn52xxp1; +struct cvmx_ipd_ctl_status_cn50xx cn56xx; +struct cvmx_ipd_ctl_status_cn50xx cn56xxp1; +struct cvmx_ipd_ctl_status_cn58xx { +u64 reserved_12_63 :52 ; +u64 ipd_full :1 ; +u64 pkt_off :1 ; +u64 len_m8 :1 ; +u64 reset :1 ; +u64 addpkt :1 ; +u64 naddbuf :1 ; +u64 pkt_lend :1 ; +u64 wqe_lend :1 ; +u64 pbp_en :1 ; +cvmx_ipd_mode_t opc_mode :2 ; +u64 ipd_en :1 ; + } cn58xx; +struct cvmx_ipd_ctl_status_cn58xx cn58xxp1; +struct cvmx_ipd_ctl_status_s cn61xx; +struct cvmx_ipd_ctl_status_s cn63xx; +struct cvmx_ipd_ctl_status_cn63xxp1 { +u64 reserved_16_63 :48 ; +u64 clken :1 ; +u64 no_wptr :1 ; +u64 pq_apkt :1 ; +u64 pq_nabuf :1 ; +u64 ipd_full :1 ; +u64 pkt_off :1 ; +u64 len_m8 :1 ; +u64 reset :1 ; +u64 addpkt :1 ; +u64 naddbuf :1 ; +u64 pkt_lend :1 ; +u64 wqe_lend :1 ; +u64 pbp_en :1 ; +cvmx_ipd_mode_t opc_mode :2 ; +u64 ipd_en :1 ; + } cn63xxp1; +struct cvmx_ipd_ctl_status_s cn66xx; +struct cvmx_ipd_ctl_status_s cn68xx; +struct cvmx_ipd_ctl_status_s cn68xxp1; +struct cvmx_ipd_ctl_status_s cn70xx; +struct cvmx_ipd_ctl_status_s cn70xxp1; +struct cvmx_ipd_ctl_status_s cnf71xx; +}; + +typedef union cvmx_ipd_ctl_status cvmx_ipd_ctl_status_t ; + +/** +* cvmx_ipd_ecc_ctl +* +* IPD_ECC_CTL = IPD ECC Control +* +* Allows inserting ECC errors for testing. +*/ +union cvmx_ipd_ecc_ctl { +u64 u64; +struct cvmx_ipd_ecc_ctl_s { +u64 reserved_8_63 :56 ; +u64 pm3_syn :2 ; +u64 pm2_syn :2 ; +u64 pm1_syn :2 ; +u64 pm0_syn :2 ; + } s; +struct cvmx_ipd_ecc_ctl_s cn68xx; +struct cvmx_ipd_ecc_ctl_s cn68xxp1; +}; + +typedef union cvmx_ipd_ecc_ctl cvmx_ipd_ecc_ctl_t ; + +/** +* cvmx_ipd_free_ptr_fifo_ctl +* +* IPD_FREE_PTR_FIFO_CTL = IPD's FREE Pointer FIFO Control +* +* Allows reading of the Page-Pointers stored in the IPD's FREE Fifo. +* See also the IPD_FREE_PTR_VALUE +*/ +union cvmx_ipd_free_ptr_fifo_ctl { +u64 u64; +struct cvmx_ipd_free_ptr_fifo_ctl_s { +u64 reserved_32_63 :32 ; +u64 max_cnts :7 ; +u64 wraddr :8 ; +u64 praddr :8 ; +u64 cena :1 ; +u64 raddr :8 ; + } s; +struct cvmx_ipd_free_ptr_fifo_ctl_s cn68xx; +struct cvmx_ipd_free_ptr_fifo_ctl_s cn68xxp1; +}; + +typedef union cvmx_ipd_free_ptr_fifo_ctl cvmx_ipd_free_ptr_fifo_ctl_t ; + +/** +* cvmx_ipd_free_ptr_value +* +* IPD_FREE_PTR_VALUE = IPD's FREE Pointer Value +* +* The value of the pointer selected through the IPD_FREE_PTR_FIFO_CTL +*/ +union cvmx_ipd_free_ptr_value { +u64 u64; +struct cvmx_ipd_free_ptr_value_s { +u64 reserved_33_63 :31 ; +u64 ptr :33 ; + } s; +struct cvmx_ipd_free_ptr_value_s cn68xx; +struct cvmx_ipd_free_ptr_value_s cn68xxp1; +}; + +typedef union cvmx_ipd_free_ptr_value cvmx_ipd_free_ptr_value_t ; + +/** +* cvmx_ipd_hold_ptr_fifo_ctl +* +* IPD_HOLD_PTR_FIFO_CTL = IPD's Holding Pointer FIFO Control +* +* Allows reading of the Page-Pointers stored in the IPD's Holding Fifo. +*/ +union cvmx_ipd_hold_ptr_fifo_ctl { +u64 u64; +struct cvmx_ipd_hold_ptr_fifo_ctl_s { +u64 reserved_43_63 :21 ; +u64 ptr :33 ; +u64 max_pkt :3 ; +u64 praddr :3 ; +u64 cena :1 ; +u64 raddr :3 ; + } s; +struct cvmx_ipd_hold_ptr_fifo_ctl_s cn68xx; +struct cvmx_ipd_hold_ptr_fifo_ctl_s cn68xxp1; +}; + +typedef union cvmx_ipd_hold_ptr_fifo_ctl cvmx_ipd_hold_ptr_fifo_ctl_t ; + +/** +* cvmx_ipd_int_enb +* +* IPD_INTERRUPT_ENB = IPD Interrupt Enable Register +* Used to enable the various interrupting conditions of IPD +*/ +union cvmx_ipd_int_enb { +u64 u64; +struct cvmx_ipd_int_enb_s { +u64 reserved_23_63 :41 ; +u64 pw3_dbe :1 ; +u64 pw3_sbe :1 ; +u64 pw2_dbe :1 ; +u64 pw2_sbe :1 ; +u64 pw1_dbe :1 ; +u64 pw1_sbe :1 ; +u64 pw0_dbe :1 ; +u64 pw0_sbe :1 ; +u64 dat :1 ; +u64 eop :1 ; +u64 sop :1 ; +u64 pq_sub :1 ; +u64 pq_add :1 ; +u64 bc_ovr :1 ; +u64 d_coll :1 ; +u64 c_coll :1 ; +u64 cc_ovr :1 ; +u64 dc_ovr :1 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } s; +struct cvmx_ipd_int_enb_cn30xx { +u64 reserved_5_63 :59 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } cn30xx; +struct cvmx_ipd_int_enb_cn30xx cn31xx; +struct cvmx_ipd_int_enb_cn38xx { +u64 reserved_10_63 :54 ; +u64 bc_ovr :1 ; +u64 d_coll :1 ; +u64 c_coll :1 ; +u64 cc_ovr :1 ; +u64 dc_ovr :1 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } cn38xx; +struct cvmx_ipd_int_enb_cn30xx cn38xxp2; +struct cvmx_ipd_int_enb_cn38xx cn50xx; +struct cvmx_ipd_int_enb_cn52xx { +u64 reserved_12_63 :52 ; +u64 pq_sub :1 ; +u64 pq_add :1 ; +u64 bc_ovr :1 ; +u64 d_coll :1 ; +u64 c_coll :1 ; +u64 cc_ovr :1 ; +u64 dc_ovr :1 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } cn52xx; +struct cvmx_ipd_int_enb_cn52xx cn52xxp1; +struct cvmx_ipd_int_enb_cn52xx cn56xx; +struct cvmx_ipd_int_enb_cn52xx cn56xxp1; +struct cvmx_ipd_int_enb_cn38xx cn58xx; +struct cvmx_ipd_int_enb_cn38xx cn58xxp1; +struct cvmx_ipd_int_enb_cn52xx cn61xx; +struct cvmx_ipd_int_enb_cn52xx cn63xx; +struct cvmx_ipd_int_enb_cn52xx cn63xxp1; +struct cvmx_ipd_int_enb_cn52xx cn66xx; +struct cvmx_ipd_int_enb_s cn68xx; +struct cvmx_ipd_int_enb_s cn68xxp1; +struct cvmx_ipd_int_enb_cn52xx cn70xx; +struct cvmx_ipd_int_enb_cn52xx cn70xxp1; +struct cvmx_ipd_int_enb_cn52xx cnf71xx; +}; + +typedef union cvmx_ipd_int_enb cvmx_ipd_int_enb_t ; + +/** +* cvmx_ipd_int_sum +* +* IPD_INTERRUPT_SUM = IPD Interrupt Summary Register +* Set when an interrupt condition occurs, write '1' to clear. +*/ +union cvmx_ipd_int_sum { +u64 u64; +struct cvmx_ipd_int_sum_s { +u64 reserved_23_63 :41 ; +u64 pw3_dbe :1 ; +u64 pw3_sbe :1 ; +u64 pw2_dbe :1 ; +u64 pw2_sbe :1 ; +u64 pw1_dbe :1 ; +u64 pw1_sbe :1 ; +u64 pw0_dbe :1 ; +u64 pw0_sbe :1 ; +u64 dat :1 ; +u64 eop :1 ; +u64 sop :1 ; +u64 pq_sub :1 ; +u64 pq_add :1 ; +u64 bc_ovr :1 ; +u64 d_coll :1 ; +u64 c_coll :1 ; +u64 cc_ovr :1 ; +u64 dc_ovr :1 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } s; +struct cvmx_ipd_int_sum_cn30xx { +u64 reserved_5_63 :59 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } cn30xx; +struct cvmx_ipd_int_sum_cn30xx cn31xx; +struct cvmx_ipd_int_sum_cn38xx { +u64 reserved_10_63 :54 ; +u64 bc_ovr :1 ; +u64 d_coll :1 ; +u64 c_coll :1 ; +u64 cc_ovr :1 ; +u64 dc_ovr :1 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } cn38xx; +struct cvmx_ipd_int_sum_cn30xx cn38xxp2; +struct cvmx_ipd_int_sum_cn38xx cn50xx; +struct cvmx_ipd_int_sum_cn52xx { +u64 reserved_12_63 :52 ; +u64 pq_sub :1 ; +u64 pq_add :1 ; +u64 bc_ovr :1 ; +u64 d_coll :1 ; +u64 c_coll :1 ; +u64 cc_ovr :1 ; +u64 dc_ovr :1 ; +u64 bp_sub :1 ; +u64 prc_par3 :1 ; +u64 prc_par2 :1 ; +u64 prc_par1 :1 ; +u64 prc_par0 :1 ; + } cn52xx; +struct cvmx_ipd_int_sum_cn52xx cn52xxp1; +struct cvmx_ipd_int_sum_cn52xx cn56xx; +struct cvmx_ipd_int_sum_cn52xx cn56xxp1; +struct cvmx_ipd_int_sum_cn38xx cn58xx; +struct cvmx_ipd_int_sum_cn38xx cn58xxp1; +struct cvmx_ipd_int_sum_cn52xx cn61xx; +struct cvmx_ipd_int_sum_cn52xx cn63xx; +struct cvmx_ipd_int_sum_cn52xx cn63xxp1; +struct cvmx_ipd_int_sum_cn52xx cn66xx; +struct cvmx_ipd_int_sum_s cn68xx; +struct cvmx_ipd_int_sum_s cn68xxp1; +struct cvmx_ipd_int_sum_cn52xx cn70xx; +struct cvmx_ipd_int_sum_cn52xx cn70xxp1; +struct cvmx_ipd_int_sum_cn52xx cnf71xx; +}; + +typedef union cvmx_ipd_int_sum cvmx_ipd_int_sum_t ; + +/** +* cvmx_ipd_next_pkt_ptr +* +* IPD_NEXT_PKT_PTR = IPD's Next Packet Pointer +* +* The value of the packet-pointer fetched and in the valid register. +*/ +union cvmx_ipd_next_pkt_ptr { +u64 u64; +struct cvmx_ipd_next_pkt_ptr_s { +u64 reserved_33_63 :31 ; +u64 ptr :33 ; + } s; +struct cvmx_ipd_next_pkt_ptr_s cn68xx; +struct cvmx_ipd_next_pkt_ptr_s cn68xxp1; +}; + +typedef union cvmx_ipd_next_pkt_ptr cvmx_ipd_next_pkt_ptr_t ; + +/** +* cvmx_ipd_next_wqe_ptr +* +* IPD_NEXT_WQE_PTR = IPD's NEXT_WQE Pointer +* +* The value of the WQE-pointer fetched and in the valid register. +*/ +union cvmx_ipd_next_wqe_ptr { +u64 u64; +struct cvmx_ipd_next_wqe_ptr_s { +u64 reserved_33_63 :31 ; +u64 ptr :33 ; + } s; +struct cvmx_ipd_next_wqe_ptr_s cn68xx; +struct cvmx_ipd_next_wqe_ptr_s cn68xxp1; +}; + +typedef union cvmx_ipd_next_wqe_ptr cvmx_ipd_next_wqe_ptr_t ; + +/** +* cvmx_ipd_not_1st_mbuff_skip +* +* The number of words that the IPD will skip when writing any MBUFF that is not the first. +* +*/ +union cvmx_ipd_not_1st_mbuff_skip { +u64 u64; +struct cvmx_ipd_not_1st_mbuff_skip_s { +u64 reserved_6_63 :58 ; +u64 skip_sz :6 ; + } s; +struct cvmx_ipd_not_1st_mbuff_skip_s cn30xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn31xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn38xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn38xxp2; +struct cvmx_ipd_not_1st_mbuff_skip_s cn50xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn52xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn52xxp1; +struct cvmx_ipd_not_1st_mbuff_skip_s cn56xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn56xxp1; +struct cvmx_ipd_not_1st_mbuff_skip_s cn58xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn58xxp1; +struct cvmx_ipd_not_1st_mbuff_skip_s cn61xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn63xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn63xxp1; +struct cvmx_ipd_not_1st_mbuff_skip_s cn66xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn68xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn68xxp1; +struct cvmx_ipd_not_1st_mbuff_skip_s cn70xx; +struct cvmx_ipd_not_1st_mbuff_skip_s cn70xxp1; +struct cvmx_ipd_not_1st_mbuff_skip_s cnf71xx; +}; + +typedef union cvmx_ipd_not_1st_mbuff_skip cvmx_ipd_not_1st_mbuff_skip_t ; + +/** +* cvmx_ipd_on_bp_drop_pkt# +* +* RESERVE SPACE UPTO 0x3FFF +* +* +* RESERVED FOR FORMER IPD_SUB_PKIND_FCS - MOVED TO PIP +* +* RESERVE 4008 - 40FF +* +* +* IPD_ON_BP_DROP_PKT = IPD On Backpressure Drop Packet +* +* When IPD applies backpressure to a BPID and the corresponding bit in this register is set, +* then previously received packets will be dropped when processed. +*/ +union cvmx_ipd_on_bp_drop_pktx { +u64 u64; +struct cvmx_ipd_on_bp_drop_pktx_s { +u64 prt_enb :64 ; + } s; +struct cvmx_ipd_on_bp_drop_pktx_s cn68xx; +struct cvmx_ipd_on_bp_drop_pktx_s cn68xxp1; +}; + +typedef union cvmx_ipd_on_bp_drop_pktx cvmx_ipd_on_bp_drop_pktx_t ; + +/** +* cvmx_ipd_packet_mbuff_size +* +* The number of words in a MBUFF used for packet data store. +* +*/ +union cvmx_ipd_packet_mbuff_size { +u64 u64; +struct cvmx_ipd_packet_mbuff_size_s { +u64 reserved_12_63 :52 ; +u64 mb_size :12 ; + } s; +struct cvmx_ipd_packet_mbuff_size_s cn30xx; +struct cvmx_ipd_packet_mbuff_size_s cn31xx; +struct cvmx_ipd_packet_mbuff_size_s cn38xx; +struct cvmx_ipd_packet_mbuff_size_s cn38xxp2; +struct cvmx_ipd_packet_mbuff_size_s cn50xx; +struct cvmx_ipd_packet_mbuff_size_s cn52xx; +struct cvmx_ipd_packet_mbuff_size_s cn52xxp1; +struct cvmx_ipd_packet_mbuff_size_s cn56xx; +struct cvmx_ipd_packet_mbuff_size_s cn56xxp1; +struct cvmx_ipd_packet_mbuff_size_s cn58xx; +struct cvmx_ipd_packet_mbuff_size_s cn58xxp1; +struct cvmx_ipd_packet_mbuff_size_s cn61xx; +struct cvmx_ipd_packet_mbuff_size_s cn63xx; +struct cvmx_ipd_packet_mbuff_size_s cn63xxp1; +struct cvmx_ipd_packet_mbuff_size_s cn66xx; +struct cvmx_ipd_packet_mbuff_size_s cn68xx; +struct cvmx_ipd_packet_mbuff_size_s cn68xxp1; +struct cvmx_ipd_packet_mbuff_size_s cn70xx; +struct cvmx_ipd_packet_mbuff_size_s cn70xxp1; +struct cvmx_ipd_packet_mbuff_size_s cnf71xx; +}; + +typedef union cvmx_ipd_packet_mbuff_size cvmx_ipd_packet_mbuff_size_t ; + +/** +* cvmx_ipd_pkt_err +* +* IPD_PKT_ERR = IPD Packet Error Register +* +* Provides status about the failing packet recevie error. +*/ +union cvmx_ipd_pkt_err { +u64 u64; +struct cvmx_ipd_pkt_err_s { +u64 reserved_6_63 :58 ; +u64 reasm :6 ; + } s; +struct cvmx_ipd_pkt_err_s cn68xx; +struct cvmx_ipd_pkt_err_s cn68xxp1; +}; + +typedef union cvmx_ipd_pkt_err cvmx_ipd_pkt_err_t ; + +/** +* cvmx_ipd_pkt_ptr_valid +* +* The value of the packet-pointer fetched and in the valid register. +* +*/ +union cvmx_ipd_pkt_ptr_valid { +u64 u64; +struct cvmx_ipd_pkt_ptr_valid_s { +u64 reserved_29_63 :35 ; +u64 ptr :29 ; + } s; +struct cvmx_ipd_pkt_ptr_valid_s cn30xx; +struct cvmx_ipd_pkt_ptr_valid_s cn31xx; +struct cvmx_ipd_pkt_ptr_valid_s cn38xx; +struct cvmx_ipd_pkt_ptr_valid_s cn50xx; +struct cvmx_ipd_pkt_ptr_valid_s cn52xx; +struct cvmx_ipd_pkt_ptr_valid_s cn52xxp1; +struct cvmx_ipd_pkt_ptr_valid_s cn56xx; +struct cvmx_ipd_pkt_ptr_valid_s cn56xxp1; +struct cvmx_ipd_pkt_ptr_valid_s cn58xx; +struct cvmx_ipd_pkt_ptr_valid_s cn58xxp1; +struct cvmx_ipd_pkt_ptr_valid_s cn61xx; +struct cvmx_ipd_pkt_ptr_valid_s cn63xx; +struct cvmx_ipd_pkt_ptr_valid_s cn63xxp1; +struct cvmx_ipd_pkt_ptr_valid_s cn66xx; +struct cvmx_ipd_pkt_ptr_valid_s cn70xx; +struct cvmx_ipd_pkt_ptr_valid_s cn70xxp1; +struct cvmx_ipd_pkt_ptr_valid_s cnf71xx; +}; + +typedef union cvmx_ipd_pkt_ptr_valid cvmx_ipd_pkt_ptr_valid_t ; + +/** +* cvmx_ipd_port#_bp_page_cnt +* +* IPD_PORTX_BP_PAGE_CNT = IPD Port Backpressure Page Count +* The number of pages in use by the port that when exceeded, backpressure will be applied to the +* port. +* See also IPD_PORTX_BP_PAGE_CNT2 +* See also IPD_PORTX_BP_PAGE_CNT3 +*/ +union cvmx_ipd_portx_bp_page_cnt { +u64 u64; +struct cvmx_ipd_portx_bp_page_cnt_s { +u64 reserved_18_63 :46 ; +u64 bp_enb :1 ; +u64 page_cnt :17 ; + } s; +struct cvmx_ipd_portx_bp_page_cnt_s cn30xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn31xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn38xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn38xxp2; +struct cvmx_ipd_portx_bp_page_cnt_s cn50xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn52xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn52xxp1; +struct cvmx_ipd_portx_bp_page_cnt_s cn56xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn56xxp1; +struct cvmx_ipd_portx_bp_page_cnt_s cn58xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn58xxp1; +struct cvmx_ipd_portx_bp_page_cnt_s cn61xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn63xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn63xxp1; +struct cvmx_ipd_portx_bp_page_cnt_s cn66xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn70xx; +struct cvmx_ipd_portx_bp_page_cnt_s cn70xxp1; +struct cvmx_ipd_portx_bp_page_cnt_s cnf71xx; +}; + +typedef union cvmx_ipd_portx_bp_page_cnt cvmx_ipd_portx_bp_page_cnt_t ; + +/** +* cvmx_ipd_port#_bp_page_cnt2 +* +* IPD_PORTX_BP_PAGE_CNT2 = IPD Port Backpressure Page Count +* The number of pages in use by the port that when exceeded, backpressure will be applied to the +* port. +* See also IPD_PORTX_BP_PAGE_CNT +* See also IPD_PORTX_BP_PAGE_CNT3 +* 0x368-0x380 +*/ +union cvmx_ipd_portx_bp_page_cnt2 { +u64 u64; +struct cvmx_ipd_portx_bp_page_cnt2_s { +u64 reserved_18_63 :46 ; +u64 bp_enb :1 ; +u64 page_cnt :17 ; + } s; +struct cvmx_ipd_portx_bp_page_cnt2_s cn52xx; +struct cvmx_ipd_portx_bp_page_cnt2_s cn52xxp1; +struct cvmx_ipd_portx_bp_page_cnt2_s cn56xx; +struct cvmx_ipd_portx_bp_page_cnt2_s cn56xxp1; +struct cvmx_ipd_portx_bp_page_cnt2_s cn61xx; +struct cvmx_ipd_portx_bp_page_cnt2_s cn63xx; +struct cvmx_ipd_portx_bp_page_cnt2_s cn63xxp1; +struct cvmx_ipd_portx_bp_page_cnt2_s cn66xx; +struct cvmx_ipd_portx_bp_page_cnt2_s cn70xx; +struct cvmx_ipd_portx_bp_page_cnt2_s cn70xxp1; +struct cvmx_ipd_portx_bp_page_cnt2_s cnf71xx; +}; + +typedef union cvmx_ipd_portx_bp_page_cnt2 cvmx_ipd_portx_bp_page_cnt2_t ; + +/** +* cvmx_ipd_port#_bp_page_cnt3 +* +* IPD_PORTX_BP_PAGE_CNT3 = IPD Port Backpressure Page Count +* The number of pages in use by the port that when exceeded, backpressure will be applied to the +* port. +* See also IPD_PORTX_BP_PAGE_CNT +* See also IPD_PORTX_BP_PAGE_CNT2 +* 0x3d0-408 +*/ +union cvmx_ipd_portx_bp_page_cnt3 { +u64 u64; +struct cvmx_ipd_portx_bp_page_cnt3_s { +u64 reserved_18_63 :46 ; +u64 bp_enb :1 ; +u64 page_cnt :17 ; + } s; +struct cvmx_ipd_portx_bp_page_cnt3_s cn61xx; +struct cvmx_ipd_portx_bp_page_cnt3_s cn63xx; +struct cvmx_ipd_portx_bp_page_cnt3_s cn63xxp1; +struct cvmx_ipd_portx_bp_page_cnt3_s cn66xx; +struct cvmx_ipd_portx_bp_page_cnt3_s cn70xx; +struct cvmx_ipd_portx_bp_page_cnt3_s cn70xxp1; +struct cvmx_ipd_portx_bp_page_cnt3_s cnf71xx; +}; + +typedef union cvmx_ipd_portx_bp_page_cnt3 cvmx_ipd_portx_bp_page_cnt3_t ; + +/** +* cvmx_ipd_port_bp_counters2_pair# +* +* See also IPD_PORT_BP_COUNTERS_PAIRX +* See also IPD_PORT_BP_COUNTERS3_PAIRX +* 0x388-0x3a0 +*/ +union cvmx_ipd_port_bp_counters2_pairx { +u64 u64; +struct cvmx_ipd_port_bp_counters2_pairx_s { +u64 reserved_25_63 :39 ; +u64 cnt_val :25 ; + } s; +struct cvmx_ipd_port_bp_counters2_pairx_s cn52xx; +struct cvmx_ipd_port_bp_counters2_pairx_s cn52xxp1; +struct cvmx_ipd_port_bp_counters2_pairx_s cn56xx; +struct cvmx_ipd_port_bp_counters2_pairx_s cn56xxp1; +struct cvmx_ipd_port_bp_counters2_pairx_s cn61xx; +struct cvmx_ipd_port_bp_counters2_pairx_s cn63xx; +struct cvmx_ipd_port_bp_counters2_pairx_s cn63xxp1; +struct cvmx_ipd_port_bp_counters2_pairx_s cn66xx; +struct cvmx_ipd_port_bp_counters2_pairx_s cn70xx; +struct cvmx_ipd_port_bp_counters2_pairx_s cn70xxp1; +struct cvmx_ipd_port_bp_counters2_pairx_s cnf71xx; +}; + +typedef union cvmx_ipd_port_bp_counters2_pairx cvmx_ipd_port_bp_counters2_pairx_t ; + +/** +* cvmx_ipd_port_bp_counters3_pair# +* +* See also IPD_PORT_BP_COUNTERS_PAIRX +* See also IPD_PORT_BP_COUNTERS2_PAIRX +* 0x3b0-0x3c8 +*/ +union cvmx_ipd_port_bp_counters3_pairx { +u64 u64; +struct cvmx_ipd_port_bp_counters3_pairx_s { +u64 reserved_25_63 :39 ; +u64 cnt_val :25 ; + } s; +struct cvmx_ipd_port_bp_counters3_pairx_s cn61xx; +struct cvmx_ipd_port_bp_counters3_pairx_s cn63xx; +struct cvmx_ipd_port_bp_counters3_pairx_s cn63xxp1; +struct cvmx_ipd_port_bp_counters3_pairx_s cn66xx; +struct cvmx_ipd_port_bp_counters3_pairx_s cn70xx; +struct cvmx_ipd_port_bp_counters3_pairx_s cn70xxp1; +struct cvmx_ipd_port_bp_counters3_pairx_s cnf71xx; +}; + +typedef union cvmx_ipd_port_bp_counters3_pairx cvmx_ipd_port_bp_counters3_pairx_t ; + +/** +* cvmx_ipd_port_bp_counters4_pair# +* +* See also IPD_PORT_BP_COUNTERS_PAIRX +* See also IPD_PORT_BP_COUNTERS2_PAIRX +* 0x410-0x3c8 +*/ +union cvmx_ipd_port_bp_counters4_pairx { +u64 u64; +struct cvmx_ipd_port_bp_counters4_pairx_s { +u64 reserved_25_63 :39 ; +u64 cnt_val :25 ; + } s; +struct cvmx_ipd_port_bp_counters4_pairx_s cn61xx; +struct cvmx_ipd_port_bp_counters4_pairx_s cn66xx; +struct cvmx_ipd_port_bp_counters4_pairx_s cn70xx; +struct cvmx_ipd_port_bp_counters4_pairx_s cn70xxp1; +struct cvmx_ipd_port_bp_counters4_pairx_s cnf71xx; +}; + +typedef union cvmx_ipd_port_bp_counters4_pairx cvmx_ipd_port_bp_counters4_pairx_t ; + +/** +* cvmx_ipd_port_bp_counters_pair# +* +* See also IPD_PORT_BP_COUNTERS2_PAIRX +* See also IPD_PORT_BP_COUNTERS3_PAIRX +* 0x1b8-0x2d0 +*/ +union cvmx_ipd_port_bp_counters_pairx { +u64 u64; +struct cvmx_ipd_port_bp_counters_pairx_s { +u64 reserved_25_63 :39 ; +u64 cnt_val :25 ; + } s; +struct cvmx_ipd_port_bp_counters_pairx_s cn30xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn31xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn38xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn38xxp2; +struct cvmx_ipd_port_bp_counters_pairx_s cn50xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn52xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn52xxp1; +struct cvmx_ipd_port_bp_counters_pairx_s cn56xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn56xxp1; +struct cvmx_ipd_port_bp_counters_pairx_s cn58xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn58xxp1; +struct cvmx_ipd_port_bp_counters_pairx_s cn61xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn63xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn63xxp1; +struct cvmx_ipd_port_bp_counters_pairx_s cn66xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn70xx; +struct cvmx_ipd_port_bp_counters_pairx_s cn70xxp1; +struct cvmx_ipd_port_bp_counters_pairx_s cnf71xx; +}; + +typedef union cvmx_ipd_port_bp_counters_pairx cvmx_ipd_port_bp_counters_pairx_t ; + +/** +* cvmx_ipd_port_ptr_fifo_ctl +* +* IPD_PORT_PTR_FIFO_CTL = IPD's Reasm-Id Pointer FIFO Control +* +* Allows reading of the Page-Pointers stored in the IPD's Reasm-Id Fifo. +*/ +union cvmx_ipd_port_ptr_fifo_ctl { +u64 u64; +struct cvmx_ipd_port_ptr_fifo_ctl_s { +u64 reserved_48_63 :16 ; +u64 ptr :33 ; +u64 max_pkt :7 ; +u64 cena :1 ; +u64 raddr :7 ; + } s; +struct cvmx_ipd_port_ptr_fifo_ctl_s cn68xx; +struct cvmx_ipd_port_ptr_fifo_ctl_s cn68xxp1; +}; + +typedef union cvmx_ipd_port_ptr_fifo_ctl cvmx_ipd_port_ptr_fifo_ctl_t ; + +/** +* cvmx_ipd_port_qos_#_cnt +* +* IPD_PORT_QOS_X_CNT = IPD PortX QOS-0 Count +* A counter per port/qos. Counter are originzed in sequence where the first 8 counter (0-7) +* belong to Port-0 +* QOS 0-7 respectively followed by port 1 at (8-15), etc +* Ports 0-3, 32-43 +*/ +union cvmx_ipd_port_qos_x_cnt { +u64 u64; +struct cvmx_ipd_port_qos_x_cnt_s { +u64 wmark :32 ; +u64 cnt :32 ; + } s; +struct cvmx_ipd_port_qos_x_cnt_s cn52xx; +struct cvmx_ipd_port_qos_x_cnt_s cn52xxp1; +struct cvmx_ipd_port_qos_x_cnt_s cn56xx; +struct cvmx_ipd_port_qos_x_cnt_s cn56xxp1; +struct cvmx_ipd_port_qos_x_cnt_s cn61xx; +struct cvmx_ipd_port_qos_x_cnt_s cn63xx; +struct cvmx_ipd_port_qos_x_cnt_s cn63xxp1; +struct cvmx_ipd_port_qos_x_cnt_s cn66xx; +struct cvmx_ipd_port_qos_x_cnt_s cn68xx; +struct cvmx_ipd_port_qos_x_cnt_s cn68xxp1; +struct cvmx_ipd_port_qos_x_cnt_s cn70xx; +struct cvmx_ipd_port_qos_x_cnt_s cn70xxp1; +struct cvmx_ipd_port_qos_x_cnt_s cnf71xx; +}; + +typedef union cvmx_ipd_port_qos_x_cnt cvmx_ipd_port_qos_x_cnt_t ; + +/** +* cvmx_ipd_port_qos_int# +* +* See the description for IPD_PORT_QOS_X_CNT +* 0=P0-7; 1=P8-15; 2=P16-23; 3=P24-31; 4=P32-39; 5=P40-47; 6=P48-55; 7=P56-63 +* Only ports used are: P0-3, p16-19, P24, P32-39. Therefore only IPD_PORT_QOS_INT0 ([63:32] == +* Reserved), IPD_PORT_QOS_INT2 ([63:32] == Reserved), IPD_PORT_QOS_INT3 ([63:8] == Reserved), +* IPD_PORT_QOS_INT4 +*/ +union cvmx_ipd_port_qos_intx { +u64 u64; +struct cvmx_ipd_port_qos_intx_s { +u64 intr :64 ; + } s; +struct cvmx_ipd_port_qos_intx_s cn52xx; +struct cvmx_ipd_port_qos_intx_s cn52xxp1; +struct cvmx_ipd_port_qos_intx_s cn56xx; +struct cvmx_ipd_port_qos_intx_s cn56xxp1; +struct cvmx_ipd_port_qos_intx_s cn61xx; +struct cvmx_ipd_port_qos_intx_s cn63xx; +struct cvmx_ipd_port_qos_intx_s cn63xxp1; +struct cvmx_ipd_port_qos_intx_s cn66xx; +struct cvmx_ipd_port_qos_intx_s cn68xx; +struct cvmx_ipd_port_qos_intx_s cn68xxp1; +struct cvmx_ipd_port_qos_intx_s cn70xx; +struct cvmx_ipd_port_qos_intx_s cn70xxp1; +struct cvmx_ipd_port_qos_intx_s cnf71xx; +}; + +typedef union cvmx_ipd_port_qos_intx cvmx_ipd_port_qos_intx_t ; + +/** +* cvmx_ipd_port_qos_int_enb# +* +* "When the IPD_PORT_QOS_INTX[\#] is '1' and IPD_PORT_QOS_INT_ENBX[\#] is '1' a interrupt will be +* generated." +*/ +union cvmx_ipd_port_qos_int_enbx { +u64 u64; +struct cvmx_ipd_port_qos_int_enbx_s { +u64 enb :64 ; + } s; +struct cvmx_ipd_port_qos_int_enbx_s cn52xx; +struct cvmx_ipd_port_qos_int_enbx_s cn52xxp1; +struct cvmx_ipd_port_qos_int_enbx_s cn56xx; +struct cvmx_ipd_port_qos_int_enbx_s cn56xxp1; +struct cvmx_ipd_port_qos_int_enbx_s cn61xx; +struct cvmx_ipd_port_qos_int_enbx_s cn63xx; +struct cvmx_ipd_port_qos_int_enbx_s cn63xxp1; +struct cvmx_ipd_port_qos_int_enbx_s cn66xx; +struct cvmx_ipd_port_qos_int_enbx_s cn68xx; +struct cvmx_ipd_port_qos_int_enbx_s cn68xxp1; +struct cvmx_ipd_port_qos_int_enbx_s cn70xx; +struct cvmx_ipd_port_qos_int_enbx_s cn70xxp1; +struct cvmx_ipd_port_qos_int_enbx_s cnf71xx; +}; + +typedef union cvmx_ipd_port_qos_int_enbx cvmx_ipd_port_qos_int_enbx_t ; + +/** +* cvmx_ipd_port_sop# +* +* IPD_PORT_SOP = IPD Reasm-Id SOP +* +* Set when a SOP is detected on a reasm-num. Where the reasm-num value set the bit vector of this register. +*/ +union cvmx_ipd_port_sopx { +u64 u64; +struct cvmx_ipd_port_sopx_s { +u64 sop :64 ; + } s; +struct cvmx_ipd_port_sopx_s cn68xx; +struct cvmx_ipd_port_sopx_s cn68xxp1; +}; + +typedef union cvmx_ipd_port_sopx cvmx_ipd_port_sopx_t ; + +/** +* cvmx_ipd_prc_hold_ptr_fifo_ctl +* +* Allows reading of the Page-Pointers stored in the IPD's PRC Holding Fifo. +* +*/ +union cvmx_ipd_prc_hold_ptr_fifo_ctl { +u64 u64; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s { +u64 reserved_39_63 :25 ; +u64 max_pkt :3 ; +u64 praddr :3 ; +u64 ptr :29 ; +u64 cena :1 ; +u64 raddr :3 ; + } s; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn30xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn31xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn38xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn50xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn52xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn52xxp1; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn56xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn56xxp1; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn58xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn58xxp1; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn61xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn63xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn63xxp1; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn66xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn70xx; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn70xxp1; +struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cnf71xx; +}; + +typedef union cvmx_ipd_prc_hold_ptr_fifo_ctl cvmx_ipd_prc_hold_ptr_fifo_ctl_t ; + +/** +* cvmx_ipd_prc_port_ptr_fifo_ctl +* +* Allows reading of the Page-Pointers stored in the IPD's PRC PORT Fifo. +* +*/ +union cvmx_ipd_prc_port_ptr_fifo_ctl { +u64 u64; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s { +u64 reserved_44_63 :20 ; +u64 max_pkt :7 ; +u64 ptr :29 ; +u64 cena :1 ; +u64 raddr :7 ; + } s; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn30xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn31xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn38xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn50xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn52xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn52xxp1; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn56xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn56xxp1; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn58xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn58xxp1; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn61xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn63xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn63xxp1; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn66xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn70xx; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn70xxp1; +struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cnf71xx; +}; + +typedef union cvmx_ipd_prc_port_ptr_fifo_ctl cvmx_ipd_prc_port_ptr_fifo_ctl_t ; + +/** +* cvmx_ipd_ptr_count +* +* Shows the number of WQE and Packet Page Pointers stored in the IPD. +* +*/ +union cvmx_ipd_ptr_count { +u64 u64; +struct cvmx_ipd_ptr_count_s { +u64 reserved_19_63 :45 ; +u64 pktv_cnt :1 ; +u64 wqev_cnt :1 ; +u64 pfif_cnt :3 ; +u64 pkt_pcnt :7 ; +u64 wqe_pcnt :7 ; + } s; +struct cvmx_ipd_ptr_count_s cn30xx; +struct cvmx_ipd_ptr_count_s cn31xx; +struct cvmx_ipd_ptr_count_s cn38xx; +struct cvmx_ipd_ptr_count_s cn38xxp2; +struct cvmx_ipd_ptr_count_s cn50xx; +struct cvmx_ipd_ptr_count_s cn52xx; +struct cvmx_ipd_ptr_count_s cn52xxp1; +struct cvmx_ipd_ptr_count_s cn56xx; +struct cvmx_ipd_ptr_count_s cn56xxp1; +struct cvmx_ipd_ptr_count_s cn58xx; +struct cvmx_ipd_ptr_count_s cn58xxp1; +struct cvmx_ipd_ptr_count_s cn61xx; +struct cvmx_ipd_ptr_count_s cn63xx; +struct cvmx_ipd_ptr_count_s cn63xxp1; +struct cvmx_ipd_ptr_count_s cn66xx; +struct cvmx_ipd_ptr_count_s cn68xx; +struct cvmx_ipd_ptr_count_s cn68xxp1; +struct cvmx_ipd_ptr_count_s cn70xx; +struct cvmx_ipd_ptr_count_s cn70xxp1; +struct cvmx_ipd_ptr_count_s cnf71xx; +}; + +typedef union cvmx_ipd_ptr_count cvmx_ipd_ptr_count_t ; + +/** +* cvmx_ipd_pwp_ptr_fifo_ctl +* +* Allows reading of the Page-Pointers stored in the IPD's PWP Fifo. +* +*/ +union cvmx_ipd_pwp_ptr_fifo_ctl { +u64 u64; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s { +u64 reserved_61_63 :3 ; +u64 max_cnts :7 ; +u64 wraddr :8 ; +u64 praddr :8 ; +u64 ptr :29 ; +u64 cena :1 ; +u64 raddr :8 ; + } s; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn30xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn31xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn38xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn50xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn52xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn52xxp1; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn56xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn56xxp1; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn58xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn58xxp1; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn61xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn63xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn63xxp1; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn66xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn70xx; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn70xxp1; +struct cvmx_ipd_pwp_ptr_fifo_ctl_s cnf71xx; +}; + +typedef union cvmx_ipd_pwp_ptr_fifo_ctl cvmx_ipd_pwp_ptr_fifo_ctl_t ; + +/** +* cvmx_ipd_qos#_red_marks +* +* Set the pass-drop marks for qos level. +* +*/ +union cvmx_ipd_qosx_red_marks { +u64 u64; +struct cvmx_ipd_qosx_red_marks_s { +u64 drop :32 ; +u64 pass :32 ; + } s; +struct cvmx_ipd_qosx_red_marks_s cn30xx; +struct cvmx_ipd_qosx_red_marks_s cn31xx; +struct cvmx_ipd_qosx_red_marks_s cn38xx; +struct cvmx_ipd_qosx_red_marks_s cn38xxp2; +struct cvmx_ipd_qosx_red_marks_s cn50xx; +struct cvmx_ipd_qosx_red_marks_s cn52xx; +struct cvmx_ipd_qosx_red_marks_s cn52xxp1; +struct cvmx_ipd_qosx_red_marks_s cn56xx; +struct cvmx_ipd_qosx_red_marks_s cn56xxp1; +struct cvmx_ipd_qosx_red_marks_s cn58xx; +struct cvmx_ipd_qosx_red_marks_s cn58xxp1; +struct cvmx_ipd_qosx_red_marks_s cn61xx; +struct cvmx_ipd_qosx_red_marks_s cn63xx; +struct cvmx_ipd_qosx_red_marks_s cn63xxp1; +struct cvmx_ipd_qosx_red_marks_s cn66xx; +struct cvmx_ipd_qosx_red_marks_s cn68xx; +struct cvmx_ipd_qosx_red_marks_s cn68xxp1; +struct cvmx_ipd_qosx_red_marks_s cn70xx; +struct cvmx_ipd_qosx_red_marks_s cn70xxp1; +struct cvmx_ipd_qosx_red_marks_s cnf71xx; +}; + +typedef union cvmx_ipd_qosx_red_marks cvmx_ipd_qosx_red_marks_t ; + +/** +* cvmx_ipd_que0_free_page_cnt +* +* Number of Free-Page Pointer that are available for use in the FPA for Queue-0. +* +*/ +union cvmx_ipd_que0_free_page_cnt { +u64 u64; +struct cvmx_ipd_que0_free_page_cnt_s { +u64 reserved_32_63 :32 ; +u64 q0_pcnt :32 ; + } s; +struct cvmx_ipd_que0_free_page_cnt_s cn30xx; +struct cvmx_ipd_que0_free_page_cnt_s cn31xx; +struct cvmx_ipd_que0_free_page_cnt_s cn38xx; +struct cvmx_ipd_que0_free_page_cnt_s cn38xxp2; +struct cvmx_ipd_que0_free_page_cnt_s cn50xx; +struct cvmx_ipd_que0_free_page_cnt_s cn52xx; +struct cvmx_ipd_que0_free_page_cnt_s cn52xxp1; +struct cvmx_ipd_que0_free_page_cnt_s cn56xx; +struct cvmx_ipd_que0_free_page_cnt_s cn56xxp1; +struct cvmx_ipd_que0_free_page_cnt_s cn58xx; +struct cvmx_ipd_que0_free_page_cnt_s cn58xxp1; +struct cvmx_ipd_que0_free_page_cnt_s cn61xx; +struct cvmx_ipd_que0_free_page_cnt_s cn63xx; +struct cvmx_ipd_que0_free_page_cnt_s cn63xxp1; +struct cvmx_ipd_que0_free_page_cnt_s cn66xx; +struct cvmx_ipd_que0_free_page_cnt_s cn68xx; +struct cvmx_ipd_que0_free_page_cnt_s cn68xxp1; +struct cvmx_ipd_que0_free_page_cnt_s cn70xx; +struct cvmx_ipd_que0_free_page_cnt_s cn70xxp1; +struct cvmx_ipd_que0_free_page_cnt_s cnf71xx; +}; + +typedef union cvmx_ipd_que0_free_page_cnt cvmx_ipd_que0_free_page_cnt_t ; + +/** +* cvmx_ipd_red_bpid_enable# +* +* IPD_RED_BPID_ENABLE = IPD RED BPID Enable +* +* Set the pass-drop marks for qos level. +*/ +union cvmx_ipd_red_bpid_enablex { +u64 u64; +struct cvmx_ipd_red_bpid_enablex_s { +u64 prt_enb :64 ; + } s; +struct cvmx_ipd_red_bpid_enablex_s cn68xx; +struct cvmx_ipd_red_bpid_enablex_s cn68xxp1; +}; + +typedef union cvmx_ipd_red_bpid_enablex cvmx_ipd_red_bpid_enablex_t ; + +/** +* cvmx_ipd_red_delay +* +* IPD_RED_DELAY = IPD RED BPID Enable +* +* Set the pass-drop marks for qos level. +*/ +union cvmx_ipd_red_delay { +u64 u64; +struct cvmx_ipd_red_delay_s { +u64 reserved_28_63 :36 ; +u64 prb_dly :14 ; +u64 avg_dly :14 ; + } s; +struct cvmx_ipd_red_delay_s cn68xx; +struct cvmx_ipd_red_delay_s cn68xxp1; +}; + +typedef union cvmx_ipd_red_delay cvmx_ipd_red_delay_t ; + +/** +* cvmx_ipd_red_port_enable +* +* Set the pass-drop marks for qos level. +* +*/ +union cvmx_ipd_red_port_enable { +u64 u64; +struct cvmx_ipd_red_port_enable_s { +u64 prb_dly :14 ; +u64 avg_dly :14 ; +u64 prt_enb :36 ; + } s; +struct cvmx_ipd_red_port_enable_s cn30xx; +struct cvmx_ipd_red_port_enable_s cn31xx; +struct cvmx_ipd_red_port_enable_s cn38xx; +struct cvmx_ipd_red_port_enable_s cn38xxp2; +struct cvmx_ipd_red_port_enable_s cn50xx; +struct cvmx_ipd_red_port_enable_s cn52xx; +struct cvmx_ipd_red_port_enable_s cn52xxp1; +struct cvmx_ipd_red_port_enable_s cn56xx; +struct cvmx_ipd_red_port_enable_s cn56xxp1; +struct cvmx_ipd_red_port_enable_s cn58xx; +struct cvmx_ipd_red_port_enable_s cn58xxp1; +struct cvmx_ipd_red_port_enable_s cn61xx; +struct cvmx_ipd_red_port_enable_s cn63xx; +struct cvmx_ipd_red_port_enable_s cn63xxp1; +struct cvmx_ipd_red_port_enable_s cn66xx; +struct cvmx_ipd_red_port_enable_s cn70xx; +struct cvmx_ipd_red_port_enable_s cn70xxp1; +struct cvmx_ipd_red_port_enable_s cnf71xx; +}; + +typedef union cvmx_ipd_red_port_enable cvmx_ipd_red_port_enable_t ; + +/** +* cvmx_ipd_red_port_enable2 +* +* Set the pass-drop marks for qos level. +* +*/ +union cvmx_ipd_red_port_enable2 { +u64 u64; +struct cvmx_ipd_red_port_enable2_s { +u64 reserved_12_63 :52 ; +u64 prt_enb :12 ; + } s; +struct cvmx_ipd_red_port_enable2_cn52xx { +u64 reserved_4_63 :60 ; +u64 prt_enb :4 ; + } cn52xx; +struct cvmx_ipd_red_port_enable2_cn52xx cn52xxp1; +struct cvmx_ipd_red_port_enable2_cn52xx cn56xx; +struct cvmx_ipd_red_port_enable2_cn52xx cn56xxp1; +struct cvmx_ipd_red_port_enable2_s cn61xx; +struct cvmx_ipd_red_port_enable2_cn63xx { +u64 reserved_8_63 :56 ; +u64 prt_enb :8 ; + } cn63xx; +struct cvmx_ipd_red_port_enable2_cn63xx cn63xxp1; +struct cvmx_ipd_red_port_enable2_s cn66xx; +struct cvmx_ipd_red_port_enable2_s cn70xx; +struct cvmx_ipd_red_port_enable2_s cn70xxp1; +struct cvmx_ipd_red_port_enable2_s cnf71xx; +}; + +typedef union cvmx_ipd_red_port_enable2 cvmx_ipd_red_port_enable2_t ; + +/** +* cvmx_ipd_red_que#_param +* +* Value control the Passing and Dropping of packets by the red engine for QOS Level-0. +* +*/ +union cvmx_ipd_red_quex_param { +u64 u64; +struct cvmx_ipd_red_quex_param_s { +u64 reserved_49_63 :15 ; +u64 use_pcnt :1 ; +u64 new_con :8 ; +u64 avg_con :8 ; +u64 prb_con :32 ; + } s; +struct cvmx_ipd_red_quex_param_s cn30xx; +struct cvmx_ipd_red_quex_param_s cn31xx; +struct cvmx_ipd_red_quex_param_s cn38xx; +struct cvmx_ipd_red_quex_param_s cn38xxp2; +struct cvmx_ipd_red_quex_param_s cn50xx; +struct cvmx_ipd_red_quex_param_s cn52xx; +struct cvmx_ipd_red_quex_param_s cn52xxp1; +struct cvmx_ipd_red_quex_param_s cn56xx; +struct cvmx_ipd_red_quex_param_s cn56xxp1; +struct cvmx_ipd_red_quex_param_s cn58xx; +struct cvmx_ipd_red_quex_param_s cn58xxp1; +struct cvmx_ipd_red_quex_param_s cn61xx; +struct cvmx_ipd_red_quex_param_s cn63xx; +struct cvmx_ipd_red_quex_param_s cn63xxp1; +struct cvmx_ipd_red_quex_param_s cn66xx; +struct cvmx_ipd_red_quex_param_s cn68xx; +struct cvmx_ipd_red_quex_param_s cn68xxp1; +struct cvmx_ipd_red_quex_param_s cn70xx; +struct cvmx_ipd_red_quex_param_s cn70xxp1; +struct cvmx_ipd_red_quex_param_s cnf71xx; +}; + +typedef union cvmx_ipd_red_quex_param cvmx_ipd_red_quex_param_t ; + +/** +* cvmx_ipd_req_wgt +* +* IPD_REQ_WGT = IPD REQ weights +* +* There are 8 devices that can request to send packet traffic to the IPD. These weights are used for the Weighted Round Robin +* grant generated by the IPD to requestors. +*/ +union cvmx_ipd_req_wgt { +u64 u64; +struct cvmx_ipd_req_wgt_s { +u64 wgt7 :8 ; +u64 wgt6 :8 ; +u64 wgt5 :8 ; +u64 wgt4 :8 ; +u64 wgt3 :8 ; +u64 wgt2 :8 ; +u64 wgt1 :8 ; +u64 wgt0 :8 ; + } s; +struct cvmx_ipd_req_wgt_s cn68xx; +}; + +typedef union cvmx_ipd_req_wgt cvmx_ipd_req_wgt_t ; + +/** +* cvmx_ipd_sub_port_bp_page_cnt +* +* Will add the value to the indicated port count register, the number of pages supplied. The +* value added should +* be the 2's complement of the value that needs to be subtracted. Users add 2's complement +* values to the +* port-mbuf-count register to return (lower the count) mbufs to the counter in order to avoid +* port-level +* backpressure being applied to the port. Backpressure is applied when the MBUF used count of a +* port exceeds the +* value in the IPD_PORTX_BP_PAGE_CNT, IPD_PORTX_BP_PAGE_CNT2, and IPD_PORTX_BP_PAGE_CNT3. +* This register can't be written from the PCI via a window write. +*/ +union cvmx_ipd_sub_port_bp_page_cnt { +u64 u64; +struct cvmx_ipd_sub_port_bp_page_cnt_s { +u64 reserved_31_63 :33 ; +u64 port :6 ; +u64 page_cnt :25 ; + } s; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn30xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn31xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn38xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn38xxp2; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn50xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn52xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn52xxp1; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn56xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn56xxp1; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn58xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn58xxp1; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn61xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn63xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn63xxp1; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn66xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn68xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn68xxp1; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn70xx; +struct cvmx_ipd_sub_port_bp_page_cnt_s cn70xxp1; +struct cvmx_ipd_sub_port_bp_page_cnt_s cnf71xx; +}; + +typedef union cvmx_ipd_sub_port_bp_page_cnt cvmx_ipd_sub_port_bp_page_cnt_t ; + +/** +* cvmx_ipd_sub_port_fcs +* +* When set '1' the port corresponding to the bit set will subtract 4 bytes from the end of +* the packet. +*/ +union cvmx_ipd_sub_port_fcs { +u64 u64; +struct cvmx_ipd_sub_port_fcs_s { +u64 reserved_40_63 :24 ; +u64 port_bit2 :4 ; +u64 reserved_32_35 :4 ; +u64 port_bit :32 ; + } s; +struct cvmx_ipd_sub_port_fcs_cn30xx { +u64 reserved_3_63 :61 ; +u64 port_bit :3 ; + } cn30xx; +struct cvmx_ipd_sub_port_fcs_cn30xx cn31xx; +struct cvmx_ipd_sub_port_fcs_cn38xx { +u64 reserved_32_63 :32 ; +u64 port_bit :32 ; + } cn38xx; +struct cvmx_ipd_sub_port_fcs_cn38xx cn38xxp2; +struct cvmx_ipd_sub_port_fcs_cn30xx cn50xx; +struct cvmx_ipd_sub_port_fcs_s cn52xx; +struct cvmx_ipd_sub_port_fcs_s cn52xxp1; +struct cvmx_ipd_sub_port_fcs_s cn56xx; +struct cvmx_ipd_sub_port_fcs_s cn56xxp1; +struct cvmx_ipd_sub_port_fcs_cn38xx cn58xx; +struct cvmx_ipd_sub_port_fcs_cn38xx cn58xxp1; +struct cvmx_ipd_sub_port_fcs_s cn61xx; +struct cvmx_ipd_sub_port_fcs_s cn63xx; +struct cvmx_ipd_sub_port_fcs_s cn63xxp1; +struct cvmx_ipd_sub_port_fcs_s cn66xx; +struct cvmx_ipd_sub_port_fcs_s cn70xx; +struct cvmx_ipd_sub_port_fcs_s cn70xxp1; +struct cvmx_ipd_sub_port_fcs_s cnf71xx; +}; + +typedef union cvmx_ipd_sub_port_fcs cvmx_ipd_sub_port_fcs_t ; + +/** +* cvmx_ipd_sub_port_qos_cnt +* +* Will add the value (CNT) to the indicated Port-QOS register (PORT_QOS). The value added must +* be +* be the 2's complement of the value that needs to be subtracted. +*/ +union cvmx_ipd_sub_port_qos_cnt { +u64 u64; +struct cvmx_ipd_sub_port_qos_cnt_s { +u64 reserved_41_63 :23 ; +u64 port_qos :9 ; +u64 cnt :32 ; + } s; +struct cvmx_ipd_sub_port_qos_cnt_s cn52xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn52xxp1; +struct cvmx_ipd_sub_port_qos_cnt_s cn56xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn56xxp1; +struct cvmx_ipd_sub_port_qos_cnt_s cn61xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn63xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn63xxp1; +struct cvmx_ipd_sub_port_qos_cnt_s cn66xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn68xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn68xxp1; +struct cvmx_ipd_sub_port_qos_cnt_s cn70xx; +struct cvmx_ipd_sub_port_qos_cnt_s cn70xxp1; +struct cvmx_ipd_sub_port_qos_cnt_s cnf71xx; +}; + +typedef union cvmx_ipd_sub_port_qos_cnt cvmx_ipd_sub_port_qos_cnt_t ; + +/** +* cvmx_ipd_wqe_fpa_queue +* +* Which FPA Queue (0-7) to fetch page-pointers from for WQE's +* +*/ +union cvmx_ipd_wqe_fpa_queue { +u64 u64; +struct cvmx_ipd_wqe_fpa_queue_s { +u64 reserved_3_63 :61 ; +u64 wqe_pool :3 ; + } s; +struct cvmx_ipd_wqe_fpa_queue_s cn30xx; +struct cvmx_ipd_wqe_fpa_queue_s cn31xx; +struct cvmx_ipd_wqe_fpa_queue_s cn38xx; +struct cvmx_ipd_wqe_fpa_queue_s cn38xxp2; +struct cvmx_ipd_wqe_fpa_queue_s cn50xx; +struct cvmx_ipd_wqe_fpa_queue_s cn52xx; +struct cvmx_ipd_wqe_fpa_queue_s cn52xxp1; +struct cvmx_ipd_wqe_fpa_queue_s cn56xx; +struct cvmx_ipd_wqe_fpa_queue_s cn56xxp1; +struct cvmx_ipd_wqe_fpa_queue_s cn58xx; +struct cvmx_ipd_wqe_fpa_queue_s cn58xxp1; +struct cvmx_ipd_wqe_fpa_queue_s cn61xx; +struct cvmx_ipd_wqe_fpa_queue_s cn63xx; +struct cvmx_ipd_wqe_fpa_queue_s cn63xxp1; +struct cvmx_ipd_wqe_fpa_queue_s cn66xx; +struct cvmx_ipd_wqe_fpa_queue_s cn68xx; +struct cvmx_ipd_wqe_fpa_queue_s cn68xxp1; +struct cvmx_ipd_wqe_fpa_queue_s cn70xx; +struct cvmx_ipd_wqe_fpa_queue_s cn70xxp1; +struct cvmx_ipd_wqe_fpa_queue_s cnf71xx; +}; + +typedef union cvmx_ipd_wqe_fpa_queue cvmx_ipd_wqe_fpa_queue_t ; + +/** +* cvmx_ipd_wqe_ptr_valid +* +* The value of the WQE-pointer fetched and in the valid register. +* +*/ +union cvmx_ipd_wqe_ptr_valid { +u64 u64; +struct cvmx_ipd_wqe_ptr_valid_s { +u64 reserved_29_63 :35 ; +u64 ptr :29 ; + } s; +struct cvmx_ipd_wqe_ptr_valid_s cn30xx; +struct cvmx_ipd_wqe_ptr_valid_s cn31xx; +struct cvmx_ipd_wqe_ptr_valid_s cn38xx; +struct cvmx_ipd_wqe_ptr_valid_s cn50xx; +struct cvmx_ipd_wqe_ptr_valid_s cn52xx; +struct cvmx_ipd_wqe_ptr_valid_s cn52xxp1; +struct cvmx_ipd_wqe_ptr_valid_s cn56xx; +struct cvmx_ipd_wqe_ptr_valid_s cn56xxp1; +struct cvmx_ipd_wqe_ptr_valid_s cn58xx; +struct cvmx_ipd_wqe_ptr_valid_s cn58xxp1; +struct cvmx_ipd_wqe_ptr_valid_s cn61xx; +struct cvmx_ipd_wqe_ptr_valid_s cn63xx; +struct cvmx_ipd_wqe_ptr_valid_s cn63xxp1; +struct cvmx_ipd_wqe_ptr_valid_s cn66xx; +struct cvmx_ipd_wqe_ptr_valid_s cn70xx; +struct cvmx_ipd_wqe_ptr_valid_s cn70xxp1; +struct cvmx_ipd_wqe_ptr_valid_s cnf71xx; +}; + +typedef union cvmx_ipd_wqe_ptr_valid cvmx_ipd_wqe_ptr_valid_t ; + +#endif
Signature · 1 line
2.29.2
PATCH 14/50 mips: octeon: Add cvmx-l2c-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-l2c-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../mach-octeon/include/mach/cvmx-l2c-defs.h | 172 ++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-l2c-defs.h
arch/mips/mach-octeon/include/mach/cvmx-l2c-defs.h new file +172 -0
@@ -0,0 +1,172 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +*/ + +#ifndef __CVMX_L2C_DEFS_H_ +#define __CVMX_L2C_DEFS_H_ + +#define CVMX_L2C_CFG 0x0001180080000000ull +#define CVMX_L2C_CTL 0x0001180080800000ull + +/* +* Mapping is done starting from 0x11800.80000000 +* Use _REL for relative mapping +*/ +#define CVMX_L2C_CTL_REL 0x00800000 +#define CVMX_L2C_BIG_CTL_REL 0x00800030 +#define CVMX_L2C_TADX_INT_REL (i) (0x00a00028 + (((i) & 7) * 0x40000)) +#define CVMX_L2C_MCIX_INT_REL (i) (0x00c00028 + (((i) & 3) * 0x40000)) + +/** +* cvmx_l2c_cfg +* +* Specify the RSL base addresses for the block +* +* L2C_CFG = L2C Configuration +* +* Description: +*/ +union cvmx_l2c_cfg { +u64 u64; +struct cvmx_l2c_cfg_s { +u64 reserved_20_63 :44 ; +u64 bstrun :1 ; +u64 lbist :1 ; +u64 xor_bank :1 ; +u64 dpres1 :1 ; +u64 dpres0 :1 ; +u64 dfill_dis :1 ; +u64 fpexp :4 ; +u64 fpempty :1 ; +u64 fpen :1 ; +u64 idxalias :1 ; +u64 mwf_crd :4 ; +u64 rsp_arb_mode :1 ; +u64 rfb_arb_mode :1 ; +u64 lrf_arb_mode :1 ; + } s; +}; + +/** +* cvmx_l2c_ctl +* +* L2C_CTL = L2C Control +* +* +* Notes: +* (1) If MAXVAB is != 0, VAB_THRESH should be less than MAXVAB. +* +* (2) L2DFDBE and L2DFSBE allows software to generate L2DSBE, L2DDBE, VBFSBE, +* and VBFDBE errors for the purposes of testing error handling code. When +* one (or both) of these bits are set a PL2 which misses in the L2 will fill +* with the appropriate error in the first 2 OWs of the fill. Software can +* determine which OW pair gets the error by choosing the desired fill order +* (address<6:5>). A PL2 which hits in the L2 will not inject any errors. +* Therefore sending a WBIL2 prior to the PL2 is recommended to make a miss +* likely (if multiple processors are involved software must be careful to be +* sure no other processor or IO device can bring the block into the L2). +* +* To generate a VBFSBE or VBFDBE, software must first get the cache block +* into the cache with an error using a PL2 which misses the L2. Then a +* store partial to a portion of the cache block without the error must +* change the block to dirty. Then, a subsequent WBL2/WBIL2/victim will +* trigger the VBFSBE/VBFDBE error. +*/ +union cvmx_l2c_ctl { +u64 u64; +struct cvmx_l2c_ctl_s { +u64 reserved_29_63 :35 ; +u64 rdf_fast :1 ; +u64 disstgl2i :1 ; +u64 l2dfsbe :1 ; +u64 l2dfdbe :1 ; +u64 discclk :1 ; +u64 maxvab :4 ; +u64 maxlfb :4 ; +u64 rsp_arb_mode :1 ; +u64 xmc_arb_mode :1 ; +u64 reserved_2_13 :12 ; +u64 disecc :1 ; +u64 disidxalias :1 ; + } s; + +struct cvmx_l2c_ctl_cn73xx { +u64 reserved_32_63 :32 ; +u64 ocla_qos :3 ; +u64 reserved_28_28 :1 ; +u64 disstgl2i :1 ; +u64 reserved_25_26 :2 ; +u64 discclk :1 ; +u64 reserved_16_23 :8 ; +u64 rsp_arb_mode :1 ; +u64 xmc_arb_mode :1 ; +u64 rdf_cnt :8 ; +u64 reserved_4_5 :2 ; +u64 disldwb :1 ; +u64 dissblkdty :1 ; +u64 disecc :1 ; +u64 disidxalias :1 ; + } cn73xx; + +struct cvmx_l2c_ctl_cn73xx cn78xx; +}; + +/** +* cvmx_l2c_big_ctl +* +* L2C_BIG_CTL = L2C Big memory control register +* +* +* Notes: +* (1) BIGRD interrupts can occur during normal operation as the PP's are +* allowed to prefetch to non-existent memory locations. Therefore, +* BIGRD is for informational purposes only. +* +* (2) When HOLEWR/BIGWR blocks a store L2C_VER_ID, L2C_VER_PP, L2C_VER_IOB, +* and L2C_VER_MSC will be loaded just like a store which is blocked by VRTWR. +* Additionally, L2C_ERR_XMC will be loaded. +*/ +union cvmx_l2c_big_ctl { +u64 u64; +struct cvmx_l2c_big_ctl_s { +u64 reserved_8_63 :56 ; +u64 maxdram :4 ; +u64 reserved_0_3 :4 ; + } s; +struct cvmx_l2c_big_ctl_cn61xx { +u64 reserved_8_63 :56 ; +u64 maxdram :4 ; +u64 reserved_1_3 :3 ; +u64 disable :1 ; + } cn61xx; +struct cvmx_l2c_big_ctl_cn61xx cn63xx; +struct cvmx_l2c_big_ctl_cn61xx cn66xx; +struct cvmx_l2c_big_ctl_cn61xx cn68xx; +struct cvmx_l2c_big_ctl_cn61xx cn68xxp1; +struct cvmx_l2c_big_ctl_cn70xx { +u64 reserved_8_63 :56 ; +u64 maxdram :4 ; +u64 reserved_1_3 :3 ; +u64 disbig :1 ; + } cn70xx; +struct cvmx_l2c_big_ctl_cn70xx cn70xxp1; +struct cvmx_l2c_big_ctl_cn70xx cn73xx; +struct cvmx_l2c_big_ctl_cn70xx cn78xx; +struct cvmx_l2c_big_ctl_cn70xx cn78xxp1; +struct cvmx_l2c_big_ctl_cn61xx cnf71xx; +struct cvmx_l2c_big_ctl_cn70xx cnf75xx; +}; + +struct rlevel_byte_data { +int delay; +int loop_total; +int loop_count; +int best; +u64 bm; +int bmerrs; +int sqerrs; +int bestsq; +}; + +#endif
Signature · 1 line
2.29.2
PATCH 15/50 mips: octeon: Add cvmx-mio-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-mio-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../mach-octeon/include/mach/cvmx-mio-defs.h | 353 ++++++++++++++++++ 1 file changed, 353 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-mio-defs.h
arch/mips/mach-octeon/include/mach/cvmx-mio-defs.h new file +353 -0
@@ -0,0 +1,353 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +*/ + +#ifndef __CVMX_MIO_DEFS_H__ +#define __CVMX_MIO_DEFS_H__ + +#define CVMX_MIO_PTP_CLOCK_CFG (0x0001070000000F00ull) +#define CVMX_MIO_PTP_EVT_CNT (0x0001070000000F28ull) +#define CVMX_MIO_RST_BOOT (0x0001180000001600ull) +#define CVMX_MIO_RST_CTLX (offset) (0x0001180000001618ull + ((offset) & 1)) +#define CVMX_MIO_QLMX_CFG (offset) (0x0001180000001590ull + ((offset) & 7) * 8) + +/** +* cvmx_mio_ptp_clock_cfg +* +* This register configures the timestamp architecture. +* +*/ +union cvmx_mio_ptp_clock_cfg { +u64 u64; +struct cvmx_mio_ptp_clock_cfg_s { +u64 reserved_40_63 :24 ; +u64 ext_clk_edge :2 ; +u64 ckout_out4 :1 ; +u64 pps_out :5 ; +u64 pps_inv :1 ; +u64 pps_en :1 ; +u64 ckout_out :4 ; +u64 ckout_inv :1 ; +u64 ckout_en :1 ; +u64 evcnt_in :6 ; +u64 evcnt_edge :1 ; +u64 evcnt_en :1 ; +u64 tstmp_in :6 ; +u64 tstmp_edge :1 ; +u64 tstmp_en :1 ; +u64 ext_clk_in :6 ; +u64 ext_clk_en :1 ; +u64 ptp_en :1 ; + } s; +struct cvmx_mio_ptp_clock_cfg_cn61xx { +u64 reserved_42_63 :22 ; +u64 pps :1 ; +u64 ckout :1 ; +u64 ext_clk_edge :2 ; +u64 ckout_out4 :1 ; +u64 pps_out :5 ; +u64 pps_inv :1 ; +u64 pps_en :1 ; +u64 ckout_out :4 ; +u64 ckout_inv :1 ; +u64 ckout_en :1 ; +u64 evcnt_in :6 ; +u64 evcnt_edge :1 ; +u64 evcnt_en :1 ; +u64 tstmp_in :6 ; +u64 tstmp_edge :1 ; +u64 tstmp_en :1 ; +u64 ext_clk_in :6 ; +u64 ext_clk_en :1 ; +u64 ptp_en :1 ; + } cn61xx; +struct cvmx_mio_ptp_clock_cfg_cn63xx { +u64 reserved_24_63 :40 ; +u64 evcnt_in :6 ; +u64 evcnt_edge :1 ; +u64 evcnt_en :1 ; +u64 tstmp_in :6 ; +u64 tstmp_edge :1 ; +u64 tstmp_en :1 ; +u64 ext_clk_in :6 ; +u64 ext_clk_en :1 ; +u64 ptp_en :1 ; + } cn63xx; +struct cvmx_mio_ptp_clock_cfg_cn63xx cn63xxp1; +struct cvmx_mio_ptp_clock_cfg_s cn66xx; +struct cvmx_mio_ptp_clock_cfg_cn61xx cn68xx; +struct cvmx_mio_ptp_clock_cfg_cn63xx cn68xxp1; +struct cvmx_mio_ptp_clock_cfg_cn70xx { +u64 reserved_42_63 :22 ; +u64 ckout :1 ; +u64 pps :1 ; +u64 ext_clk_edge :2 ; +u64 reserved_32_37 :6 ; +u64 pps_inv :1 ; +u64 pps_en :1 ; +u64 reserved_26_29 :4 ; +u64 ckout_inv :1 ; +u64 ckout_en :1 ; +u64 evcnt_in :6 ; +u64 evcnt_edge :1 ; +u64 evcnt_en :1 ; +u64 tstmp_in :6 ; +u64 tstmp_edge :1 ; +u64 tstmp_en :1 ; +u64 ext_clk_in :6 ; +u64 ext_clk_en :1 ; +u64 ptp_en :1 ; + } cn70xx; +struct cvmx_mio_ptp_clock_cfg_cn70xx cn70xxp1; +struct cvmx_mio_ptp_clock_cfg_cn70xx cn73xx; +struct cvmx_mio_ptp_clock_cfg_cn70xx cn78xx; +struct cvmx_mio_ptp_clock_cfg_cn70xx cn78xxp1; +struct cvmx_mio_ptp_clock_cfg_cn61xx cnf71xx; +struct cvmx_mio_ptp_clock_cfg_cn70xx cnf75xx; +}; + +typedef union cvmx_mio_ptp_clock_cfg cvmx_mio_ptp_clock_cfg_t ; + +/** +* cvmx_mio_ptp_evt_cnt +* +* This register contains the PTP event counter. +* +*/ +union cvmx_mio_ptp_evt_cnt { +u64 u64; +struct cvmx_mio_ptp_evt_cnt_s { +u64 cntr :64 ; + } s; +struct cvmx_mio_ptp_evt_cnt_s cn61xx; +struct cvmx_mio_ptp_evt_cnt_s cn63xx; +struct cvmx_mio_ptp_evt_cnt_s cn63xxp1; +struct cvmx_mio_ptp_evt_cnt_s cn66xx; +struct cvmx_mio_ptp_evt_cnt_s cn68xx; +struct cvmx_mio_ptp_evt_cnt_s cn68xxp1; +struct cvmx_mio_ptp_evt_cnt_s cn70xx; +struct cvmx_mio_ptp_evt_cnt_s cn70xxp1; +struct cvmx_mio_ptp_evt_cnt_s cn73xx; +struct cvmx_mio_ptp_evt_cnt_s cn78xx; +struct cvmx_mio_ptp_evt_cnt_s cn78xxp1; +struct cvmx_mio_ptp_evt_cnt_s cnf71xx; +struct cvmx_mio_ptp_evt_cnt_s cnf75xx; +}; + +typedef union cvmx_mio_ptp_evt_cnt cvmx_mio_ptp_evt_cnt_t ; + +/** +* cvmx_mio_rst_boot +* +* Notes: +* JTCSRDIS, EJTAGDIS, ROMEN reset to 1 in authentik mode; in all other modes they reset to 0. +* +*/ +union cvmx_mio_rst_boot { +u64 u64; +struct cvmx_mio_rst_boot_s { +u64 chipkill :1 ; +u64 jtcsrdis :1 ; +u64 ejtagdis :1 ; +u64 romen :1 ; +u64 ckill_ppdis :1 ; +u64 jt_tstmode :1 ; +u64 reserved_50_57 :8 ; +u64 lboot_ext :2 ; +u64 reserved_44_47 :4 ; +u64 qlm4_spd :4 ; +u64 qlm3_spd :4 ; +u64 c_mul :6 ; +u64 pnr_mul :6 ; +u64 qlm2_spd :4 ; +u64 qlm1_spd :4 ; +u64 qlm0_spd :4 ; +u64 lboot :10 ; +u64 rboot :1 ; +u64 rboot_pin :1 ; + } s; +struct cvmx_mio_rst_boot_cn61xx { +u64 chipkill :1 ; +u64 jtcsrdis :1 ; +u64 ejtagdis :1 ; +u64 romen :1 ; +u64 ckill_ppdis :1 ; +u64 jt_tstmode :1 ; +u64 reserved_50_57 :8 ; +u64 lboot_ext :2 ; +u64 reserved_36_47 :12 ; +u64 c_mul :6 ; +u64 pnr_mul :6 ; +u64 qlm2_spd :4 ; +u64 qlm1_spd :4 ; +u64 qlm0_spd :4 ; +u64 lboot :10 ; +u64 rboot :1 ; +u64 rboot_pin :1 ; + } cn61xx; +struct cvmx_mio_rst_boot_cn63xx { +u64 reserved_36_63 :28 ; +u64 c_mul :6 ; +u64 pnr_mul :6 ; +u64 qlm2_spd :4 ; +u64 qlm1_spd :4 ; +u64 qlm0_spd :4 ; +u64 lboot :10 ; +u64 rboot :1 ; +u64 rboot_pin :1 ; + } cn63xx; +struct cvmx_mio_rst_boot_cn63xx cn63xxp1; +struct cvmx_mio_rst_boot_cn66xx { +u64 chipkill :1 ; +u64 jtcsrdis :1 ; +u64 ejtagdis :1 ; +u64 romen :1 ; +u64 ckill_ppdis :1 ; +u64 reserved_50_58 :9 ; +u64 lboot_ext :2 ; +u64 reserved_36_47 :12 ; +u64 c_mul :6 ; +u64 pnr_mul :6 ; +u64 qlm2_spd :4 ; +u64 qlm1_spd :4 ; +u64 qlm0_spd :4 ; +u64 lboot :10 ; +u64 rboot :1 ; +u64 rboot_pin :1 ; + } cn66xx; +struct cvmx_mio_rst_boot_cn68xx { +u64 reserved_59_63 :5 ; +u64 jt_tstmode :1 ; +u64 reserved_44_57 :14 ; +u64 qlm4_spd :4 ; +u64 qlm3_spd :4 ; +u64 c_mul :6 ; +u64 pnr_mul :6 ; +u64 qlm2_spd :4 ; +u64 qlm1_spd :4 ; +u64 qlm0_spd :4 ; +u64 lboot :10 ; +u64 rboot :1 ; +u64 rboot_pin :1 ; + } cn68xx; +struct cvmx_mio_rst_boot_cn68xxp1 { +u64 reserved_44_63 :20 ; +u64 qlm4_spd :4 ; +u64 qlm3_spd :4 ; +u64 c_mul :6 ; +u64 pnr_mul :6 ; +u64 qlm2_spd :4 ; +u64 qlm1_spd :4 ; +u64 qlm0_spd :4 ; +u64 lboot :10 ; +u64 rboot :1 ; +u64 rboot_pin :1 ; + } cn68xxp1; +struct cvmx_mio_rst_boot_cn61xx cnf71xx; +}; + +typedef union cvmx_mio_rst_boot cvmx_mio_rst_boot_t ; + +/** +* cvmx_mio_rst_ctl# +* +* Notes: +* GEN1_Only mode is enabled for PEM0 when QLM1_SPD[0] is set or when sclk < 550Mhz. +* GEN1_Only mode is enabled for PEM1 when QLM1_SPD[1] is set or when sclk < 550Mhz. +*/ +union cvmx_mio_rst_ctlx { +u64 u64; +struct cvmx_mio_rst_ctlx_s { +u64 reserved_13_63 :51 ; +u64 in_rev_ln :1 ; +u64 rev_lanes :1 ; +u64 gen1_only :1 ; +u64 prst_link :1 ; +u64 rst_done :1 ; +u64 rst_link :1 ; +u64 host_mode :1 ; +u64 prtmode :2 ; +u64 rst_drv :1 ; +u64 rst_rcv :1 ; +u64 rst_chip :1 ; +u64 rst_val :1 ; + } s; +struct cvmx_mio_rst_ctlx_s cn61xx; +struct cvmx_mio_rst_ctlx_cn63xx { +u64 reserved_10_63 :54 ; +u64 prst_link :1 ; +u64 rst_done :1 ; +u64 rst_link :1 ; +u64 host_mode :1 ; +u64 prtmode :2 ; +u64 rst_drv :1 ; +u64 rst_rcv :1 ; +u64 rst_chip :1 ; +u64 rst_val :1 ; + } cn63xx; +struct cvmx_mio_rst_ctlx_cn63xxp1 { +u64 reserved_9_63 :55 ; +u64 rst_done :1 ; +u64 rst_link :1 ; +u64 host_mode :1 ; +u64 prtmode :2 ; +u64 rst_drv :1 ; +u64 rst_rcv :1 ; +u64 rst_chip :1 ; +u64 rst_val :1 ; + } cn63xxp1; +struct cvmx_mio_rst_ctlx_cn63xx cn66xx; +struct cvmx_mio_rst_ctlx_cn63xx cn68xx; +struct cvmx_mio_rst_ctlx_cn63xx cn68xxp1; +struct cvmx_mio_rst_ctlx_s cnf71xx; +}; + +typedef union cvmx_mio_rst_ctlx cvmx_mio_rst_ctlx_t ; + +/** +* cvmx_mio_qlm#_cfg +* +* Notes: +* Certain QLM_SPD is valid only for certain QLM_CFG configuration, refer to HRM for valid +* combinations. These csrs are reset only on COLD_RESET. The Reset values for QLM_SPD and QLM_CFG +* are as follows: MIO_QLM0_CFG SPD=F, CFG=2 SGMII (AGX0) +* MIO_QLM1_CFG SPD=0, CFG=1 PCIE 2x1 (PEM0/PEM1) +*/ +union cvmx_mio_qlmx_cfg { +u64 u64; +struct cvmx_mio_qlmx_cfg_s { +u64 reserved_15_63 :49 ; +u64 prtmode :1 ; +u64 reserved_12_13 :2 ; +u64 qlm_spd :4 ; +u64 reserved_4_7 :4 ; +u64 qlm_cfg :4 ; + } s; +struct cvmx_mio_qlmx_cfg_cn61xx { +u64 reserved_15_63 :49 ; +u64 prtmode :1 ; +u64 reserved_12_13 :2 ; +u64 qlm_spd :4 ; +u64 reserved_2_7 :6 ; +u64 qlm_cfg :2 ; + } cn61xx; +struct cvmx_mio_qlmx_cfg_cn66xx { +u64 reserved_12_63 :52 ; +u64 qlm_spd :4 ; +u64 reserved_4_7 :4 ; +u64 qlm_cfg :4 ; + } cn66xx; +struct cvmx_mio_qlmx_cfg_cn68xx { +u64 reserved_12_63 :52 ; +u64 qlm_spd :4 ; +u64 reserved_3_7 :5 ; +u64 qlm_cfg :3 ; + } cn68xx; +struct cvmx_mio_qlmx_cfg_cn68xx cn68xxp1; +struct cvmx_mio_qlmx_cfg_cn61xx cnf71xx; +}; + +typedef union cvmx_mio_qlmx_cfg cvmx_mio_qlmx_cfg_t ; + +#endif
Signature · 1 line
2.29.2
PATCH 16/50 mips: octeon: Add cvmx-npi-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-npi-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../mach-octeon/include/mach/cvmx-npi-defs.h | 1953 +++++++++++++++++ 1 file changed, 1953 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-npi-defs.h
arch/mips/mach-octeon/include/mach/cvmx-npi-defs.h new file +1953 -0
@@ -0,0 +1,1953 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +* +* Configuration and status register (CSR) type definitions for +* Octeon npi. +*/ + +#ifndef __CVMX_NPI_DEFS_H__ +#define __CVMX_NPI_DEFS_H__ + +#define CVMX_NPI_BASE_ADDR_INPUT0 CVMX_NPI_BASE_ADDR_INPUTX(0) +#define CVMX_NPI_BASE_ADDR_INPUT1 CVMX_NPI_BASE_ADDR_INPUTX(1) +#define CVMX_NPI_BASE_ADDR_INPUT2 CVMX_NPI_BASE_ADDR_INPUTX(2) +#define CVMX_NPI_BASE_ADDR_INPUT3 CVMX_NPI_BASE_ADDR_INPUTX(3) +#define CVMX_NPI_BASE_ADDR_INPUTX (offset) (0x00011F0000000070ull + ((offset) & 3) * 16) +#define CVMX_NPI_BASE_ADDR_OUTPUT0 CVMX_NPI_BASE_ADDR_OUTPUTX(0) +#define CVMX_NPI_BASE_ADDR_OUTPUT1 CVMX_NPI_BASE_ADDR_OUTPUTX(1) +#define CVMX_NPI_BASE_ADDR_OUTPUT2 CVMX_NPI_BASE_ADDR_OUTPUTX(2) +#define CVMX_NPI_BASE_ADDR_OUTPUT3 CVMX_NPI_BASE_ADDR_OUTPUTX(3) +#define CVMX_NPI_BASE_ADDR_OUTPUTX (offset) (0x00011F00000000B8ull + ((offset) & 3) * 8) +#define CVMX_NPI_BIST_STATUS (0x00011F00000003F8ull) +#define CVMX_NPI_BUFF_SIZE_OUTPUT0 CVMX_NPI_BUFF_SIZE_OUTPUTX(0) +#define CVMX_NPI_BUFF_SIZE_OUTPUT1 CVMX_NPI_BUFF_SIZE_OUTPUTX(1) +#define CVMX_NPI_BUFF_SIZE_OUTPUT2 CVMX_NPI_BUFF_SIZE_OUTPUTX(2) +#define CVMX_NPI_BUFF_SIZE_OUTPUT3 CVMX_NPI_BUFF_SIZE_OUTPUTX(3) +#define CVMX_NPI_BUFF_SIZE_OUTPUTX (offset) (0x00011F00000000E0ull + ((offset) & 3) * 8) +#define CVMX_NPI_COMP_CTL (0x00011F0000000218ull) +#define CVMX_NPI_CTL_STATUS (0x00011F0000000010ull) +#define CVMX_NPI_DBG_SELECT (0x00011F0000000008ull) +#define CVMX_NPI_DMA_CONTROL (0x00011F0000000128ull) +#define CVMX_NPI_DMA_HIGHP_COUNTS (0x00011F0000000148ull) +#define CVMX_NPI_DMA_HIGHP_NADDR (0x00011F0000000158ull) +#define CVMX_NPI_DMA_LOWP_COUNTS (0x00011F0000000140ull) +#define CVMX_NPI_DMA_LOWP_NADDR (0x00011F0000000150ull) +#define CVMX_NPI_HIGHP_DBELL (0x00011F0000000120ull) +#define CVMX_NPI_HIGHP_IBUFF_SADDR (0x00011F0000000110ull) +#define CVMX_NPI_INPUT_CONTROL (0x00011F0000000138ull) +#define CVMX_NPI_INT_ENB (0x00011F0000000020ull) +#define CVMX_NPI_INT_SUM (0x00011F0000000018ull) +#define CVMX_NPI_LOWP_DBELL (0x00011F0000000118ull) +#define CVMX_NPI_LOWP_IBUFF_SADDR (0x00011F0000000108ull) +#define CVMX_NPI_MEM_ACCESS_SUBID3 CVMX_NPI_MEM_ACCESS_SUBIDX(3) +#define CVMX_NPI_MEM_ACCESS_SUBID4 CVMX_NPI_MEM_ACCESS_SUBIDX(4) +#define CVMX_NPI_MEM_ACCESS_SUBID5 CVMX_NPI_MEM_ACCESS_SUBIDX(5) +#define CVMX_NPI_MEM_ACCESS_SUBID6 CVMX_NPI_MEM_ACCESS_SUBIDX(6) +#define CVMX_NPI_MEM_ACCESS_SUBIDX (offset) (0x00011F0000000028ull + ((offset) & 7) * 8 - 8 * 3) +#define CVMX_NPI_MSI_RCV (0x0000000000000190ull) +#define CVMX_NPI_NPI_MSI_RCV (0x00011F0000001190ull) +#define CVMX_NPI_NUM_DESC_OUTPUT0 CVMX_NPI_NUM_DESC_OUTPUTX(0) +#define CVMX_NPI_NUM_DESC_OUTPUT1 CVMX_NPI_NUM_DESC_OUTPUTX(1) +#define CVMX_NPI_NUM_DESC_OUTPUT2 CVMX_NPI_NUM_DESC_OUTPUTX(2) +#define CVMX_NPI_NUM_DESC_OUTPUT3 CVMX_NPI_NUM_DESC_OUTPUTX(3) +#define CVMX_NPI_NUM_DESC_OUTPUTX (offset) (0x00011F0000000050ull + ((offset) & 3) * 8) +#define CVMX_NPI_OUTPUT_CONTROL (0x00011F0000000100ull) +#define CVMX_NPI_P0_DBPAIR_ADDR CVMX_NPI_PX_DBPAIR_ADDR(0) +#define CVMX_NPI_P0_INSTR_ADDR CVMX_NPI_PX_INSTR_ADDR(0) +#define CVMX_NPI_P0_INSTR_CNTS CVMX_NPI_PX_INSTR_CNTS(0) +#define CVMX_NPI_P0_PAIR_CNTS CVMX_NPI_PX_PAIR_CNTS(0) +#define CVMX_NPI_P1_DBPAIR_ADDR CVMX_NPI_PX_DBPAIR_ADDR(1) +#define CVMX_NPI_P1_INSTR_ADDR CVMX_NPI_PX_INSTR_ADDR(1) +#define CVMX_NPI_P1_INSTR_CNTS CVMX_NPI_PX_INSTR_CNTS(1) +#define CVMX_NPI_P1_PAIR_CNTS CVMX_NPI_PX_PAIR_CNTS(1) +#define CVMX_NPI_P2_DBPAIR_ADDR CVMX_NPI_PX_DBPAIR_ADDR(2) +#define CVMX_NPI_P2_INSTR_ADDR CVMX_NPI_PX_INSTR_ADDR(2) +#define CVMX_NPI_P2_INSTR_CNTS CVMX_NPI_PX_INSTR_CNTS(2) +#define CVMX_NPI_P2_PAIR_CNTS CVMX_NPI_PX_PAIR_CNTS(2) +#define CVMX_NPI_P3_DBPAIR_ADDR CVMX_NPI_PX_DBPAIR_ADDR(3) +#define CVMX_NPI_P3_INSTR_ADDR CVMX_NPI_PX_INSTR_ADDR(3) +#define CVMX_NPI_P3_INSTR_CNTS CVMX_NPI_PX_INSTR_CNTS(3) +#define CVMX_NPI_P3_PAIR_CNTS CVMX_NPI_PX_PAIR_CNTS(3) +#define CVMX_NPI_PCI_BAR1_INDEXX (offset) (0x00011F0000001100ull + ((offset) & 31) * 4) +#define CVMX_NPI_PCI_BIST_REG (0x00011F00000011C0ull) +#define CVMX_NPI_PCI_BURST_SIZE (0x00011F00000000D8ull) +#define CVMX_NPI_PCI_CFG00 (0x00011F0000001800ull) +#define CVMX_NPI_PCI_CFG01 (0x00011F0000001804ull) +#define CVMX_NPI_PCI_CFG02 (0x00011F0000001808ull) +#define CVMX_NPI_PCI_CFG03 (0x00011F000000180Cull) +#define CVMX_NPI_PCI_CFG04 (0x00011F0000001810ull) +#define CVMX_NPI_PCI_CFG05 (0x00011F0000001814ull) +#define CVMX_NPI_PCI_CFG06 (0x00011F0000001818ull) +#define CVMX_NPI_PCI_CFG07 (0x00011F000000181Cull) +#define CVMX_NPI_PCI_CFG08 (0x00011F0000001820ull) +#define CVMX_NPI_PCI_CFG09 (0x00011F0000001824ull) +#define CVMX_NPI_PCI_CFG10 (0x00011F0000001828ull) +#define CVMX_NPI_PCI_CFG11 (0x00011F000000182Cull) +#define CVMX_NPI_PCI_CFG12 (0x00011F0000001830ull) +#define CVMX_NPI_PCI_CFG13 (0x00011F0000001834ull) +#define CVMX_NPI_PCI_CFG15 (0x00011F000000183Cull) +#define CVMX_NPI_PCI_CFG16 (0x00011F0000001840ull) +#define CVMX_NPI_PCI_CFG17 (0x00011F0000001844ull) +#define CVMX_NPI_PCI_CFG18 (0x00011F0000001848ull) +#define CVMX_NPI_PCI_CFG19 (0x00011F000000184Cull) +#define CVMX_NPI_PCI_CFG20 (0x00011F0000001850ull) +#define CVMX_NPI_PCI_CFG21 (0x00011F0000001854ull) +#define CVMX_NPI_PCI_CFG22 (0x00011F0000001858ull) +#define CVMX_NPI_PCI_CFG56 (0x00011F00000018E0ull) +#define CVMX_NPI_PCI_CFG57 (0x00011F00000018E4ull) +#define CVMX_NPI_PCI_CFG58 (0x00011F00000018E8ull) +#define CVMX_NPI_PCI_CFG59 (0x00011F00000018ECull) +#define CVMX_NPI_PCI_CFG60 (0x00011F00000018F0ull) +#define CVMX_NPI_PCI_CFG61 (0x00011F00000018F4ull) +#define CVMX_NPI_PCI_CFG62 (0x00011F00000018F8ull) +#define CVMX_NPI_PCI_CFG63 (0x00011F00000018FCull) +#define CVMX_NPI_PCI_CNT_REG (0x00011F00000011B8ull) +#define CVMX_NPI_PCI_CTL_STATUS_2 (0x00011F000000118Cull) +#define CVMX_NPI_PCI_INT_ARB_CFG (0x00011F0000000130ull) +#define CVMX_NPI_PCI_INT_ENB2 (0x00011F00000011A0ull) +#define CVMX_NPI_PCI_INT_SUM2 (0x00011F0000001198ull) +#define CVMX_NPI_PCI_READ_CMD (0x00011F0000000048ull) +#define CVMX_NPI_PCI_READ_CMD_6 (0x00011F0000001180ull) +#define CVMX_NPI_PCI_READ_CMD_C (0x00011F0000001184ull) +#define CVMX_NPI_PCI_READ_CMD_E (0x00011F0000001188ull) +#define CVMX_NPI_PCI_SCM_REG (0x00011F00000011A8ull) +#define CVMX_NPI_PCI_TSR_REG (0x00011F00000011B0ull) +#define CVMX_NPI_PORT32_INSTR_HDR (0x00011F00000001F8ull) +#define CVMX_NPI_PORT33_INSTR_HDR (0x00011F0000000200ull) +#define CVMX_NPI_PORT34_INSTR_HDR (0x00011F0000000208ull) +#define CVMX_NPI_PORT35_INSTR_HDR (0x00011F0000000210ull) +#define CVMX_NPI_PORT_BP_CONTROL (0x00011F00000001F0ull) +#define CVMX_NPI_PX_DBPAIR_ADDR (offset) (0x00011F0000000180ull + ((offset) & 3) * 8) +#define CVMX_NPI_PX_INSTR_ADDR (offset) (0x00011F00000001C0ull + ((offset) & 3) * 8) +#define CVMX_NPI_PX_INSTR_CNTS (offset) (0x00011F00000001A0ull + ((offset) & 3) * 8) +#define CVMX_NPI_PX_PAIR_CNTS (offset) (0x00011F0000000160ull + ((offset) & 3) * 8) +#define CVMX_NPI_RSL_INT_BLOCKS (0x00011F0000000000ull) +#define CVMX_NPI_SIZE_INPUT0 CVMX_NPI_SIZE_INPUTX(0) +#define CVMX_NPI_SIZE_INPUT1 CVMX_NPI_SIZE_INPUTX(1) +#define CVMX_NPI_SIZE_INPUT2 CVMX_NPI_SIZE_INPUTX(2) +#define CVMX_NPI_SIZE_INPUT3 CVMX_NPI_SIZE_INPUTX(3) +#define CVMX_NPI_SIZE_INPUTX (offset) (0x00011F0000000078ull + ((offset) & 3) * 16) +#define CVMX_NPI_WIN_READ_TO (0x00011F00000001E0ull) + +/** +* cvmx_npi_base_addr_input# +* +* NPI_BASE_ADDR_INPUT0 = NPI's Base Address Input 0 Register +* +* The address to start reading Instructions from for Input-0. +*/ +union cvmx_npi_base_addr_inputx { +u64 u64; +struct cvmx_npi_base_addr_inputx_s { +u64 baddr :61 ; +u64 reserved_0_2 :3 ; + } s; +struct cvmx_npi_base_addr_inputx_s cn30xx; +struct cvmx_npi_base_addr_inputx_s cn31xx; +struct cvmx_npi_base_addr_inputx_s cn38xx; +struct cvmx_npi_base_addr_inputx_s cn38xxp2; +struct cvmx_npi_base_addr_inputx_s cn50xx; +struct cvmx_npi_base_addr_inputx_s cn58xx; +struct cvmx_npi_base_addr_inputx_s cn58xxp1; +}; + +typedef union cvmx_npi_base_addr_inputx cvmx_npi_base_addr_inputx_t ; + +/** +* cvmx_npi_base_addr_output# +* +* NPI_BASE_ADDR_OUTPUT0 = NPI's Base Address Output 0 Register +* +* The address to start reading Instructions from for Output-0. +*/ +union cvmx_npi_base_addr_outputx { +u64 u64; +struct cvmx_npi_base_addr_outputx_s { +u64 baddr :61 ; +u64 reserved_0_2 :3 ; + } s; +struct cvmx_npi_base_addr_outputx_s cn30xx; +struct cvmx_npi_base_addr_outputx_s cn31xx; +struct cvmx_npi_base_addr_outputx_s cn38xx; +struct cvmx_npi_base_addr_outputx_s cn38xxp2; +struct cvmx_npi_base_addr_outputx_s cn50xx; +struct cvmx_npi_base_addr_outputx_s cn58xx; +struct cvmx_npi_base_addr_outputx_s cn58xxp1; +}; + +typedef union cvmx_npi_base_addr_outputx cvmx_npi_base_addr_outputx_t ; + +/** +* cvmx_npi_bist_status +* +* NPI_BIST_STATUS = NPI's BIST Status Register +* +* Results from BIST runs of NPI's memories. +*/ +union cvmx_npi_bist_status { +u64 u64; +struct cvmx_npi_bist_status_s { +u64 reserved_20_63 :44 ; +u64 csr_bs :1 ; +u64 dif_bs :1 ; +u64 rdp_bs :1 ; +u64 pcnc_bs :1 ; +u64 pcn_bs :1 ; +u64 rdn_bs :1 ; +u64 pcac_bs :1 ; +u64 pcad_bs :1 ; +u64 rdnl_bs :1 ; +u64 pgf_bs :1 ; +u64 pig_bs :1 ; +u64 pof0_bs :1 ; +u64 pof1_bs :1 ; +u64 pof2_bs :1 ; +u64 pof3_bs :1 ; +u64 pos_bs :1 ; +u64 nus_bs :1 ; +u64 dob_bs :1 ; +u64 pdf_bs :1 ; +u64 dpi_bs :1 ; + } s; +struct cvmx_npi_bist_status_cn30xx { +u64 reserved_20_63 :44 ; +u64 csr_bs :1 ; +u64 dif_bs :1 ; +u64 rdp_bs :1 ; +u64 pcnc_bs :1 ; +u64 pcn_bs :1 ; +u64 rdn_bs :1 ; +u64 pcac_bs :1 ; +u64 pcad_bs :1 ; +u64 rdnl_bs :1 ; +u64 pgf_bs :1 ; +u64 pig_bs :1 ; +u64 pof0_bs :1 ; +u64 reserved_5_7 :3 ; +u64 pos_bs :1 ; +u64 nus_bs :1 ; +u64 dob_bs :1 ; +u64 pdf_bs :1 ; +u64 dpi_bs :1 ; + } cn30xx; +struct cvmx_npi_bist_status_s cn31xx; +struct cvmx_npi_bist_status_s cn38xx; +struct cvmx_npi_bist_status_s cn38xxp2; +struct cvmx_npi_bist_status_cn50xx { +u64 reserved_20_63 :44 ; +u64 csr_bs :1 ; +u64 dif_bs :1 ; +u64 rdp_bs :1 ; +u64 pcnc_bs :1 ; +u64 pcn_bs :1 ; +u64 rdn_bs :1 ; +u64 pcac_bs :1 ; +u64 pcad_bs :1 ; +u64 rdnl_bs :1 ; +u64 pgf_bs :1 ; +u64 pig_bs :1 ; +u64 pof0_bs :1 ; +u64 pof1_bs :1 ; +u64 reserved_5_6 :2 ; +u64 pos_bs :1 ; +u64 nus_bs :1 ; +u64 dob_bs :1 ; +u64 pdf_bs :1 ; +u64 dpi_bs :1 ; + } cn50xx; +struct cvmx_npi_bist_status_s cn58xx; +struct cvmx_npi_bist_status_s cn58xxp1; +}; + +typedef union cvmx_npi_bist_status cvmx_npi_bist_status_t ; + +/** +* cvmx_npi_buff_size_output# +* +* NPI_BUFF_SIZE_OUTPUT0 = NPI's D/I Buffer Sizes For Output 0 +* +* The size in bytes of the Data Bufffer and Information Buffer for output 0. +*/ +union cvmx_npi_buff_size_outputx { +u64 u64; +struct cvmx_npi_buff_size_outputx_s { +u64 reserved_23_63 :41 ; +u64 isize :7 ; +u64 bsize :16 ; + } s; +struct cvmx_npi_buff_size_outputx_s cn30xx; +struct cvmx_npi_buff_size_outputx_s cn31xx; +struct cvmx_npi_buff_size_outputx_s cn38xx; +struct cvmx_npi_buff_size_outputx_s cn38xxp2; +struct cvmx_npi_buff_size_outputx_s cn50xx; +struct cvmx_npi_buff_size_outputx_s cn58xx; +struct cvmx_npi_buff_size_outputx_s cn58xxp1; +}; + +typedef union cvmx_npi_buff_size_outputx cvmx_npi_buff_size_outputx_t ; + +/** +* cvmx_npi_comp_ctl +* +* NPI_COMP_CTL = PCI Compensation Control +* +* PCI Compensation Control +*/ +union cvmx_npi_comp_ctl { +u64 u64; +struct cvmx_npi_comp_ctl_s { +u64 reserved_10_63 :54 ; +u64 pctl :5 ; +u64 nctl :5 ; + } s; +struct cvmx_npi_comp_ctl_s cn50xx; +struct cvmx_npi_comp_ctl_s cn58xx; +struct cvmx_npi_comp_ctl_s cn58xxp1; +}; + +typedef union cvmx_npi_comp_ctl cvmx_npi_comp_ctl_t ; + +/** +* cvmx_npi_ctl_status +* +* NPI_CTL_STATUS = NPI's Control Status Register +* +* Contains control ans status for NPI. +* Writes to this register are not ordered with writes/reads to the PCI Memory space. +* To ensure that a write has completed the user must read the register before +* making an access(i.e. PCI memory space) that requires the value of this register to be updated. +*/ +union cvmx_npi_ctl_status { +u64 u64; +struct cvmx_npi_ctl_status_s { +u64 reserved_63_63 :1 ; +u64 chip_rev :8 ; +u64 dis_pniw :1 ; +u64 out3_enb :1 ; +u64 out2_enb :1 ; +u64 out1_enb :1 ; +u64 out0_enb :1 ; +u64 ins3_enb :1 ; +u64 ins2_enb :1 ; +u64 ins1_enb :1 ; +u64 ins0_enb :1 ; +u64 ins3_64b :1 ; +u64 ins2_64b :1 ; +u64 ins1_64b :1 ; +u64 ins0_64b :1 ; +u64 pci_wdis :1 ; +u64 wait_com :1 ; +u64 reserved_37_39 :3 ; +u64 max_word :5 ; +u64 reserved_10_31 :22 ; +u64 timer :10 ; + } s; +struct cvmx_npi_ctl_status_cn30xx { +u64 reserved_63_63 :1 ; +u64 chip_rev :8 ; +u64 dis_pniw :1 ; +u64 reserved_51_53 :3 ; +u64 out0_enb :1 ; +u64 reserved_47_49 :3 ; +u64 ins0_enb :1 ; +u64 reserved_43_45 :3 ; +u64 ins0_64b :1 ; +u64 pci_wdis :1 ; +u64 wait_com :1 ; +u64 reserved_37_39 :3 ; +u64 max_word :5 ; +u64 reserved_10_31 :22 ; +u64 timer :10 ; + } cn30xx; +struct cvmx_npi_ctl_status_cn31xx { +u64 reserved_63_63 :1 ; +u64 chip_rev :8 ; +u64 dis_pniw :1 ; +u64 reserved_52_53 :2 ; +u64 out1_enb :1 ; +u64 out0_enb :1 ; +u64 reserved_48_49 :2 ; +u64 ins1_enb :1 ; +u64 ins0_enb :1 ; +u64 reserved_44_45 :2 ; +u64 ins1_64b :1 ; +u64 ins0_64b :1 ; +u64 pci_wdis :1 ; +u64 wait_com :1 ; +u64 reserved_37_39 :3 ; +u64 max_word :5 ; +u64 reserved_10_31 :22 ; +u64 timer :10 ; + } cn31xx; +struct cvmx_npi_ctl_status_s cn38xx; +struct cvmx_npi_ctl_status_s cn38xxp2; +struct cvmx_npi_ctl_status_cn31xx cn50xx; +struct cvmx_npi_ctl_status_s cn58xx; +struct cvmx_npi_ctl_status_s cn58xxp1; +}; + +typedef union cvmx_npi_ctl_status cvmx_npi_ctl_status_t ; + +/** +* cvmx_npi_dbg_select +* +* NPI_DBG_SELECT = Debug Select Register +* +* Contains the debug select value in last written to the RSLs. +*/ +union cvmx_npi_dbg_select { +u64 u64; +struct cvmx_npi_dbg_select_s { +u64 reserved_16_63 :48 ; +u64 dbg_sel :16 ; + } s; +struct cvmx_npi_dbg_select_s cn30xx; +struct cvmx_npi_dbg_select_s cn31xx; +struct cvmx_npi_dbg_select_s cn38xx; +struct cvmx_npi_dbg_select_s cn38xxp2; +struct cvmx_npi_dbg_select_s cn50xx; +struct cvmx_npi_dbg_select_s cn58xx; +struct cvmx_npi_dbg_select_s cn58xxp1; +}; + +typedef union cvmx_npi_dbg_select cvmx_npi_dbg_select_t ; + +/** +* cvmx_npi_dma_control +* +* NPI_DMA_CONTROL = DMA Control Register +* +* Controls operation of the DMA IN/OUT of the NPI. +*/ +union cvmx_npi_dma_control { +u64 u64; +struct cvmx_npi_dma_control_s { +u64 reserved_36_63 :28 ; +u64 b0_lend :1 ; +u64 dwb_denb :1 ; +u64 dwb_ichk :9 ; +u64 fpa_que :3 ; +u64 o_add1 :1 ; +u64 o_ro :1 ; +u64 o_ns :1 ; +u64 o_es :2 ; +u64 o_mode :1 ; +u64 hp_enb :1 ; +u64 lp_enb :1 ; +u64 csize :14 ; + } s; +struct cvmx_npi_dma_control_s cn30xx; +struct cvmx_npi_dma_control_s cn31xx; +struct cvmx_npi_dma_control_s cn38xx; +struct cvmx_npi_dma_control_s cn38xxp2; +struct cvmx_npi_dma_control_s cn50xx; +struct cvmx_npi_dma_control_s cn58xx; +struct cvmx_npi_dma_control_s cn58xxp1; +}; + +typedef union cvmx_npi_dma_control cvmx_npi_dma_control_t ; + +/** +* cvmx_npi_dma_highp_counts +* +* NPI_DMA_HIGHP_COUNTS = NPI's High Priority DMA Counts +* +* Values for determing the number of instructions for High Priority DMA in the NPI. +*/ +union cvmx_npi_dma_highp_counts { +u64 u64; +struct cvmx_npi_dma_highp_counts_s { +u64 reserved_39_63 :25 ; +u64 fcnt :7 ; +u64 dbell :32 ; + } s; +struct cvmx_npi_dma_highp_counts_s cn30xx; +struct cvmx_npi_dma_highp_counts_s cn31xx; +struct cvmx_npi_dma_highp_counts_s cn38xx; +struct cvmx_npi_dma_highp_counts_s cn38xxp2; +struct cvmx_npi_dma_highp_counts_s cn50xx; +struct cvmx_npi_dma_highp_counts_s cn58xx; +struct cvmx_npi_dma_highp_counts_s cn58xxp1; +}; + +typedef union cvmx_npi_dma_highp_counts cvmx_npi_dma_highp_counts_t ; + +/** +* cvmx_npi_dma_highp_naddr +* +* NPI_DMA_HIGHP_NADDR = NPI's High Priority DMA Next Ichunk Address +* +* Place NPI will read the next Ichunk data from. This is valid when state is 0 +*/ +union cvmx_npi_dma_highp_naddr { +u64 u64; +struct cvmx_npi_dma_highp_naddr_s { +u64 reserved_40_63 :24 ; +u64 state :4 ; +u64 addr :36 ; + } s; +struct cvmx_npi_dma_highp_naddr_s cn30xx; +struct cvmx_npi_dma_highp_naddr_s cn31xx; +struct cvmx_npi_dma_highp_naddr_s cn38xx; +struct cvmx_npi_dma_highp_naddr_s cn38xxp2; +struct cvmx_npi_dma_highp_naddr_s cn50xx; +struct cvmx_npi_dma_highp_naddr_s cn58xx; +struct cvmx_npi_dma_highp_naddr_s cn58xxp1; +}; + +typedef union cvmx_npi_dma_highp_naddr cvmx_npi_dma_highp_naddr_t ; + +/** +* cvmx_npi_dma_lowp_counts +* +* NPI_DMA_LOWP_COUNTS = NPI's Low Priority DMA Counts +* +* Values for determing the number of instructions for Low Priority DMA in the NPI. +*/ +union cvmx_npi_dma_lowp_counts { +u64 u64; +struct cvmx_npi_dma_lowp_counts_s { +u64 reserved_39_63 :25 ; +u64 fcnt :7 ; +u64 dbell :32 ; + } s; +struct cvmx_npi_dma_lowp_counts_s cn30xx; +struct cvmx_npi_dma_lowp_counts_s cn31xx; +struct cvmx_npi_dma_lowp_counts_s cn38xx; +struct cvmx_npi_dma_lowp_counts_s cn38xxp2; +struct cvmx_npi_dma_lowp_counts_s cn50xx; +struct cvmx_npi_dma_lowp_counts_s cn58xx; +struct cvmx_npi_dma_lowp_counts_s cn58xxp1; +}; + +typedef union cvmx_npi_dma_lowp_counts cvmx_npi_dma_lowp_counts_t ; + +/** +* cvmx_npi_dma_lowp_naddr +* +* NPI_DMA_LOWP_NADDR = NPI's Low Priority DMA Next Ichunk Address +* +* Place NPI will read the next Ichunk data from. This is valid when state is 0 +*/ +union cvmx_npi_dma_lowp_naddr { +u64 u64; +struct cvmx_npi_dma_lowp_naddr_s { +u64 reserved_40_63 :24 ; +u64 state :4 ; +u64 addr :36 ; + } s; +struct cvmx_npi_dma_lowp_naddr_s cn30xx; +struct cvmx_npi_dma_lowp_naddr_s cn31xx; +struct cvmx_npi_dma_lowp_naddr_s cn38xx; +struct cvmx_npi_dma_lowp_naddr_s cn38xxp2; +struct cvmx_npi_dma_lowp_naddr_s cn50xx; +struct cvmx_npi_dma_lowp_naddr_s cn58xx; +struct cvmx_npi_dma_lowp_naddr_s cn58xxp1; +}; + +typedef union cvmx_npi_dma_lowp_naddr cvmx_npi_dma_lowp_naddr_t ; + +/** +* cvmx_npi_highp_dbell +* +* NPI_HIGHP_DBELL = High Priority Door Bell +* +* The door bell register for the high priority DMA queue. +*/ +union cvmx_npi_highp_dbell { +u64 u64; +struct cvmx_npi_highp_dbell_s { +u64 reserved_16_63 :48 ; +u64 dbell :16 ; + } s; +struct cvmx_npi_highp_dbell_s cn30xx; +struct cvmx_npi_highp_dbell_s cn31xx; +struct cvmx_npi_highp_dbell_s cn38xx; +struct cvmx_npi_highp_dbell_s cn38xxp2; +struct cvmx_npi_highp_dbell_s cn50xx; +struct cvmx_npi_highp_dbell_s cn58xx; +struct cvmx_npi_highp_dbell_s cn58xxp1; +}; + +typedef union cvmx_npi_highp_dbell cvmx_npi_highp_dbell_t ; + +/** +* cvmx_npi_highp_ibuff_saddr +* +* NPI_HIGHP_IBUFF_SADDR = DMA High Priority Instruction Buffer Starting Address +* +* The address to start reading Instructions from for HIGHP. +*/ +union cvmx_npi_highp_ibuff_saddr { +u64 u64; +struct cvmx_npi_highp_ibuff_saddr_s { +u64 reserved_36_63 :28 ; +u64 saddr :36 ; + } s; +struct cvmx_npi_highp_ibuff_saddr_s cn30xx; +struct cvmx_npi_highp_ibuff_saddr_s cn31xx; +struct cvmx_npi_highp_ibuff_saddr_s cn38xx; +struct cvmx_npi_highp_ibuff_saddr_s cn38xxp2; +struct cvmx_npi_highp_ibuff_saddr_s cn50xx; +struct cvmx_npi_highp_ibuff_saddr_s cn58xx; +struct cvmx_npi_highp_ibuff_saddr_s cn58xxp1; +}; + +typedef union cvmx_npi_highp_ibuff_saddr cvmx_npi_highp_ibuff_saddr_t ; + +/** +* cvmx_npi_input_control +* +* NPI_INPUT_CONTROL = NPI's Input Control Register +* +* Control for reads for gather list and instructions. +*/ +union cvmx_npi_input_control { +u64 u64; +struct cvmx_npi_input_control_s { +u64 reserved_23_63 :41 ; +u64 pkt_rr :1 ; +u64 pbp_dhi :13 ; +u64 d_nsr :1 ; +u64 d_esr :2 ; +u64 d_ror :1 ; +u64 use_csr :1 ; +u64 nsr :1 ; +u64 esr :2 ; +u64 ror :1 ; + } s; +struct cvmx_npi_input_control_cn30xx { +u64 reserved_22_63 :42 ; +u64 pbp_dhi :13 ; +u64 d_nsr :1 ; +u64 d_esr :2 ; +u64 d_ror :1 ; +u64 use_csr :1 ; +u64 nsr :1 ; +u64 esr :2 ; +u64 ror :1 ; + } cn30xx; +struct cvmx_npi_input_control_cn30xx cn31xx; +struct cvmx_npi_input_control_s cn38xx; +struct cvmx_npi_input_control_cn30xx cn38xxp2; +struct cvmx_npi_input_control_s cn50xx; +struct cvmx_npi_input_control_s cn58xx; +struct cvmx_npi_input_control_s cn58xxp1; +}; + +typedef union cvmx_npi_input_control cvmx_npi_input_control_t ; + +/** +* cvmx_npi_int_enb +* +* NPI_INTERRUPT_ENB = NPI's Interrupt Enable Register +* +* Used to enable the various interrupting conditions of NPI +*/ +union cvmx_npi_int_enb { +u64 u64; +struct cvmx_npi_int_enb_s { +u64 reserved_62_63 :2 ; +u64 q1_a_f :1 ; +u64 q1_s_e :1 ; +u64 pdf_p_f :1 ; +u64 pdf_p_e :1 ; +u64 pcf_p_f :1 ; +u64 pcf_p_e :1 ; +u64 rdx_s_e :1 ; +u64 rwx_s_e :1 ; +u64 pnc_a_f :1 ; +u64 pnc_s_e :1 ; +u64 com_a_f :1 ; +u64 com_s_e :1 ; +u64 q3_a_f :1 ; +u64 q3_s_e :1 ; +u64 q2_a_f :1 ; +u64 q2_s_e :1 ; +u64 pcr_a_f :1 ; +u64 pcr_s_e :1 ; +u64 fcr_a_f :1 ; +u64 fcr_s_e :1 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 i3_pperr :1 ; +u64 i2_pperr :1 ; +u64 i1_pperr :1 ; +u64 i0_pperr :1 ; +u64 p3_ptout :1 ; +u64 p2_ptout :1 ; +u64 p1_ptout :1 ; +u64 p0_ptout :1 ; +u64 p3_pperr :1 ; +u64 p2_pperr :1 ; +u64 p1_pperr :1 ; +u64 p0_pperr :1 ; +u64 g3_rtout :1 ; +u64 g2_rtout :1 ; +u64 g1_rtout :1 ; +u64 g0_rtout :1 ; +u64 p3_perr :1 ; +u64 p2_perr :1 ; +u64 p1_perr :1 ; +u64 p0_perr :1 ; +u64 p3_rtout :1 ; +u64 p2_rtout :1 ; +u64 p1_rtout :1 ; +u64 p0_rtout :1 ; +u64 i3_overf :1 ; +u64 i2_overf :1 ; +u64 i1_overf :1 ; +u64 i0_overf :1 ; +u64 i3_rtout :1 ; +u64 i2_rtout :1 ; +u64 i1_rtout :1 ; +u64 i0_rtout :1 ; +u64 po3_2sml :1 ; +u64 po2_2sml :1 ; +u64 po1_2sml :1 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } s; +struct cvmx_npi_int_enb_cn30xx { +u64 reserved_62_63 :2 ; +u64 q1_a_f :1 ; +u64 q1_s_e :1 ; +u64 pdf_p_f :1 ; +u64 pdf_p_e :1 ; +u64 pcf_p_f :1 ; +u64 pcf_p_e :1 ; +u64 rdx_s_e :1 ; +u64 rwx_s_e :1 ; +u64 pnc_a_f :1 ; +u64 pnc_s_e :1 ; +u64 com_a_f :1 ; +u64 com_s_e :1 ; +u64 q3_a_f :1 ; +u64 q3_s_e :1 ; +u64 q2_a_f :1 ; +u64 q2_s_e :1 ; +u64 pcr_a_f :1 ; +u64 pcr_s_e :1 ; +u64 fcr_a_f :1 ; +u64 fcr_s_e :1 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 reserved_36_38 :3 ; +u64 i0_pperr :1 ; +u64 reserved_32_34 :3 ; +u64 p0_ptout :1 ; +u64 reserved_28_30 :3 ; +u64 p0_pperr :1 ; +u64 reserved_24_26 :3 ; +u64 g0_rtout :1 ; +u64 reserved_20_22 :3 ; +u64 p0_perr :1 ; +u64 reserved_16_18 :3 ; +u64 p0_rtout :1 ; +u64 reserved_12_14 :3 ; +u64 i0_overf :1 ; +u64 reserved_8_10 :3 ; +u64 i0_rtout :1 ; +u64 reserved_4_6 :3 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } cn30xx; +struct cvmx_npi_int_enb_cn31xx { +u64 reserved_62_63 :2 ; +u64 q1_a_f :1 ; +u64 q1_s_e :1 ; +u64 pdf_p_f :1 ; +u64 pdf_p_e :1 ; +u64 pcf_p_f :1 ; +u64 pcf_p_e :1 ; +u64 rdx_s_e :1 ; +u64 rwx_s_e :1 ; +u64 pnc_a_f :1 ; +u64 pnc_s_e :1 ; +u64 com_a_f :1 ; +u64 com_s_e :1 ; +u64 q3_a_f :1 ; +u64 q3_s_e :1 ; +u64 q2_a_f :1 ; +u64 q2_s_e :1 ; +u64 pcr_a_f :1 ; +u64 pcr_s_e :1 ; +u64 fcr_a_f :1 ; +u64 fcr_s_e :1 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 reserved_37_38 :2 ; +u64 i1_pperr :1 ; +u64 i0_pperr :1 ; +u64 reserved_33_34 :2 ; +u64 p1_ptout :1 ; +u64 p0_ptout :1 ; +u64 reserved_29_30 :2 ; +u64 p1_pperr :1 ; +u64 p0_pperr :1 ; +u64 reserved_25_26 :2 ; +u64 g1_rtout :1 ; +u64 g0_rtout :1 ; +u64 reserved_21_22 :2 ; +u64 p1_perr :1 ; +u64 p0_perr :1 ; +u64 reserved_17_18 :2 ; +u64 p1_rtout :1 ; +u64 p0_rtout :1 ; +u64 reserved_13_14 :2 ; +u64 i1_overf :1 ; +u64 i0_overf :1 ; +u64 reserved_9_10 :2 ; +u64 i1_rtout :1 ; +u64 i0_rtout :1 ; +u64 reserved_5_6 :2 ; +u64 po1_2sml :1 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } cn31xx; +struct cvmx_npi_int_enb_s cn38xx; +struct cvmx_npi_int_enb_cn38xxp2 { +u64 reserved_42_63 :22 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 i3_pperr :1 ; +u64 i2_pperr :1 ; +u64 i1_pperr :1 ; +u64 i0_pperr :1 ; +u64 p3_ptout :1 ; +u64 p2_ptout :1 ; +u64 p1_ptout :1 ; +u64 p0_ptout :1 ; +u64 p3_pperr :1 ; +u64 p2_pperr :1 ; +u64 p1_pperr :1 ; +u64 p0_pperr :1 ; +u64 g3_rtout :1 ; +u64 g2_rtout :1 ; +u64 g1_rtout :1 ; +u64 g0_rtout :1 ; +u64 p3_perr :1 ; +u64 p2_perr :1 ; +u64 p1_perr :1 ; +u64 p0_perr :1 ; +u64 p3_rtout :1 ; +u64 p2_rtout :1 ; +u64 p1_rtout :1 ; +u64 p0_rtout :1 ; +u64 i3_overf :1 ; +u64 i2_overf :1 ; +u64 i1_overf :1 ; +u64 i0_overf :1 ; +u64 i3_rtout :1 ; +u64 i2_rtout :1 ; +u64 i1_rtout :1 ; +u64 i0_rtout :1 ; +u64 po3_2sml :1 ; +u64 po2_2sml :1 ; +u64 po1_2sml :1 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } cn38xxp2; +struct cvmx_npi_int_enb_cn31xx cn50xx; +struct cvmx_npi_int_enb_s cn58xx; +struct cvmx_npi_int_enb_s cn58xxp1; +}; + +typedef union cvmx_npi_int_enb cvmx_npi_int_enb_t ; + +/** +* cvmx_npi_int_sum +* +* NPI_INTERRUPT_SUM = NPI Interrupt Summary Register +* +* Set when an interrupt condition occurs, write '1' to clear. +*/ +union cvmx_npi_int_sum { +u64 u64; +struct cvmx_npi_int_sum_s { +u64 reserved_62_63 :2 ; +u64 q1_a_f :1 ; +u64 q1_s_e :1 ; +u64 pdf_p_f :1 ; +u64 pdf_p_e :1 ; +u64 pcf_p_f :1 ; +u64 pcf_p_e :1 ; +u64 rdx_s_e :1 ; +u64 rwx_s_e :1 ; +u64 pnc_a_f :1 ; +u64 pnc_s_e :1 ; +u64 com_a_f :1 ; +u64 com_s_e :1 ; +u64 q3_a_f :1 ; +u64 q3_s_e :1 ; +u64 q2_a_f :1 ; +u64 q2_s_e :1 ; +u64 pcr_a_f :1 ; +u64 pcr_s_e :1 ; +u64 fcr_a_f :1 ; +u64 fcr_s_e :1 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 i3_pperr :1 ; +u64 i2_pperr :1 ; +u64 i1_pperr :1 ; +u64 i0_pperr :1 ; +u64 p3_ptout :1 ; +u64 p2_ptout :1 ; +u64 p1_ptout :1 ; +u64 p0_ptout :1 ; +u64 p3_pperr :1 ; +u64 p2_pperr :1 ; +u64 p1_pperr :1 ; +u64 p0_pperr :1 ; +u64 g3_rtout :1 ; +u64 g2_rtout :1 ; +u64 g1_rtout :1 ; +u64 g0_rtout :1 ; +u64 p3_perr :1 ; +u64 p2_perr :1 ; +u64 p1_perr :1 ; +u64 p0_perr :1 ; +u64 p3_rtout :1 ; +u64 p2_rtout :1 ; +u64 p1_rtout :1 ; +u64 p0_rtout :1 ; +u64 i3_overf :1 ; +u64 i2_overf :1 ; +u64 i1_overf :1 ; +u64 i0_overf :1 ; +u64 i3_rtout :1 ; +u64 i2_rtout :1 ; +u64 i1_rtout :1 ; +u64 i0_rtout :1 ; +u64 po3_2sml :1 ; +u64 po2_2sml :1 ; +u64 po1_2sml :1 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } s; +struct cvmx_npi_int_sum_cn30xx { +u64 reserved_62_63 :2 ; +u64 q1_a_f :1 ; +u64 q1_s_e :1 ; +u64 pdf_p_f :1 ; +u64 pdf_p_e :1 ; +u64 pcf_p_f :1 ; +u64 pcf_p_e :1 ; +u64 rdx_s_e :1 ; +u64 rwx_s_e :1 ; +u64 pnc_a_f :1 ; +u64 pnc_s_e :1 ; +u64 com_a_f :1 ; +u64 com_s_e :1 ; +u64 q3_a_f :1 ; +u64 q3_s_e :1 ; +u64 q2_a_f :1 ; +u64 q2_s_e :1 ; +u64 pcr_a_f :1 ; +u64 pcr_s_e :1 ; +u64 fcr_a_f :1 ; +u64 fcr_s_e :1 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 reserved_36_38 :3 ; +u64 i0_pperr :1 ; +u64 reserved_32_34 :3 ; +u64 p0_ptout :1 ; +u64 reserved_28_30 :3 ; +u64 p0_pperr :1 ; +u64 reserved_24_26 :3 ; +u64 g0_rtout :1 ; +u64 reserved_20_22 :3 ; +u64 p0_perr :1 ; +u64 reserved_16_18 :3 ; +u64 p0_rtout :1 ; +u64 reserved_12_14 :3 ; +u64 i0_overf :1 ; +u64 reserved_8_10 :3 ; +u64 i0_rtout :1 ; +u64 reserved_4_6 :3 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } cn30xx; +struct cvmx_npi_int_sum_cn31xx { +u64 reserved_62_63 :2 ; +u64 q1_a_f :1 ; +u64 q1_s_e :1 ; +u64 pdf_p_f :1 ; +u64 pdf_p_e :1 ; +u64 pcf_p_f :1 ; +u64 pcf_p_e :1 ; +u64 rdx_s_e :1 ; +u64 rwx_s_e :1 ; +u64 pnc_a_f :1 ; +u64 pnc_s_e :1 ; +u64 com_a_f :1 ; +u64 com_s_e :1 ; +u64 q3_a_f :1 ; +u64 q3_s_e :1 ; +u64 q2_a_f :1 ; +u64 q2_s_e :1 ; +u64 pcr_a_f :1 ; +u64 pcr_s_e :1 ; +u64 fcr_a_f :1 ; +u64 fcr_s_e :1 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 reserved_37_38 :2 ; +u64 i1_pperr :1 ; +u64 i0_pperr :1 ; +u64 reserved_33_34 :2 ; +u64 p1_ptout :1 ; +u64 p0_ptout :1 ; +u64 reserved_29_30 :2 ; +u64 p1_pperr :1 ; +u64 p0_pperr :1 ; +u64 reserved_25_26 :2 ; +u64 g1_rtout :1 ; +u64 g0_rtout :1 ; +u64 reserved_21_22 :2 ; +u64 p1_perr :1 ; +u64 p0_perr :1 ; +u64 reserved_17_18 :2 ; +u64 p1_rtout :1 ; +u64 p0_rtout :1 ; +u64 reserved_13_14 :2 ; +u64 i1_overf :1 ; +u64 i0_overf :1 ; +u64 reserved_9_10 :2 ; +u64 i1_rtout :1 ; +u64 i0_rtout :1 ; +u64 reserved_5_6 :2 ; +u64 po1_2sml :1 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } cn31xx; +struct cvmx_npi_int_sum_s cn38xx; +struct cvmx_npi_int_sum_cn38xxp2 { +u64 reserved_42_63 :22 ; +u64 iobdma :1 ; +u64 p_dperr :1 ; +u64 win_rto :1 ; +u64 i3_pperr :1 ; +u64 i2_pperr :1 ; +u64 i1_pperr :1 ; +u64 i0_pperr :1 ; +u64 p3_ptout :1 ; +u64 p2_ptout :1 ; +u64 p1_ptout :1 ; +u64 p0_ptout :1 ; +u64 p3_pperr :1 ; +u64 p2_pperr :1 ; +u64 p1_pperr :1 ; +u64 p0_pperr :1 ; +u64 g3_rtout :1 ; +u64 g2_rtout :1 ; +u64 g1_rtout :1 ; +u64 g0_rtout :1 ; +u64 p3_perr :1 ; +u64 p2_perr :1 ; +u64 p1_perr :1 ; +u64 p0_perr :1 ; +u64 p3_rtout :1 ; +u64 p2_rtout :1 ; +u64 p1_rtout :1 ; +u64 p0_rtout :1 ; +u64 i3_overf :1 ; +u64 i2_overf :1 ; +u64 i1_overf :1 ; +u64 i0_overf :1 ; +u64 i3_rtout :1 ; +u64 i2_rtout :1 ; +u64 i1_rtout :1 ; +u64 i0_rtout :1 ; +u64 po3_2sml :1 ; +u64 po2_2sml :1 ; +u64 po1_2sml :1 ; +u64 po0_2sml :1 ; +u64 pci_rsl :1 ; +u64 rml_wto :1 ; +u64 rml_rto :1 ; + } cn38xxp2; +struct cvmx_npi_int_sum_cn31xx cn50xx; +struct cvmx_npi_int_sum_s cn58xx; +struct cvmx_npi_int_sum_s cn58xxp1; +}; + +typedef union cvmx_npi_int_sum cvmx_npi_int_sum_t ; + +/** +* cvmx_npi_lowp_dbell +* +* NPI_LOWP_DBELL = Low Priority Door Bell +* +* The door bell register for the low priority DMA queue. +*/ +union cvmx_npi_lowp_dbell { +u64 u64; +struct cvmx_npi_lowp_dbell_s { +u64 reserved_16_63 :48 ; +u64 dbell :16 ; + } s; +struct cvmx_npi_lowp_dbell_s cn30xx; +struct cvmx_npi_lowp_dbell_s cn31xx; +struct cvmx_npi_lowp_dbell_s cn38xx; +struct cvmx_npi_lowp_dbell_s cn38xxp2; +struct cvmx_npi_lowp_dbell_s cn50xx; +struct cvmx_npi_lowp_dbell_s cn58xx; +struct cvmx_npi_lowp_dbell_s cn58xxp1; +}; + +typedef union cvmx_npi_lowp_dbell cvmx_npi_lowp_dbell_t ; + +/** +* cvmx_npi_lowp_ibuff_saddr +* +* NPI_LOWP_IBUFF_SADDR = DMA Low Priority's Instruction Buffer Starting Address +* +* The address to start reading Instructions from for LOWP. +*/ +union cvmx_npi_lowp_ibuff_saddr { +u64 u64; +struct cvmx_npi_lowp_ibuff_saddr_s { +u64 reserved_36_63 :28 ; +u64 saddr :36 ; + } s; +struct cvmx_npi_lowp_ibuff_saddr_s cn30xx; +struct cvmx_npi_lowp_ibuff_saddr_s cn31xx; +struct cvmx_npi_lowp_ibuff_saddr_s cn38xx; +struct cvmx_npi_lowp_ibuff_saddr_s cn38xxp2; +struct cvmx_npi_lowp_ibuff_saddr_s cn50xx; +struct cvmx_npi_lowp_ibuff_saddr_s cn58xx; +struct cvmx_npi_lowp_ibuff_saddr_s cn58xxp1; +}; + +typedef union cvmx_npi_lowp_ibuff_saddr cvmx_npi_lowp_ibuff_saddr_t ; + +/** +* cvmx_npi_mem_access_subid# +* +* NPI_MEM_ACCESS_SUBID3 = Memory Access SubId 3Register +* +* Carries Read/Write parameters for PP access to PCI memory that use NPI SubId3. +* Writes to this register are not ordered with writes/reads to the PCI Memory space. +* To ensure that a write has completed the user must read the register before +* making an access(i.e. PCI memory space) that requires the value of this register to be updated. +*/ +union cvmx_npi_mem_access_subidx { +u64 u64; +struct cvmx_npi_mem_access_subidx_s { +u64 reserved_38_63 :26 ; +u64 shortl :1 ; +u64 nmerge :1 ; +u64 esr :2 ; +u64 esw :2 ; +u64 nsr :1 ; +u64 nsw :1 ; +u64 ror :1 ; +u64 row :1 ; +u64 ba :28 ; + } s; +struct cvmx_npi_mem_access_subidx_s cn30xx; +struct cvmx_npi_mem_access_subidx_cn31xx { +u64 reserved_36_63 :28 ; +u64 esr :2 ; +u64 esw :2 ; +u64 nsr :1 ; +u64 nsw :1 ; +u64 ror :1 ; +u64 row :1 ; +u64 ba :28 ; + } cn31xx; +struct cvmx_npi_mem_access_subidx_s cn38xx; +struct cvmx_npi_mem_access_subidx_cn31xx cn38xxp2; +struct cvmx_npi_mem_access_subidx_s cn50xx; +struct cvmx_npi_mem_access_subidx_s cn58xx; +struct cvmx_npi_mem_access_subidx_s cn58xxp1; +}; + +typedef union cvmx_npi_mem_access_subidx cvmx_npi_mem_access_subidx_t ; + +/** +* cvmx_npi_msi_rcv +* +* NPI_MSI_RCV = NPI MSI Receive Vector Register +* +* A bit is set in this register relative to the vector received during a MSI. And cleared by a W1 to the register. +*/ +union cvmx_npi_msi_rcv { +u64 u64; +struct cvmx_npi_msi_rcv_s { +u64 int_vec :64 ; + } s; +struct cvmx_npi_msi_rcv_s cn30xx; +struct cvmx_npi_msi_rcv_s cn31xx; +struct cvmx_npi_msi_rcv_s cn38xx; +struct cvmx_npi_msi_rcv_s cn38xxp2; +struct cvmx_npi_msi_rcv_s cn50xx; +struct cvmx_npi_msi_rcv_s cn58xx; +struct cvmx_npi_msi_rcv_s cn58xxp1; +}; + +typedef union cvmx_npi_msi_rcv cvmx_npi_msi_rcv_t ; + +/** +* cvmx_npi_num_desc_output# +* +* NUM_DESC_OUTPUT0 = Number Of Descriptors Available For Output 0 +* +* The size of the Buffer/Info Pointer Pair ring for Output-0. +*/ +union cvmx_npi_num_desc_outputx { +u64 u64; +struct cvmx_npi_num_desc_outputx_s { +u64 reserved_32_63 :32 ; +u64 size :32 ; + } s; +struct cvmx_npi_num_desc_outputx_s cn30xx; +struct cvmx_npi_num_desc_outputx_s cn31xx; +struct cvmx_npi_num_desc_outputx_s cn38xx; +struct cvmx_npi_num_desc_outputx_s cn38xxp2; +struct cvmx_npi_num_desc_outputx_s cn50xx; +struct cvmx_npi_num_desc_outputx_s cn58xx; +struct cvmx_npi_num_desc_outputx_s cn58xxp1; +}; + +typedef union cvmx_npi_num_desc_outputx cvmx_npi_num_desc_outputx_t ; + +/** +* cvmx_npi_output_control +* +* NPI_OUTPUT_CONTROL = NPI's Output Control Register +* +* The address to start reading Instructions from for Output-3. +*/ +union cvmx_npi_output_control { +u64 u64; +struct cvmx_npi_output_control_s { +u64 reserved_49_63 :15 ; +u64 pkt_rr :1 ; +u64 p3_bmode :1 ; +u64 p2_bmode :1 ; +u64 p1_bmode :1 ; +u64 p0_bmode :1 ; +u64 o3_es :2 ; +u64 o3_ns :1 ; +u64 o3_ro :1 ; +u64 o2_es :2 ; +u64 o2_ns :1 ; +u64 o2_ro :1 ; +u64 o1_es :2 ; +u64 o1_ns :1 ; +u64 o1_ro :1 ; +u64 o0_es :2 ; +u64 o0_ns :1 ; +u64 o0_ro :1 ; +u64 o3_csrm :1 ; +u64 o2_csrm :1 ; +u64 o1_csrm :1 ; +u64 o0_csrm :1 ; +u64 reserved_20_23 :4 ; +u64 iptr_o3 :1 ; +u64 iptr_o2 :1 ; +u64 iptr_o1 :1 ; +u64 iptr_o0 :1 ; +u64 esr_sl3 :2 ; +u64 nsr_sl3 :1 ; +u64 ror_sl3 :1 ; +u64 esr_sl2 :2 ; +u64 nsr_sl2 :1 ; +u64 ror_sl2 :1 ; +u64 esr_sl1 :2 ; +u64 nsr_sl1 :1 ; +u64 ror_sl1 :1 ; +u64 esr_sl0 :2 ; +u64 nsr_sl0 :1 ; +u64 ror_sl0 :1 ; + } s; +struct cvmx_npi_output_control_cn30xx { +u64 reserved_45_63 :19 ; +u64 p0_bmode :1 ; +u64 reserved_32_43 :12 ; +u64 o0_es :2 ; +u64 o0_ns :1 ; +u64 o0_ro :1 ; +u64 reserved_25_27 :3 ; +u64 o0_csrm :1 ; +u64 reserved_17_23 :7 ; +u64 iptr_o0 :1 ; +u64 reserved_4_15 :12 ; +u64 esr_sl0 :2 ; +u64 nsr_sl0 :1 ; +u64 ror_sl0 :1 ; + } cn30xx; +struct cvmx_npi_output_control_cn31xx { +u64 reserved_46_63 :18 ; +u64 p1_bmode :1 ; +u64 p0_bmode :1 ; +u64 reserved_36_43 :8 ; +u64 o1_es :2 ; +u64 o1_ns :1 ; +u64 o1_ro :1 ; +u64 o0_es :2 ; +u64 o0_ns :1 ; +u64 o0_ro :1 ; +u64 reserved_26_27 :2 ; +u64 o1_csrm :1 ; +u64 o0_csrm :1 ; +u64 reserved_18_23 :6 ; +u64 iptr_o1 :1 ; +u64 iptr_o0 :1 ; +u64 reserved_8_15 :8 ; +u64 esr_sl1 :2 ; +u64 nsr_sl1 :1 ; +u64 ror_sl1 :1 ; +u64 esr_sl0 :2 ; +u64 nsr_sl0 :1 ; +u64 ror_sl0 :1 ; + } cn31xx; +struct cvmx_npi_output_control_s cn38xx; +struct cvmx_npi_output_control_cn38xxp2 { +u64 reserved_48_63 :16 ; +u64 p3_bmode :1 ; +u64 p2_bmode :1 ; +u64 p1_bmode :1 ; +u64 p0_bmode :1 ; +u64 o3_es :2 ; +u64 o3_ns :1 ; +u64 o3_ro :1 ; +u64 o2_es :2 ; +u64 o2_ns :1 ; +u64 o2_ro :1 ; +u64 o1_es :2 ; +u64 o1_ns :1 ; +u64 o1_ro :1 ; +u64 o0_es :2 ; +u64 o0_ns :1 ; +u64 o0_ro :1 ; +u64 o3_csrm :1 ; +u64 o2_csrm :1 ; +u64 o1_csrm :1 ; +u64 o0_csrm :1 ; +u64 reserved_20_23 :4 ; +u64 iptr_o3 :1 ; +u64 iptr_o2 :1 ; +u64 iptr_o1 :1 ; +u64 iptr_o0 :1 ; +u64 esr_sl3 :2 ; +u64 nsr_sl3 :1 ; +u64 ror_sl3 :1 ; +u64 esr_sl2 :2 ; +u64 nsr_sl2 :1 ; +u64 ror_sl2 :1 ; +u64 esr_sl1 :2 ; +u64 nsr_sl1 :1 ; +u64 ror_sl1 :1 ; +u64 esr_sl0 :2 ; +u64 nsr_sl0 :1 ; +u64 ror_sl0 :1 ; + } cn38xxp2; +struct cvmx_npi_output_control_cn50xx { +u64 reserved_49_63 :15 ; +u64 pkt_rr :1 ; +u64 reserved_46_47 :2 ; +u64 p1_bmode :1 ; +u64 p0_bmode :1 ; +u64 reserved_36_43 :8 ; +u64 o1_es :2 ; +u64 o1_ns :1 ; +u64 o1_ro :1 ; +u64 o0_es :2 ; +u64 o0_ns :1 ; +u64 o0_ro :1 ; +u64 reserved_26_27 :2 ; +u64 o1_csrm :1 ; +u64 o0_csrm :1 ; +u64 reserved_18_23 :6 ; +u64 iptr_o1 :1 ; +u64 iptr_o0 :1 ; +u64 reserved_8_15 :8 ; +u64 esr_sl1 :2 ; +u64 nsr_sl1 :1 ; +u64 ror_sl1 :1 ; +u64 esr_sl0 :2 ; +u64 nsr_sl0 :1 ; +u64 ror_sl0 :1 ; + } cn50xx; +struct cvmx_npi_output_control_s cn58xx; +struct cvmx_npi_output_control_s cn58xxp1; +}; + +typedef union cvmx_npi_output_control cvmx_npi_output_control_t ; + +/** +* cvmx_npi_p#_dbpair_addr +* +* NPI_P0_DBPAIR_ADDR = NPI's Port-0 DATA-BUFFER Pair Next Read Address. +* +* Contains the next address to read for Port's-0 Data/Buffer Pair. +*/ +union cvmx_npi_px_dbpair_addr { +u64 u64; +struct cvmx_npi_px_dbpair_addr_s { +u64 reserved_63_63 :1 ; +u64 state :2 ; +u64 naddr :61 ; + } s; +struct cvmx_npi_px_dbpair_addr_s cn30xx; +struct cvmx_npi_px_dbpair_addr_s cn31xx; +struct cvmx_npi_px_dbpair_addr_s cn38xx; +struct cvmx_npi_px_dbpair_addr_s cn38xxp2; +struct cvmx_npi_px_dbpair_addr_s cn50xx; +struct cvmx_npi_px_dbpair_addr_s cn58xx; +struct cvmx_npi_px_dbpair_addr_s cn58xxp1; +}; + +typedef union cvmx_npi_px_dbpair_addr cvmx_npi_px_dbpair_addr_t ; + +/** +* cvmx_npi_p#_instr_addr +* +* NPI_P0_INSTR_ADDR = NPI's Port-0 Instruction Next Read Address. +* +* Contains the next address to read for Port's-0 Instructions. +*/ +union cvmx_npi_px_instr_addr { +u64 u64; +struct cvmx_npi_px_instr_addr_s { +u64 state :3 ; +u64 naddr :61 ; + } s; +struct cvmx_npi_px_instr_addr_s cn30xx; +struct cvmx_npi_px_instr_addr_s cn31xx; +struct cvmx_npi_px_instr_addr_s cn38xx; +struct cvmx_npi_px_instr_addr_s cn38xxp2; +struct cvmx_npi_px_instr_addr_s cn50xx; +struct cvmx_npi_px_instr_addr_s cn58xx; +struct cvmx_npi_px_instr_addr_s cn58xxp1; +}; + +typedef union cvmx_npi_px_instr_addr cvmx_npi_px_instr_addr_t ; + +/** +* cvmx_npi_p#_instr_cnts +* +* NPI_P0_INSTR_CNTS = NPI's Port-0 Instruction Counts For Packets In. +* +* Used to determine the number of instruction in the NPI and to be fetched for Input-Packets. +*/ +union cvmx_npi_px_instr_cnts { +u64 u64; +struct cvmx_npi_px_instr_cnts_s { +u64 reserved_38_63 :26 ; +u64 fcnt :6 ; +u64 avail :32 ; + } s; +struct cvmx_npi_px_instr_cnts_s cn30xx; +struct cvmx_npi_px_instr_cnts_s cn31xx; +struct cvmx_npi_px_instr_cnts_s cn38xx; +struct cvmx_npi_px_instr_cnts_s cn38xxp2; +struct cvmx_npi_px_instr_cnts_s cn50xx; +struct cvmx_npi_px_instr_cnts_s cn58xx; +struct cvmx_npi_px_instr_cnts_s cn58xxp1; +}; + +typedef union cvmx_npi_px_instr_cnts cvmx_npi_px_instr_cnts_t ; + +/** +* cvmx_npi_p#_pair_cnts +* +* NPI_P0_PAIR_CNTS = NPI's Port-0 Instruction Counts For Packets Out. +* +* Used to determine the number of instruction in the NPI and to be fetched for Output-Packets. +*/ +union cvmx_npi_px_pair_cnts { +u64 u64; +struct cvmx_npi_px_pair_cnts_s { +u64 reserved_37_63 :27 ; +u64 fcnt :5 ; +u64 avail :32 ; + } s; +struct cvmx_npi_px_pair_cnts_s cn30xx; +struct cvmx_npi_px_pair_cnts_s cn31xx; +struct cvmx_npi_px_pair_cnts_s cn38xx; +struct cvmx_npi_px_pair_cnts_s cn38xxp2; +struct cvmx_npi_px_pair_cnts_s cn50xx; +struct cvmx_npi_px_pair_cnts_s cn58xx; +struct cvmx_npi_px_pair_cnts_s cn58xxp1; +}; + +typedef union cvmx_npi_px_pair_cnts cvmx_npi_px_pair_cnts_t ; + +/** +* cvmx_npi_pci_burst_size +* +* NPI_PCI_BURST_SIZE = NPI PCI Burst Size Register +* +* Control the number of words the NPI will attempt to read / write to/from the PCI. +*/ +union cvmx_npi_pci_burst_size { +u64 u64; +struct cvmx_npi_pci_burst_size_s { +u64 reserved_14_63 :50 ; +u64 wr_brst :7 ; +u64 rd_brst :7 ; + } s; +struct cvmx_npi_pci_burst_size_s cn30xx; +struct cvmx_npi_pci_burst_size_s cn31xx; +struct cvmx_npi_pci_burst_size_s cn38xx; +struct cvmx_npi_pci_burst_size_s cn38xxp2; +struct cvmx_npi_pci_burst_size_s cn50xx; +struct cvmx_npi_pci_burst_size_s cn58xx; +struct cvmx_npi_pci_burst_size_s cn58xxp1; +}; + +typedef union cvmx_npi_pci_burst_size cvmx_npi_pci_burst_size_t ; + +/** +* cvmx_npi_pci_int_arb_cfg +* +* NPI_PCI_INT_ARB_CFG = Configuration For PCI Arbiter +* +* Controls operation of the Internal PCI Arbiter. This register should +* only be written when PRST# is asserted. NPI_PCI_INT_ARB_CFG[EN] should +* only be set when Octane is a host. +*/ +union cvmx_npi_pci_int_arb_cfg { +u64 u64; +struct cvmx_npi_pci_int_arb_cfg_s { +u64 reserved_13_63 :51 ; +u64 hostmode :1 ; +u64 pci_ovr :4 ; +u64 reserved_5_7 :3 ; +u64 en :1 ; +u64 park_mod :1 ; +u64 park_dev :3 ; + } s; +struct cvmx_npi_pci_int_arb_cfg_cn30xx { +u64 reserved_5_63 :59 ; +u64 en :1 ; +u64 park_mod :1 ; +u64 park_dev :3 ; + } cn30xx; +struct cvmx_npi_pci_int_arb_cfg_cn30xx cn31xx; +struct cvmx_npi_pci_int_arb_cfg_cn30xx cn38xx; +struct cvmx_npi_pci_int_arb_cfg_cn30xx cn38xxp2; +struct cvmx_npi_pci_int_arb_cfg_s cn50xx; +struct cvmx_npi_pci_int_arb_cfg_s cn58xx; +struct cvmx_npi_pci_int_arb_cfg_s cn58xxp1; +}; + +typedef union cvmx_npi_pci_int_arb_cfg cvmx_npi_pci_int_arb_cfg_t ; + +/** +* cvmx_npi_pci_read_cmd +* +* NPI_PCI_READ_CMD = NPI PCI Read Command Register +* +* Controls the type of read command sent. +* Writes to this register are not ordered with writes/reads to the PCI Memory space. +* To ensure that a write has completed the user must read the register before +* making an access(i.e. PCI memory space) that requires the value of this register to be updated. +* Also any previously issued reads/writes to PCI memory space, still stored in the outbound +* FIFO will use the value of this register after it has been updated. +*/ +union cvmx_npi_pci_read_cmd { +u64 u64; +struct cvmx_npi_pci_read_cmd_s { +u64 reserved_11_63 :53 ; +u64 cmd_size :11 ; + } s; +struct cvmx_npi_pci_read_cmd_s cn30xx; +struct cvmx_npi_pci_read_cmd_s cn31xx; +struct cvmx_npi_pci_read_cmd_s cn38xx; +struct cvmx_npi_pci_read_cmd_s cn38xxp2; +struct cvmx_npi_pci_read_cmd_s cn50xx; +struct cvmx_npi_pci_read_cmd_s cn58xx; +struct cvmx_npi_pci_read_cmd_s cn58xxp1; +}; + +typedef union cvmx_npi_pci_read_cmd cvmx_npi_pci_read_cmd_t ; + +/** +* cvmx_npi_port32_instr_hdr +* +* NPI_PORT32_INSTR_HDR = NPI Port 32 Instruction Header +* +* Contains bits [62:42] of the Instruction Header for port 32. +*/ +union cvmx_npi_port32_instr_hdr { +u64 u64; +struct cvmx_npi_port32_instr_hdr_s { +u64 reserved_44_63 :20 ; +u64 pbp :1 ; +u64 rsv_f :5 ; +u64 rparmode :2 ; +u64 rsv_e :1 ; +u64 rskp_len :7 ; +u64 rsv_d :6 ; +u64 use_ihdr :1 ; +u64 rsv_c :5 ; +u64 par_mode :2 ; +u64 rsv_b :1 ; +u64 skp_len :7 ; +u64 rsv_a :6 ; + } s; +struct cvmx_npi_port32_instr_hdr_s cn30xx; +struct cvmx_npi_port32_instr_hdr_s cn31xx; +struct cvmx_npi_port32_instr_hdr_s cn38xx; +struct cvmx_npi_port32_instr_hdr_s cn38xxp2; +struct cvmx_npi_port32_instr_hdr_s cn50xx; +struct cvmx_npi_port32_instr_hdr_s cn58xx; +struct cvmx_npi_port32_instr_hdr_s cn58xxp1; +}; + +typedef union cvmx_npi_port32_instr_hdr cvmx_npi_port32_instr_hdr_t ; + +/** +* cvmx_npi_port33_instr_hdr +* +* NPI_PORT33_INSTR_HDR = NPI Port 33 Instruction Header +* +* Contains bits [62:42] of the Instruction Header for port 33. +*/ +union cvmx_npi_port33_instr_hdr { +u64 u64; +struct cvmx_npi_port33_instr_hdr_s { +u64 reserved_44_63 :20 ; +u64 pbp :1 ; +u64 rsv_f :5 ; +u64 rparmode :2 ; +u64 rsv_e :1 ; +u64 rskp_len :7 ; +u64 rsv_d :6 ; +u64 use_ihdr :1 ; +u64 rsv_c :5 ; +u64 par_mode :2 ; +u64 rsv_b :1 ; +u64 skp_len :7 ; +u64 rsv_a :6 ; + } s; +struct cvmx_npi_port33_instr_hdr_s cn31xx; +struct cvmx_npi_port33_instr_hdr_s cn38xx; +struct cvmx_npi_port33_instr_hdr_s cn38xxp2; +struct cvmx_npi_port33_instr_hdr_s cn50xx; +struct cvmx_npi_port33_instr_hdr_s cn58xx; +struct cvmx_npi_port33_instr_hdr_s cn58xxp1; +}; + +typedef union cvmx_npi_port33_instr_hdr cvmx_npi_port33_instr_hdr_t ; + +/** +* cvmx_npi_port34_instr_hdr +* +* NPI_PORT34_INSTR_HDR = NPI Port 34 Instruction Header +* +* Contains bits [62:42] of the Instruction Header for port 34. Added for PASS-2. +*/ +union cvmx_npi_port34_instr_hdr { +u64 u64; +struct cvmx_npi_port34_instr_hdr_s { +u64 reserved_44_63 :20 ; +u64 pbp :1 ; +u64 rsv_f :5 ; +u64 rparmode :2 ; +u64 rsv_e :1 ; +u64 rskp_len :7 ; +u64 rsv_d :6 ; +u64 use_ihdr :1 ; +u64 rsv_c :5 ; +u64 par_mode :2 ; +u64 rsv_b :1 ; +u64 skp_len :7 ; +u64 rsv_a :6 ; + } s; +struct cvmx_npi_port34_instr_hdr_s cn38xx; +struct cvmx_npi_port34_instr_hdr_s cn38xxp2; +struct cvmx_npi_port34_instr_hdr_s cn58xx; +struct cvmx_npi_port34_instr_hdr_s cn58xxp1; +}; + +typedef union cvmx_npi_port34_instr_hdr cvmx_npi_port34_instr_hdr_t ; + +/** +* cvmx_npi_port35_instr_hdr +* +* NPI_PORT35_INSTR_HDR = NPI Port 35 Instruction Header +* +* Contains bits [62:42] of the Instruction Header for port 35. Added for PASS-2. +*/ +union cvmx_npi_port35_instr_hdr { +u64 u64; +struct cvmx_npi_port35_instr_hdr_s { +u64 reserved_44_63 :20 ; +u64 pbp :1 ; +u64 rsv_f :5 ; +u64 rparmode :2 ; +u64 rsv_e :1 ; +u64 rskp_len :7 ; +u64 rsv_d :6 ; +u64 use_ihdr :1 ; +u64 rsv_c :5 ; +u64 par_mode :2 ; +u64 rsv_b :1 ; +u64 skp_len :7 ; +u64 rsv_a :6 ; + } s; +struct cvmx_npi_port35_instr_hdr_s cn38xx; +struct cvmx_npi_port35_instr_hdr_s cn38xxp2; +struct cvmx_npi_port35_instr_hdr_s cn58xx; +struct cvmx_npi_port35_instr_hdr_s cn58xxp1; +}; + +typedef union cvmx_npi_port35_instr_hdr cvmx_npi_port35_instr_hdr_t ; + +/** +* cvmx_npi_port_bp_control +* +* NPI_PORT_BP_CONTROL = Port Backpressure Control +* +* Enables Port Level Backpressure +*/ +union cvmx_npi_port_bp_control { +u64 u64; +struct cvmx_npi_port_bp_control_s { +u64 reserved_8_63 :56 ; +u64 bp_on :4 ; +u64 enb :4 ; + } s; +struct cvmx_npi_port_bp_control_s cn30xx; +struct cvmx_npi_port_bp_control_s cn31xx; +struct cvmx_npi_port_bp_control_s cn38xx; +struct cvmx_npi_port_bp_control_s cn38xxp2; +struct cvmx_npi_port_bp_control_s cn50xx; +struct cvmx_npi_port_bp_control_s cn58xx; +struct cvmx_npi_port_bp_control_s cn58xxp1; +}; + +typedef union cvmx_npi_port_bp_control cvmx_npi_port_bp_control_t ; + +/** +* cvmx_npi_rsl_int_blocks +* +* RSL_INT_BLOCKS = RSL Interrupt Blocks Register +* +* Reading this register will return a vector with a bit set '1' for a corresponding RSL block +* that presently has an interrupt pending. The Field Description below supplies the name of the +* register that software should read to find out why that intterupt bit is set. +*/ +union cvmx_npi_rsl_int_blocks { +u64 u64; +struct cvmx_npi_rsl_int_blocks_s { +u64 reserved_32_63 :32 ; +u64 rint_31 :1 ; +u64 iob :1 ; +u64 reserved_28_29 :2 ; +u64 rint_27 :1 ; +u64 rint_26 :1 ; +u64 rint_25 :1 ; +u64 rint_24 :1 ; +u64 asx1 :1 ; +u64 asx0 :1 ; +u64 rint_21 :1 ; +u64 pip :1 ; +u64 spx1 :1 ; +u64 spx0 :1 ; +u64 lmc :1 ; +u64 l2c :1 ; +u64 rint_15 :1 ; +u64 reserved_13_14 :2 ; +u64 pow :1 ; +u64 tim :1 ; +u64 pko :1 ; +u64 ipd :1 ; +u64 rint_8 :1 ; +u64 zip :1 ; +u64 dfa :1 ; +u64 fpa :1 ; +u64 key :1 ; +u64 npi :1 ; +u64 gmx1 :1 ; +u64 gmx0 :1 ; +u64 mio :1 ; + } s; +struct cvmx_npi_rsl_int_blocks_cn30xx { +u64 reserved_32_63 :32 ; +u64 rint_31 :1 ; +u64 iob :1 ; +u64 rint_29 :1 ; +u64 rint_28 :1 ; +u64 rint_27 :1 ; +u64 rint_26 :1 ; +u64 rint_25 :1 ; +u64 rint_24 :1 ; +u64 asx1 :1 ; +u64 asx0 :1 ; +u64 rint_21 :1 ; +u64 pip :1 ; +u64 spx1 :1 ; +u64 spx0 :1 ; +u64 lmc :1 ; +u64 l2c :1 ; +u64 rint_15 :1 ; +u64 rint_14 :1 ; +u64 usb :1 ; +u64 pow :1 ; +u64 tim :1 ; +u64 pko :1 ; +u64 ipd :1 ; +u64 rint_8 :1 ; +u64 zip :1 ; +u64 dfa :1 ; +u64 fpa :1 ; +u64 key :1 ; +u64 npi :1 ; +u64 gmx1 :1 ; +u64 gmx0 :1 ; +u64 mio :1 ; + } cn30xx; +struct cvmx_npi_rsl_int_blocks_cn30xx cn31xx; +struct cvmx_npi_rsl_int_blocks_cn38xx { +u64 reserved_32_63 :32 ; +u64 rint_31 :1 ; +u64 iob :1 ; +u64 rint_29 :1 ; +u64 rint_28 :1 ; +u64 rint_27 :1 ; +u64 rint_26 :1 ; +u64 rint_25 :1 ; +u64 rint_24 :1 ; +u64 asx1 :1 ; +u64 asx0 :1 ; +u64 rint_21 :1 ; +u64 pip :1 ; +u64 spx1 :1 ; +u64 spx0 :1 ; +u64 lmc :1 ; +u64 l2c :1 ; +u64 rint_15 :1 ; +u64 rint_14 :1 ; +u64 rint_13 :1 ; +u64 pow :1 ; +u64 tim :1 ; +u64 pko :1 ; +u64 ipd :1 ; +u64 rint_8 :1 ; +u64 zip :1 ; +u64 dfa :1 ; +u64 fpa :1 ; +u64 key :1 ; +u64 npi :1 ; +u64 gmx1 :1 ; +u64 gmx0 :1 ; +u64 mio :1 ; + } cn38xx; +struct cvmx_npi_rsl_int_blocks_cn38xx cn38xxp2; +struct cvmx_npi_rsl_int_blocks_cn50xx { +u64 reserved_31_63 :33 ; +u64 iob :1 ; +u64 lmc1 :1 ; +u64 agl :1 ; +u64 reserved_24_27 :4 ; +u64 asx1 :1 ; +u64 asx0 :1 ; +u64 reserved_21_21 :1 ; +u64 pip :1 ; +u64 spx1 :1 ; +u64 spx0 :1 ; +u64 lmc :1 ; +u64 l2c :1 ; +u64 reserved_15_15 :1 ; +u64 rad :1 ; +u64 usb :1 ; +u64 pow :1 ; +u64 tim :1 ; +u64 pko :1 ; +u64 ipd :1 ; +u64 reserved_8_8 :1 ; +u64 zip :1 ; +u64 dfa :1 ; +u64 fpa :1 ; +u64 key :1 ; +u64 npi :1 ; +u64 gmx1 :1 ; +u64 gmx0 :1 ; +u64 mio :1 ; + } cn50xx; +struct cvmx_npi_rsl_int_blocks_cn38xx cn58xx; +struct cvmx_npi_rsl_int_blocks_cn38xx cn58xxp1; +}; + +typedef union cvmx_npi_rsl_int_blocks cvmx_npi_rsl_int_blocks_t ; + +/** +* cvmx_npi_size_input# +* +* NPI_SIZE_INPUT0 = NPI's Size for Input 0 Register +* +* The size (in instructions) of Instruction Queue-0. +*/ +union cvmx_npi_size_inputx { +u64 u64; +struct cvmx_npi_size_inputx_s { +u64 reserved_32_63 :32 ; +u64 size :32 ; + } s; +struct cvmx_npi_size_inputx_s cn30xx; +struct cvmx_npi_size_inputx_s cn31xx; +struct cvmx_npi_size_inputx_s cn38xx; +struct cvmx_npi_size_inputx_s cn38xxp2; +struct cvmx_npi_size_inputx_s cn50xx; +struct cvmx_npi_size_inputx_s cn58xx; +struct cvmx_npi_size_inputx_s cn58xxp1; +}; + +typedef union cvmx_npi_size_inputx cvmx_npi_size_inputx_t ; + +/** +* cvmx_npi_win_read_to +* +* NPI_WIN_READ_TO = NPI WINDOW READ Timeout Register +* +* Number of core clocks to wait before timing out on a WINDOW-READ to the NCB. +*/ +union cvmx_npi_win_read_to { +u64 u64; +struct cvmx_npi_win_read_to_s { +u64 reserved_32_63 :32 ; +u64 time :32 ; + } s; +struct cvmx_npi_win_read_to_s cn30xx; +struct cvmx_npi_win_read_to_s cn31xx; +struct cvmx_npi_win_read_to_s cn38xx; +struct cvmx_npi_win_read_to_s cn38xxp2; +struct cvmx_npi_win_read_to_s cn50xx; +struct cvmx_npi_win_read_to_s cn58xx; +struct cvmx_npi_win_read_to_s cn58xxp1; +}; + +typedef union cvmx_npi_win_read_to cvmx_npi_win_read_to_t ; + +#endif
Signature · 1 line
2.29.2
PATCH 17/50 mips: octeon: Add cvmx-pcieepx-defs.h header file
In reply to Stefan RoeseFrom: Aaron Williams <[email protected]>
Import cvmx-pcieepx-defs.h header file from 2013 U-Boot. It will be used by the later added drivers to support PCIe and networking on the MIPS Octeon II / III platforms.
---
.../include/mach/cvmx-pcieepx-defs.h | 6848 +++++++++++++++++ 1 file changed, 6848 insertions(+) create mode 100644 arch/mips/mach-octeon/include/mach/cvmx-pcieepx-defs.h
arch/mips/mach-octeon/include/mach/cvmx-pcieepx-defs.h new file +6848 -0
@@ -0,0 +1,6848 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2020 Marvell International Ltd. +* +* Configuration and status register (CSR) type definitions for +* Octeon pcieepx. +*/ + +#ifndef __CVMX_PCIEEPX_DEFS_H__ +#define __CVMX_PCIEEPX_DEFS_H__ + +static inline u64 CVMX_PCIEEPX_CFG000(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000000ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000000ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000000ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000000ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000000ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000000ull; + } + return 0x0000030000000000ull; +} + +static inline u64 CVMX_PCIEEPX_CFG001(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000004ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000004ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000004ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000004ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000004ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000004ull; + } + return 0x0000030000000004ull; +} + +static inline u64 CVMX_PCIEEPX_CFG002(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000008ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000008ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000008ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000008ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000008ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000008ull; + } + return 0x0000030000000008ull; +} + +static inline u64 CVMX_PCIEEPX_CFG003(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000000Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000000Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000000Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000000Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000000Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000000Cull; + } + return 0x000003000000000Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG004(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000010ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000010ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000010ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000010ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000010ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000010ull; + } + return 0x0000030000000010ull; +} + +static inline u64 CVMX_PCIEEPX_CFG004_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030080000010ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030080000010ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030080000010ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030080000010ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030080000010ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000080000010ull; + } + return 0x0000030080000010ull; +} + +static inline u64 CVMX_PCIEEPX_CFG005(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000014ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000014ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000014ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000014ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000014ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000014ull; + } + return 0x0000030000000014ull; +} + +static inline u64 CVMX_PCIEEPX_CFG005_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030080000014ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030080000014ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030080000014ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030080000014ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030080000014ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000080000014ull; + } + return 0x0000030080000014ull; +} + +static inline u64 CVMX_PCIEEPX_CFG006(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000018ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000018ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000018ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000018ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000018ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000018ull; + } + return 0x0000030000000018ull; +} + +static inline u64 CVMX_PCIEEPX_CFG006_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030080000018ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030080000018ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030080000018ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030080000018ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030080000018ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000080000018ull; + } + return 0x0000030080000018ull; +} + +static inline u64 CVMX_PCIEEPX_CFG007(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000001Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000001Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000001Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000001Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000001Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000001Cull; + } + return 0x000003000000001Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG007_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003008000001Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003008000001Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003008000001Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003008000001Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003008000001Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000008000001Cull; + } + return 0x000003008000001Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG008(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000020ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000020ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000020ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000020ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000020ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000020ull; + } + return 0x0000030000000020ull; +} + +static inline u64 CVMX_PCIEEPX_CFG008_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030080000020ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030080000020ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030080000020ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030080000020ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030080000020ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000080000020ull; + } + return 0x0000030080000020ull; +} + +static inline u64 CVMX_PCIEEPX_CFG009(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000024ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000024ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000024ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000024ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000024ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000024ull; + } + return 0x0000030000000024ull; +} + +static inline u64 CVMX_PCIEEPX_CFG009_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030080000024ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030080000024ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030080000024ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030080000024ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030080000024ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000080000024ull; + } + return 0x0000030080000024ull; +} + +static inline u64 CVMX_PCIEEPX_CFG010(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000028ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000028ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000028ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000028ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000028ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000028ull; + } + return 0x0000030000000028ull; +} + +static inline u64 CVMX_PCIEEPX_CFG011(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000002Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000002Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000002Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000002Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000002Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000002Cull; + } + return 0x000003000000002Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG012(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000030ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000030ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000030ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000030ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000030ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000030ull; + } + return 0x0000030000000030ull; +} + +static inline u64 CVMX_PCIEEPX_CFG012_MASK(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030080000030ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030080000030ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030080000030ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030080000030ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030080000030ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000080000030ull; + } + return 0x0000030080000030ull; +} + +static inline u64 CVMX_PCIEEPX_CFG013(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000034ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000034ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000034ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000034ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000034ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000034ull; + } + return 0x0000030000000034ull; +} + +static inline u64 CVMX_PCIEEPX_CFG015(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000003Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000003Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000003Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000003Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000003Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000003Cull; + } + return 0x000003000000003Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG016(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000040ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000040ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000040ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000040ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000040ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000040ull; + } + return 0x0000030000000040ull; +} + +static inline u64 CVMX_PCIEEPX_CFG017(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000044ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000044ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000044ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000044ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000044ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000044ull; + } + return 0x0000030000000044ull; +} + +static inline u64 CVMX_PCIEEPX_CFG020(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000050ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000050ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000050ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000050ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000050ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000050ull; + } + return 0x0000030000000050ull; +} + +static inline u64 CVMX_PCIEEPX_CFG021(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000054ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000054ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000054ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000054ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000054ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000054ull; + } + return 0x0000030000000054ull; +} + +static inline u64 CVMX_PCIEEPX_CFG022(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000058ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000058ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000058ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000058ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000058ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000058ull; + } + return 0x0000030000000058ull; +} + +static inline u64 CVMX_PCIEEPX_CFG023(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000005Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000005Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000005Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000005Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000005Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000005Cull; + } + return 0x000003000000005Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG024(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000060ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000060ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000060ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000060ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000060ull + (offset) * 0x100000000ull; + } + return 0x0000030000000060ull; +} + +static inline u64 CVMX_PCIEEPX_CFG025(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000064ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000064ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000064ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000064ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000064ull + (offset) * 0x100000000ull; + } + return 0x0000030000000064ull; +} + +static inline u64 CVMX_PCIEEPX_CFG028(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000070ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000070ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000070ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000070ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000070ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000070ull; + } + return 0x0000030000000070ull; +} + +static inline u64 CVMX_PCIEEPX_CFG029(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000074ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000074ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000074ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000074ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000074ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000074ull; + } + return 0x0000030000000074ull; +} + +static inline u64 CVMX_PCIEEPX_CFG030(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000078ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000078ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000078ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000078ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000078ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000078ull; + } + return 0x0000030000000078ull; +} + +static inline u64 CVMX_PCIEEPX_CFG031(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000007Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000007Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000007Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000007Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000007Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000007Cull; + } + return 0x000003000000007Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG032(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000080ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000080ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000080ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000080ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000080ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000080ull; + } + return 0x0000030000000080ull; +} + +#define CVMX_PCIEEPX_CFG033(offset) (0x0000000000000084ull) +#define CVMX_PCIEEPX_CFG034(offset) (0x0000000000000088ull) +static inline u64 CVMX_PCIEEPX_CFG037(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000094ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000094ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000094ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000094ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000094ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000094ull; + } + return 0x0000030000000094ull; +} + +static inline u64 CVMX_PCIEEPX_CFG038(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000098ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000098ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000098ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000098ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000098ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000098ull; + } + return 0x0000030000000098ull; +} + +static inline u64 CVMX_PCIEEPX_CFG039(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000009Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000009Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000009Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000009Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000009Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000009Cull; + } + return 0x000003000000009Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG040(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000000A0ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x00000300000000A0ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000000A0ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000000A0ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000000A0ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x00000000000000A0ull; + } + return 0x00000300000000A0ull; +} + +#define CVMX_PCIEEPX_CFG041(offset) (0x00000000000000A4ull) +#define CVMX_PCIEEPX_CFG042(offset) (0x00000000000000A8ull) +static inline u64 CVMX_PCIEEPX_CFG044(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000000B0ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000000B0ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000000B0ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000000B0ull; + } + return 0x00000300000000B0ull; +} + +static inline u64 CVMX_PCIEEPX_CFG045(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000000B4ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000000B4ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000000B4ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000000B4ull; + } + return 0x00000300000000B4ull; +} + +static inline u64 CVMX_PCIEEPX_CFG046(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000000B8ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000000B8ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000000B8ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000000B8ull; + } + return 0x00000300000000B8ull; +} + +static inline u64 CVMX_PCIEEPX_CFG064(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000100ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000100ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000100ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000100ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000100ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000100ull; + } + return 0x0000030000000100ull; +} + +static inline u64 CVMX_PCIEEPX_CFG065(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000104ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000104ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000104ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000104ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000104ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000104ull; + } + return 0x0000030000000104ull; +} + +static inline u64 CVMX_PCIEEPX_CFG066(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000108ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000108ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000108ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000108ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000108ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000108ull; + } + return 0x0000030000000108ull; +} + +static inline u64 CVMX_PCIEEPX_CFG067(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000010Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000010Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000010Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000010Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000010Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000010Cull; + } + return 0x000003000000010Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG068(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000110ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000110ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000110ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000110ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000110ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000110ull; + } + return 0x0000030000000110ull; +} + +static inline u64 CVMX_PCIEEPX_CFG069(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000114ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000114ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000114ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000114ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000114ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000114ull; + } + return 0x0000030000000114ull; +} + +static inline u64 CVMX_PCIEEPX_CFG070(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000118ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000118ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000118ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000118ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000118ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000118ull; + } + return 0x0000030000000118ull; +} + +static inline u64 CVMX_PCIEEPX_CFG071(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000011Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000011Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000011Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000011Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000011Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000011Cull; + } + return 0x000003000000011Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG072(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000120ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000120ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000120ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000120ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000120ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000120ull; + } + return 0x0000030000000120ull; +} + +static inline u64 CVMX_PCIEEPX_CFG073(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000124ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000124ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000124ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000124ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000124ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000124ull; + } + return 0x0000030000000124ull; +} + +static inline u64 CVMX_PCIEEPX_CFG074(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000128ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000128ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000128ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000128ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000128ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000128ull; + } + return 0x0000030000000128ull; +} + +static inline u64 CVMX_PCIEEPX_CFG078(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000138ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000138ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000138ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000138ull; + } + return 0x0000030000000138ull; +} + +static inline u64 CVMX_PCIEEPX_CFG082(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000148ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000148ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000148ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000148ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000148ull + (offset) * 0x100000000ull; + } + return 0x0000030000000148ull; +} + +static inline u64 CVMX_PCIEEPX_CFG083(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000014Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000014Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000014Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000014Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000014Cull + (offset) * 0x100000000ull; + } + return 0x000003000000014Cull; +} + +#define CVMX_PCIEEPX_CFG084(offset) (0x0000030000000150ull + ((offset) & 3) * 0x100000000ull) +static inline u64 CVMX_PCIEEPX_CFG086(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000158ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000158ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000158ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000158ull; + } + return 0x0000030000000158ull; +} + +static inline u64 CVMX_PCIEEPX_CFG087(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000015Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000015Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000015Cull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000015Cull; + } + return 0x000003000000015Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG088(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000160ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000160ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000160ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000160ull; + } + return 0x0000030000000160ull; +} + +static inline u64 CVMX_PCIEEPX_CFG089(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000164ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000164ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000164ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000164ull; + } + return 0x0000030000000164ull; +} + +static inline u64 CVMX_PCIEEPX_CFG090(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000168ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000168ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000168ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000168ull; + } + return 0x0000030000000168ull; +} + +static inline u64 CVMX_PCIEEPX_CFG091(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000016Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000016Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000016Cull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000016Cull; + } + return 0x000003000000016Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG092(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000170ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000170ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000170ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000170ull; + } + return 0x0000030000000170ull; +} + +static inline u64 CVMX_PCIEEPX_CFG094(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000178ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000178ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000178ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000178ull; + } + return 0x0000030000000178ull; +} + +static inline u64 CVMX_PCIEEPX_CFG095(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000017Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000017Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000017Cull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000017Cull; + } + return 0x000003000000017Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG096(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000180ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000180ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000180ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000180ull; + } + return 0x0000030000000180ull; +} + +static inline u64 CVMX_PCIEEPX_CFG097(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000184ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000184ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000184ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000184ull; + } + return 0x0000030000000184ull; +} + +static inline u64 CVMX_PCIEEPX_CFG098(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000188ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000188ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000188ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000188ull; + } + return 0x0000030000000188ull; +} + +static inline u64 CVMX_PCIEEPX_CFG099(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000018Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000018Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000018Cull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000018Cull; + } + return 0x000003000000018Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG100(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000190ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000190ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000190ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000190ull; + } + return 0x0000030000000190ull; +} + +static inline u64 CVMX_PCIEEPX_CFG101(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000194ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000194ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000194ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000194ull; + } + return 0x0000030000000194ull; +} + +static inline u64 CVMX_PCIEEPX_CFG102(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000198ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000198ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000198ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000198ull; + } + return 0x0000030000000198ull; +} + +static inline u64 CVMX_PCIEEPX_CFG103(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000019Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000019Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000019Cull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000019Cull; + } + return 0x000003000000019Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG104(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001A0ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001A0ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001A0ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001A0ull; + } + return 0x00000300000001A0ull; +} + +static inline u64 CVMX_PCIEEPX_CFG105(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001A4ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001A4ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001A4ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001A4ull; + } + return 0x00000300000001A4ull; +} + +static inline u64 CVMX_PCIEEPX_CFG106(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001A8ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001A8ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001A8ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001A8ull; + } + return 0x00000300000001A8ull; +} + +static inline u64 CVMX_PCIEEPX_CFG107(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001ACull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001ACull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001ACull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001ACull; + } + return 0x00000300000001ACull; +} + +static inline u64 CVMX_PCIEEPX_CFG108(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001B0ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001B0ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001B0ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001B0ull; + } + return 0x00000300000001B0ull; +} + +static inline u64 CVMX_PCIEEPX_CFG109(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001B4ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001B4ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001B4ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001B4ull; + } + return 0x00000300000001B4ull; +} + +static inline u64 CVMX_PCIEEPX_CFG110(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001B8ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001B8ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001B8ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001B8ull; + } + return 0x00000300000001B8ull; +} + +static inline u64 CVMX_PCIEEPX_CFG111(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001BCull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001BCull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001BCull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001BCull; + } + return 0x00000300000001BCull; +} + +static inline u64 CVMX_PCIEEPX_CFG112(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000001C0ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000001C0ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000001C0ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000001C0ull; + } + return 0x00000300000001C0ull; +} + +static inline u64 CVMX_PCIEEPX_CFG448(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000700ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000700ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000700ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000700ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000700ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000700ull; + } + return 0x0000030000000700ull; +} + +static inline u64 CVMX_PCIEEPX_CFG449(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000704ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000704ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000704ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000704ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000704ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000704ull; + } + return 0x0000030000000704ull; +} + +static inline u64 CVMX_PCIEEPX_CFG450(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000708ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000708ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000708ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000708ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000708ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000708ull; + } + return 0x0000030000000708ull; +} + +static inline u64 CVMX_PCIEEPX_CFG451(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000070Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000070Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000070Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000070Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000070Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000070Cull; + } + return 0x000003000000070Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG452(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000710ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000710ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000710ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000710ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000710ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000710ull; + } + return 0x0000030000000710ull; +} + +static inline u64 CVMX_PCIEEPX_CFG453(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000714ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000714ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000714ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000714ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000714ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000714ull; + } + return 0x0000030000000714ull; +} + +static inline u64 CVMX_PCIEEPX_CFG454(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000718ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000718ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000718ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000718ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000718ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000718ull; + } + return 0x0000030000000718ull; +} + +static inline u64 CVMX_PCIEEPX_CFG455(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000071Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000071Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000071Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000071Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000071Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000071Cull; + } + return 0x000003000000071Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG456(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000720ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000720ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000720ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000720ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000720ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000720ull; + } + return 0x0000030000000720ull; +} + +static inline u64 CVMX_PCIEEPX_CFG458(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000728ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000728ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000728ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000728ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000728ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000728ull; + } + return 0x0000030000000728ull; +} + +static inline u64 CVMX_PCIEEPX_CFG459(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000072Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000072Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000072Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000072Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000072Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000072Cull; + } + return 0x000003000000072Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG460(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000730ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000730ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000730ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000730ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000730ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000730ull; + } + return 0x0000030000000730ull; +} + +static inline u64 CVMX_PCIEEPX_CFG461(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000734ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000734ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000734ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000734ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000734ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000734ull; + } + return 0x0000030000000734ull; +} + +static inline u64 CVMX_PCIEEPX_CFG462(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000738ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000738ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000738ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000738ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000738ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000738ull; + } + return 0x0000030000000738ull; +} + +static inline u64 CVMX_PCIEEPX_CFG463(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000073Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000073Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000073Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000073Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000073Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000073Cull; + } + return 0x000003000000073Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG464(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000740ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000740ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000740ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000740ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000740ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000740ull; + } + return 0x0000030000000740ull; +} + +static inline u64 CVMX_PCIEEPX_CFG465(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000744ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000744ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000744ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000744ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000744ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000744ull; + } + return 0x0000030000000744ull; +} + +static inline u64 CVMX_PCIEEPX_CFG466(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000748ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000748ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000748ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000748ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000748ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000748ull; + } + return 0x0000030000000748ull; +} + +static inline u64 CVMX_PCIEEPX_CFG467(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000074Cull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000074Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000074Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000074Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000074Cull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000074Cull; + } + return 0x000003000000074Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG468(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000750ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000750ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000750ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000750ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000750ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000750ull; + } + return 0x0000030000000750ull; +} + +static inline u64 CVMX_PCIEEPX_CFG490(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x00000000000007A8ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x00000300000007A8ull + (offset) * 0x100000000ull; + } + return 0x00000000000007A8ull; +} + +static inline u64 CVMX_PCIEEPX_CFG491(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x00000000000007ACull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x00000300000007ACull + (offset) * 0x100000000ull; + } + return 0x00000000000007ACull; +} + +static inline u64 CVMX_PCIEEPX_CFG492(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x00000000000007B0ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x00000300000007B0ull + (offset) * 0x100000000ull; + } + return 0x00000000000007B0ull; +} + +static inline u64 CVMX_PCIEEPX_CFG515(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x000003000000080Cull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x000003000000080Cull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x000003000000080Cull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x000003000000080Cull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x000003000000080Cull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x000000000000080Cull; + } + return 0x000003000000080Cull; +} + +static inline u64 CVMX_PCIEEPX_CFG516(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000810ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000810ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000810ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000810ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000810ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000810ull; + } + return 0x0000030000000810ull; +} + +static inline u64 CVMX_PCIEEPX_CFG517(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000814ull; + case OCTEON_CN70XX & OCTEON_FAMILY_MASK: + return 0x0000030000000814ull + (offset) * 0x100000000ull; + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000814ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000814ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000814ull + (offset) * 0x100000000ull; + case OCTEON_CN66XX & OCTEON_FAMILY_MASK: + case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: + case OCTEON_CN63XX & OCTEON_FAMILY_MASK: + case OCTEON_CN61XX & OCTEON_FAMILY_MASK: + case OCTEON_CN68XX & OCTEON_FAMILY_MASK: + return 0x0000000000000814ull; + } + return 0x0000030000000814ull; +} + +static inline u64 CVMX_PCIEEPX_CFG548(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x0000030000000890ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x0000030000000890ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x0000030000000890ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x0000030000000890ull; + } + return 0x0000030000000890ull; +} + +static inline u64 CVMX_PCIEEPX_CFG554(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000008A8ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000008A8ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000008A8ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000008A8ull; + } + return 0x00000300000008A8ull; +} + +static inline u64 CVMX_PCIEEPX_CFG558(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000008B8ull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000008B8ull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000008B8ull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000008B8ull; + } + return 0x00000300000008B8ull; +} + +static inline u64 CVMX_PCIEEPX_CFG559(unsigned long offset) +{ + switch (cvmx_get_octeon_family()) { + case OCTEON_CN78XX & OCTEON_FAMILY_MASK: + if (OCTEON_IS_MODEL(OCTEON_CN78XX_PASS1_X)) + return 0x00000300000008BCull + (offset) * 0x100000000ull; + if (OCTEON_IS_MODEL(OCTEON_CN78XX)) + return 0x00000300000008BCull + (offset) * 0x100000000ull; + + case OCTEON_CN73XX & OCTEON_FAMILY_MASK: + return 0x00000300000008BCull + (offset) * 0x100000000ull; + case OCTEON_CNF75XX & OCTEON_FAMILY_MASK: + return 0x00000300000008BCull; + } + return 0x00000300000008BCull; +} + +/** + * cvmx_pcieep#_cfg000 + * + * This register contains the first 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg000 { + u32 u32; + struct cvmx_pcieepx_cfg000_s { + u32 devid : 16; + u32 vendid : 16; + } s; + struct cvmx_pcieepx_cfg000_s cn52xx; + struct cvmx_pcieepx_cfg000_s cn52xxp1; + struct cvmx_pcieepx_cfg000_s cn56xx; + struct cvmx_pcieepx_cfg000_s cn56xxp1; + struct cvmx_pcieepx_cfg000_s cn61xx; + struct cvmx_pcieepx_cfg000_s cn63xx; + struct cvmx_pcieepx_cfg000_s cn63xxp1; + struct cvmx_pcieepx_cfg000_s cn66xx; + struct cvmx_pcieepx_cfg000_s cn68xx; + struct cvmx_pcieepx_cfg000_s cn68xxp1; + struct cvmx_pcieepx_cfg000_s cn70xx; + struct cvmx_pcieepx_cfg000_s cn70xxp1; + struct cvmx_pcieepx_cfg000_s cn73xx; + struct cvmx_pcieepx_cfg000_s cn78xx; + struct cvmx_pcieepx_cfg000_s cn78xxp1; + struct cvmx_pcieepx_cfg000_s cnf71xx; + struct cvmx_pcieepx_cfg000_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg000 cvmx_pcieepx_cfg000_t; + +/** + * cvmx_pcieep#_cfg001 + * + * This register contains the second 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg001 { + u32 u32; + struct cvmx_pcieepx_cfg001_s { + u32 dpe : 1; + u32 sse : 1; + u32 rma : 1; + u32 rta : 1; + u32 sta : 1; + u32 devt : 2; + u32 mdpe : 1; + u32 fbb : 1; + u32 reserved_22_22 : 1; + u32 m66 : 1; + u32 cl : 1; + u32 i_stat : 1; + u32 reserved_11_18 : 8; + u32 i_dis : 1; + u32 fbbe : 1; + u32 see : 1; + u32 ids_wcc : 1; + u32 per : 1; + u32 vps : 1; + u32 mwice : 1; + u32 scse : 1; + u32 me : 1; + u32 msae : 1; + u32 isae : 1; + } s; + struct cvmx_pcieepx_cfg001_s cn52xx; + struct cvmx_pcieepx_cfg001_s cn52xxp1; + struct cvmx_pcieepx_cfg001_s cn56xx; + struct cvmx_pcieepx_cfg001_s cn56xxp1; + struct cvmx_pcieepx_cfg001_s cn61xx; + struct cvmx_pcieepx_cfg001_s cn63xx; + struct cvmx_pcieepx_cfg001_s cn63xxp1; + struct cvmx_pcieepx_cfg001_s cn66xx; + struct cvmx_pcieepx_cfg001_s cn68xx; + struct cvmx_pcieepx_cfg001_s cn68xxp1; + struct cvmx_pcieepx_cfg001_s cn70xx; + struct cvmx_pcieepx_cfg001_s cn70xxp1; + struct cvmx_pcieepx_cfg001_s cn73xx; + struct cvmx_pcieepx_cfg001_s cn78xx; + struct cvmx_pcieepx_cfg001_s cn78xxp1; + struct cvmx_pcieepx_cfg001_s cnf71xx; + struct cvmx_pcieepx_cfg001_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg001 cvmx_pcieepx_cfg001_t; + +/** + * cvmx_pcieep#_cfg002 + * + * This register contains the third 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg002 { + u32 u32; + struct cvmx_pcieepx_cfg002_s { + u32 bcc : 8; + u32 sc : 8; + u32 pi : 8; + u32 rid : 8; + } s; + struct cvmx_pcieepx_cfg002_s cn52xx; + struct cvmx_pcieepx_cfg002_s cn52xxp1; + struct cvmx_pcieepx_cfg002_s cn56xx; + struct cvmx_pcieepx_cfg002_s cn56xxp1; + struct cvmx_pcieepx_cfg002_s cn61xx; + struct cvmx_pcieepx_cfg002_s cn63xx; + struct cvmx_pcieepx_cfg002_s cn63xxp1; + struct cvmx_pcieepx_cfg002_s cn66xx; + struct cvmx_pcieepx_cfg002_s cn68xx; + struct cvmx_pcieepx_cfg002_s cn68xxp1; + struct cvmx_pcieepx_cfg002_s cn70xx; + struct cvmx_pcieepx_cfg002_s cn70xxp1; + struct cvmx_pcieepx_cfg002_s cn73xx; + struct cvmx_pcieepx_cfg002_s cn78xx; + struct cvmx_pcieepx_cfg002_s cn78xxp1; + struct cvmx_pcieepx_cfg002_s cnf71xx; + struct cvmx_pcieepx_cfg002_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg002 cvmx_pcieepx_cfg002_t; + +/** + * cvmx_pcieep#_cfg003 + * + * This register contains the fourth 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg003 { + u32 u32; + struct cvmx_pcieepx_cfg003_s { + u32 bist : 8; + u32 mfd : 1; + u32 chf : 7; + u32 lt : 8; + u32 cls : 8; + } s; + struct cvmx_pcieepx_cfg003_s cn52xx; + struct cvmx_pcieepx_cfg003_s cn52xxp1; + struct cvmx_pcieepx_cfg003_s cn56xx; + struct cvmx_pcieepx_cfg003_s cn56xxp1; + struct cvmx_pcieepx_cfg003_s cn61xx; + struct cvmx_pcieepx_cfg003_s cn63xx; + struct cvmx_pcieepx_cfg003_s cn63xxp1; + struct cvmx_pcieepx_cfg003_s cn66xx; + struct cvmx_pcieepx_cfg003_s cn68xx; + struct cvmx_pcieepx_cfg003_s cn68xxp1; + struct cvmx_pcieepx_cfg003_s cn70xx; + struct cvmx_pcieepx_cfg003_s cn70xxp1; + struct cvmx_pcieepx_cfg003_s cn73xx; + struct cvmx_pcieepx_cfg003_s cn78xx; + struct cvmx_pcieepx_cfg003_s cn78xxp1; + struct cvmx_pcieepx_cfg003_s cnf71xx; + struct cvmx_pcieepx_cfg003_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg003 cvmx_pcieepx_cfg003_t; + +/** + * cvmx_pcieep#_cfg004 + * + * This register contains the fifth 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg004 { + u32 u32; + struct cvmx_pcieepx_cfg004_s { + u32 reserved_4_31 : 28; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } s; + struct cvmx_pcieepx_cfg004_cn52xx { + u32 lbab : 18; + u32 reserved_4_13 : 10; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } cn52xx; + struct cvmx_pcieepx_cfg004_cn52xx cn52xxp1; + struct cvmx_pcieepx_cfg004_cn52xx cn56xx; + struct cvmx_pcieepx_cfg004_cn52xx cn56xxp1; + struct cvmx_pcieepx_cfg004_cn52xx cn61xx; + struct cvmx_pcieepx_cfg004_cn52xx cn63xx; + struct cvmx_pcieepx_cfg004_cn52xx cn63xxp1; + struct cvmx_pcieepx_cfg004_cn52xx cn66xx; + struct cvmx_pcieepx_cfg004_cn52xx cn68xx; + struct cvmx_pcieepx_cfg004_cn52xx cn68xxp1; + struct cvmx_pcieepx_cfg004_cn52xx cn70xx; + struct cvmx_pcieepx_cfg004_cn52xx cn70xxp1; + struct cvmx_pcieepx_cfg004_cn73xx { + u32 lbab : 9; + u32 reserved_4_22 : 19; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } cn73xx; + struct cvmx_pcieepx_cfg004_cn73xx cn78xx; + struct cvmx_pcieepx_cfg004_cn78xxp1 { + u32 lbab : 17; + u32 reserved_4_14 : 11; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } cn78xxp1; + struct cvmx_pcieepx_cfg004_cn52xx cnf71xx; + struct cvmx_pcieepx_cfg004_cn73xx cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg004 cvmx_pcieepx_cfg004_t; + +/** + * cvmx_pcieep#_cfg004_mask + * + * The BAR 0 mask register is invisible to host software and not readable from the application. + * The BAR 0 mask register is only writable through PEM()_CFG_WR. + */ +union cvmx_pcieepx_cfg004_mask { + u32 u32; + struct cvmx_pcieepx_cfg004_mask_s { + u32 lmask : 31; + u32 enb : 1; + } s; + struct cvmx_pcieepx_cfg004_mask_s cn52xx; + struct cvmx_pcieepx_cfg004_mask_s cn52xxp1; + struct cvmx_pcieepx_cfg004_mask_s cn56xx; + struct cvmx_pcieepx_cfg004_mask_s cn56xxp1; + struct cvmx_pcieepx_cfg004_mask_s cn61xx; + struct cvmx_pcieepx_cfg004_mask_s cn63xx; + struct cvmx_pcieepx_cfg004_mask_s cn63xxp1; + struct cvmx_pcieepx_cfg004_mask_s cn66xx; + struct cvmx_pcieepx_cfg004_mask_s cn68xx; + struct cvmx_pcieepx_cfg004_mask_s cn68xxp1; + struct cvmx_pcieepx_cfg004_mask_s cn70xx; + struct cvmx_pcieepx_cfg004_mask_s cn70xxp1; + struct cvmx_pcieepx_cfg004_mask_s cn73xx; + struct cvmx_pcieepx_cfg004_mask_s cn78xx; + struct cvmx_pcieepx_cfg004_mask_s cn78xxp1; + struct cvmx_pcieepx_cfg004_mask_s cnf71xx; + struct cvmx_pcieepx_cfg004_mask_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg004_mask cvmx_pcieepx_cfg004_mask_t; + +/** + * cvmx_pcieep#_cfg005 + * + * This register contains the sixth 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg005 { + u32 u32; + struct cvmx_pcieepx_cfg005_s { + u32 ubab : 32; + } s; + struct cvmx_pcieepx_cfg005_s cn52xx; + struct cvmx_pcieepx_cfg005_s cn52xxp1; + struct cvmx_pcieepx_cfg005_s cn56xx; + struct cvmx_pcieepx_cfg005_s cn56xxp1; + struct cvmx_pcieepx_cfg005_s cn61xx; + struct cvmx_pcieepx_cfg005_s cn63xx; + struct cvmx_pcieepx_cfg005_s cn63xxp1; + struct cvmx_pcieepx_cfg005_s cn66xx; + struct cvmx_pcieepx_cfg005_s cn68xx; + struct cvmx_pcieepx_cfg005_s cn68xxp1; + struct cvmx_pcieepx_cfg005_s cn70xx; + struct cvmx_pcieepx_cfg005_s cn70xxp1; + struct cvmx_pcieepx_cfg005_s cn73xx; + struct cvmx_pcieepx_cfg005_s cn78xx; + struct cvmx_pcieepx_cfg005_s cn78xxp1; + struct cvmx_pcieepx_cfg005_s cnf71xx; + struct cvmx_pcieepx_cfg005_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg005 cvmx_pcieepx_cfg005_t; + +/** + * cvmx_pcieep#_cfg005_mask + * + * The BAR 0 mask register is invisible to host software and not readable from the application. + * The BAR 0 mask register is only writable through PEM()_CFG_WR. + */ +union cvmx_pcieepx_cfg005_mask { + u32 u32; + struct cvmx_pcieepx_cfg005_mask_s { + u32 umask : 32; + } s; + struct cvmx_pcieepx_cfg005_mask_s cn52xx; + struct cvmx_pcieepx_cfg005_mask_s cn52xxp1; + struct cvmx_pcieepx_cfg005_mask_s cn56xx; + struct cvmx_pcieepx_cfg005_mask_s cn56xxp1; + struct cvmx_pcieepx_cfg005_mask_s cn61xx; + struct cvmx_pcieepx_cfg005_mask_s cn63xx; + struct cvmx_pcieepx_cfg005_mask_s cn63xxp1; + struct cvmx_pcieepx_cfg005_mask_s cn66xx; + struct cvmx_pcieepx_cfg005_mask_s cn68xx; + struct cvmx_pcieepx_cfg005_mask_s cn68xxp1; + struct cvmx_pcieepx_cfg005_mask_s cn70xx; + struct cvmx_pcieepx_cfg005_mask_s cn70xxp1; + struct cvmx_pcieepx_cfg005_mask_s cn73xx; + struct cvmx_pcieepx_cfg005_mask_s cn78xx; + struct cvmx_pcieepx_cfg005_mask_s cn78xxp1; + struct cvmx_pcieepx_cfg005_mask_s cnf71xx; + struct cvmx_pcieepx_cfg005_mask_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg005_mask cvmx_pcieepx_cfg005_mask_t; + +/** + * cvmx_pcieep#_cfg006 + * + * This register contains the seventh 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg006 { + u32 u32; + struct cvmx_pcieepx_cfg006_s { + u32 lbab : 6; + u32 reserved_4_25 : 22; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } s; + struct cvmx_pcieepx_cfg006_s cn52xx; + struct cvmx_pcieepx_cfg006_s cn52xxp1; + struct cvmx_pcieepx_cfg006_s cn56xx; + struct cvmx_pcieepx_cfg006_s cn56xxp1; + struct cvmx_pcieepx_cfg006_s cn61xx; + struct cvmx_pcieepx_cfg006_s cn63xx; + struct cvmx_pcieepx_cfg006_s cn63xxp1; + struct cvmx_pcieepx_cfg006_s cn66xx; + struct cvmx_pcieepx_cfg006_s cn68xx; + struct cvmx_pcieepx_cfg006_s cn68xxp1; + struct cvmx_pcieepx_cfg006_s cn70xx; + struct cvmx_pcieepx_cfg006_s cn70xxp1; + struct cvmx_pcieepx_cfg006_s cn73xx; + struct cvmx_pcieepx_cfg006_s cn78xx; + struct cvmx_pcieepx_cfg006_s cn78xxp1; + struct cvmx_pcieepx_cfg006_s cnf71xx; + struct cvmx_pcieepx_cfg006_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg006 cvmx_pcieepx_cfg006_t; + +/** + * cvmx_pcieep#_cfg006_mask + * + * The BAR 1 mask register is invisible to host software and not readable from the application. + * The BAR 1 mask register is only writable through PEM()_CFG_WR. + */ +union cvmx_pcieepx_cfg006_mask { + u32 u32; + struct cvmx_pcieepx_cfg006_mask_s { + u32 lmask : 31; + u32 enb : 1; + } s; + struct cvmx_pcieepx_cfg006_mask_s cn52xx; + struct cvmx_pcieepx_cfg006_mask_s cn52xxp1; + struct cvmx_pcieepx_cfg006_mask_s cn56xx; + struct cvmx_pcieepx_cfg006_mask_s cn56xxp1; + struct cvmx_pcieepx_cfg006_mask_s cn61xx; + struct cvmx_pcieepx_cfg006_mask_s cn63xx; + struct cvmx_pcieepx_cfg006_mask_s cn63xxp1; + struct cvmx_pcieepx_cfg006_mask_s cn66xx; + struct cvmx_pcieepx_cfg006_mask_s cn68xx; + struct cvmx_pcieepx_cfg006_mask_s cn68xxp1; + struct cvmx_pcieepx_cfg006_mask_s cn70xx; + struct cvmx_pcieepx_cfg006_mask_s cn70xxp1; + struct cvmx_pcieepx_cfg006_mask_s cn73xx; + struct cvmx_pcieepx_cfg006_mask_s cn78xx; + struct cvmx_pcieepx_cfg006_mask_s cn78xxp1; + struct cvmx_pcieepx_cfg006_mask_s cnf71xx; + struct cvmx_pcieepx_cfg006_mask_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg006_mask cvmx_pcieepx_cfg006_mask_t; + +/** + * cvmx_pcieep#_cfg007 + * + * This register contains the eighth 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg007 { + u32 u32; + struct cvmx_pcieepx_cfg007_s { + u32 ubab : 32; + } s; + struct cvmx_pcieepx_cfg007_s cn52xx; + struct cvmx_pcieepx_cfg007_s cn52xxp1; + struct cvmx_pcieepx_cfg007_s cn56xx; + struct cvmx_pcieepx_cfg007_s cn56xxp1; + struct cvmx_pcieepx_cfg007_s cn61xx; + struct cvmx_pcieepx_cfg007_s cn63xx; + struct cvmx_pcieepx_cfg007_s cn63xxp1; + struct cvmx_pcieepx_cfg007_s cn66xx; + struct cvmx_pcieepx_cfg007_s cn68xx; + struct cvmx_pcieepx_cfg007_s cn68xxp1; + struct cvmx_pcieepx_cfg007_s cn70xx; + struct cvmx_pcieepx_cfg007_s cn70xxp1; + struct cvmx_pcieepx_cfg007_s cn73xx; + struct cvmx_pcieepx_cfg007_s cn78xx; + struct cvmx_pcieepx_cfg007_s cn78xxp1; + struct cvmx_pcieepx_cfg007_s cnf71xx; + struct cvmx_pcieepx_cfg007_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg007 cvmx_pcieepx_cfg007_t; + +/** + * cvmx_pcieep#_cfg007_mask + * + * The BAR 1 mask register is invisible to host software and not readable from the application. + * The BAR 1 mask register is only writable through PEM()_CFG_WR. + */ +union cvmx_pcieepx_cfg007_mask { + u32 u32; + struct cvmx_pcieepx_cfg007_mask_s { + u32 umask : 32; + } s; + struct cvmx_pcieepx_cfg007_mask_s cn52xx; + struct cvmx_pcieepx_cfg007_mask_s cn52xxp1; + struct cvmx_pcieepx_cfg007_mask_s cn56xx; + struct cvmx_pcieepx_cfg007_mask_s cn56xxp1; + struct cvmx_pcieepx_cfg007_mask_s cn61xx; + struct cvmx_pcieepx_cfg007_mask_s cn63xx; + struct cvmx_pcieepx_cfg007_mask_s cn63xxp1; + struct cvmx_pcieepx_cfg007_mask_s cn66xx; + struct cvmx_pcieepx_cfg007_mask_s cn68xx; + struct cvmx_pcieepx_cfg007_mask_s cn68xxp1; + struct cvmx_pcieepx_cfg007_mask_s cn70xx; + struct cvmx_pcieepx_cfg007_mask_s cn70xxp1; + struct cvmx_pcieepx_cfg007_mask_s cn73xx; + struct cvmx_pcieepx_cfg007_mask_s cn78xx; + struct cvmx_pcieepx_cfg007_mask_s cn78xxp1; + struct cvmx_pcieepx_cfg007_mask_s cnf71xx; + struct cvmx_pcieepx_cfg007_mask_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg007_mask cvmx_pcieepx_cfg007_mask_t; + +/** + * cvmx_pcieep#_cfg008 + * + * This register contains the ninth 32-bits of PCIe type 0 configuration space. + * + */ +union cvmx_pcieepx_cfg008 { + u32 u32; + struct cvmx_pcieepx_cfg008_s { + u32 lbab : 12; + u32 reserved_4_19 : 16; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } s; + struct cvmx_pcieepx_cfg008_cn52xx { + u32 reserved_4_31 : 28; + u32 pf : 1; + u32 typ : 2; + u32 mspc : 1; + } cn52xx; + struct cvmx_pcieepx_cfg008_cn52xx cn52xxp1; + struct cvmx_pcieepx_cfg008_cn52xx cn56xx; + struct cvmx_pcieepx_cfg008_cn52xx cn56xxp1; + struct cvmx_pcieepx_cfg008_cn52xx cn61xx; + struct cvmx_pcieepx_cfg008_cn52xx cn63xx; + struct cvmx_pcieepx_cfg008_cn52xx cn63xxp1; + struct cvmx_pcieepx_cfg008_cn52xx cn66xx; + struct cvmx_pcieepx_cfg008_cn52xx cn68xx; + struct cvmx_pcieepx_cfg008_cn52xx cn68xxp1; + struct cvmx_pcieepx_cfg008_s cn70xx; + struct cvmx_pcieepx_cfg008_s cn70xxp1; + struct cvmx_pcieepx_cfg008_s cn73xx; + struct cvmx_pcieepx_cfg008_s cn78xx; + struct cvmx_pcieepx_cfg008_s cn78xxp1; + struct cvmx_pcieepx_cfg008_cn52xx cnf71xx; + struct cvmx_pcieepx_cfg008_s cnf75xx; +}; + +typedef union cvmx_pcieepx_cfg008 cvmx_pcieepx_cfg008_t; + +/** + * cvmx_pcieep#_cfg008_mask + * + * The BAR 2 mask register is invisible to host software and not readable from the application. + * The BAR 2 mask register is only writable through PEM()_CFG_WR. + */ +union cvmx_pcieepx_cfg008_mask { + u32 u32; + struct cvmx_pcieepx_cfg008_mask_s { + u32 lmask : 31; + u32 enb : 1; + } s; + struct cvmx_pcieepx_cfg008_mask_s cn52xx; + struct cvmx_pcieepx_cfg008_mask_s cn52xxp1; + struct cvmx_pcieepx_cfg008_mask_s cn56xx; + struct cvmx_pcieepx_cfg008_mask_s cn56xxp1; + struct cvmx_pcieepx_cfg008_mask_s cn61xx; + struct cvmx_pcieepx_cfg008_mask_s cn63xx; + struct cvmx_pcieepx_cfg008_mask_s cn63xxp1; + struct cvmx_pcieepx_cfg008_mask_s cn66xx; + struct cvmx_pcieepx_cfg008_mask_s cn68xx; + struct cvmx_pcieepx_cfg008_mask_s cn68xxp1; + struct cvmx_pcieepx_cfg008_mask_s cn70xx; + struct cvmx_pcieepx_cfg008_mask_s cn70xxp1; + struct cvmx_pcieepx_cfg008_mask_s cn73xx; + struct cvmx_pcieepx_cfg008_mask_s cn78xx; + struct cvmx_pcieepx_cfg008_mask_s cn78xxp1;
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.29.2
Part of the diff is not shown here. View the raw message.