18c2ecf20Sopenharmony_ci/***********************license start***************
28c2ecf20Sopenharmony_ci * Author: Cavium Networks
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Contact: support@caviumnetworks.com
58c2ecf20Sopenharmony_ci * This file is part of the OCTEON SDK
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (c) 2003-2012 Cavium Networks
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This file is free software; you can redistribute it and/or modify
108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as
118c2ecf20Sopenharmony_ci * published by the Free Software Foundation.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * This file is distributed in the hope that it will be useful, but
148c2ecf20Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
158c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
168c2ecf20Sopenharmony_ci * NONINFRINGEMENT.  See the GNU General Public License for more
178c2ecf20Sopenharmony_ci * details.
188c2ecf20Sopenharmony_ci *
198c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License
208c2ecf20Sopenharmony_ci * along with this file; if not, write to the Free Software
218c2ecf20Sopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
228c2ecf20Sopenharmony_ci * or visit http://www.gnu.org/licenses/.
238c2ecf20Sopenharmony_ci *
248c2ecf20Sopenharmony_ci * This file may also be available under a different license from Cavium.
258c2ecf20Sopenharmony_ci * Contact Cavium Networks for more information
268c2ecf20Sopenharmony_ci ***********************license end**************************************/
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#ifndef __CVMX_RNM_DEFS_H__
298c2ecf20Sopenharmony_ci#define __CVMX_RNM_DEFS_H__
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define CVMX_RNM_BIST_STATUS (CVMX_ADD_IO_SEG(0x0001180040000008ull))
328c2ecf20Sopenharmony_ci#define CVMX_RNM_CTL_STATUS (CVMX_ADD_IO_SEG(0x0001180040000000ull))
338c2ecf20Sopenharmony_ci#define CVMX_RNM_EER_DBG (CVMX_ADD_IO_SEG(0x0001180040000018ull))
348c2ecf20Sopenharmony_ci#define CVMX_RNM_EER_KEY (CVMX_ADD_IO_SEG(0x0001180040000010ull))
358c2ecf20Sopenharmony_ci#define CVMX_RNM_SERIAL_NUM (CVMX_ADD_IO_SEG(0x0001180040000020ull))
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciunion cvmx_rnm_bist_status {
388c2ecf20Sopenharmony_ci	uint64_t u64;
398c2ecf20Sopenharmony_ci	struct cvmx_rnm_bist_status_s {
408c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
418c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
428c2ecf20Sopenharmony_ci		uint64_t rrc:1;
438c2ecf20Sopenharmony_ci		uint64_t mem:1;
448c2ecf20Sopenharmony_ci#else
458c2ecf20Sopenharmony_ci		uint64_t mem:1;
468c2ecf20Sopenharmony_ci		uint64_t rrc:1;
478c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
488c2ecf20Sopenharmony_ci#endif
498c2ecf20Sopenharmony_ci	} s;
508c2ecf20Sopenharmony_ci};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciunion cvmx_rnm_ctl_status {
538c2ecf20Sopenharmony_ci	uint64_t u64;
548c2ecf20Sopenharmony_ci	struct cvmx_rnm_ctl_status_s {
558c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
568c2ecf20Sopenharmony_ci		uint64_t reserved_12_63:52;
578c2ecf20Sopenharmony_ci		uint64_t dis_mak:1;
588c2ecf20Sopenharmony_ci		uint64_t eer_lck:1;
598c2ecf20Sopenharmony_ci		uint64_t eer_val:1;
608c2ecf20Sopenharmony_ci		uint64_t ent_sel:4;
618c2ecf20Sopenharmony_ci		uint64_t exp_ent:1;
628c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
638c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
648c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
658c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
668c2ecf20Sopenharmony_ci#else
678c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
688c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
698c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
708c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
718c2ecf20Sopenharmony_ci		uint64_t exp_ent:1;
728c2ecf20Sopenharmony_ci		uint64_t ent_sel:4;
738c2ecf20Sopenharmony_ci		uint64_t eer_val:1;
748c2ecf20Sopenharmony_ci		uint64_t eer_lck:1;
758c2ecf20Sopenharmony_ci		uint64_t dis_mak:1;
768c2ecf20Sopenharmony_ci		uint64_t reserved_12_63:52;
778c2ecf20Sopenharmony_ci#endif
788c2ecf20Sopenharmony_ci	} s;
798c2ecf20Sopenharmony_ci	struct cvmx_rnm_ctl_status_cn30xx {
808c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
818c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
828c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
838c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
848c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
858c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
868c2ecf20Sopenharmony_ci#else
878c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
888c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
898c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
908c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
918c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
928c2ecf20Sopenharmony_ci#endif
938c2ecf20Sopenharmony_ci	} cn30xx;
948c2ecf20Sopenharmony_ci	struct cvmx_rnm_ctl_status_cn50xx {
958c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
968c2ecf20Sopenharmony_ci		uint64_t reserved_9_63:55;
978c2ecf20Sopenharmony_ci		uint64_t ent_sel:4;
988c2ecf20Sopenharmony_ci		uint64_t exp_ent:1;
998c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
1008c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
1018c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
1028c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
1038c2ecf20Sopenharmony_ci#else
1048c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
1058c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
1068c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
1078c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
1088c2ecf20Sopenharmony_ci		uint64_t exp_ent:1;
1098c2ecf20Sopenharmony_ci		uint64_t ent_sel:4;
1108c2ecf20Sopenharmony_ci		uint64_t reserved_9_63:55;
1118c2ecf20Sopenharmony_ci#endif
1128c2ecf20Sopenharmony_ci	} cn50xx;
1138c2ecf20Sopenharmony_ci	struct cvmx_rnm_ctl_status_cn63xx {
1148c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1158c2ecf20Sopenharmony_ci		uint64_t reserved_11_63:53;
1168c2ecf20Sopenharmony_ci		uint64_t eer_lck:1;
1178c2ecf20Sopenharmony_ci		uint64_t eer_val:1;
1188c2ecf20Sopenharmony_ci		uint64_t ent_sel:4;
1198c2ecf20Sopenharmony_ci		uint64_t exp_ent:1;
1208c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
1218c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
1228c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
1238c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
1248c2ecf20Sopenharmony_ci#else
1258c2ecf20Sopenharmony_ci		uint64_t ent_en:1;
1268c2ecf20Sopenharmony_ci		uint64_t rng_en:1;
1278c2ecf20Sopenharmony_ci		uint64_t rnm_rst:1;
1288c2ecf20Sopenharmony_ci		uint64_t rng_rst:1;
1298c2ecf20Sopenharmony_ci		uint64_t exp_ent:1;
1308c2ecf20Sopenharmony_ci		uint64_t ent_sel:4;
1318c2ecf20Sopenharmony_ci		uint64_t eer_val:1;
1328c2ecf20Sopenharmony_ci		uint64_t eer_lck:1;
1338c2ecf20Sopenharmony_ci		uint64_t reserved_11_63:53;
1348c2ecf20Sopenharmony_ci#endif
1358c2ecf20Sopenharmony_ci	} cn63xx;
1368c2ecf20Sopenharmony_ci};
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ciunion cvmx_rnm_eer_dbg {
1398c2ecf20Sopenharmony_ci	uint64_t u64;
1408c2ecf20Sopenharmony_ci	struct cvmx_rnm_eer_dbg_s {
1418c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1428c2ecf20Sopenharmony_ci		uint64_t dat:64;
1438c2ecf20Sopenharmony_ci#else
1448c2ecf20Sopenharmony_ci		uint64_t dat:64;
1458c2ecf20Sopenharmony_ci#endif
1468c2ecf20Sopenharmony_ci	} s;
1478c2ecf20Sopenharmony_ci};
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ciunion cvmx_rnm_eer_key {
1508c2ecf20Sopenharmony_ci	uint64_t u64;
1518c2ecf20Sopenharmony_ci	struct cvmx_rnm_eer_key_s {
1528c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1538c2ecf20Sopenharmony_ci		uint64_t key:64;
1548c2ecf20Sopenharmony_ci#else
1558c2ecf20Sopenharmony_ci		uint64_t key:64;
1568c2ecf20Sopenharmony_ci#endif
1578c2ecf20Sopenharmony_ci	} s;
1588c2ecf20Sopenharmony_ci};
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ciunion cvmx_rnm_serial_num {
1618c2ecf20Sopenharmony_ci	uint64_t u64;
1628c2ecf20Sopenharmony_ci	struct cvmx_rnm_serial_num_s {
1638c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1648c2ecf20Sopenharmony_ci		uint64_t dat:64;
1658c2ecf20Sopenharmony_ci#else
1668c2ecf20Sopenharmony_ci		uint64_t dat:64;
1678c2ecf20Sopenharmony_ci#endif
1688c2ecf20Sopenharmony_ci	} s;
1698c2ecf20Sopenharmony_ci};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci#endif
172