1e2644915SDavid Daney /***********************license start*************** 2e2644915SDavid Daney * Author: Cavium Networks 3e2644915SDavid Daney * 4e2644915SDavid Daney * Contact: support@caviumnetworks.com 5e2644915SDavid Daney * This file is part of the OCTEON SDK 6e2644915SDavid Daney * 7*c5aa59e8SDavid Daney * Copyright (c) 2003-2012 Cavium Networks 8e2644915SDavid Daney * 9e2644915SDavid Daney * This file is free software; you can redistribute it and/or modify 10e2644915SDavid Daney * it under the terms of the GNU General Public License, Version 2, as 11e2644915SDavid Daney * published by the Free Software Foundation. 12e2644915SDavid Daney * 13e2644915SDavid Daney * This file is distributed in the hope that it will be useful, but 14e2644915SDavid Daney * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 15e2644915SDavid Daney * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 16e2644915SDavid Daney * NONINFRINGEMENT. See the GNU General Public License for more 17e2644915SDavid Daney * details. 18e2644915SDavid Daney * 19e2644915SDavid Daney * You should have received a copy of the GNU General Public License 20e2644915SDavid Daney * along with this file; if not, write to the Free Software 21e2644915SDavid Daney * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22e2644915SDavid Daney * or visit http://www.gnu.org/licenses/. 23e2644915SDavid Daney * 24e2644915SDavid Daney * This file may also be available under a different license from Cavium. 25e2644915SDavid Daney * Contact Cavium Networks for more information 26e2644915SDavid Daney ***********************license end**************************************/ 27e2644915SDavid Daney 28e2644915SDavid Daney #ifndef __CVMX_RNM_DEFS_H__ 29e2644915SDavid Daney #define __CVMX_RNM_DEFS_H__ 30e2644915SDavid Daney 31aa32a955SDavid Daney #define CVMX_RNM_BIST_STATUS (CVMX_ADD_IO_SEG(0x0001180040000008ull)) 32aa32a955SDavid Daney #define CVMX_RNM_CTL_STATUS (CVMX_ADD_IO_SEG(0x0001180040000000ull)) 33aa32a955SDavid Daney #define CVMX_RNM_EER_DBG (CVMX_ADD_IO_SEG(0x0001180040000018ull)) 34aa32a955SDavid Daney #define CVMX_RNM_EER_KEY (CVMX_ADD_IO_SEG(0x0001180040000010ull)) 35aa32a955SDavid Daney #define CVMX_RNM_SERIAL_NUM (CVMX_ADD_IO_SEG(0x0001180040000020ull)) 36e2644915SDavid Daney 37e2644915SDavid Daney union cvmx_rnm_bist_status { 38e2644915SDavid Daney uint64_t u64; 39e2644915SDavid Daney struct cvmx_rnm_bist_status_s { 40*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 41e2644915SDavid Daney uint64_t reserved_2_63:62; 42e2644915SDavid Daney uint64_t rrc:1; 43e2644915SDavid Daney uint64_t mem:1; 44*c5aa59e8SDavid Daney #else 45*c5aa59e8SDavid Daney uint64_t mem:1; 46*c5aa59e8SDavid Daney uint64_t rrc:1; 47*c5aa59e8SDavid Daney uint64_t reserved_2_63:62; 48*c5aa59e8SDavid Daney #endif 49e2644915SDavid Daney } s; 50e2644915SDavid Daney }; 51e2644915SDavid Daney 52e2644915SDavid Daney union cvmx_rnm_ctl_status { 53e2644915SDavid Daney uint64_t u64; 54e2644915SDavid Daney struct cvmx_rnm_ctl_status_s { 55*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 56*c5aa59e8SDavid Daney uint64_t reserved_12_63:52; 57*c5aa59e8SDavid Daney uint64_t dis_mak:1; 58*c5aa59e8SDavid Daney uint64_t eer_lck:1; 59*c5aa59e8SDavid Daney uint64_t eer_val:1; 60*c5aa59e8SDavid Daney uint64_t ent_sel:4; 61*c5aa59e8SDavid Daney uint64_t exp_ent:1; 62*c5aa59e8SDavid Daney uint64_t rng_rst:1; 63*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 64*c5aa59e8SDavid Daney uint64_t rng_en:1; 65*c5aa59e8SDavid Daney uint64_t ent_en:1; 66*c5aa59e8SDavid Daney #else 67*c5aa59e8SDavid Daney uint64_t ent_en:1; 68*c5aa59e8SDavid Daney uint64_t rng_en:1; 69*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 70*c5aa59e8SDavid Daney uint64_t rng_rst:1; 71*c5aa59e8SDavid Daney uint64_t exp_ent:1; 72*c5aa59e8SDavid Daney uint64_t ent_sel:4; 73*c5aa59e8SDavid Daney uint64_t eer_val:1; 74*c5aa59e8SDavid Daney uint64_t eer_lck:1; 75*c5aa59e8SDavid Daney uint64_t dis_mak:1; 76*c5aa59e8SDavid Daney uint64_t reserved_12_63:52; 77*c5aa59e8SDavid Daney #endif 78*c5aa59e8SDavid Daney } s; 79*c5aa59e8SDavid Daney struct cvmx_rnm_ctl_status_cn30xx { 80*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 81*c5aa59e8SDavid Daney uint64_t reserved_4_63:60; 82*c5aa59e8SDavid Daney uint64_t rng_rst:1; 83*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 84*c5aa59e8SDavid Daney uint64_t rng_en:1; 85*c5aa59e8SDavid Daney uint64_t ent_en:1; 86*c5aa59e8SDavid Daney #else 87*c5aa59e8SDavid Daney uint64_t ent_en:1; 88*c5aa59e8SDavid Daney uint64_t rng_en:1; 89*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 90*c5aa59e8SDavid Daney uint64_t rng_rst:1; 91*c5aa59e8SDavid Daney uint64_t reserved_4_63:60; 92*c5aa59e8SDavid Daney #endif 93*c5aa59e8SDavid Daney } cn30xx; 94*c5aa59e8SDavid Daney struct cvmx_rnm_ctl_status_cn50xx { 95*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 96*c5aa59e8SDavid Daney uint64_t reserved_9_63:55; 97*c5aa59e8SDavid Daney uint64_t ent_sel:4; 98*c5aa59e8SDavid Daney uint64_t exp_ent:1; 99*c5aa59e8SDavid Daney uint64_t rng_rst:1; 100*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 101*c5aa59e8SDavid Daney uint64_t rng_en:1; 102*c5aa59e8SDavid Daney uint64_t ent_en:1; 103*c5aa59e8SDavid Daney #else 104*c5aa59e8SDavid Daney uint64_t ent_en:1; 105*c5aa59e8SDavid Daney uint64_t rng_en:1; 106*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 107*c5aa59e8SDavid Daney uint64_t rng_rst:1; 108*c5aa59e8SDavid Daney uint64_t exp_ent:1; 109*c5aa59e8SDavid Daney uint64_t ent_sel:4; 110*c5aa59e8SDavid Daney uint64_t reserved_9_63:55; 111*c5aa59e8SDavid Daney #endif 112*c5aa59e8SDavid Daney } cn50xx; 113*c5aa59e8SDavid Daney struct cvmx_rnm_ctl_status_cn63xx { 114*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 115aa32a955SDavid Daney uint64_t reserved_11_63:53; 116aa32a955SDavid Daney uint64_t eer_lck:1; 117aa32a955SDavid Daney uint64_t eer_val:1; 118e2644915SDavid Daney uint64_t ent_sel:4; 119e2644915SDavid Daney uint64_t exp_ent:1; 120e2644915SDavid Daney uint64_t rng_rst:1; 121e2644915SDavid Daney uint64_t rnm_rst:1; 122e2644915SDavid Daney uint64_t rng_en:1; 123e2644915SDavid Daney uint64_t ent_en:1; 124*c5aa59e8SDavid Daney #else 125e2644915SDavid Daney uint64_t ent_en:1; 126*c5aa59e8SDavid Daney uint64_t rng_en:1; 127*c5aa59e8SDavid Daney uint64_t rnm_rst:1; 128*c5aa59e8SDavid Daney uint64_t rng_rst:1; 129aa32a955SDavid Daney uint64_t exp_ent:1; 130*c5aa59e8SDavid Daney uint64_t ent_sel:4; 131*c5aa59e8SDavid Daney uint64_t eer_val:1; 132*c5aa59e8SDavid Daney uint64_t eer_lck:1; 133*c5aa59e8SDavid Daney uint64_t reserved_11_63:53; 134*c5aa59e8SDavid Daney #endif 135*c5aa59e8SDavid Daney } cn63xx; 136aa32a955SDavid Daney }; 137aa32a955SDavid Daney 138aa32a955SDavid Daney union cvmx_rnm_eer_dbg { 139aa32a955SDavid Daney uint64_t u64; 140aa32a955SDavid Daney struct cvmx_rnm_eer_dbg_s { 141*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 142aa32a955SDavid Daney uint64_t dat:64; 143*c5aa59e8SDavid Daney #else 144*c5aa59e8SDavid Daney uint64_t dat:64; 145*c5aa59e8SDavid Daney #endif 146aa32a955SDavid Daney } s; 147aa32a955SDavid Daney }; 148aa32a955SDavid Daney 149aa32a955SDavid Daney union cvmx_rnm_eer_key { 150aa32a955SDavid Daney uint64_t u64; 151aa32a955SDavid Daney struct cvmx_rnm_eer_key_s { 152*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 153aa32a955SDavid Daney uint64_t key:64; 154*c5aa59e8SDavid Daney #else 155*c5aa59e8SDavid Daney uint64_t key:64; 156*c5aa59e8SDavid Daney #endif 157aa32a955SDavid Daney } s; 158aa32a955SDavid Daney }; 159aa32a955SDavid Daney 160aa32a955SDavid Daney union cvmx_rnm_serial_num { 161aa32a955SDavid Daney uint64_t u64; 162aa32a955SDavid Daney struct cvmx_rnm_serial_num_s { 163*c5aa59e8SDavid Daney #ifdef __BIG_ENDIAN_BITFIELD 164aa32a955SDavid Daney uint64_t dat:64; 165*c5aa59e8SDavid Daney #else 166*c5aa59e8SDavid Daney uint64_t dat:64; 167*c5aa59e8SDavid Daney #endif 168aa32a955SDavid Daney } s; 169e2644915SDavid Daney }; 170e2644915SDavid Daney 171e2644915SDavid Daney #endif 172