New upstream version 18.08
[deb_dpdk.git] / drivers / net / qede / base / ecore_hsi_debug_tools.h
index e82b0d4..bf54872 100644 (file)
@@ -1,9 +1,7 @@
-/*
- * Copyright (c) 2016 QLogic Corporation.
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2016 - 2018 Cavium Inc.
  * All rights reserved.
- * www.qlogic.com
- *
- * See LICENSE.qede_pmd for copyright and licensing details.
+ * www.cavium.com
  */
 
 #ifndef __ECORE_HSI_DEBUG_TOOLS__
@@ -67,6 +65,8 @@ enum block_addr {
        GRCBASE_MULD = 0x4e0000,
        GRCBASE_YULD = 0x4c8000,
        GRCBASE_XYLD = 0x4c0000,
+       GRCBASE_PTLD = 0x590000,
+       GRCBASE_YPLD = 0x5b0000,
        GRCBASE_PRM = 0x230000,
        GRCBASE_PBF_PB1 = 0xda0000,
        GRCBASE_PBF_PB2 = 0xda4000,
@@ -80,6 +80,10 @@ enum block_addr {
        GRCBASE_TCFC = 0x2d0000,
        GRCBASE_IGU = 0x180000,
        GRCBASE_CAU = 0x1c0000,
+       GRCBASE_RGFS = 0xf00000,
+       GRCBASE_RGSRC = 0x320000,
+       GRCBASE_TGFS = 0xd00000,
+       GRCBASE_TGSRC = 0x322000,
        GRCBASE_UMAC = 0x51000,
        GRCBASE_XMAC = 0x210000,
        GRCBASE_DBG = 0x10000,
@@ -92,6 +96,7 @@ enum block_addr {
        GRCBASE_MS = 0x6a0000,
        GRCBASE_PHY_PCIE = 0x620000,
        GRCBASE_LED = 0x6b8000,
+       GRCBASE_AVS_WRAP = 0x6b0000,
        GRCBASE_MISC_AEU = 0x8000,
        GRCBASE_BAR0_MAP = 0x1c00000,
        MAX_BLOCK_ADDR
@@ -152,6 +157,8 @@ enum block_id {
        BLOCK_MULD,
        BLOCK_YULD,
        BLOCK_XYLD,
+       BLOCK_PTLD,
+       BLOCK_YPLD,
        BLOCK_PRM,
        BLOCK_PBF_PB1,
        BLOCK_PBF_PB2,
@@ -165,6 +172,10 @@ enum block_id {
        BLOCK_TCFC,
        BLOCK_IGU,
        BLOCK_CAU,
+       BLOCK_RGFS,
+       BLOCK_RGSRC,
+       BLOCK_TGFS,
+       BLOCK_TGSRC,
        BLOCK_UMAC,
        BLOCK_XMAC,
        BLOCK_DBG,
@@ -177,6 +188,7 @@ enum block_id {
        BLOCK_MS,
        BLOCK_PHY_PCIE,
        BLOCK_LED,
+       BLOCK_AVS_WRAP,
        BLOCK_MISC_AEU,
        BLOCK_BAR0_MAP,
        MAX_BLOCK_ID
@@ -198,6 +210,10 @@ enum bin_dbg_buffer_type {
        BIN_BUF_DBG_ATTN_REGS /* Attention registers */,
        BIN_BUF_DBG_ATTN_INDEXES /* Attention indexes */,
        BIN_BUF_DBG_ATTN_NAME_OFFSETS /* Attention name offsets */,
+       BIN_BUF_DBG_BUS_BLOCKS /* Debug Bus blocks */,
+       BIN_BUF_DBG_BUS_LINES /* Debug Bus lines */,
+       BIN_BUF_DBG_BUS_BLOCKS_USER_DATA /* Debug Bus blocks user data */,
+       BIN_BUF_DBG_BUS_LINE_NAME_OFFSETS /* Debug Bus line name offsets */,
        BIN_BUF_DBG_PARSING_STRINGS /* Debug Tools parsing strings */,
        MAX_BIN_DBG_BUFFER_TYPE
 };
@@ -207,10 +223,10 @@ enum bin_dbg_buffer_type {
  * Attention bit mapping
  */
 struct dbg_attn_bit_mapping {
-       __le16 data;
+       u16 data;
 /* The index of an attention in the blocks attentions list
- * (if is_unused_idx_cnt=0), or a number of consecutive unused attention bits
- * (if is_unused_idx_cnt=1)
+ * (if is_unused_bit_cnt=0), or a number of consecutive unused attention bits
+ * (if is_unused_bit_cnt=1)
  */
 #define DBG_ATTN_BIT_MAPPING_VAL_MASK                0x7FFF
 #define DBG_ATTN_BIT_MAPPING_VAL_SHIFT               0
@@ -229,14 +245,14 @@ struct dbg_attn_block_type_data {
 /* Offset of this block attention names in the debug attention name offsets
  * array
  */
-       __le16 names_offset;
-       __le16 reserved1;
+       u16 names_offset;
+       u16 reserved1;
        u8 num_regs /* Number of attention registers in this block */;
        u8 reserved2;
 /* Offset of this blocks attention registers in the attention registers array
  * (in dbg_attn_reg units)
  */
-       __le16 regs_offset;
+       u16 regs_offset;
 };
 
 /*
@@ -254,20 +270,20 @@ struct dbg_attn_block {
  * Attention register result
  */
 struct dbg_attn_reg_result {
-       __le32 data;
+       u32 data;
 /* STS attention register GRC address (in dwords) */
 #define DBG_ATTN_REG_RESULT_STS_ADDRESS_MASK   0xFFFFFF
 #define DBG_ATTN_REG_RESULT_STS_ADDRESS_SHIFT  0
 /* Number of attention indexes in this register */
-#define DBG_ATTN_REG_RESULT_NUM_ATTN_IDX_MASK  0xFF
-#define DBG_ATTN_REG_RESULT_NUM_ATTN_IDX_SHIFT 24
-/* Offset of this registers block attention indexes (values in the range
- * 0..number of block attentions)
- */
-       __le16 attn_idx_offset;
-       __le16 reserved;
-       __le32 sts_val /* Value read from the STS attention register */;
-       __le32 mask_val /* Value read from the MASK attention register */;
+#define DBG_ATTN_REG_RESULT_NUM_REG_ATTN_MASK  0xFF
+#define DBG_ATTN_REG_RESULT_NUM_REG_ATTN_SHIFT 24
+/* The offset of this registers attentions within the blocks attentions list
+ * (a value in the range 0..number of block attentions-1)
+ */
+       u16 block_attn_offset;
+       u16 reserved;
+       u32 sts_val /* Value read from the STS attention register */;
+       u32 mask_val /* Value read from the MASK attention register */;
 };
 
 /*
@@ -279,13 +295,13 @@ struct dbg_attn_block_result {
 /* Value from dbg_attn_type enum */
 #define DBG_ATTN_BLOCK_RESULT_ATTN_TYPE_MASK  0x3
 #define DBG_ATTN_BLOCK_RESULT_ATTN_TYPE_SHIFT 0
-/* Number of registers in the blok in which at least one attention bit is set */
+/* Number of registers in block in which at least one attention bit is set */
 #define DBG_ATTN_BLOCK_RESULT_NUM_REGS_MASK   0x3F
 #define DBG_ATTN_BLOCK_RESULT_NUM_REGS_SHIFT  2
 /* Offset of this registers block attention names in the attention name offsets
  * array
  */
-       __le16 names_offset;
+       u16 names_offset;
 /* result data for each register in the block in which at least one attention
  * bit is set
  */
@@ -298,7 +314,7 @@ struct dbg_attn_block_result {
  * mode header
  */
 struct dbg_mode_hdr {
-       __le16 data;
+       u16 data;
 /* indicates if a mode expression should be evaluated (0/1) */
 #define DBG_MODE_HDR_EVAL_MODE_MASK         0x1
 #define DBG_MODE_HDR_EVAL_MODE_SHIFT        0
@@ -313,22 +329,20 @@ struct dbg_mode_hdr {
  * Attention register
  */
 struct dbg_attn_reg {
-       struct dbg_mode_hdr mode /* Mode header */;
-/* Offset of this registers block attention indexes (values in the range
- * 0..number of block attentions)
+/* The offset of this registers attentions within the blocks attentions list
+ * (a value in the range 0..number of block attentions-1)
  */
-       __le16 attn_idx_offset;
-       __le32 data;
+       u16 block_attn_offset;
+       u32 data;
 /* STS attention register GRC address (in dwords) */
 #define DBG_ATTN_REG_STS_ADDRESS_MASK   0xFFFFFF
 #define DBG_ATTN_REG_STS_ADDRESS_SHIFT  0
-/* Number of attention indexes in this register */
-#define DBG_ATTN_REG_NUM_ATTN_IDX_MASK  0xFF
-#define DBG_ATTN_REG_NUM_ATTN_IDX_SHIFT 24
+/* Number of attention in this register */
+#define DBG_ATTN_REG_NUM_REG_ATTN_MASK  0xFF
+#define DBG_ATTN_REG_NUM_REG_ATTN_SHIFT 24
 /* STS_CLR attention register GRC address (in dwords) */
-       __le32 sts_clr_address;
-/* MASK attention register GRC address (in dwords) */
-       __le32 mask_address;
+       u32 sts_clr_address;
+       u32 mask_address /* MASK attention register GRC address (in dwords) */;
 };
 
 
@@ -343,6 +357,53 @@ enum dbg_attn_type {
 };
 
 
+/*
+ * Debug Bus block data
+ */
+struct dbg_bus_block {
+/* Number of debug lines in this block (excluding signature & latency events) */
+       u8 num_of_lines;
+/* Indicates if this block has a latency events debug line (0/1). */
+       u8 has_latency_events;
+/* Offset of this blocks lines in the Debug Bus lines array. */
+       u16 lines_offset;
+};
+
+
+/*
+ * Debug Bus block user data
+ */
+struct dbg_bus_block_user_data {
+/* Number of debug lines in this block (excluding signature & latency events) */
+       u8 num_of_lines;
+/* Indicates if this block has a latency events debug line (0/1). */
+       u8 has_latency_events;
+/* Offset of this blocks lines in the debug bus line name offsets array. */
+       u16 names_offset;
+};
+
+
+/*
+ * Block Debug line data
+ */
+struct dbg_bus_line {
+       u8 data;
+/* Number of groups in the line (0-3) */
+#define DBG_BUS_LINE_NUM_OF_GROUPS_MASK  0xF
+#define DBG_BUS_LINE_NUM_OF_GROUPS_SHIFT 0
+/* Indicates if this is a 128b line (0) or a 256b line (1). */
+#define DBG_BUS_LINE_IS_256B_MASK        0x1
+#define DBG_BUS_LINE_IS_256B_SHIFT       4
+#define DBG_BUS_LINE_RESERVED_MASK       0x7
+#define DBG_BUS_LINE_RESERVED_SHIFT      5
+/* Four 2-bit values, indicating the size of each group minus 1 (i.e.
+ * value=0 means size=1, value=1 means size=2, etc), starting from lsb.
+ * The sizes are in dwords (if is_256b=0) or in qwords (if is_256b=1).
+ */
+       u8 group_sizes;
+};
+
+
 /*
  * condition header for registers dump
  */
@@ -357,18 +418,21 @@ struct dbg_dump_cond_hdr {
  * memory data for registers dump
  */
 struct dbg_dump_mem {
-       __le32 dword0;
+       u32 dword0;
 /* register address (in dwords) */
 #define DBG_DUMP_MEM_ADDRESS_MASK       0xFFFFFF
 #define DBG_DUMP_MEM_ADDRESS_SHIFT      0
 #define DBG_DUMP_MEM_MEM_GROUP_ID_MASK  0xFF /* memory group ID */
 #define DBG_DUMP_MEM_MEM_GROUP_ID_SHIFT 24
-       __le32 dword1;
+       u32 dword1;
 /* register size (in dwords) */
 #define DBG_DUMP_MEM_LENGTH_MASK        0xFFFFFF
 #define DBG_DUMP_MEM_LENGTH_SHIFT       0
-#define DBG_DUMP_MEM_RESERVED_MASK      0xFF
-#define DBG_DUMP_MEM_RESERVED_SHIFT     24
+/* indicates if the register is wide-bus */
+#define DBG_DUMP_MEM_WIDE_BUS_MASK      0x1
+#define DBG_DUMP_MEM_WIDE_BUS_SHIFT     24
+#define DBG_DUMP_MEM_RESERVED_MASK      0x7F
+#define DBG_DUMP_MEM_RESERVED_SHIFT     25
 };
 
 
@@ -376,12 +440,15 @@ struct dbg_dump_mem {
  * register data for registers dump
  */
 struct dbg_dump_reg {
-       __le32 data;
+       u32 data;
 /* register address (in dwords) */
-#define DBG_DUMP_REG_ADDRESS_MASK  0xFFFFFF
-#define DBG_DUMP_REG_ADDRESS_SHIFT 0
-#define DBG_DUMP_REG_LENGTH_MASK   0xFF /* register size (in dwords) */
-#define DBG_DUMP_REG_LENGTH_SHIFT  24
+#define DBG_DUMP_REG_ADDRESS_MASK   0x7FFFFF /* register address (in dwords) */
+#define DBG_DUMP_REG_ADDRESS_SHIFT  0
+/* indicates if the register is wide-bus */
+#define DBG_DUMP_REG_WIDE_BUS_MASK  0x1
+#define DBG_DUMP_REG_WIDE_BUS_SHIFT 23
+#define DBG_DUMP_REG_LENGTH_MASK    0xFF /* register size (in dwords) */
+#define DBG_DUMP_REG_LENGTH_SHIFT   24
 };
 
 
@@ -389,7 +456,7 @@ struct dbg_dump_reg {
  * split header for registers dump
  */
 struct dbg_dump_split_hdr {
-       __le32 hdr;
+       u32 hdr;
 /* size in dwords of the data following this header */
 #define DBG_DUMP_SPLIT_HDR_DATA_SIZE_MASK      0xFFFFFF
 #define DBG_DUMP_SPLIT_HDR_DATA_SIZE_SHIFT     0
@@ -403,8 +470,7 @@ struct dbg_dump_split_hdr {
  */
 struct dbg_idle_chk_cond_hdr {
        struct dbg_mode_hdr mode /* Mode header */;
-/* size in dwords of the data following this header */
-       __le16 data_size;
+       u16 data_size /* size in dwords of the data following this header */;
 };
 
 
@@ -412,14 +478,17 @@ struct dbg_idle_chk_cond_hdr {
  * Idle Check condition register
  */
 struct dbg_idle_chk_cond_reg {
-       __le32 data;
+       u32 data;
 /* Register GRC address (in dwords) */
-#define DBG_IDLE_CHK_COND_REG_ADDRESS_MASK   0xFFFFFF
+#define DBG_IDLE_CHK_COND_REG_ADDRESS_MASK   0x7FFFFF
 #define DBG_IDLE_CHK_COND_REG_ADDRESS_SHIFT  0
+/* indicates if the register is wide-bus */
+#define DBG_IDLE_CHK_COND_REG_WIDE_BUS_MASK  0x1
+#define DBG_IDLE_CHK_COND_REG_WIDE_BUS_SHIFT 23
 /* value from block_id enum */
 #define DBG_IDLE_CHK_COND_REG_BLOCK_ID_MASK  0xFF
 #define DBG_IDLE_CHK_COND_REG_BLOCK_ID_SHIFT 24
-       __le16 num_entries /* number of registers entries to check */;
+       u16 num_entries /* number of registers entries to check */;
        u8 entry_size /* size of registers entry (in dwords) */;
        u8 start_entry /* index of the first entry to check */;
 };
@@ -429,14 +498,17 @@ struct dbg_idle_chk_cond_reg {
  * Idle Check info register
  */
 struct dbg_idle_chk_info_reg {
-       __le32 data;
+       u32 data;
 /* Register GRC address (in dwords) */
-#define DBG_IDLE_CHK_INFO_REG_ADDRESS_MASK   0xFFFFFF
+#define DBG_IDLE_CHK_INFO_REG_ADDRESS_MASK   0x7FFFFF
 #define DBG_IDLE_CHK_INFO_REG_ADDRESS_SHIFT  0
+/* indicates if the register is wide-bus */
+#define DBG_IDLE_CHK_INFO_REG_WIDE_BUS_MASK  0x1
+#define DBG_IDLE_CHK_INFO_REG_WIDE_BUS_SHIFT 23
 /* value from block_id enum */
 #define DBG_IDLE_CHK_INFO_REG_BLOCK_ID_MASK  0xFF
 #define DBG_IDLE_CHK_INFO_REG_BLOCK_ID_SHIFT 24
-       __le16 size /* register size in dwords */;
+       u16 size /* register size in dwords */;
        struct dbg_mode_hdr mode /* Mode header */;
 };
 
@@ -454,8 +526,8 @@ union dbg_idle_chk_reg {
  * Idle Check result header
  */
 struct dbg_idle_chk_result_hdr {
-       __le16 rule_id /* Failing rule index */;
-       __le16 mem_entry_id /* Failing memory entry index */;
+       u16 rule_id /* Failing rule index */;
+       u16 mem_entry_id /* Failing memory entry index */;
        u8 num_dumped_cond_regs /* number of dumped condition registers */;
        u8 num_dumped_info_regs /* number of dumped condition registers */;
        u8 severity /* from dbg_idle_chk_severity_types enum */;
@@ -475,7 +547,7 @@ struct dbg_idle_chk_result_reg_hdr {
 #define DBG_IDLE_CHK_RESULT_REG_HDR_REG_ID_MASK  0x7F
 #define DBG_IDLE_CHK_RESULT_REG_HDR_REG_ID_SHIFT 1
        u8 start_entry /* index of the first checked entry */;
-       __le16 size /* register size in dwords */;
+       u16 size /* register size in dwords */;
 };
 
 
@@ -483,7 +555,7 @@ struct dbg_idle_chk_result_reg_hdr {
  * Idle Check rule
  */
 struct dbg_idle_chk_rule {
-       __le16 rule_id /* Idle Check rule ID */;
+       u16 rule_id /* Idle Check rule ID */;
        u8 severity /* value from dbg_idle_chk_severity_types enum */;
        u8 cond_id /* Condition ID */;
        u8 num_cond_regs /* number of condition registers */;
@@ -493,11 +565,11 @@ struct dbg_idle_chk_rule {
 /* offset of this rules registers in the idle check register array
  * (in dbg_idle_chk_reg units)
  */
-       __le16 reg_offset;
+       u16 reg_offset;
 /* offset of this rules immediate values in the immediate values array
  * (in dwords)
  */
-       __le16 imm_offset;
+       u16 imm_offset;
 };
 
 
@@ -505,7 +577,7 @@ struct dbg_idle_chk_rule {
  * Idle Check rule parsing data
  */
 struct dbg_idle_chk_rule_parsing_data {
-       __le32 data;
+       u32 data;
 /* indicates if this register has a FW message */
 #define DBG_IDLE_CHK_RULE_PARSING_DATA_HAS_FW_MSG_MASK  0x1
 #define DBG_IDLE_CHK_RULE_PARSING_DATA_HAS_FW_MSG_SHIFT 0
@@ -534,17 +606,21 @@ enum dbg_idle_chk_severity_types {
  * Debug Bus block data
  */
 struct dbg_bus_block_data {
-/* Indicates if the block is enabled for recording (0/1) */
-       u8 enabled;
-       u8 hw_id /* HW ID associated with the block */;
+       __le16 data;
+/* 4-bit value: bit i set -> dword/qword i is enabled. */
+#define DBG_BUS_BLOCK_DATA_ENABLE_MASK_MASK       0xF
+#define DBG_BUS_BLOCK_DATA_ENABLE_MASK_SHIFT      0
+/* Number of dwords/qwords to shift right the debug data (0-3) */
+#define DBG_BUS_BLOCK_DATA_RIGHT_SHIFT_MASK       0xF
+#define DBG_BUS_BLOCK_DATA_RIGHT_SHIFT_SHIFT      4
+/* 4-bit value: bit i set -> dword/qword i is forced valid. */
+#define DBG_BUS_BLOCK_DATA_FORCE_VALID_MASK_MASK  0xF
+#define DBG_BUS_BLOCK_DATA_FORCE_VALID_MASK_SHIFT 8
+/* 4-bit value: bit i set -> dword/qword i frame bit is forced. */
+#define DBG_BUS_BLOCK_DATA_FORCE_FRAME_MASK_MASK  0xF
+#define DBG_BUS_BLOCK_DATA_FORCE_FRAME_MASK_SHIFT 12
        u8 line_num /* Debug line number to select */;
-       u8 right_shift /* Number of units to  right the debug data (0-3) */;
-       u8 cycle_en /* 4-bit value: bit i set -> unit i is enabled. */;
-/* 4-bit value: bit i set -> unit i is forced valid. */
-       u8 force_valid;
-/* 4-bit value: bit i set -> unit i frame bit is forced. */
-       u8 force_frame;
-       u8 reserved;
+       u8 hw_id /* HW ID associated with the block */;
 };
 
 
@@ -593,12 +669,27 @@ enum dbg_bus_constraint_ops {
 };
 
 
+/*
+ * Debug Bus trigger state data
+ */
+struct dbg_bus_trigger_state_data {
+       u8 data;
+/* 4-bit value: bit i set -> dword i of the trigger state block
+ * (after right shift) is enabled.
+ */
+#define DBG_BUS_TRIGGER_STATE_DATA_BLOCK_SHIFTED_ENABLE_MASK_MASK  0xF
+#define DBG_BUS_TRIGGER_STATE_DATA_BLOCK_SHIFTED_ENABLE_MASK_SHIFT 0
+/* 4-bit value: bit i set -> dword i is compared by a constraint */
+#define DBG_BUS_TRIGGER_STATE_DATA_CONSTRAINT_DWORD_MASK_MASK      0xF
+#define DBG_BUS_TRIGGER_STATE_DATA_CONSTRAINT_DWORD_MASK_SHIFT     4
+};
+
 /*
  * Debug Bus memory address
  */
 struct dbg_bus_mem_addr {
-       __le32 lo;
-       __le32 hi;
+       u32 lo;
+       u32 hi;
 };
 
 /*
@@ -607,7 +698,7 @@ struct dbg_bus_mem_addr {
 struct dbg_bus_pci_buf_data {
        struct dbg_bus_mem_addr phys_addr /* PCI buffer physical address */;
        struct dbg_bus_mem_addr virt_addr /* PCI buffer virtual address */;
-       __le32 size /* PCI buffer size in bytes */;
+       u32 size /* PCI buffer size in bytes */;
 };
 
 /*
@@ -640,14 +731,8 @@ union dbg_bus_storm_eid_params {
  * Debug Bus Storm data
  */
 struct dbg_bus_storm_data {
-/* Indicates if the Storm is enabled for fast debug recording (0/1) */
-       u8 fast_enabled;
-/* Fast debug Storm mode, valid only if fast_enabled is set */
-       u8 fast_mode;
-/* Indicates if the Storm is enabled for slow debug recording (0/1) */
-       u8 slow_enabled;
-/* Slow debug Storm mode, valid only if slow_enabled is set */
-       u8 slow_mode;
+       u8 enabled /* indicates if the Storm is enabled for recording */;
+       u8 mode /* Storm debug mode, valid only if the Storm is enabled */;
        u8 hw_id /* HW ID associated with the Storm */;
        u8 eid_filter_en /* Indicates if EID filtering is performed (0/1) */;
 /* 1 = EID range filter, 0 = EID mask filter. Valid only if eid_filter_en is
@@ -657,32 +742,28 @@ struct dbg_bus_storm_data {
        u8 cid_filter_en /* Indicates if CID filtering is performed (0/1) */;
 /* EID filter params to filter on. Valid only if eid_filter_en is set. */
        union dbg_bus_storm_eid_params eid_filter_params;
-       __le16 reserved;
-/* CID to filter on. Valid only if cid_filter_en is set. */
-       __le32 cid;
+       u32 cid /* CID to filter on. Valid only if cid_filter_en is set. */;
 };
 
 /*
  * Debug Bus data
  */
 struct dbg_bus_data {
-       __le32 app_version /* The tools version number of the application */;
+       u32 app_version /* The tools version number of the application */;
        u8 state /* The current debug bus state */;
        u8 hw_dwords /* HW dwords per cycle */;
-       u8 next_hw_id /* Next HW ID to be associated with an input */;
+/* The HW IDs of the recorded HW blocks, where bits i*3..i*3+2 contain the
+ * HW ID of dword/qword i
+ */
+       u16 hw_id_mask;
        u8 num_enabled_blocks /* Number of blocks enabled for recording */;
        u8 num_enabled_storms /* Number of Storms enabled for recording */;
        u8 target /* Output target */;
-       u8 next_trigger_state /* ID of next trigger state to be added */;
-/* ID of next filter/trigger constraint to be added */
-       u8 next_constraint_id;
        u8 one_shot_en /* Indicates if one-shot mode is enabled (0/1) */;
        u8 grc_input_en /* Indicates if GRC recording is enabled (0/1) */;
 /* Indicates if timestamp recording is enabled (0/1) */
        u8 timestamp_input_en;
        u8 filter_en /* Indicates if the recording filter is enabled (0/1) */;
-/* Indicates if the recording trigger is enabled (0/1) */
-       u8 trigger_en;
 /* If true, the next added constraint belong to the filter. Otherwise,
  * it belongs to the last added trigger state. Valid only if either filter or
  * triggers are enabled.
@@ -696,6 +777,14 @@ struct dbg_bus_data {
  * Valid only if both filter and trigger are enabled (0/1)
  */
        u8 filter_post_trigger;
+       u16 reserved;
+/* Indicates if the recording trigger is enabled (0/1) */
+       u8 trigger_en;
+/* trigger states data */
+       struct dbg_bus_trigger_state_data trigger_states[3];
+       u8 next_trigger_state /* ID of next trigger state to be added */;
+/* ID of next filter/trigger constraint to be added */
+       u8 next_constraint_id;
 /* If true, all inputs are associated with HW ID 0. Otherwise, each input is
  * assigned a different HW ID (0/1)
  */
@@ -706,9 +795,8 @@ struct dbg_bus_data {
  * DBG_BUS_TARGET_ID_PCI.
  */
        struct dbg_bus_pci_buf_data pci_buf;
-       __le16 reserved;
 /* Debug Bus data for each block */
-       struct dbg_bus_block_data blocks[80];
+       struct dbg_bus_block_data blocks[88];
 /* Debug Bus data for each block */
        struct dbg_bus_storm_data storms[6];
 };
@@ -737,17 +825,6 @@ enum dbg_bus_frame_modes {
 };
 
 
-/*
- * Debug bus input types
- */
-enum dbg_bus_input_types {
-       DBG_BUS_INPUT_TYPE_STORM,
-       DBG_BUS_INPUT_TYPE_BLOCK,
-       MAX_DBG_BUS_INPUT_TYPES
-};
-
-
-
 /*
  * Debug bus other engine mode
  */
@@ -842,16 +919,18 @@ enum dbg_bus_targets {
 };
 
 
+
 /*
  * GRC Dump data
  */
 struct dbg_grc_data {
-/* Value of each GRC parameter. Array size must match enum dbg_grc_params. */
-       __le32 param_val[40];
-/* Indicates for each GRC parameter if it was set by the user (0/1).
- * Array size must match the enum dbg_grc_params.
+/* Indicates if the GRC parameters were initialized */
+       u8 params_initialized;
+       u8 reserved1;
+       u16 reserved2;
+/* Value of each GRC parameter. Array size must match the enum dbg_grc_params.
  */
-       u8 param_set_by_user[40];
+       u32 param_val[48];
 };
 
 
@@ -876,7 +955,8 @@ enum dbg_grc_params {
        DBG_GRC_PARAM_DUMP_CAU /* dump CAU memories (0/1) */,
        DBG_GRC_PARAM_DUMP_QM /* dump QM memories (0/1) */,
        DBG_GRC_PARAM_DUMP_MCP /* dump MCP memories (0/1) */,
-       DBG_GRC_PARAM_RESERVED /* reserved */,
+/* MCP Trace meta data size in bytes */
+       DBG_GRC_PARAM_MCP_TRACE_META_SIZE,
        DBG_GRC_PARAM_DUMP_CFC /* dump CFC memories (0/1) */,
        DBG_GRC_PARAM_DUMP_IGU /* dump IGU memories (0/1) */,
        DBG_GRC_PARAM_DUMP_BRB /* dump BRB memories (0/1) */,
@@ -901,6 +981,8 @@ enum dbg_grc_params {
        DBG_GRC_PARAM_PARITY_SAFE,
        DBG_GRC_PARAM_DUMP_CM /* dump CM memories (0/1) */,
        DBG_GRC_PARAM_DUMP_PHY /* dump PHY memories (0/1) */,
+       DBG_GRC_PARAM_NO_MCP /* dont perform MCP commands (0/1) */,
+       DBG_GRC_PARAM_NO_FW_VER /* dont read FW/MFW version (0/1) */,
        MAX_DBG_GRC_PARAMS
 };
 
@@ -967,7 +1049,7 @@ enum dbg_status {
        DBG_STATUS_MCP_TRACE_NO_META,
        DBG_STATUS_MCP_COULD_NOT_HALT,
        DBG_STATUS_MCP_COULD_NOT_RESUME,
-       DBG_STATUS_DMAE_FAILED,
+       DBG_STATUS_RESERVED2,
        DBG_STATUS_SEMI_FIFO_NOT_EMPTY,
        DBG_STATUS_IGU_FIFO_BAD_DATA,
        DBG_STATUS_MCP_COULD_NOT_MASK_PRTY,
@@ -975,7 +1057,10 @@ enum dbg_status {
        DBG_STATUS_REG_FIFO_BAD_DATA,
        DBG_STATUS_PROTECTION_OVERRIDE_BAD_DATA,
        DBG_STATUS_DBG_ARRAY_NOT_SET,
-       DBG_STATUS_MULTI_BLOCKS_WITH_FILTER,
+       DBG_STATUS_FILTER_BUG,
+       DBG_STATUS_NON_MATCHING_LINES,
+       DBG_STATUS_INVALID_TRIGGER_DWORD_OFFSET,
+       DBG_STATUS_DBG_BUS_IN_USE,
        MAX_DBG_STATUS
 };
 
@@ -998,11 +1083,11 @@ enum dbg_storms {
  * Idle Check data
  */
 struct idle_chk_data {
-       __le32 buf_size /* Idle check buffer size in dwords */;
+       u32 buf_size /* Idle check buffer size in dwords */;
 /* Indicates if the idle check buffer size was set (0/1) */
        u8 buf_size_set;
        u8 reserved1;
-       __le16 reserved2;
+       u16 reserved2;
 };
 
 /*
@@ -1014,11 +1099,13 @@ struct dbg_tools_data {
        struct idle_chk_data idle_chk /* Idle Check data */;
        u8 mode_enable[40] /* Indicates if a mode is enabled (0/1) */;
 /* Indicates if a block is in reset state (0/1) */
-       u8 block_in_reset[80];
+       u8 block_in_reset[88];
        u8 chip_id /* Chip ID (from enum chip_ids) */;
-       u8 platform_id /* Platform ID (from enum platform_ids) */;
+       u8 platform_id /* Platform ID */;
        u8 initialized /* Indicates if the data was initialized */;
-       u8 reserved;
+       u8 use_dmae /* Indicates if DMAE should be used */;
+/* Numbers of registers that were read since last log */
+       u32 num_regs_read;
 };