162306a36Sopenharmony_ci/***********************license start*************** 262306a36Sopenharmony_ci * Author: Cavium Networks 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Contact: support@caviumnetworks.com 562306a36Sopenharmony_ci * This file is part of the OCTEON SDK 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Copyright (c) 2003-2012 Cavium Networks 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * This file is free software; you can redistribute it and/or modify 1062306a36Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as 1162306a36Sopenharmony_ci * published by the Free Software Foundation. 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * This file is distributed in the hope that it will be useful, but 1462306a36Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 1562306a36Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 1662306a36Sopenharmony_ci * NONINFRINGEMENT. See the GNU General Public License for more 1762306a36Sopenharmony_ci * details. 1862306a36Sopenharmony_ci * 1962306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License 2062306a36Sopenharmony_ci * along with this file; if not, write to the Free Software 2162306a36Sopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 2262306a36Sopenharmony_ci * or visit http://www.gnu.org/licenses/. 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * This file may also be available under a different license from Cavium. 2562306a36Sopenharmony_ci * Contact Cavium Networks for more information 2662306a36Sopenharmony_ci ***********************license end**************************************/ 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#ifndef __CVMX_RNM_DEFS_H__ 2962306a36Sopenharmony_ci#define __CVMX_RNM_DEFS_H__ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#define CVMX_RNM_BIST_STATUS (CVMX_ADD_IO_SEG(0x0001180040000008ull)) 3262306a36Sopenharmony_ci#define CVMX_RNM_CTL_STATUS (CVMX_ADD_IO_SEG(0x0001180040000000ull)) 3362306a36Sopenharmony_ci#define CVMX_RNM_EER_DBG (CVMX_ADD_IO_SEG(0x0001180040000018ull)) 3462306a36Sopenharmony_ci#define CVMX_RNM_EER_KEY (CVMX_ADD_IO_SEG(0x0001180040000010ull)) 3562306a36Sopenharmony_ci#define CVMX_RNM_SERIAL_NUM (CVMX_ADD_IO_SEG(0x0001180040000020ull)) 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciunion cvmx_rnm_bist_status { 3862306a36Sopenharmony_ci uint64_t u64; 3962306a36Sopenharmony_ci struct cvmx_rnm_bist_status_s { 4062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 4162306a36Sopenharmony_ci uint64_t reserved_2_63:62; 4262306a36Sopenharmony_ci uint64_t rrc:1; 4362306a36Sopenharmony_ci uint64_t mem:1; 4462306a36Sopenharmony_ci#else 4562306a36Sopenharmony_ci uint64_t mem:1; 4662306a36Sopenharmony_ci uint64_t rrc:1; 4762306a36Sopenharmony_ci uint64_t reserved_2_63:62; 4862306a36Sopenharmony_ci#endif 4962306a36Sopenharmony_ci } s; 5062306a36Sopenharmony_ci}; 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciunion cvmx_rnm_ctl_status { 5362306a36Sopenharmony_ci uint64_t u64; 5462306a36Sopenharmony_ci struct cvmx_rnm_ctl_status_s { 5562306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 5662306a36Sopenharmony_ci uint64_t reserved_12_63:52; 5762306a36Sopenharmony_ci uint64_t dis_mak:1; 5862306a36Sopenharmony_ci uint64_t eer_lck:1; 5962306a36Sopenharmony_ci uint64_t eer_val:1; 6062306a36Sopenharmony_ci uint64_t ent_sel:4; 6162306a36Sopenharmony_ci uint64_t exp_ent:1; 6262306a36Sopenharmony_ci uint64_t rng_rst:1; 6362306a36Sopenharmony_ci uint64_t rnm_rst:1; 6462306a36Sopenharmony_ci uint64_t rng_en:1; 6562306a36Sopenharmony_ci uint64_t ent_en:1; 6662306a36Sopenharmony_ci#else 6762306a36Sopenharmony_ci uint64_t ent_en:1; 6862306a36Sopenharmony_ci uint64_t rng_en:1; 6962306a36Sopenharmony_ci uint64_t rnm_rst:1; 7062306a36Sopenharmony_ci uint64_t rng_rst:1; 7162306a36Sopenharmony_ci uint64_t exp_ent:1; 7262306a36Sopenharmony_ci uint64_t ent_sel:4; 7362306a36Sopenharmony_ci uint64_t eer_val:1; 7462306a36Sopenharmony_ci uint64_t eer_lck:1; 7562306a36Sopenharmony_ci uint64_t dis_mak:1; 7662306a36Sopenharmony_ci uint64_t reserved_12_63:52; 7762306a36Sopenharmony_ci#endif 7862306a36Sopenharmony_ci } s; 7962306a36Sopenharmony_ci struct cvmx_rnm_ctl_status_cn30xx { 8062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 8162306a36Sopenharmony_ci uint64_t reserved_4_63:60; 8262306a36Sopenharmony_ci uint64_t rng_rst:1; 8362306a36Sopenharmony_ci uint64_t rnm_rst:1; 8462306a36Sopenharmony_ci uint64_t rng_en:1; 8562306a36Sopenharmony_ci uint64_t ent_en:1; 8662306a36Sopenharmony_ci#else 8762306a36Sopenharmony_ci uint64_t ent_en:1; 8862306a36Sopenharmony_ci uint64_t rng_en:1; 8962306a36Sopenharmony_ci uint64_t rnm_rst:1; 9062306a36Sopenharmony_ci uint64_t rng_rst:1; 9162306a36Sopenharmony_ci uint64_t reserved_4_63:60; 9262306a36Sopenharmony_ci#endif 9362306a36Sopenharmony_ci } cn30xx; 9462306a36Sopenharmony_ci struct cvmx_rnm_ctl_status_cn50xx { 9562306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 9662306a36Sopenharmony_ci uint64_t reserved_9_63:55; 9762306a36Sopenharmony_ci uint64_t ent_sel:4; 9862306a36Sopenharmony_ci uint64_t exp_ent:1; 9962306a36Sopenharmony_ci uint64_t rng_rst:1; 10062306a36Sopenharmony_ci uint64_t rnm_rst:1; 10162306a36Sopenharmony_ci uint64_t rng_en:1; 10262306a36Sopenharmony_ci uint64_t ent_en:1; 10362306a36Sopenharmony_ci#else 10462306a36Sopenharmony_ci uint64_t ent_en:1; 10562306a36Sopenharmony_ci uint64_t rng_en:1; 10662306a36Sopenharmony_ci uint64_t rnm_rst:1; 10762306a36Sopenharmony_ci uint64_t rng_rst:1; 10862306a36Sopenharmony_ci uint64_t exp_ent:1; 10962306a36Sopenharmony_ci uint64_t ent_sel:4; 11062306a36Sopenharmony_ci uint64_t reserved_9_63:55; 11162306a36Sopenharmony_ci#endif 11262306a36Sopenharmony_ci } cn50xx; 11362306a36Sopenharmony_ci struct cvmx_rnm_ctl_status_cn63xx { 11462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 11562306a36Sopenharmony_ci uint64_t reserved_11_63:53; 11662306a36Sopenharmony_ci uint64_t eer_lck:1; 11762306a36Sopenharmony_ci uint64_t eer_val:1; 11862306a36Sopenharmony_ci uint64_t ent_sel:4; 11962306a36Sopenharmony_ci uint64_t exp_ent:1; 12062306a36Sopenharmony_ci uint64_t rng_rst:1; 12162306a36Sopenharmony_ci uint64_t rnm_rst:1; 12262306a36Sopenharmony_ci uint64_t rng_en:1; 12362306a36Sopenharmony_ci uint64_t ent_en:1; 12462306a36Sopenharmony_ci#else 12562306a36Sopenharmony_ci uint64_t ent_en:1; 12662306a36Sopenharmony_ci uint64_t rng_en:1; 12762306a36Sopenharmony_ci uint64_t rnm_rst:1; 12862306a36Sopenharmony_ci uint64_t rng_rst:1; 12962306a36Sopenharmony_ci uint64_t exp_ent:1; 13062306a36Sopenharmony_ci uint64_t ent_sel:4; 13162306a36Sopenharmony_ci uint64_t eer_val:1; 13262306a36Sopenharmony_ci uint64_t eer_lck:1; 13362306a36Sopenharmony_ci uint64_t reserved_11_63:53; 13462306a36Sopenharmony_ci#endif 13562306a36Sopenharmony_ci } cn63xx; 13662306a36Sopenharmony_ci}; 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ciunion cvmx_rnm_eer_dbg { 13962306a36Sopenharmony_ci uint64_t u64; 14062306a36Sopenharmony_ci struct cvmx_rnm_eer_dbg_s { 14162306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 14262306a36Sopenharmony_ci uint64_t dat:64; 14362306a36Sopenharmony_ci#else 14462306a36Sopenharmony_ci uint64_t dat:64; 14562306a36Sopenharmony_ci#endif 14662306a36Sopenharmony_ci } s; 14762306a36Sopenharmony_ci}; 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ciunion cvmx_rnm_eer_key { 15062306a36Sopenharmony_ci uint64_t u64; 15162306a36Sopenharmony_ci struct cvmx_rnm_eer_key_s { 15262306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 15362306a36Sopenharmony_ci uint64_t key:64; 15462306a36Sopenharmony_ci#else 15562306a36Sopenharmony_ci uint64_t key:64; 15662306a36Sopenharmony_ci#endif 15762306a36Sopenharmony_ci } s; 15862306a36Sopenharmony_ci}; 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ciunion cvmx_rnm_serial_num { 16162306a36Sopenharmony_ci uint64_t u64; 16262306a36Sopenharmony_ci struct cvmx_rnm_serial_num_s { 16362306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 16462306a36Sopenharmony_ci uint64_t dat:64; 16562306a36Sopenharmony_ci#else 16662306a36Sopenharmony_ci uint64_t dat:64; 16762306a36Sopenharmony_ci#endif 16862306a36Sopenharmony_ci } s; 16962306a36Sopenharmony_ci}; 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci#endif 172