cvmx-csr.h revision 210286
1/***********************license start*************** 2 * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights 3 * reserved. 4 * 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: 9 * 10 * * Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * * Redistributions in binary form must reproduce the above 14 * copyright notice, this list of conditions and the following 15 * disclaimer in the documentation and/or other materials provided 16 * with the distribution. 17 * 18 * * Neither the name of Cavium Networks nor the names of 19 * its contributors may be used to endorse or promote products 20 * derived from this software without specific prior written 21 * permission. 22 * 23 * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 24 * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS 25 * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH 26 * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY 27 * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT 28 * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES 29 * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR 30 * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET 31 * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT 32 * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. 33 * 34 * 35 * For any questions regarding licensing please contact marketing@caviumnetworks.com 36 * 37 ***********************license end**************************************/ 38 39 40 41 42 43 44/** 45 * @file 46 * 47 * Configuration and status register (CSR) address and type definitions for 48 * Octoen. 49 * 50 * <hr>$Revision: 41586 $<hr> 51 * 52 */ 53#ifndef __CVMX_CSR_H__ 54#define __CVMX_CSR_H__ 55 56#ifndef CVMX_ENABLE_CSR_ADDRESS_CHECKING 57#define CVMX_ENABLE_CSR_ADDRESS_CHECKING 0 58#endif 59 60#include "cvmx-platform.h" 61#include "cvmx-csr-enums.h" 62#include "cvmx-csr-addresses.h" 63#include "cvmx-csr-typedefs.h" 64 65/* Map the HW names to the SDK historical names */ 66typedef cvmx_ciu_intx_en1_t cvmx_ciu_int1_t; 67typedef cvmx_ciu_intx_sum0_t cvmx_ciu_intx0_t; 68typedef cvmx_ciu_mbox_setx_t cvmx_ciu_mbox_t; 69typedef cvmx_fpa_fpfx_marks_t cvmx_fpa_fpf_marks_t; 70typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que0_page_index_t; 71typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que1_page_index_t; 72typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que2_page_index_t; 73typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que3_page_index_t; 74typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que4_page_index_t; 75typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que5_page_index_t; 76typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que6_page_index_t; 77typedef cvmx_fpa_quex_page_index_t cvmx_fpa_que7_page_index_t; 78typedef cvmx_ipd_1st_mbuff_skip_t cvmx_ipd_mbuff_first_skip_t; 79typedef cvmx_ipd_1st_next_ptr_back_t cvmx_ipd_first_next_ptr_back_t; 80typedef cvmx_ipd_packet_mbuff_size_t cvmx_ipd_mbuff_size_t; 81typedef cvmx_ipd_qosx_red_marks_t cvmx_ipd_qos_red_marks_t; 82typedef cvmx_ipd_wqe_fpa_queue_t cvmx_ipd_wqe_fpa_pool_t; 83typedef cvmx_l2c_pfcx_t cvmx_l2c_pfc0_t; 84typedef cvmx_l2c_pfcx_t cvmx_l2c_pfc1_t; 85typedef cvmx_l2c_pfcx_t cvmx_l2c_pfc2_t; 86typedef cvmx_l2c_pfcx_t cvmx_l2c_pfc3_t; 87typedef cvmx_lmcx_bist_ctl_t cvmx_lmc_bist_ctl_t; 88typedef cvmx_lmcx_bist_result_t cvmx_lmc_bist_result_t; 89typedef cvmx_lmcx_comp_ctl_t cvmx_lmc_comp_ctl_t; 90typedef cvmx_lmcx_ctl_t cvmx_lmc_ctl_t; 91typedef cvmx_lmcx_ctl1_t cvmx_lmc_ctl1_t; 92typedef cvmx_lmcx_dclk_cnt_hi_t cvmx_lmc_dclk_cnt_hi_t; 93typedef cvmx_lmcx_dclk_cnt_lo_t cvmx_lmc_dclk_cnt_lo_t; 94typedef cvmx_lmcx_dclk_ctl_t cvmx_lmc_dclk_ctl_t; 95typedef cvmx_lmcx_ddr2_ctl_t cvmx_lmc_ddr2_ctl_t; 96typedef cvmx_lmcx_delay_cfg_t cvmx_lmc_delay_cfg_t; 97typedef cvmx_lmcx_dll_ctl_t cvmx_lmc_dll_ctl_t; 98typedef cvmx_lmcx_dual_memcfg_t cvmx_lmc_dual_memcfg_t; 99typedef cvmx_lmcx_ecc_synd_t cvmx_lmc_ecc_synd_t; 100typedef cvmx_lmcx_fadr_t cvmx_lmc_fadr_t; 101typedef cvmx_lmcx_ifb_cnt_hi_t cvmx_lmc_ifb_cnt_hi_t; 102typedef cvmx_lmcx_ifb_cnt_lo_t cvmx_lmc_ifb_cnt_lo_t; 103typedef cvmx_lmcx_mem_cfg0_t cvmx_lmc_mem_cfg0_t; 104typedef cvmx_lmcx_mem_cfg1_t cvmx_lmc_mem_cfg1_t; 105typedef cvmx_lmcx_wodt_ctl0_t cvmx_lmc_odt_ctl_t; 106typedef cvmx_lmcx_ops_cnt_hi_t cvmx_lmc_ops_cnt_hi_t; 107typedef cvmx_lmcx_ops_cnt_lo_t cvmx_lmc_ops_cnt_lo_t; 108typedef cvmx_lmcx_pll_bwctl_t cvmx_lmc_pll_bwctl_t; 109typedef cvmx_lmcx_pll_ctl_t cvmx_lmc_pll_ctl_t; 110typedef cvmx_lmcx_pll_status_t cvmx_lmc_pll_status_t; 111typedef cvmx_lmcx_read_level_ctl_t cvmx_lmc_read_level_ctl_t; 112typedef cvmx_lmcx_read_level_dbg_t cvmx_lmc_read_level_dbg_t; 113typedef cvmx_lmcx_read_level_rankx_t cvmx_lmc_read_level_rankx_t; 114typedef cvmx_lmcx_rodt_comp_ctl_t cvmx_lmc_rodt_comp_ctl_t; 115typedef cvmx_lmcx_rodt_ctl_t cvmx_lmc_rodt_ctl_t; 116typedef cvmx_lmcx_wodt_ctl0_t cvmx_lmc_wodt_ctl_t; 117typedef cvmx_lmcx_wodt_ctl0_t cvmx_lmc_wodt_ctl0_t; 118typedef cvmx_lmcx_wodt_ctl1_t cvmx_lmc_wodt_ctl1_t; 119typedef cvmx_mio_boot_reg_cfgx_t cvmx_mio_boot_reg_cfg0_t; 120typedef cvmx_mio_boot_reg_timx_t cvmx_mio_boot_reg_tim0_t; 121typedef cvmx_mio_twsx_int_t cvmx_mio_tws_int_t; 122typedef cvmx_mio_twsx_sw_twsi_t cvmx_mio_tws_sw_twsi_t; 123typedef cvmx_mio_twsx_sw_twsi_ext_t cvmx_mio_tws_sw_twsi_ext_t; 124typedef cvmx_mio_twsx_twsi_sw_t cvmx_mio_tws_twsi_sw_t; 125typedef cvmx_npi_base_addr_inputx_t cvmx_npi_base_addr_input_t; 126typedef cvmx_npi_base_addr_outputx_t cvmx_npi_base_addr_output_t; 127typedef cvmx_npi_buff_size_outputx_t cvmx_npi_buff_size_output_t; 128typedef cvmx_npi_dma_highp_counts_t cvmx_npi_dma_counts_t; 129typedef cvmx_npi_dma_highp_naddr_t cvmx_npi_dma_naddr_t; 130typedef cvmx_npi_highp_dbell_t cvmx_npi_dbell_t; 131typedef cvmx_npi_highp_ibuff_saddr_t cvmx_npi_dma_ibuff_saddr_t; 132typedef cvmx_npi_mem_access_subidx_t cvmx_npi_mem_access_subid_t; 133typedef cvmx_npi_num_desc_outputx_t cvmx_npi_num_desc_output_t; 134typedef cvmx_npi_px_dbpair_addr_t cvmx_npi_dbpair_addr_t; 135typedef cvmx_npi_px_instr_addr_t cvmx_npi_instr_addr_t; 136typedef cvmx_npi_px_instr_cnts_t cvmx_npi_instr_cnts_t; 137typedef cvmx_npi_px_pair_cnts_t cvmx_npi_pair_cnts_t; 138typedef cvmx_npi_size_inputx_t cvmx_npi_size_input_t; 139typedef cvmx_pci_dbellx_t cvmx_pci_dbell_t; 140typedef cvmx_pci_dma_cntx_t cvmx_pci_dma_cnt_t; 141typedef cvmx_pci_dma_int_levx_t cvmx_pci_dma_int_lev_t; 142typedef cvmx_pci_dma_timex_t cvmx_pci_dma_time_t; 143typedef cvmx_pci_instr_countx_t cvmx_pci_instr_count_t; 144typedef cvmx_pci_pkt_creditsx_t cvmx_pci_pkt_credits_t; 145typedef cvmx_pci_pkts_sent_int_levx_t cvmx_pci_pkts_sent_int_lev_t; 146typedef cvmx_pci_pkts_sent_timex_t cvmx_pci_pkts_sent_time_t; 147typedef cvmx_pci_pkts_sentx_t cvmx_pci_pkts_sent_t; 148typedef cvmx_pip_prt_cfgx_t cvmx_pip_port_cfg_t; 149typedef cvmx_pip_prt_tagx_t cvmx_pip_port_tag_cfg_t; 150typedef cvmx_pip_qos_watchx_t cvmx_pip_port_watcher_cfg_t; 151typedef cvmx_pko_mem_queue_ptrs_t cvmx_pko_queue_cfg_t; 152typedef cvmx_pko_reg_cmd_buf_t cvmx_pko_pool_cfg_t; 153typedef cvmx_smix_clk_t cvmx_smi_clk_t; 154typedef cvmx_smix_cmd_t cvmx_smi_cmd_t; 155typedef cvmx_smix_en_t cvmx_smi_en_t; 156typedef cvmx_smix_rd_dat_t cvmx_smi_rd_dat_t; 157typedef cvmx_smix_wr_dat_t cvmx_smi_wr_dat_t; 158typedef cvmx_tim_reg_flags_t cvmx_tim_control_t; 159 160/* The CSRs for bootbus region zero used to be independent of the 161 other 1-7. As of SDK 1.7.0 these were combined. These macros 162 are for backwards compactability */ 163#define CVMX_MIO_BOOT_REG_CFG0 CVMX_MIO_BOOT_REG_CFGX(0) 164#define CVMX_MIO_BOOT_REG_TIM0 CVMX_MIO_BOOT_REG_TIMX(0) 165 166/* The CN3XXX and CN58XX chips use to not have a LMC number 167 passed to the address macros. These are here to supply backwards 168 compatability with old code. Code should really use the new addresses 169 with bus arguments for support on other chips */ 170#define CVMX_LMC_BIST_CTL CVMX_LMCX_BIST_CTL(0) 171#define CVMX_LMC_BIST_RESULT CVMX_LMCX_BIST_RESULT(0) 172#define CVMX_LMC_COMP_CTL CVMX_LMCX_COMP_CTL(0) 173#define CVMX_LMC_CTL CVMX_LMCX_CTL(0) 174#define CVMX_LMC_CTL1 CVMX_LMCX_CTL1(0) 175#define CVMX_LMC_DCLK_CNT_HI CVMX_LMCX_DCLK_CNT_HI(0) 176#define CVMX_LMC_DCLK_CNT_LO CVMX_LMCX_DCLK_CNT_LO(0) 177#define CVMX_LMC_DCLK_CTL CVMX_LMCX_DCLK_CTL(0) 178#define CVMX_LMC_DDR2_CTL CVMX_LMCX_DDR2_CTL(0) 179#define CVMX_LMC_DELAY_CFG CVMX_LMCX_DELAY_CFG(0) 180#define CVMX_LMC_DLL_CTL CVMX_LMCX_DLL_CTL(0) 181#define CVMX_LMC_DUAL_MEMCFG CVMX_LMCX_DUAL_MEMCFG(0) 182#define CVMX_LMC_ECC_SYND CVMX_LMCX_ECC_SYND(0) 183#define CVMX_LMC_FADR CVMX_LMCX_FADR(0) 184#define CVMX_LMC_IFB_CNT_HI CVMX_LMCX_IFB_CNT_HI(0) 185#define CVMX_LMC_IFB_CNT_LO CVMX_LMCX_IFB_CNT_LO(0) 186#define CVMX_LMC_MEM_CFG0 CVMX_LMCX_MEM_CFG0(0) 187#define CVMX_LMC_MEM_CFG1 CVMX_LMCX_MEM_CFG1(0) 188#define CVMX_LMC_OPS_CNT_HI CVMX_LMCX_OPS_CNT_HI(0) 189#define CVMX_LMC_OPS_CNT_LO CVMX_LMCX_OPS_CNT_LO(0) 190#define CVMX_LMC_PLL_BWCTL CVMX_LMCX_PLL_BWCTL(0) 191#define CVMX_LMC_PLL_CTL CVMX_LMCX_PLL_CTL(0) 192#define CVMX_LMC_PLL_STATUS CVMX_LMCX_PLL_STATUS(0) 193#define CVMX_LMC_READ_LEVEL_CTL CVMX_LMCX_READ_LEVEL_CTL(0) 194#define CVMX_LMC_READ_LEVEL_DBG CVMX_LMCX_READ_LEVEL_DBG(0) 195#define CVMX_LMC_READ_LEVEL_RANKX CVMX_LMCX_READ_LEVEL_RANKX(0) 196#define CVMX_LMC_RODT_COMP_CTL CVMX_LMCX_RODT_COMP_CTL(0) 197#define CVMX_LMC_RODT_CTL CVMX_LMCX_RODT_CTL(0) 198#define CVMX_LMC_WODT_CTL CVMX_LMCX_WODT_CTL0(0) 199#define CVMX_LMC_WODT_CTL0 CVMX_LMCX_WODT_CTL0(0) 200#define CVMX_LMC_WODT_CTL1 CVMX_LMCX_WODT_CTL1(0) 201 202/* The CN3XXX and CN58XX chips use to not have a TWSI bus number 203 passed to the address macros. These are here to supply backwards 204 compatability with old code. Code should really use the new addresses 205 with bus arguments for support on other chips */ 206#define CVMX_MIO_TWS_INT CVMX_MIO_TWSX_INT(0) 207#define CVMX_MIO_TWS_SW_TWSI CVMX_MIO_TWSX_SW_TWSI(0) 208#define CVMX_MIO_TWS_SW_TWSI_EXT CVMX_MIO_TWSX_SW_TWSI_EXT(0) 209#define CVMX_MIO_TWS_TWSI_SW CVMX_MIO_TWSX_TWSI_SW(0) 210 211/* The CN3XXX and CN58XX chips use to not have a SMI/MDIO bus number 212 passed to the address macros. These are here to supply backwards 213 compatability with old code. Code should really use the new addresses 214 with bus arguments for support on other chips */ 215#define CVMX_SMI_CLK CVMX_SMIX_CLK(0) 216#define CVMX_SMI_CMD CVMX_SMIX_CMD(0) 217#define CVMX_SMI_EN CVMX_SMIX_EN(0) 218#define CVMX_SMI_RD_DAT CVMX_SMIX_RD_DAT(0) 219#define CVMX_SMI_WR_DAT CVMX_SMIX_WR_DAT(0) 220 221#endif /* __CVMX_CSR_H__ */ 222 223