1*14fa93cdSSrikanth Jampala #ifndef __NITROX_CSR_H 2*14fa93cdSSrikanth Jampala #define __NITROX_CSR_H 3*14fa93cdSSrikanth Jampala 4*14fa93cdSSrikanth Jampala #include <asm/byteorder.h> 5*14fa93cdSSrikanth Jampala #include <linux/types.h> 6*14fa93cdSSrikanth Jampala 7*14fa93cdSSrikanth Jampala /* EMU clusters */ 8*14fa93cdSSrikanth Jampala #define NR_CLUSTERS 4 9*14fa93cdSSrikanth Jampala #define AE_CORES_PER_CLUSTER 20 10*14fa93cdSSrikanth Jampala #define SE_CORES_PER_CLUSTER 16 11*14fa93cdSSrikanth Jampala 12*14fa93cdSSrikanth Jampala /* BIST registers */ 13*14fa93cdSSrikanth Jampala #define EMU_BIST_STATUSX(_i) (0x1402700 + ((_i) * 0x40000)) 14*14fa93cdSSrikanth Jampala #define UCD_BIST_STATUS 0x12C0070 15*14fa93cdSSrikanth Jampala #define NPS_CORE_BIST_REG 0x10000E8 16*14fa93cdSSrikanth Jampala #define NPS_CORE_NPC_BIST_REG 0x1000128 17*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_BIST_REG 0x1040088 18*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_BIST_REG 0x1040100 19*14fa93cdSSrikanth Jampala #define POM_BIST_REG 0x11C0100 20*14fa93cdSSrikanth Jampala #define BMI_BIST_REG 0x1140080 21*14fa93cdSSrikanth Jampala #define EFL_CORE_BIST_REGX(_i) (0x1240100 + ((_i) * 0x400)) 22*14fa93cdSSrikanth Jampala #define EFL_TOP_BIST_STAT 0x1241090 23*14fa93cdSSrikanth Jampala #define BMO_BIST_REG 0x1180080 24*14fa93cdSSrikanth Jampala #define LBC_BIST_STATUS 0x1200020 25*14fa93cdSSrikanth Jampala #define PEM_BIST_STATUSX(_i) (0x1080468 | ((_i) << 18)) 26*14fa93cdSSrikanth Jampala 27*14fa93cdSSrikanth Jampala /* EMU registers */ 28*14fa93cdSSrikanth Jampala #define EMU_SE_ENABLEX(_i) (0x1400000 + ((_i) * 0x40000)) 29*14fa93cdSSrikanth Jampala #define EMU_AE_ENABLEX(_i) (0x1400008 + ((_i) * 0x40000)) 30*14fa93cdSSrikanth Jampala #define EMU_WD_INT_ENA_W1SX(_i) (0x1402318 + ((_i) * 0x40000)) 31*14fa93cdSSrikanth Jampala #define EMU_GE_INT_ENA_W1SX(_i) (0x1402518 + ((_i) * 0x40000)) 32*14fa93cdSSrikanth Jampala #define EMU_FUSE_MAPX(_i) (0x1402708 + ((_i) * 0x40000)) 33*14fa93cdSSrikanth Jampala 34*14fa93cdSSrikanth Jampala /* UCD registers */ 35*14fa93cdSSrikanth Jampala #define UCD_UCODE_LOAD_BLOCK_NUM 0x12C0010 36*14fa93cdSSrikanth Jampala #define UCD_UCODE_LOAD_IDX_DATAX(_i) (0x12C0018 + ((_i) * 0x20)) 37*14fa93cdSSrikanth Jampala #define UCD_SE_EID_UCODE_BLOCK_NUMX(_i) (0x12C0000 + ((_i) * 0x1000)) 38*14fa93cdSSrikanth Jampala 39*14fa93cdSSrikanth Jampala /* NPS core registers */ 40*14fa93cdSSrikanth Jampala #define NPS_CORE_GBL_VFCFG 0x1000000 41*14fa93cdSSrikanth Jampala #define NPS_CORE_CONTROL 0x1000008 42*14fa93cdSSrikanth Jampala #define NPS_CORE_INT_ACTIVE 0x1000080 43*14fa93cdSSrikanth Jampala #define NPS_CORE_INT 0x10000A0 44*14fa93cdSSrikanth Jampala #define NPS_CORE_INT_ENA_W1S 0x10000B8 45*14fa93cdSSrikanth Jampala 46*14fa93cdSSrikanth Jampala /* NPS packet registers */ 47*14fa93cdSSrikanth Jampala #define NPS_PKT_INT 0x1040018 48*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_HI 0x1040108 49*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_HI_ENA_W1S 0x1040120 50*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_LO 0x1040128 51*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_LO_ENA_W1S 0x1040140 52*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_ERR_TYPE 0x1040148 53*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_ERR_TYPE_ENA_W1S 0x1040160 54*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_CTLX(_i) (0x10060 + ((_i) * 0x40000)) 55*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_BADDRX(_i) (0x10068 + ((_i) * 0x40000)) 56*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_RSIZEX(_i) (0x10070 + ((_i) * 0x40000)) 57*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_DONE_CNTSX(_i) (0x10080 + ((_i) * 0x40000)) 58*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_BAOFF_DBELLX(_i) (0x10078 + ((_i) * 0x40000)) 59*14fa93cdSSrikanth Jampala #define NPS_PKT_IN_INT_LEVELSX(_i) (0x10088 + ((_i) * 0x40000)) 60*14fa93cdSSrikanth Jampala 61*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_HI 0x1040208 62*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_HI_ENA_W1S 0x1040220 63*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_LO 0x1040228 64*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_LO_ENA_W1S 0x1040240 65*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_ERR_TYPE 0x1040248 66*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_ERR_TYPE_ENA_W1S 0x1040260 67*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_CTLX(_i) (0x10000 + ((_i) * 0x40000)) 68*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_CNTSX(_i) (0x10008 + ((_i) * 0x40000)) 69*14fa93cdSSrikanth Jampala #define NPS_PKT_SLC_INT_LEVELSX(_i) (0x10010 + ((_i) * 0x40000)) 70*14fa93cdSSrikanth Jampala 71*14fa93cdSSrikanth Jampala /* POM registers */ 72*14fa93cdSSrikanth Jampala #define POM_INT_ENA_W1S 0x11C0018 73*14fa93cdSSrikanth Jampala #define POM_GRP_EXECMASKX(_i) (0x11C1100 | ((_i) * 8)) 74*14fa93cdSSrikanth Jampala #define POM_INT 0x11C0000 75*14fa93cdSSrikanth Jampala #define POM_PERF_CTL 0x11CC400 76*14fa93cdSSrikanth Jampala 77*14fa93cdSSrikanth Jampala /* BMI registers */ 78*14fa93cdSSrikanth Jampala #define BMI_INT 0x1140000 79*14fa93cdSSrikanth Jampala #define BMI_CTL 0x1140020 80*14fa93cdSSrikanth Jampala #define BMI_INT_ENA_W1S 0x1140018 81*14fa93cdSSrikanth Jampala 82*14fa93cdSSrikanth Jampala /* EFL registers */ 83*14fa93cdSSrikanth Jampala #define EFL_CORE_INT_ENA_W1SX(_i) (0x1240018 + ((_i) * 0x400)) 84*14fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT0X(_i) (0x1240050 + ((_i) * 0x400)) 85*14fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT0_ENA_W1SX(_i) (0x1240068 + ((_i) * 0x400)) 86*14fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT1X(_i) (0x1240070 + ((_i) * 0x400)) 87*14fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT1_ENA_W1SX(_i) (0x1240088 + ((_i) * 0x400)) 88*14fa93cdSSrikanth Jampala #define EFL_CORE_SE_ERR_INTX(_i) (0x12400A0 + ((_i) * 0x400)) 89*14fa93cdSSrikanth Jampala #define EFL_RNM_CTL_STATUS 0x1241800 90*14fa93cdSSrikanth Jampala #define EFL_CORE_INTX(_i) (0x1240000 + ((_i) * 0x400)) 91*14fa93cdSSrikanth Jampala 92*14fa93cdSSrikanth Jampala /* BMO registers */ 93*14fa93cdSSrikanth Jampala #define BMO_CTL2 0x1180028 94*14fa93cdSSrikanth Jampala 95*14fa93cdSSrikanth Jampala /* LBC registers */ 96*14fa93cdSSrikanth Jampala #define LBC_INT 0x1200000 97*14fa93cdSSrikanth Jampala #define LBC_INVAL_CTL 0x1201010 98*14fa93cdSSrikanth Jampala #define LBC_PLM_VF1_64_INT 0x1202008 99*14fa93cdSSrikanth Jampala #define LBC_INVAL_STATUS 0x1202010 100*14fa93cdSSrikanth Jampala #define LBC_INT_ENA_W1S 0x1203000 101*14fa93cdSSrikanth Jampala #define LBC_PLM_VF1_64_INT_ENA_W1S 0x1205008 102*14fa93cdSSrikanth Jampala #define LBC_PLM_VF65_128_INT 0x1206008 103*14fa93cdSSrikanth Jampala #define LBC_ELM_VF1_64_INT 0x1208000 104*14fa93cdSSrikanth Jampala #define LBC_PLM_VF65_128_INT_ENA_W1S 0x1209008 105*14fa93cdSSrikanth Jampala #define LBC_ELM_VF1_64_INT_ENA_W1S 0x120B000 106*14fa93cdSSrikanth Jampala #define LBC_ELM_VF65_128_INT 0x120C000 107*14fa93cdSSrikanth Jampala #define LBC_ELM_VF65_128_INT_ENA_W1S 0x120F000 108*14fa93cdSSrikanth Jampala 109*14fa93cdSSrikanth Jampala /* PEM registers */ 110*14fa93cdSSrikanth Jampala #define PEM0_INT 0x1080428 111*14fa93cdSSrikanth Jampala 112*14fa93cdSSrikanth Jampala /** 113*14fa93cdSSrikanth Jampala * struct emu_fuse_map - EMU Fuse Map Registers 114*14fa93cdSSrikanth Jampala * @ae_fuse: Fuse settings for AE 19..0 115*14fa93cdSSrikanth Jampala * @se_fuse: Fuse settings for SE 15..0 116*14fa93cdSSrikanth Jampala * 117*14fa93cdSSrikanth Jampala * A set bit indicates the unit is fuse disabled. 118*14fa93cdSSrikanth Jampala */ 119*14fa93cdSSrikanth Jampala union emu_fuse_map { 120*14fa93cdSSrikanth Jampala u64 value; 121*14fa93cdSSrikanth Jampala struct { 122*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 123*14fa93cdSSrikanth Jampala u64 valid : 1; 124*14fa93cdSSrikanth Jampala u64 raz_52_62 : 11; 125*14fa93cdSSrikanth Jampala u64 ae_fuse : 20; 126*14fa93cdSSrikanth Jampala u64 raz_16_31 : 16; 127*14fa93cdSSrikanth Jampala u64 se_fuse : 16; 128*14fa93cdSSrikanth Jampala #else 129*14fa93cdSSrikanth Jampala u64 se_fuse : 16; 130*14fa93cdSSrikanth Jampala u64 raz_16_31 : 16; 131*14fa93cdSSrikanth Jampala u64 ae_fuse : 20; 132*14fa93cdSSrikanth Jampala u64 raz_52_62 : 11; 133*14fa93cdSSrikanth Jampala u64 valid : 1; 134*14fa93cdSSrikanth Jampala #endif 135*14fa93cdSSrikanth Jampala } s; 136*14fa93cdSSrikanth Jampala }; 137*14fa93cdSSrikanth Jampala 138*14fa93cdSSrikanth Jampala /** 139*14fa93cdSSrikanth Jampala * struct emu_se_enable - Symmetric Engine Enable Registers 140*14fa93cdSSrikanth Jampala * @enable: Individual enables for each of the clusters 141*14fa93cdSSrikanth Jampala * 16 symmetric engines. 142*14fa93cdSSrikanth Jampala */ 143*14fa93cdSSrikanth Jampala union emu_se_enable { 144*14fa93cdSSrikanth Jampala u64 value; 145*14fa93cdSSrikanth Jampala struct { 146*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 147*14fa93cdSSrikanth Jampala u64 raz : 48; 148*14fa93cdSSrikanth Jampala u64 enable : 16; 149*14fa93cdSSrikanth Jampala #else 150*14fa93cdSSrikanth Jampala u64 enable : 16; 151*14fa93cdSSrikanth Jampala u64 raz : 48; 152*14fa93cdSSrikanth Jampala #endif 153*14fa93cdSSrikanth Jampala } s; 154*14fa93cdSSrikanth Jampala }; 155*14fa93cdSSrikanth Jampala 156*14fa93cdSSrikanth Jampala /** 157*14fa93cdSSrikanth Jampala * struct emu_ae_enable - EMU Asymmetric engines. 158*14fa93cdSSrikanth Jampala * @enable: Individual enables for each of the cluster's 159*14fa93cdSSrikanth Jampala * 20 Asymmetric Engines. 160*14fa93cdSSrikanth Jampala */ 161*14fa93cdSSrikanth Jampala union emu_ae_enable { 162*14fa93cdSSrikanth Jampala u64 value; 163*14fa93cdSSrikanth Jampala struct { 164*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 165*14fa93cdSSrikanth Jampala u64 raz : 44; 166*14fa93cdSSrikanth Jampala u64 enable : 20; 167*14fa93cdSSrikanth Jampala #else 168*14fa93cdSSrikanth Jampala u64 enable : 20; 169*14fa93cdSSrikanth Jampala u64 raz : 44; 170*14fa93cdSSrikanth Jampala #endif 171*14fa93cdSSrikanth Jampala } s; 172*14fa93cdSSrikanth Jampala }; 173*14fa93cdSSrikanth Jampala 174*14fa93cdSSrikanth Jampala /** 175*14fa93cdSSrikanth Jampala * struct emu_wd_int_ena_w1s - EMU Interrupt Enable Registers 176*14fa93cdSSrikanth Jampala * @ae_wd: Reads or sets enable for EMU(0..3)_WD_INT[AE_WD] 177*14fa93cdSSrikanth Jampala * @se_wd: Reads or sets enable for EMU(0..3)_WD_INT[SE_WD] 178*14fa93cdSSrikanth Jampala */ 179*14fa93cdSSrikanth Jampala union emu_wd_int_ena_w1s { 180*14fa93cdSSrikanth Jampala u64 value; 181*14fa93cdSSrikanth Jampala struct { 182*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 183*14fa93cdSSrikanth Jampala u64 raz2 : 12; 184*14fa93cdSSrikanth Jampala u64 ae_wd : 20; 185*14fa93cdSSrikanth Jampala u64 raz1 : 16; 186*14fa93cdSSrikanth Jampala u64 se_wd : 16; 187*14fa93cdSSrikanth Jampala #else 188*14fa93cdSSrikanth Jampala u64 se_wd : 16; 189*14fa93cdSSrikanth Jampala u64 raz1 : 16; 190*14fa93cdSSrikanth Jampala u64 ae_wd : 20; 191*14fa93cdSSrikanth Jampala u64 raz2 : 12; 192*14fa93cdSSrikanth Jampala #endif 193*14fa93cdSSrikanth Jampala } s; 194*14fa93cdSSrikanth Jampala }; 195*14fa93cdSSrikanth Jampala 196*14fa93cdSSrikanth Jampala /** 197*14fa93cdSSrikanth Jampala * struct emu_ge_int_ena_w1s - EMU Interrupt Enable set registers 198*14fa93cdSSrikanth Jampala * @ae_ge: Reads or sets enable for EMU(0..3)_GE_INT[AE_GE] 199*14fa93cdSSrikanth Jampala * @se_ge: Reads or sets enable for EMU(0..3)_GE_INT[SE_GE] 200*14fa93cdSSrikanth Jampala */ 201*14fa93cdSSrikanth Jampala union emu_ge_int_ena_w1s { 202*14fa93cdSSrikanth Jampala u64 value; 203*14fa93cdSSrikanth Jampala struct { 204*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 205*14fa93cdSSrikanth Jampala u64 raz_52_63 : 12; 206*14fa93cdSSrikanth Jampala u64 ae_ge : 20; 207*14fa93cdSSrikanth Jampala u64 raz_16_31: 16; 208*14fa93cdSSrikanth Jampala u64 se_ge : 16; 209*14fa93cdSSrikanth Jampala #else 210*14fa93cdSSrikanth Jampala u64 se_ge : 16; 211*14fa93cdSSrikanth Jampala u64 raz_16_31: 16; 212*14fa93cdSSrikanth Jampala u64 ae_ge : 20; 213*14fa93cdSSrikanth Jampala u64 raz_52_63 : 12; 214*14fa93cdSSrikanth Jampala #endif 215*14fa93cdSSrikanth Jampala } s; 216*14fa93cdSSrikanth Jampala }; 217*14fa93cdSSrikanth Jampala 218*14fa93cdSSrikanth Jampala /** 219*14fa93cdSSrikanth Jampala * struct nps_pkt_slc_ctl - Solicited Packet Out Control Registers 220*14fa93cdSSrikanth Jampala * @rh: Indicates whether to remove or include the response header 221*14fa93cdSSrikanth Jampala * 1 = Include, 0 = Remove 222*14fa93cdSSrikanth Jampala * @z: If set, 8 trailing 0x00 bytes will be added to the end of the 223*14fa93cdSSrikanth Jampala * outgoing packet. 224*14fa93cdSSrikanth Jampala * @enb: Enable for this port. 225*14fa93cdSSrikanth Jampala */ 226*14fa93cdSSrikanth Jampala union nps_pkt_slc_ctl { 227*14fa93cdSSrikanth Jampala u64 value; 228*14fa93cdSSrikanth Jampala struct { 229*14fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD) 230*14fa93cdSSrikanth Jampala u64 raz : 61; 231*14fa93cdSSrikanth Jampala u64 rh : 1; 232*14fa93cdSSrikanth Jampala u64 z : 1; 233*14fa93cdSSrikanth Jampala u64 enb : 1; 234*14fa93cdSSrikanth Jampala #else 235*14fa93cdSSrikanth Jampala u64 enb : 1; 236*14fa93cdSSrikanth Jampala u64 z : 1; 237*14fa93cdSSrikanth Jampala u64 rh : 1; 238*14fa93cdSSrikanth Jampala u64 raz : 61; 239*14fa93cdSSrikanth Jampala #endif 240*14fa93cdSSrikanth Jampala } s; 241*14fa93cdSSrikanth Jampala }; 242*14fa93cdSSrikanth Jampala 243*14fa93cdSSrikanth Jampala /** 244*14fa93cdSSrikanth Jampala * struct nps_pkt_slc_cnts - Solicited Packet Out Count Registers 245*14fa93cdSSrikanth Jampala * @slc_int: Returns a 1 when: 246*14fa93cdSSrikanth Jampala * NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT], or 247*14fa93cdSSrikanth Jampala * NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SLC(i)_INT_LEVELS[TIMET]. 248*14fa93cdSSrikanth Jampala * To clear the bit, the CNTS register must be written to clear. 249*14fa93cdSSrikanth Jampala * @in_int: Returns a 1 when: 250*14fa93cdSSrikanth Jampala * NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT]. 251*14fa93cdSSrikanth Jampala * To clear the bit, the DONE_CNTS register must be written to clear. 252*14fa93cdSSrikanth Jampala * @mbox_int: Returns a 1 when: 253*14fa93cdSSrikanth Jampala * NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set. To clear the bit, 254*14fa93cdSSrikanth Jampala * write NPS_PKT_MBOX_PF_VF(i)_INT[INTR] with 1. 255*14fa93cdSSrikanth Jampala * @timer: Timer, incremented every 2048 coprocessor clock cycles 256*14fa93cdSSrikanth Jampala * when [CNT] is not zero. The hardware clears both [TIMER] and 257*14fa93cdSSrikanth Jampala * [INT] when [CNT] goes to 0. 258*14fa93cdSSrikanth Jampala * @cnt: Packet counter. Hardware adds to [CNT] as it sends packets out. 259*14fa93cdSSrikanth Jampala * On a write to this CSR, hardware subtracts the amount written to the 260*14fa93cdSSrikanth Jampala * [CNT] field from [CNT]. 261*14fa93cdSSrikanth Jampala */ 262*14fa93cdSSrikanth Jampala union nps_pkt_slc_cnts { 263*14fa93cdSSrikanth Jampala u64 value; 264*14fa93cdSSrikanth Jampala struct { 265*14fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD) 266*14fa93cdSSrikanth Jampala u64 slc_int : 1; 267*14fa93cdSSrikanth Jampala u64 uns_int : 1; 268*14fa93cdSSrikanth Jampala u64 in_int : 1; 269*14fa93cdSSrikanth Jampala u64 mbox_int : 1; 270*14fa93cdSSrikanth Jampala u64 resend : 1; 271*14fa93cdSSrikanth Jampala u64 raz : 5; 272*14fa93cdSSrikanth Jampala u64 timer : 22; 273*14fa93cdSSrikanth Jampala u64 cnt : 32; 274*14fa93cdSSrikanth Jampala #else 275*14fa93cdSSrikanth Jampala u64 cnt : 32; 276*14fa93cdSSrikanth Jampala u64 timer : 22; 277*14fa93cdSSrikanth Jampala u64 raz : 5; 278*14fa93cdSSrikanth Jampala u64 resend : 1; 279*14fa93cdSSrikanth Jampala u64 mbox_int : 1; 280*14fa93cdSSrikanth Jampala u64 in_int : 1; 281*14fa93cdSSrikanth Jampala u64 uns_int : 1; 282*14fa93cdSSrikanth Jampala u64 slc_int : 1; 283*14fa93cdSSrikanth Jampala #endif 284*14fa93cdSSrikanth Jampala } s; 285*14fa93cdSSrikanth Jampala }; 286*14fa93cdSSrikanth Jampala 287*14fa93cdSSrikanth Jampala /** 288*14fa93cdSSrikanth Jampala * struct nps_pkt_slc_int_levels - Solicited Packet Out Interrupt Levels 289*14fa93cdSSrikanth Jampala * Registers. 290*14fa93cdSSrikanth Jampala * @bmode: Determines whether NPS_PKT_SLC_CNTS[CNT] is a byte or 291*14fa93cdSSrikanth Jampala * packet counter. 292*14fa93cdSSrikanth Jampala * @timet: Output port counter time interrupt threshold. 293*14fa93cdSSrikanth Jampala * @cnt: Output port counter interrupt threshold. 294*14fa93cdSSrikanth Jampala */ 295*14fa93cdSSrikanth Jampala union nps_pkt_slc_int_levels { 296*14fa93cdSSrikanth Jampala u64 value; 297*14fa93cdSSrikanth Jampala struct { 298*14fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD) 299*14fa93cdSSrikanth Jampala u64 bmode : 1; 300*14fa93cdSSrikanth Jampala u64 raz : 9; 301*14fa93cdSSrikanth Jampala u64 timet : 22; 302*14fa93cdSSrikanth Jampala u64 cnt : 32; 303*14fa93cdSSrikanth Jampala #else 304*14fa93cdSSrikanth Jampala u64 cnt : 32; 305*14fa93cdSSrikanth Jampala u64 timet : 22; 306*14fa93cdSSrikanth Jampala u64 raz : 9; 307*14fa93cdSSrikanth Jampala u64 bmode : 1; 308*14fa93cdSSrikanth Jampala #endif 309*14fa93cdSSrikanth Jampala } s; 310*14fa93cdSSrikanth Jampala }; 311*14fa93cdSSrikanth Jampala 312*14fa93cdSSrikanth Jampala /** 313*14fa93cdSSrikanth Jampala * struct nps_pkt_inst - NPS Packet Interrupt Register 314*14fa93cdSSrikanth Jampala * @in_err: Set when any NPS_PKT_IN_RERR_HI/LO bit and 315*14fa93cdSSrikanth Jampala * corresponding NPS_PKT_IN_RERR_*_ENA_* bit are bot set. 316*14fa93cdSSrikanth Jampala * @uns_err: Set when any NSP_PKT_UNS_RERR_HI/LO bit and 317*14fa93cdSSrikanth Jampala * corresponding NPS_PKT_UNS_RERR_*_ENA_* bit are both set. 318*14fa93cdSSrikanth Jampala * @slc_er: Set when any NSP_PKT_SLC_RERR_HI/LO bit and 319*14fa93cdSSrikanth Jampala * corresponding NPS_PKT_SLC_RERR_*_ENA_* bit are both set. 320*14fa93cdSSrikanth Jampala */ 321*14fa93cdSSrikanth Jampala union nps_pkt_int { 322*14fa93cdSSrikanth Jampala u64 value; 323*14fa93cdSSrikanth Jampala struct { 324*14fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD) 325*14fa93cdSSrikanth Jampala u64 raz : 54; 326*14fa93cdSSrikanth Jampala u64 uns_wto : 1; 327*14fa93cdSSrikanth Jampala u64 in_err : 1; 328*14fa93cdSSrikanth Jampala u64 uns_err : 1; 329*14fa93cdSSrikanth Jampala u64 slc_err : 1; 330*14fa93cdSSrikanth Jampala u64 in_dbe : 1; 331*14fa93cdSSrikanth Jampala u64 in_sbe : 1; 332*14fa93cdSSrikanth Jampala u64 uns_dbe : 1; 333*14fa93cdSSrikanth Jampala u64 uns_sbe : 1; 334*14fa93cdSSrikanth Jampala u64 slc_dbe : 1; 335*14fa93cdSSrikanth Jampala u64 slc_sbe : 1; 336*14fa93cdSSrikanth Jampala #else 337*14fa93cdSSrikanth Jampala u64 slc_sbe : 1; 338*14fa93cdSSrikanth Jampala u64 slc_dbe : 1; 339*14fa93cdSSrikanth Jampala u64 uns_sbe : 1; 340*14fa93cdSSrikanth Jampala u64 uns_dbe : 1; 341*14fa93cdSSrikanth Jampala u64 in_sbe : 1; 342*14fa93cdSSrikanth Jampala u64 in_dbe : 1; 343*14fa93cdSSrikanth Jampala u64 slc_err : 1; 344*14fa93cdSSrikanth Jampala u64 uns_err : 1; 345*14fa93cdSSrikanth Jampala u64 in_err : 1; 346*14fa93cdSSrikanth Jampala u64 uns_wto : 1; 347*14fa93cdSSrikanth Jampala u64 raz : 54; 348*14fa93cdSSrikanth Jampala #endif 349*14fa93cdSSrikanth Jampala } s; 350*14fa93cdSSrikanth Jampala }; 351*14fa93cdSSrikanth Jampala 352*14fa93cdSSrikanth Jampala /** 353*14fa93cdSSrikanth Jampala * struct nps_pkt_in_done_cnts - Input instruction ring counts registers 354*14fa93cdSSrikanth Jampala * @slc_cnt: Returns a 1 when: 355*14fa93cdSSrikanth Jampala * NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT], or 356*14fa93cdSSrikanth Jampala * NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SCL(i)_INT_LEVELS[TIMET] 357*14fa93cdSSrikanth Jampala * To clear the bit, the CNTS register must be 358*14fa93cdSSrikanth Jampala * written to clear the underlying condition 359*14fa93cdSSrikanth Jampala * @uns_int: Return a 1 when: 360*14fa93cdSSrikanth Jampala * NPS_PKT_UNS(i)_CNTS[CNT] > NPS_PKT_UNS(i)_INT_LEVELS[CNT], or 361*14fa93cdSSrikanth Jampala * NPS_PKT_UNS(i)_CNTS[TIMER] > NPS_PKT_UNS(i)_INT_LEVELS[TIMET] 362*14fa93cdSSrikanth Jampala * To clear the bit, the CNTS register must be 363*14fa93cdSSrikanth Jampala * written to clear the underlying condition 364*14fa93cdSSrikanth Jampala * @in_int: Returns a 1 when: 365*14fa93cdSSrikanth Jampala * NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT] 366*14fa93cdSSrikanth Jampala * To clear the bit, the DONE_CNTS register 367*14fa93cdSSrikanth Jampala * must be written to clear the underlying condition 368*14fa93cdSSrikanth Jampala * @mbox_int: Returns a 1 when: 369*14fa93cdSSrikanth Jampala * NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set. 370*14fa93cdSSrikanth Jampala * To clear the bit, write NPS_PKT_MBOX_PF_VF(i)_INT[INTR] 371*14fa93cdSSrikanth Jampala * with 1. 372*14fa93cdSSrikanth Jampala * @resend: A write of 1 will resend an MSI-X interrupt message if any 373*14fa93cdSSrikanth Jampala * of the following conditions are true for this ring "i". 374*14fa93cdSSrikanth Jampala * NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT] 375*14fa93cdSSrikanth Jampala * NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SLC(i)_INT_LEVELS[TIMET] 376*14fa93cdSSrikanth Jampala * NPS_PKT_UNS(i)_CNTS[CNT] > NPS_PKT_UNS(i)_INT_LEVELS[CNT] 377*14fa93cdSSrikanth Jampala * NPS_PKT_UNS(i)_CNTS[TIMER] > NPS_PKT_UNS(i)_INT_LEVELS[TIMET] 378*14fa93cdSSrikanth Jampala * NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT] 379*14fa93cdSSrikanth Jampala * NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set 380*14fa93cdSSrikanth Jampala * @cnt: Packet counter. Hardware adds to [CNT] as it reads 381*14fa93cdSSrikanth Jampala * packets. On a write to this CSR, hardware substracts the 382*14fa93cdSSrikanth Jampala * amount written to the [CNT] field from [CNT], which will 383*14fa93cdSSrikanth Jampala * clear PKT_IN(i)_INT_STATUS[INTR] if [CNT] becomes <= 384*14fa93cdSSrikanth Jampala * NPS_PKT_IN(i)_INT_LEVELS[CNT]. This register should be 385*14fa93cdSSrikanth Jampala * cleared before enabling a ring by reading the current 386*14fa93cdSSrikanth Jampala * value and writing it back. 387*14fa93cdSSrikanth Jampala */ 388*14fa93cdSSrikanth Jampala union nps_pkt_in_done_cnts { 389*14fa93cdSSrikanth Jampala u64 value; 390*14fa93cdSSrikanth Jampala struct { 391*14fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD) 392*14fa93cdSSrikanth Jampala u64 slc_int : 1; 393*14fa93cdSSrikanth Jampala u64 uns_int : 1; 394*14fa93cdSSrikanth Jampala u64 in_int : 1; 395*14fa93cdSSrikanth Jampala u64 mbox_int : 1; 396*14fa93cdSSrikanth Jampala u64 resend : 1; 397*14fa93cdSSrikanth Jampala u64 raz : 27; 398*14fa93cdSSrikanth Jampala u64 cnt : 32; 399*14fa93cdSSrikanth Jampala #else 400*14fa93cdSSrikanth Jampala u64 cnt : 32; 401*14fa93cdSSrikanth Jampala u64 raz : 27; 402*14fa93cdSSrikanth Jampala u64 resend : 1; 403*14fa93cdSSrikanth Jampala u64 mbox_int : 1; 404*14fa93cdSSrikanth Jampala u64 in_int : 1; 405*14fa93cdSSrikanth Jampala u64 uns_int : 1; 406*14fa93cdSSrikanth Jampala u64 slc_int : 1; 407*14fa93cdSSrikanth Jampala #endif 408*14fa93cdSSrikanth Jampala } s; 409*14fa93cdSSrikanth Jampala }; 410*14fa93cdSSrikanth Jampala 411*14fa93cdSSrikanth Jampala /** 412*14fa93cdSSrikanth Jampala * struct nps_pkt_in_instr_ctl - Input Instruction Ring Control Registers. 413*14fa93cdSSrikanth Jampala * @is64b: If 1, the ring uses 64-byte instructions. If 0, the 414*14fa93cdSSrikanth Jampala * ring uses 32-byte instructions. 415*14fa93cdSSrikanth Jampala * @enb: Enable for the input ring. 416*14fa93cdSSrikanth Jampala */ 417*14fa93cdSSrikanth Jampala union nps_pkt_in_instr_ctl { 418*14fa93cdSSrikanth Jampala u64 value; 419*14fa93cdSSrikanth Jampala struct { 420*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 421*14fa93cdSSrikanth Jampala u64 raz : 62; 422*14fa93cdSSrikanth Jampala u64 is64b : 1; 423*14fa93cdSSrikanth Jampala u64 enb : 1; 424*14fa93cdSSrikanth Jampala #else 425*14fa93cdSSrikanth Jampala u64 enb : 1; 426*14fa93cdSSrikanth Jampala u64 is64b : 1; 427*14fa93cdSSrikanth Jampala u64 raz : 62; 428*14fa93cdSSrikanth Jampala #endif 429*14fa93cdSSrikanth Jampala } s; 430*14fa93cdSSrikanth Jampala }; 431*14fa93cdSSrikanth Jampala 432*14fa93cdSSrikanth Jampala /** 433*14fa93cdSSrikanth Jampala * struct nps_pkt_in_instr_rsize - Input instruction ring size registers 434*14fa93cdSSrikanth Jampala * @rsize: Ring size (number of instructions) 435*14fa93cdSSrikanth Jampala */ 436*14fa93cdSSrikanth Jampala union nps_pkt_in_instr_rsize { 437*14fa93cdSSrikanth Jampala u64 value; 438*14fa93cdSSrikanth Jampala struct { 439*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 440*14fa93cdSSrikanth Jampala u64 raz : 32; 441*14fa93cdSSrikanth Jampala u64 rsize : 32; 442*14fa93cdSSrikanth Jampala #else 443*14fa93cdSSrikanth Jampala u64 rsize : 32; 444*14fa93cdSSrikanth Jampala u64 raz : 32; 445*14fa93cdSSrikanth Jampala #endif 446*14fa93cdSSrikanth Jampala } s; 447*14fa93cdSSrikanth Jampala }; 448*14fa93cdSSrikanth Jampala 449*14fa93cdSSrikanth Jampala /** 450*14fa93cdSSrikanth Jampala * struct nps_pkt_in_instr_baoff_dbell - Input instruction ring 451*14fa93cdSSrikanth Jampala * base address offset and doorbell registers 452*14fa93cdSSrikanth Jampala * @aoff: Address offset. The offset from the NPS_PKT_IN_INSTR_BADDR 453*14fa93cdSSrikanth Jampala * where the next pointer is read. 454*14fa93cdSSrikanth Jampala * @dbell: Pointer list doorbell count. Write operations to this field 455*14fa93cdSSrikanth Jampala * increments the present value here. Read operations return the 456*14fa93cdSSrikanth Jampala * present value. 457*14fa93cdSSrikanth Jampala */ 458*14fa93cdSSrikanth Jampala union nps_pkt_in_instr_baoff_dbell { 459*14fa93cdSSrikanth Jampala u64 value; 460*14fa93cdSSrikanth Jampala struct { 461*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 462*14fa93cdSSrikanth Jampala u64 aoff : 32; 463*14fa93cdSSrikanth Jampala u64 dbell : 32; 464*14fa93cdSSrikanth Jampala #else 465*14fa93cdSSrikanth Jampala u64 dbell : 32; 466*14fa93cdSSrikanth Jampala u64 aoff : 32; 467*14fa93cdSSrikanth Jampala #endif 468*14fa93cdSSrikanth Jampala } s; 469*14fa93cdSSrikanth Jampala }; 470*14fa93cdSSrikanth Jampala 471*14fa93cdSSrikanth Jampala /** 472*14fa93cdSSrikanth Jampala * struct nps_core_int_ena_w1s - NPS core interrupt enable set register 473*14fa93cdSSrikanth Jampala * @host_nps_wr_err: Reads or sets enable for 474*14fa93cdSSrikanth Jampala * NPS_CORE_INT[HOST_NPS_WR_ERR]. 475*14fa93cdSSrikanth Jampala * @npco_dma_malform: Reads or sets enable for 476*14fa93cdSSrikanth Jampala * NPS_CORE_INT[NPCO_DMA_MALFORM]. 477*14fa93cdSSrikanth Jampala * @exec_wr_timeout: Reads or sets enable for 478*14fa93cdSSrikanth Jampala * NPS_CORE_INT[EXEC_WR_TIMEOUT]. 479*14fa93cdSSrikanth Jampala * @host_wr_timeout: Reads or sets enable for 480*14fa93cdSSrikanth Jampala * NPS_CORE_INT[HOST_WR_TIMEOUT]. 481*14fa93cdSSrikanth Jampala * @host_wr_err: Reads or sets enable for 482*14fa93cdSSrikanth Jampala * NPS_CORE_INT[HOST_WR_ERR] 483*14fa93cdSSrikanth Jampala */ 484*14fa93cdSSrikanth Jampala union nps_core_int_ena_w1s { 485*14fa93cdSSrikanth Jampala u64 value; 486*14fa93cdSSrikanth Jampala struct { 487*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 488*14fa93cdSSrikanth Jampala u64 raz4 : 55; 489*14fa93cdSSrikanth Jampala u64 host_nps_wr_err : 1; 490*14fa93cdSSrikanth Jampala u64 npco_dma_malform : 1; 491*14fa93cdSSrikanth Jampala u64 exec_wr_timeout : 1; 492*14fa93cdSSrikanth Jampala u64 host_wr_timeout : 1; 493*14fa93cdSSrikanth Jampala u64 host_wr_err : 1; 494*14fa93cdSSrikanth Jampala u64 raz3 : 1; 495*14fa93cdSSrikanth Jampala u64 raz2 : 1; 496*14fa93cdSSrikanth Jampala u64 raz1 : 1; 497*14fa93cdSSrikanth Jampala u64 raz0 : 1; 498*14fa93cdSSrikanth Jampala #else 499*14fa93cdSSrikanth Jampala u64 raz0 : 1; 500*14fa93cdSSrikanth Jampala u64 raz1 : 1; 501*14fa93cdSSrikanth Jampala u64 raz2 : 1; 502*14fa93cdSSrikanth Jampala u64 raz3 : 1; 503*14fa93cdSSrikanth Jampala u64 host_wr_err : 1; 504*14fa93cdSSrikanth Jampala u64 host_wr_timeout : 1; 505*14fa93cdSSrikanth Jampala u64 exec_wr_timeout : 1; 506*14fa93cdSSrikanth Jampala u64 npco_dma_malform : 1; 507*14fa93cdSSrikanth Jampala u64 host_nps_wr_err : 1; 508*14fa93cdSSrikanth Jampala u64 raz4 : 55; 509*14fa93cdSSrikanth Jampala #endif 510*14fa93cdSSrikanth Jampala } s; 511*14fa93cdSSrikanth Jampala }; 512*14fa93cdSSrikanth Jampala 513*14fa93cdSSrikanth Jampala /** 514*14fa93cdSSrikanth Jampala * struct nps_core_gbl_vfcfg - Global VF Configuration Register. 515*14fa93cdSSrikanth Jampala * @ilk_disable: When set, this bit indicates that the ILK interface has 516*14fa93cdSSrikanth Jampala * been disabled. 517*14fa93cdSSrikanth Jampala * @obaf: BMO allocation control 518*14fa93cdSSrikanth Jampala * 0 = allocate per queue 519*14fa93cdSSrikanth Jampala * 1 = allocate per VF 520*14fa93cdSSrikanth Jampala * @ibaf: BMI allocation control 521*14fa93cdSSrikanth Jampala * 0 = allocate per queue 522*14fa93cdSSrikanth Jampala * 1 = allocate per VF 523*14fa93cdSSrikanth Jampala * @zaf: ZIP allocation control 524*14fa93cdSSrikanth Jampala * 0 = allocate per queue 525*14fa93cdSSrikanth Jampala * 1 = allocate per VF 526*14fa93cdSSrikanth Jampala * @aeaf: AE allocation control 527*14fa93cdSSrikanth Jampala * 0 = allocate per queue 528*14fa93cdSSrikanth Jampala * 1 = allocate per VF 529*14fa93cdSSrikanth Jampala * @seaf: SE allocation control 530*14fa93cdSSrikanth Jampala * 0 = allocation per queue 531*14fa93cdSSrikanth Jampala * 1 = allocate per VF 532*14fa93cdSSrikanth Jampala * @cfg: VF/PF mode. 533*14fa93cdSSrikanth Jampala */ 534*14fa93cdSSrikanth Jampala union nps_core_gbl_vfcfg { 535*14fa93cdSSrikanth Jampala u64 value; 536*14fa93cdSSrikanth Jampala struct { 537*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 538*14fa93cdSSrikanth Jampala u64 raz :55; 539*14fa93cdSSrikanth Jampala u64 ilk_disable :1; 540*14fa93cdSSrikanth Jampala u64 obaf :1; 541*14fa93cdSSrikanth Jampala u64 ibaf :1; 542*14fa93cdSSrikanth Jampala u64 zaf :1; 543*14fa93cdSSrikanth Jampala u64 aeaf :1; 544*14fa93cdSSrikanth Jampala u64 seaf :1; 545*14fa93cdSSrikanth Jampala u64 cfg :3; 546*14fa93cdSSrikanth Jampala #else 547*14fa93cdSSrikanth Jampala u64 cfg :3; 548*14fa93cdSSrikanth Jampala u64 seaf :1; 549*14fa93cdSSrikanth Jampala u64 aeaf :1; 550*14fa93cdSSrikanth Jampala u64 zaf :1; 551*14fa93cdSSrikanth Jampala u64 ibaf :1; 552*14fa93cdSSrikanth Jampala u64 obaf :1; 553*14fa93cdSSrikanth Jampala u64 ilk_disable :1; 554*14fa93cdSSrikanth Jampala u64 raz :55; 555*14fa93cdSSrikanth Jampala #endif 556*14fa93cdSSrikanth Jampala } s; 557*14fa93cdSSrikanth Jampala }; 558*14fa93cdSSrikanth Jampala 559*14fa93cdSSrikanth Jampala /** 560*14fa93cdSSrikanth Jampala * struct nps_core_int_active - NPS Core Interrupt Active Register 561*14fa93cdSSrikanth Jampala * @resend: Resend MSI-X interrupt if needs to handle interrupts 562*14fa93cdSSrikanth Jampala * Sofware can set this bit and then exit the ISR. 563*14fa93cdSSrikanth Jampala * @ocla: Set when any OCLA(0)_INT and corresponding OCLA(0_INT_ENA_W1C 564*14fa93cdSSrikanth Jampala * bit are set 565*14fa93cdSSrikanth Jampala * @mbox: Set when any NPS_PKT_MBOX_INT_LO/HI and corresponding 566*14fa93cdSSrikanth Jampala * NPS_PKT_MBOX_INT_LO_ENA_W1C/HI_ENA_W1C bits are set 567*14fa93cdSSrikanth Jampala * @emu: bit i is set in [EMU] when any EMU(i)_INT bit is set 568*14fa93cdSSrikanth Jampala * @bmo: Set when any BMO_INT bit is set 569*14fa93cdSSrikanth Jampala * @bmi: Set when any BMI_INT bit is set or when any non-RO 570*14fa93cdSSrikanth Jampala * BMI_INT and corresponding BMI_INT_ENA_W1C bits are both set 571*14fa93cdSSrikanth Jampala * @aqm: Set when any AQM_INT bit is set 572*14fa93cdSSrikanth Jampala * @zqm: Set when any ZQM_INT bit is set 573*14fa93cdSSrikanth Jampala * @efl: Set when any EFL_INT RO bit is set or when any non-RO EFL_INT 574*14fa93cdSSrikanth Jampala * and corresponding EFL_INT_ENA_W1C bits are both set 575*14fa93cdSSrikanth Jampala * @ilk: Set when any ILK_INT bit is set 576*14fa93cdSSrikanth Jampala * @lbc: Set when any LBC_INT RO bit is set or when any non-RO LBC_INT 577*14fa93cdSSrikanth Jampala * and corresponding LBC_INT_ENA_W1C bits are bot set 578*14fa93cdSSrikanth Jampala * @pem: Set when any PEM(0)_INT RO bit is set or when any non-RO 579*14fa93cdSSrikanth Jampala * PEM(0)_INT and corresponding PEM(0)_INT_ENA_W1C bit are both set 580*14fa93cdSSrikanth Jampala * @ucd: Set when any UCD_INT bit is set 581*14fa93cdSSrikanth Jampala * @zctl: Set when any ZIP_INT RO bit is set or when any non-RO ZIP_INT 582*14fa93cdSSrikanth Jampala * and corresponding ZIP_INT_ENA_W1C bits are both set 583*14fa93cdSSrikanth Jampala * @lbm: Set when any LBM_INT bit is set 584*14fa93cdSSrikanth Jampala * @nps_pkt: Set when any NPS_PKT_INT bit is set 585*14fa93cdSSrikanth Jampala * @nps_core: Set when any NPS_CORE_INT RO bit is set or when non-RO 586*14fa93cdSSrikanth Jampala * NPS_CORE_INT and corresponding NSP_CORE_INT_ENA_W1C bits are both set 587*14fa93cdSSrikanth Jampala */ 588*14fa93cdSSrikanth Jampala union nps_core_int_active { 589*14fa93cdSSrikanth Jampala u64 value; 590*14fa93cdSSrikanth Jampala struct { 591*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 592*14fa93cdSSrikanth Jampala u64 resend : 1; 593*14fa93cdSSrikanth Jampala u64 raz : 43; 594*14fa93cdSSrikanth Jampala u64 ocla : 1; 595*14fa93cdSSrikanth Jampala u64 mbox : 1; 596*14fa93cdSSrikanth Jampala u64 emu : 4; 597*14fa93cdSSrikanth Jampala u64 bmo : 1; 598*14fa93cdSSrikanth Jampala u64 bmi : 1; 599*14fa93cdSSrikanth Jampala u64 aqm : 1; 600*14fa93cdSSrikanth Jampala u64 zqm : 1; 601*14fa93cdSSrikanth Jampala u64 efl : 1; 602*14fa93cdSSrikanth Jampala u64 ilk : 1; 603*14fa93cdSSrikanth Jampala u64 lbc : 1; 604*14fa93cdSSrikanth Jampala u64 pem : 1; 605*14fa93cdSSrikanth Jampala u64 pom : 1; 606*14fa93cdSSrikanth Jampala u64 ucd : 1; 607*14fa93cdSSrikanth Jampala u64 zctl : 1; 608*14fa93cdSSrikanth Jampala u64 lbm : 1; 609*14fa93cdSSrikanth Jampala u64 nps_pkt : 1; 610*14fa93cdSSrikanth Jampala u64 nps_core : 1; 611*14fa93cdSSrikanth Jampala #else 612*14fa93cdSSrikanth Jampala u64 nps_core : 1; 613*14fa93cdSSrikanth Jampala u64 nps_pkt : 1; 614*14fa93cdSSrikanth Jampala u64 lbm : 1; 615*14fa93cdSSrikanth Jampala u64 zctl: 1; 616*14fa93cdSSrikanth Jampala u64 ucd : 1; 617*14fa93cdSSrikanth Jampala u64 pom : 1; 618*14fa93cdSSrikanth Jampala u64 pem : 1; 619*14fa93cdSSrikanth Jampala u64 lbc : 1; 620*14fa93cdSSrikanth Jampala u64 ilk : 1; 621*14fa93cdSSrikanth Jampala u64 efl : 1; 622*14fa93cdSSrikanth Jampala u64 zqm : 1; 623*14fa93cdSSrikanth Jampala u64 aqm : 1; 624*14fa93cdSSrikanth Jampala u64 bmi : 1; 625*14fa93cdSSrikanth Jampala u64 bmo : 1; 626*14fa93cdSSrikanth Jampala u64 emu : 4; 627*14fa93cdSSrikanth Jampala u64 mbox : 1; 628*14fa93cdSSrikanth Jampala u64 ocla : 1; 629*14fa93cdSSrikanth Jampala u64 raz : 43; 630*14fa93cdSSrikanth Jampala u64 resend : 1; 631*14fa93cdSSrikanth Jampala #endif 632*14fa93cdSSrikanth Jampala } s; 633*14fa93cdSSrikanth Jampala }; 634*14fa93cdSSrikanth Jampala 635*14fa93cdSSrikanth Jampala /** 636*14fa93cdSSrikanth Jampala * struct efl_core_int - EFL Interrupt Registers 637*14fa93cdSSrikanth Jampala * @epci_decode_err: EPCI decoded a transacation that was unknown 638*14fa93cdSSrikanth Jampala * This error should only occurred when there is a micrcode/SE error 639*14fa93cdSSrikanth Jampala * and should be considered fatal 640*14fa93cdSSrikanth Jampala * @ae_err: An AE uncorrectable error occurred. 641*14fa93cdSSrikanth Jampala * See EFL_CORE(0..3)_AE_ERR_INT 642*14fa93cdSSrikanth Jampala * @se_err: An SE uncorrectable error occurred. 643*14fa93cdSSrikanth Jampala * See EFL_CORE(0..3)_SE_ERR_INT 644*14fa93cdSSrikanth Jampala * @dbe: Double-bit error occurred in EFL 645*14fa93cdSSrikanth Jampala * @sbe: Single-bit error occurred in EFL 646*14fa93cdSSrikanth Jampala * @d_left: Asserted when new POM-Header-BMI-data is 647*14fa93cdSSrikanth Jampala * being sent to an Exec, and that Exec has Not read all BMI 648*14fa93cdSSrikanth Jampala * data associated with the previous POM header 649*14fa93cdSSrikanth Jampala * @len_ovr: Asserted when an Exec-Read is issued that is more than 650*14fa93cdSSrikanth Jampala * 14 greater in length that the BMI data left to be read 651*14fa93cdSSrikanth Jampala */ 652*14fa93cdSSrikanth Jampala union efl_core_int { 653*14fa93cdSSrikanth Jampala u64 value; 654*14fa93cdSSrikanth Jampala struct { 655*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 656*14fa93cdSSrikanth Jampala u64 raz : 57; 657*14fa93cdSSrikanth Jampala u64 epci_decode_err : 1; 658*14fa93cdSSrikanth Jampala u64 ae_err : 1; 659*14fa93cdSSrikanth Jampala u64 se_err : 1; 660*14fa93cdSSrikanth Jampala u64 dbe : 1; 661*14fa93cdSSrikanth Jampala u64 sbe : 1; 662*14fa93cdSSrikanth Jampala u64 d_left : 1; 663*14fa93cdSSrikanth Jampala u64 len_ovr : 1; 664*14fa93cdSSrikanth Jampala #else 665*14fa93cdSSrikanth Jampala u64 len_ovr : 1; 666*14fa93cdSSrikanth Jampala u64 d_left : 1; 667*14fa93cdSSrikanth Jampala u64 sbe : 1; 668*14fa93cdSSrikanth Jampala u64 dbe : 1; 669*14fa93cdSSrikanth Jampala u64 se_err : 1; 670*14fa93cdSSrikanth Jampala u64 ae_err : 1; 671*14fa93cdSSrikanth Jampala u64 epci_decode_err : 1; 672*14fa93cdSSrikanth Jampala u64 raz : 57; 673*14fa93cdSSrikanth Jampala #endif 674*14fa93cdSSrikanth Jampala } s; 675*14fa93cdSSrikanth Jampala }; 676*14fa93cdSSrikanth Jampala 677*14fa93cdSSrikanth Jampala /** 678*14fa93cdSSrikanth Jampala * struct efl_core_int_ena_w1s - EFL core interrupt enable set register 679*14fa93cdSSrikanth Jampala * @epci_decode_err: Reads or sets enable for 680*14fa93cdSSrikanth Jampala * EFL_CORE(0..3)_INT[EPCI_DECODE_ERR]. 681*14fa93cdSSrikanth Jampala * @d_left: Reads or sets enable for 682*14fa93cdSSrikanth Jampala * EFL_CORE(0..3)_INT[D_LEFT]. 683*14fa93cdSSrikanth Jampala * @len_ovr: Reads or sets enable for 684*14fa93cdSSrikanth Jampala * EFL_CORE(0..3)_INT[LEN_OVR]. 685*14fa93cdSSrikanth Jampala */ 686*14fa93cdSSrikanth Jampala union efl_core_int_ena_w1s { 687*14fa93cdSSrikanth Jampala u64 value; 688*14fa93cdSSrikanth Jampala struct { 689*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 690*14fa93cdSSrikanth Jampala u64 raz_7_63 : 57; 691*14fa93cdSSrikanth Jampala u64 epci_decode_err : 1; 692*14fa93cdSSrikanth Jampala u64 raz_2_5 : 4; 693*14fa93cdSSrikanth Jampala u64 d_left : 1; 694*14fa93cdSSrikanth Jampala u64 len_ovr : 1; 695*14fa93cdSSrikanth Jampala #else 696*14fa93cdSSrikanth Jampala u64 len_ovr : 1; 697*14fa93cdSSrikanth Jampala u64 d_left : 1; 698*14fa93cdSSrikanth Jampala u64 raz_2_5 : 4; 699*14fa93cdSSrikanth Jampala u64 epci_decode_err : 1; 700*14fa93cdSSrikanth Jampala u64 raz_7_63 : 57; 701*14fa93cdSSrikanth Jampala #endif 702*14fa93cdSSrikanth Jampala } s; 703*14fa93cdSSrikanth Jampala }; 704*14fa93cdSSrikanth Jampala 705*14fa93cdSSrikanth Jampala /** 706*14fa93cdSSrikanth Jampala * struct efl_rnm_ctl_status - RNM Control and Status Register 707*14fa93cdSSrikanth Jampala * @ent_sel: Select input to RNM FIFO 708*14fa93cdSSrikanth Jampala * @exp_ent: Exported entropy enable for random number generator 709*14fa93cdSSrikanth Jampala * @rng_rst: Reset to RNG. Setting this bit to 1 cancels the generation 710*14fa93cdSSrikanth Jampala * of the current random number. 711*14fa93cdSSrikanth Jampala * @rnm_rst: Reset the RNM. Setting this bit to 1 clears all sorted numbers 712*14fa93cdSSrikanth Jampala * in the random number memory. 713*14fa93cdSSrikanth Jampala * @rng_en: Enabled the output of the RNG. 714*14fa93cdSSrikanth Jampala * @ent_en: Entropy enable for random number generator. 715*14fa93cdSSrikanth Jampala */ 716*14fa93cdSSrikanth Jampala union efl_rnm_ctl_status { 717*14fa93cdSSrikanth Jampala u64 value; 718*14fa93cdSSrikanth Jampala struct { 719*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 720*14fa93cdSSrikanth Jampala u64 raz_9_63 : 55; 721*14fa93cdSSrikanth Jampala u64 ent_sel : 4; 722*14fa93cdSSrikanth Jampala u64 exp_ent : 1; 723*14fa93cdSSrikanth Jampala u64 rng_rst : 1; 724*14fa93cdSSrikanth Jampala u64 rnm_rst : 1; 725*14fa93cdSSrikanth Jampala u64 rng_en : 1; 726*14fa93cdSSrikanth Jampala u64 ent_en : 1; 727*14fa93cdSSrikanth Jampala #else 728*14fa93cdSSrikanth Jampala u64 ent_en : 1; 729*14fa93cdSSrikanth Jampala u64 rng_en : 1; 730*14fa93cdSSrikanth Jampala u64 rnm_rst : 1; 731*14fa93cdSSrikanth Jampala u64 rng_rst : 1; 732*14fa93cdSSrikanth Jampala u64 exp_ent : 1; 733*14fa93cdSSrikanth Jampala u64 ent_sel : 4; 734*14fa93cdSSrikanth Jampala u64 raz_9_63 : 55; 735*14fa93cdSSrikanth Jampala #endif 736*14fa93cdSSrikanth Jampala } s; 737*14fa93cdSSrikanth Jampala }; 738*14fa93cdSSrikanth Jampala 739*14fa93cdSSrikanth Jampala /** 740*14fa93cdSSrikanth Jampala * struct bmi_ctl - BMI control register 741*14fa93cdSSrikanth Jampala * @ilk_hdrq_thrsh: Maximum number of header queue locations 742*14fa93cdSSrikanth Jampala * that ILK packets may consume. When the threshold is 743*14fa93cdSSrikanth Jampala * exceeded ILK_XOFF is sent to the BMI_X2P_ARB. 744*14fa93cdSSrikanth Jampala * @nps_hdrq_thrsh: Maximum number of header queue locations 745*14fa93cdSSrikanth Jampala * that NPS packets may consume. When the threshold is 746*14fa93cdSSrikanth Jampala * exceeded NPS_XOFF is sent to the BMI_X2P_ARB. 747*14fa93cdSSrikanth Jampala * @totl_hdrq_thrsh: Maximum number of header queue locations 748*14fa93cdSSrikanth Jampala * that the sum of ILK and NPS packets may consume. 749*14fa93cdSSrikanth Jampala * @ilk_free_thrsh: Maximum number of buffers that ILK packet 750*14fa93cdSSrikanth Jampala * flows may consume before ILK_XOFF is sent to the BMI_X2P_ARB. 751*14fa93cdSSrikanth Jampala * @nps_free_thrsh: Maximum number of buffers that NPS packet 752*14fa93cdSSrikanth Jampala * flows may consume before NPS XOFF is sent to the BMI_X2p_ARB. 753*14fa93cdSSrikanth Jampala * @totl_free_thrsh: Maximum number of buffers that bot ILK and NPS 754*14fa93cdSSrikanth Jampala * packet flows may consume before both NPS_XOFF and ILK_XOFF 755*14fa93cdSSrikanth Jampala * are asserted to the BMI_X2P_ARB. 756*14fa93cdSSrikanth Jampala * @max_pkt_len: Maximum packet length, integral number of 256B 757*14fa93cdSSrikanth Jampala * buffers. 758*14fa93cdSSrikanth Jampala */ 759*14fa93cdSSrikanth Jampala union bmi_ctl { 760*14fa93cdSSrikanth Jampala u64 value; 761*14fa93cdSSrikanth Jampala struct { 762*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 763*14fa93cdSSrikanth Jampala u64 raz_56_63 : 8; 764*14fa93cdSSrikanth Jampala u64 ilk_hdrq_thrsh : 8; 765*14fa93cdSSrikanth Jampala u64 nps_hdrq_thrsh : 8; 766*14fa93cdSSrikanth Jampala u64 totl_hdrq_thrsh : 8; 767*14fa93cdSSrikanth Jampala u64 ilk_free_thrsh : 8; 768*14fa93cdSSrikanth Jampala u64 nps_free_thrsh : 8; 769*14fa93cdSSrikanth Jampala u64 totl_free_thrsh : 8; 770*14fa93cdSSrikanth Jampala u64 max_pkt_len : 8; 771*14fa93cdSSrikanth Jampala #else 772*14fa93cdSSrikanth Jampala u64 max_pkt_len : 8; 773*14fa93cdSSrikanth Jampala u64 totl_free_thrsh : 8; 774*14fa93cdSSrikanth Jampala u64 nps_free_thrsh : 8; 775*14fa93cdSSrikanth Jampala u64 ilk_free_thrsh : 8; 776*14fa93cdSSrikanth Jampala u64 totl_hdrq_thrsh : 8; 777*14fa93cdSSrikanth Jampala u64 nps_hdrq_thrsh : 8; 778*14fa93cdSSrikanth Jampala u64 ilk_hdrq_thrsh : 8; 779*14fa93cdSSrikanth Jampala u64 raz_56_63 : 8; 780*14fa93cdSSrikanth Jampala #endif 781*14fa93cdSSrikanth Jampala } s; 782*14fa93cdSSrikanth Jampala }; 783*14fa93cdSSrikanth Jampala 784*14fa93cdSSrikanth Jampala /** 785*14fa93cdSSrikanth Jampala * struct bmi_int_ena_w1s - BMI interrupt enable set register 786*14fa93cdSSrikanth Jampala * @ilk_req_oflw: Reads or sets enable for 787*14fa93cdSSrikanth Jampala * BMI_INT[ILK_REQ_OFLW]. 788*14fa93cdSSrikanth Jampala * @nps_req_oflw: Reads or sets enable for 789*14fa93cdSSrikanth Jampala * BMI_INT[NPS_REQ_OFLW]. 790*14fa93cdSSrikanth Jampala * @fpf_undrrn: Reads or sets enable for 791*14fa93cdSSrikanth Jampala * BMI_INT[FPF_UNDRRN]. 792*14fa93cdSSrikanth Jampala * @eop_err_ilk: Reads or sets enable for 793*14fa93cdSSrikanth Jampala * BMI_INT[EOP_ERR_ILK]. 794*14fa93cdSSrikanth Jampala * @eop_err_nps: Reads or sets enable for 795*14fa93cdSSrikanth Jampala * BMI_INT[EOP_ERR_NPS]. 796*14fa93cdSSrikanth Jampala * @sop_err_ilk: Reads or sets enable for 797*14fa93cdSSrikanth Jampala * BMI_INT[SOP_ERR_ILK]. 798*14fa93cdSSrikanth Jampala * @sop_err_nps: Reads or sets enable for 799*14fa93cdSSrikanth Jampala * BMI_INT[SOP_ERR_NPS]. 800*14fa93cdSSrikanth Jampala * @pkt_rcv_err_ilk: Reads or sets enable for 801*14fa93cdSSrikanth Jampala * BMI_INT[PKT_RCV_ERR_ILK]. 802*14fa93cdSSrikanth Jampala * @pkt_rcv_err_nps: Reads or sets enable for 803*14fa93cdSSrikanth Jampala * BMI_INT[PKT_RCV_ERR_NPS]. 804*14fa93cdSSrikanth Jampala * @max_len_err_ilk: Reads or sets enable for 805*14fa93cdSSrikanth Jampala * BMI_INT[MAX_LEN_ERR_ILK]. 806*14fa93cdSSrikanth Jampala * @max_len_err_nps: Reads or sets enable for 807*14fa93cdSSrikanth Jampala * BMI_INT[MAX_LEN_ERR_NPS]. 808*14fa93cdSSrikanth Jampala */ 809*14fa93cdSSrikanth Jampala union bmi_int_ena_w1s { 810*14fa93cdSSrikanth Jampala u64 value; 811*14fa93cdSSrikanth Jampala struct { 812*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 813*14fa93cdSSrikanth Jampala u64 raz_13_63 : 51; 814*14fa93cdSSrikanth Jampala u64 ilk_req_oflw : 1; 815*14fa93cdSSrikanth Jampala u64 nps_req_oflw : 1; 816*14fa93cdSSrikanth Jampala u64 raz_10 : 1; 817*14fa93cdSSrikanth Jampala u64 raz_9 : 1; 818*14fa93cdSSrikanth Jampala u64 fpf_undrrn : 1; 819*14fa93cdSSrikanth Jampala u64 eop_err_ilk : 1; 820*14fa93cdSSrikanth Jampala u64 eop_err_nps : 1; 821*14fa93cdSSrikanth Jampala u64 sop_err_ilk : 1; 822*14fa93cdSSrikanth Jampala u64 sop_err_nps : 1; 823*14fa93cdSSrikanth Jampala u64 pkt_rcv_err_ilk : 1; 824*14fa93cdSSrikanth Jampala u64 pkt_rcv_err_nps : 1; 825*14fa93cdSSrikanth Jampala u64 max_len_err_ilk : 1; 826*14fa93cdSSrikanth Jampala u64 max_len_err_nps : 1; 827*14fa93cdSSrikanth Jampala #else 828*14fa93cdSSrikanth Jampala u64 max_len_err_nps : 1; 829*14fa93cdSSrikanth Jampala u64 max_len_err_ilk : 1; 830*14fa93cdSSrikanth Jampala u64 pkt_rcv_err_nps : 1; 831*14fa93cdSSrikanth Jampala u64 pkt_rcv_err_ilk : 1; 832*14fa93cdSSrikanth Jampala u64 sop_err_nps : 1; 833*14fa93cdSSrikanth Jampala u64 sop_err_ilk : 1; 834*14fa93cdSSrikanth Jampala u64 eop_err_nps : 1; 835*14fa93cdSSrikanth Jampala u64 eop_err_ilk : 1; 836*14fa93cdSSrikanth Jampala u64 fpf_undrrn : 1; 837*14fa93cdSSrikanth Jampala u64 raz_9 : 1; 838*14fa93cdSSrikanth Jampala u64 raz_10 : 1; 839*14fa93cdSSrikanth Jampala u64 nps_req_oflw : 1; 840*14fa93cdSSrikanth Jampala u64 ilk_req_oflw : 1; 841*14fa93cdSSrikanth Jampala u64 raz_13_63 : 51; 842*14fa93cdSSrikanth Jampala #endif 843*14fa93cdSSrikanth Jampala } s; 844*14fa93cdSSrikanth Jampala }; 845*14fa93cdSSrikanth Jampala 846*14fa93cdSSrikanth Jampala /** 847*14fa93cdSSrikanth Jampala * struct bmo_ctl2 - BMO Control2 Register 848*14fa93cdSSrikanth Jampala * @arb_sel: Determines P2X Arbitration 849*14fa93cdSSrikanth Jampala * @ilk_buf_thrsh: Maximum number of buffers that the 850*14fa93cdSSrikanth Jampala * ILK packet flows may consume before ILK XOFF is 851*14fa93cdSSrikanth Jampala * asserted to the POM. 852*14fa93cdSSrikanth Jampala * @nps_slc_buf_thrsh: Maximum number of buffers that the 853*14fa93cdSSrikanth Jampala * NPS_SLC packet flow may consume before NPS_SLC XOFF is 854*14fa93cdSSrikanth Jampala * asserted to the POM. 855*14fa93cdSSrikanth Jampala * @nps_uns_buf_thrsh: Maximum number of buffers that the 856*14fa93cdSSrikanth Jampala * NPS_UNS packet flow may consume before NPS_UNS XOFF is 857*14fa93cdSSrikanth Jampala * asserted to the POM. 858*14fa93cdSSrikanth Jampala * @totl_buf_thrsh: Maximum number of buffers that ILK, NPS_UNS and 859*14fa93cdSSrikanth Jampala * NPS_SLC packet flows may consume before NPS_UNS XOFF, NSP_SLC and 860*14fa93cdSSrikanth Jampala * ILK_XOFF are all asserted POM. 861*14fa93cdSSrikanth Jampala */ 862*14fa93cdSSrikanth Jampala union bmo_ctl2 { 863*14fa93cdSSrikanth Jampala u64 value; 864*14fa93cdSSrikanth Jampala struct { 865*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 866*14fa93cdSSrikanth Jampala u64 arb_sel : 1; 867*14fa93cdSSrikanth Jampala u64 raz_32_62 : 31; 868*14fa93cdSSrikanth Jampala u64 ilk_buf_thrsh : 8; 869*14fa93cdSSrikanth Jampala u64 nps_slc_buf_thrsh : 8; 870*14fa93cdSSrikanth Jampala u64 nps_uns_buf_thrsh : 8; 871*14fa93cdSSrikanth Jampala u64 totl_buf_thrsh : 8; 872*14fa93cdSSrikanth Jampala #else 873*14fa93cdSSrikanth Jampala u64 totl_buf_thrsh : 8; 874*14fa93cdSSrikanth Jampala u64 nps_uns_buf_thrsh : 8; 875*14fa93cdSSrikanth Jampala u64 nps_slc_buf_thrsh : 8; 876*14fa93cdSSrikanth Jampala u64 ilk_buf_thrsh : 8; 877*14fa93cdSSrikanth Jampala u64 raz_32_62 : 31; 878*14fa93cdSSrikanth Jampala u64 arb_sel : 1; 879*14fa93cdSSrikanth Jampala #endif 880*14fa93cdSSrikanth Jampala } s; 881*14fa93cdSSrikanth Jampala }; 882*14fa93cdSSrikanth Jampala 883*14fa93cdSSrikanth Jampala /** 884*14fa93cdSSrikanth Jampala * struct pom_int_ena_w1s - POM interrupt enable set register 885*14fa93cdSSrikanth Jampala * @illegal_intf: Reads or sets enable for POM_INT[ILLEGAL_INTF]. 886*14fa93cdSSrikanth Jampala * @illegal_dport: Reads or sets enable for POM_INT[ILLEGAL_DPORT]. 887*14fa93cdSSrikanth Jampala */ 888*14fa93cdSSrikanth Jampala union pom_int_ena_w1s { 889*14fa93cdSSrikanth Jampala u64 value; 890*14fa93cdSSrikanth Jampala struct { 891*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 892*14fa93cdSSrikanth Jampala u64 raz2 : 60; 893*14fa93cdSSrikanth Jampala u64 illegal_intf : 1; 894*14fa93cdSSrikanth Jampala u64 illegal_dport : 1; 895*14fa93cdSSrikanth Jampala u64 raz1 : 1; 896*14fa93cdSSrikanth Jampala u64 raz0 : 1; 897*14fa93cdSSrikanth Jampala #else 898*14fa93cdSSrikanth Jampala u64 raz0 : 1; 899*14fa93cdSSrikanth Jampala u64 raz1 : 1; 900*14fa93cdSSrikanth Jampala u64 illegal_dport : 1; 901*14fa93cdSSrikanth Jampala u64 illegal_intf : 1; 902*14fa93cdSSrikanth Jampala u64 raz2 : 60; 903*14fa93cdSSrikanth Jampala #endif 904*14fa93cdSSrikanth Jampala } s; 905*14fa93cdSSrikanth Jampala }; 906*14fa93cdSSrikanth Jampala 907*14fa93cdSSrikanth Jampala /** 908*14fa93cdSSrikanth Jampala * struct lbc_inval_ctl - LBC invalidation control register 909*14fa93cdSSrikanth Jampala * @wait_timer: Wait timer for wait state. [WAIT_TIMER] must 910*14fa93cdSSrikanth Jampala * always be written with its reset value. 911*14fa93cdSSrikanth Jampala * @cam_inval_start: Software should write [CAM_INVAL_START]=1 912*14fa93cdSSrikanth Jampala * to initiate an LBC cache invalidation. After this, software 913*14fa93cdSSrikanth Jampala * should read LBC_INVAL_STATUS until LBC_INVAL_STATUS[DONE] is set. 914*14fa93cdSSrikanth Jampala * LBC hardware clears [CAVM_INVAL_START] before software can 915*14fa93cdSSrikanth Jampala * observed LBC_INVAL_STATUS[DONE] to be set 916*14fa93cdSSrikanth Jampala */ 917*14fa93cdSSrikanth Jampala union lbc_inval_ctl { 918*14fa93cdSSrikanth Jampala u64 value; 919*14fa93cdSSrikanth Jampala struct { 920*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 921*14fa93cdSSrikanth Jampala u64 raz2 : 48; 922*14fa93cdSSrikanth Jampala u64 wait_timer : 8; 923*14fa93cdSSrikanth Jampala u64 raz1 : 6; 924*14fa93cdSSrikanth Jampala u64 cam_inval_start : 1; 925*14fa93cdSSrikanth Jampala u64 raz0 : 1; 926*14fa93cdSSrikanth Jampala #else 927*14fa93cdSSrikanth Jampala u64 raz0 : 1; 928*14fa93cdSSrikanth Jampala u64 cam_inval_start : 1; 929*14fa93cdSSrikanth Jampala u64 raz1 : 6; 930*14fa93cdSSrikanth Jampala u64 wait_timer : 8; 931*14fa93cdSSrikanth Jampala u64 raz2 : 48; 932*14fa93cdSSrikanth Jampala #endif 933*14fa93cdSSrikanth Jampala } s; 934*14fa93cdSSrikanth Jampala }; 935*14fa93cdSSrikanth Jampala 936*14fa93cdSSrikanth Jampala /** 937*14fa93cdSSrikanth Jampala * struct lbc_int_ena_w1s - LBC interrupt enable set register 938*14fa93cdSSrikanth Jampala * @cam_hard_err: Reads or sets enable for LBC_INT[CAM_HARD_ERR]. 939*14fa93cdSSrikanth Jampala * @cam_inval_abort: Reads or sets enable for LBC_INT[CAM_INVAL_ABORT]. 940*14fa93cdSSrikanth Jampala * @over_fetch_err: Reads or sets enable for LBC_INT[OVER_FETCH_ERR]. 941*14fa93cdSSrikanth Jampala * @cache_line_to_err: Reads or sets enable for 942*14fa93cdSSrikanth Jampala * LBC_INT[CACHE_LINE_TO_ERR]. 943*14fa93cdSSrikanth Jampala * @cam_soft_err: Reads or sets enable for 944*14fa93cdSSrikanth Jampala * LBC_INT[CAM_SOFT_ERR]. 945*14fa93cdSSrikanth Jampala * @dma_rd_err: Reads or sets enable for 946*14fa93cdSSrikanth Jampala * LBC_INT[DMA_RD_ERR]. 947*14fa93cdSSrikanth Jampala */ 948*14fa93cdSSrikanth Jampala union lbc_int_ena_w1s { 949*14fa93cdSSrikanth Jampala u64 value; 950*14fa93cdSSrikanth Jampala struct { 951*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 952*14fa93cdSSrikanth Jampala u64 raz_10_63 : 54; 953*14fa93cdSSrikanth Jampala u64 cam_hard_err : 1; 954*14fa93cdSSrikanth Jampala u64 cam_inval_abort : 1; 955*14fa93cdSSrikanth Jampala u64 over_fetch_err : 1; 956*14fa93cdSSrikanth Jampala u64 cache_line_to_err : 1; 957*14fa93cdSSrikanth Jampala u64 raz_2_5 : 4; 958*14fa93cdSSrikanth Jampala u64 cam_soft_err : 1; 959*14fa93cdSSrikanth Jampala u64 dma_rd_err : 1; 960*14fa93cdSSrikanth Jampala #else 961*14fa93cdSSrikanth Jampala u64 dma_rd_err : 1; 962*14fa93cdSSrikanth Jampala u64 cam_soft_err : 1; 963*14fa93cdSSrikanth Jampala u64 raz_2_5 : 4; 964*14fa93cdSSrikanth Jampala u64 cache_line_to_err : 1; 965*14fa93cdSSrikanth Jampala u64 over_fetch_err : 1; 966*14fa93cdSSrikanth Jampala u64 cam_inval_abort : 1; 967*14fa93cdSSrikanth Jampala u64 cam_hard_err : 1; 968*14fa93cdSSrikanth Jampala u64 raz_10_63 : 54; 969*14fa93cdSSrikanth Jampala #endif 970*14fa93cdSSrikanth Jampala } s; 971*14fa93cdSSrikanth Jampala }; 972*14fa93cdSSrikanth Jampala 973*14fa93cdSSrikanth Jampala /** 974*14fa93cdSSrikanth Jampala * struct lbc_int - LBC interrupt summary register 975*14fa93cdSSrikanth Jampala * @cam_hard_err: indicates a fatal hardware error. 976*14fa93cdSSrikanth Jampala * It requires system reset. 977*14fa93cdSSrikanth Jampala * When [CAM_HARD_ERR] is set, LBC stops logging any new information in 978*14fa93cdSSrikanth Jampala * LBC_POM_MISS_INFO_LOG, 979*14fa93cdSSrikanth Jampala * LBC_POM_MISS_ADDR_LOG, 980*14fa93cdSSrikanth Jampala * LBC_EFL_MISS_INFO_LOG, and 981*14fa93cdSSrikanth Jampala * LBC_EFL_MISS_ADDR_LOG. 982*14fa93cdSSrikanth Jampala * Software should sample them. 983*14fa93cdSSrikanth Jampala * @cam_inval_abort: indicates a fatal hardware error. 984*14fa93cdSSrikanth Jampala * System reset is required. 985*14fa93cdSSrikanth Jampala * @over_fetch_err: indicates a fatal hardware error 986*14fa93cdSSrikanth Jampala * System reset is required 987*14fa93cdSSrikanth Jampala * @cache_line_to_err: is a debug feature. 988*14fa93cdSSrikanth Jampala * This timeout interrupt bit tells the software that 989*14fa93cdSSrikanth Jampala * a cacheline in LBC has non-zero usage and the context 990*14fa93cdSSrikanth Jampala * has not been used for greater than the 991*14fa93cdSSrikanth Jampala * LBC_TO_CNT[TO_CNT] time interval. 992*14fa93cdSSrikanth Jampala * @sbe: Memory SBE error. This is recoverable via ECC. 993*14fa93cdSSrikanth Jampala * See LBC_ECC_INT for more details. 994*14fa93cdSSrikanth Jampala * @dbe: Memory DBE error. This is a fatal and requires a 995*14fa93cdSSrikanth Jampala * system reset. 996*14fa93cdSSrikanth Jampala * @pref_dat_len_mismatch_err: Summary bit for context length 997*14fa93cdSSrikanth Jampala * mismatch errors. 998*14fa93cdSSrikanth Jampala * @rd_dat_len_mismatch_err: Summary bit for SE read data length 999*14fa93cdSSrikanth Jampala * greater than data prefect length errors. 1000*14fa93cdSSrikanth Jampala * @cam_soft_err: is recoverable. Software must complete a 1001*14fa93cdSSrikanth Jampala * LBC_INVAL_CTL[CAM_INVAL_START] invalidation sequence and 1002*14fa93cdSSrikanth Jampala * then clear [CAM_SOFT_ERR]. 1003*14fa93cdSSrikanth Jampala * @dma_rd_err: A context prefect read of host memory returned with 1004*14fa93cdSSrikanth Jampala * a read error. 1005*14fa93cdSSrikanth Jampala */ 1006*14fa93cdSSrikanth Jampala union lbc_int { 1007*14fa93cdSSrikanth Jampala u64 value; 1008*14fa93cdSSrikanth Jampala struct { 1009*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 1010*14fa93cdSSrikanth Jampala u64 raz_10_63 : 54; 1011*14fa93cdSSrikanth Jampala u64 cam_hard_err : 1; 1012*14fa93cdSSrikanth Jampala u64 cam_inval_abort : 1; 1013*14fa93cdSSrikanth Jampala u64 over_fetch_err : 1; 1014*14fa93cdSSrikanth Jampala u64 cache_line_to_err : 1; 1015*14fa93cdSSrikanth Jampala u64 sbe : 1; 1016*14fa93cdSSrikanth Jampala u64 dbe : 1; 1017*14fa93cdSSrikanth Jampala u64 pref_dat_len_mismatch_err : 1; 1018*14fa93cdSSrikanth Jampala u64 rd_dat_len_mismatch_err : 1; 1019*14fa93cdSSrikanth Jampala u64 cam_soft_err : 1; 1020*14fa93cdSSrikanth Jampala u64 dma_rd_err : 1; 1021*14fa93cdSSrikanth Jampala #else 1022*14fa93cdSSrikanth Jampala u64 dma_rd_err : 1; 1023*14fa93cdSSrikanth Jampala u64 cam_soft_err : 1; 1024*14fa93cdSSrikanth Jampala u64 rd_dat_len_mismatch_err : 1; 1025*14fa93cdSSrikanth Jampala u64 pref_dat_len_mismatch_err : 1; 1026*14fa93cdSSrikanth Jampala u64 dbe : 1; 1027*14fa93cdSSrikanth Jampala u64 sbe : 1; 1028*14fa93cdSSrikanth Jampala u64 cache_line_to_err : 1; 1029*14fa93cdSSrikanth Jampala u64 over_fetch_err : 1; 1030*14fa93cdSSrikanth Jampala u64 cam_inval_abort : 1; 1031*14fa93cdSSrikanth Jampala u64 cam_hard_err : 1; 1032*14fa93cdSSrikanth Jampala u64 raz_10_63 : 54; 1033*14fa93cdSSrikanth Jampala #endif 1034*14fa93cdSSrikanth Jampala } s; 1035*14fa93cdSSrikanth Jampala }; 1036*14fa93cdSSrikanth Jampala 1037*14fa93cdSSrikanth Jampala /** 1038*14fa93cdSSrikanth Jampala * struct lbc_inval_status: LBC Invalidation status register 1039*14fa93cdSSrikanth Jampala * @cam_clean_entry_complete_cnt: The number of entries that are 1040*14fa93cdSSrikanth Jampala * cleaned up successfully. 1041*14fa93cdSSrikanth Jampala * @cam_clean_entry_cnt: The number of entries that have the CAM 1042*14fa93cdSSrikanth Jampala * inval command issued. 1043*14fa93cdSSrikanth Jampala * @cam_inval_state: cam invalidation FSM state 1044*14fa93cdSSrikanth Jampala * @cam_inval_abort: cam invalidation abort 1045*14fa93cdSSrikanth Jampala * @cam_rst_rdy: lbc_cam reset ready 1046*14fa93cdSSrikanth Jampala * @done: LBC clears [DONE] when 1047*14fa93cdSSrikanth Jampala * LBC_INVAL_CTL[CAM_INVAL_START] is written with a one, 1048*14fa93cdSSrikanth Jampala * and sets [DONE] when it completes the invalidation 1049*14fa93cdSSrikanth Jampala * sequence. 1050*14fa93cdSSrikanth Jampala */ 1051*14fa93cdSSrikanth Jampala union lbc_inval_status { 1052*14fa93cdSSrikanth Jampala u64 value; 1053*14fa93cdSSrikanth Jampala struct { 1054*14fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD)) 1055*14fa93cdSSrikanth Jampala u64 raz3 : 23; 1056*14fa93cdSSrikanth Jampala u64 cam_clean_entry_complete_cnt : 9; 1057*14fa93cdSSrikanth Jampala u64 raz2 : 7; 1058*14fa93cdSSrikanth Jampala u64 cam_clean_entry_cnt : 9; 1059*14fa93cdSSrikanth Jampala u64 raz1 : 5; 1060*14fa93cdSSrikanth Jampala u64 cam_inval_state : 3; 1061*14fa93cdSSrikanth Jampala u64 raz0 : 5; 1062*14fa93cdSSrikanth Jampala u64 cam_inval_abort : 1; 1063*14fa93cdSSrikanth Jampala u64 cam_rst_rdy : 1; 1064*14fa93cdSSrikanth Jampala u64 done : 1; 1065*14fa93cdSSrikanth Jampala #else 1066*14fa93cdSSrikanth Jampala u64 done : 1; 1067*14fa93cdSSrikanth Jampala u64 cam_rst_rdy : 1; 1068*14fa93cdSSrikanth Jampala u64 cam_inval_abort : 1; 1069*14fa93cdSSrikanth Jampala u64 raz0 : 5; 1070*14fa93cdSSrikanth Jampala u64 cam_inval_state : 3; 1071*14fa93cdSSrikanth Jampala u64 raz1 : 5; 1072*14fa93cdSSrikanth Jampala u64 cam_clean_entry_cnt : 9; 1073*14fa93cdSSrikanth Jampala u64 raz2 : 7; 1074*14fa93cdSSrikanth Jampala u64 cam_clean_entry_complete_cnt : 9; 1075*14fa93cdSSrikanth Jampala u64 raz3 : 23; 1076*14fa93cdSSrikanth Jampala #endif 1077*14fa93cdSSrikanth Jampala } s; 1078*14fa93cdSSrikanth Jampala }; 1079*14fa93cdSSrikanth Jampala 1080*14fa93cdSSrikanth Jampala #endif /* __NITROX_CSR_H */ 1081