1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2bfcc09ddSBjoern A. Zeeb /* 3*a4128aadSBjoern A. Zeeb * Copyright (C) 2018, 2020-2024 Intel Corporation 4bfcc09ddSBjoern A. Zeeb */ 5bfcc09ddSBjoern A. Zeeb #ifndef __iwl_context_info_file_gen3_h__ 6bfcc09ddSBjoern A. Zeeb #define __iwl_context_info_file_gen3_h__ 7bfcc09ddSBjoern A. Zeeb 8bfcc09ddSBjoern A. Zeeb #include "iwl-context-info.h" 9bfcc09ddSBjoern A. Zeeb 10bfcc09ddSBjoern A. Zeeb #define CSR_CTXT_INFO_BOOT_CTRL 0x0 11bfcc09ddSBjoern A. Zeeb #define CSR_CTXT_INFO_ADDR 0x118 12bfcc09ddSBjoern A. Zeeb #define CSR_IML_DATA_ADDR 0x120 13bfcc09ddSBjoern A. Zeeb #define CSR_IML_SIZE_ADDR 0x128 14bfcc09ddSBjoern A. Zeeb #define CSR_IML_RESP_ADDR 0x12c 15bfcc09ddSBjoern A. Zeeb 169af1bba4SBjoern A. Zeeb #define UNFRAGMENTED_PNVM_PAYLOADS_NUMBER 2 179af1bba4SBjoern A. Zeeb 18bfcc09ddSBjoern A. Zeeb /* Set bit for enabling automatic function boot */ 19bfcc09ddSBjoern A. Zeeb #define CSR_AUTO_FUNC_BOOT_ENA BIT(1) 20bfcc09ddSBjoern A. Zeeb /* Set bit for initiating function boot */ 21bfcc09ddSBjoern A. Zeeb #define CSR_AUTO_FUNC_INIT BIT(7) 22bfcc09ddSBjoern A. Zeeb 23bfcc09ddSBjoern A. Zeeb /** 24bfcc09ddSBjoern A. Zeeb * enum iwl_prph_scratch_mtr_format - tfd size configuration 25bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_MTR_FORMAT_16B: 16 bit tfd 26bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_MTR_FORMAT_32B: 32 bit tfd 27bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_MTR_FORMAT_64B: 64 bit tfd 28bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_MTR_FORMAT_256B: 256 bit tfd 29bfcc09ddSBjoern A. Zeeb */ 30bfcc09ddSBjoern A. Zeeb enum iwl_prph_scratch_mtr_format { 31bfcc09ddSBjoern A. Zeeb IWL_PRPH_MTR_FORMAT_16B = 0x0, 32bfcc09ddSBjoern A. Zeeb IWL_PRPH_MTR_FORMAT_32B = 0x40000, 33bfcc09ddSBjoern A. Zeeb IWL_PRPH_MTR_FORMAT_64B = 0x80000, 34bfcc09ddSBjoern A. Zeeb IWL_PRPH_MTR_FORMAT_256B = 0xC0000, 35bfcc09ddSBjoern A. Zeeb }; 36bfcc09ddSBjoern A. Zeeb 37bfcc09ddSBjoern A. Zeeb /** 38bfcc09ddSBjoern A. Zeeb * enum iwl_prph_scratch_flags - PRPH scratch control flags 39fac1f593SBjoern A. Zeeb * @IWL_PRPH_SCRATCH_IMR_DEBUG_EN: IMR support for debug 40bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_EARLY_DEBUG_EN: enable early debug conf 41bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_EDBG_DEST_DRAM: use DRAM, with size allocated 42bfcc09ddSBjoern A. Zeeb * in hwm config. 43bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_EDBG_DEST_INTERNAL: use buffer on SRAM 44bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_EDBG_DEST_ST_ARBITER: use st arbiter, mainly for 45bfcc09ddSBjoern A. Zeeb * multicomm. 46bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_EDBG_DEST_TB22DTF: route debug data to SoC HW 47*a4128aadSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_RB_SIZE_4K: Use 4K RB size (the default is 2K) 48bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_MTR_MODE: format used for completion - 0: for 49bfcc09ddSBjoern A. Zeeb * completion descriptor, 1 for responses (legacy) 50bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_MTR_FORMAT: a mask for the size of the tfd. 51bfcc09ddSBjoern A. Zeeb * There are 4 optional values: 0: 16 bit, 1: 32 bit, 2: 64 bit, 52bfcc09ddSBjoern A. Zeeb * 3: 256 bit. 53bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_RB_SIZE_EXT_MASK: RB size full information, ignored 54bfcc09ddSBjoern A. Zeeb * by older firmware versions, so set IWL_PRPH_SCRATCH_RB_SIZE_4K 55bfcc09ddSBjoern A. Zeeb * appropriately; use the below values for this. 56bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K: 8kB RB size 57bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K: 12kB RB size 58bfcc09ddSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K: 16kB RB size 59*a4128aadSBjoern A. Zeeb * @IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE: Indicate fw to set SCU_FORCE_ACTIVE 60*a4128aadSBjoern A. Zeeb * upon reset. 61bfcc09ddSBjoern A. Zeeb */ 62bfcc09ddSBjoern A. Zeeb enum iwl_prph_scratch_flags { 63fac1f593SBjoern A. Zeeb IWL_PRPH_SCRATCH_IMR_DEBUG_EN = BIT(1), 64bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_EARLY_DEBUG_EN = BIT(4), 65bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_EDBG_DEST_DRAM = BIT(8), 66bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_EDBG_DEST_INTERNAL = BIT(9), 67bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_EDBG_DEST_ST_ARBITER = BIT(10), 68bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_EDBG_DEST_TB22DTF = BIT(11), 69bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_RB_SIZE_4K = BIT(16), 70bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_MTR_MODE = BIT(17), 71bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_MTR_FORMAT = BIT(18) | BIT(19), 72bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_RB_SIZE_EXT_MASK = 0xf << 20, 73bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K = 8 << 20, 74bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K = 9 << 20, 75bfcc09ddSBjoern A. Zeeb IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K = 10 << 20, 76*a4128aadSBjoern A. Zeeb IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE = BIT(29), 77bfcc09ddSBjoern A. Zeeb }; 78bfcc09ddSBjoern A. Zeeb 79bfcc09ddSBjoern A. Zeeb /* 80bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch_version - version structure 81bfcc09ddSBjoern A. Zeeb * @mac_id: SKU and revision id 82bfcc09ddSBjoern A. Zeeb * @version: prph scratch information version id 83bfcc09ddSBjoern A. Zeeb * @size: the size of the context information in DWs 84bfcc09ddSBjoern A. Zeeb * @reserved: reserved 85bfcc09ddSBjoern A. Zeeb */ 86bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_version { 87bfcc09ddSBjoern A. Zeeb __le16 mac_id; 88bfcc09ddSBjoern A. Zeeb __le16 version; 89bfcc09ddSBjoern A. Zeeb __le16 size; 90bfcc09ddSBjoern A. Zeeb __le16 reserved; 91bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_VERSION_S */ 92bfcc09ddSBjoern A. Zeeb 93bfcc09ddSBjoern A. Zeeb /* 94bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch_control - control structure 95bfcc09ddSBjoern A. Zeeb * @control_flags: context information flags see &enum iwl_prph_scratch_flags 96bfcc09ddSBjoern A. Zeeb * @reserved: reserved 97bfcc09ddSBjoern A. Zeeb */ 98bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_control { 99bfcc09ddSBjoern A. Zeeb __le32 control_flags; 100bfcc09ddSBjoern A. Zeeb __le32 reserved; 101bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_CONTROL_S */ 102bfcc09ddSBjoern A. Zeeb 103bfcc09ddSBjoern A. Zeeb /* 1049af1bba4SBjoern A. Zeeb * struct iwl_prph_scratch_pnvm_cfg - PNVM scratch 105bfcc09ddSBjoern A. Zeeb * @pnvm_base_addr: PNVM start address 1069af1bba4SBjoern A. Zeeb * @pnvm_size: the size of the PNVM image in bytes 107bfcc09ddSBjoern A. Zeeb * @reserved: reserved 108bfcc09ddSBjoern A. Zeeb */ 109bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_pnvm_cfg { 110bfcc09ddSBjoern A. Zeeb __le64 pnvm_base_addr; 111bfcc09ddSBjoern A. Zeeb __le32 pnvm_size; 112bfcc09ddSBjoern A. Zeeb __le32 reserved; 113bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_PNVM_CFG_S */ 114bfcc09ddSBjoern A. Zeeb 1159af1bba4SBjoern A. Zeeb /** 1169af1bba4SBjoern A. Zeeb * struct iwl_prph_scrath_mem_desc_addr_array 1179af1bba4SBjoern A. Zeeb * @mem_descs: array of dram addresses. 1189af1bba4SBjoern A. Zeeb * Each address is the beggining of a pnvm payload. 1199af1bba4SBjoern A. Zeeb */ 1209af1bba4SBjoern A. Zeeb struct iwl_prph_scrath_mem_desc_addr_array { 1219af1bba4SBjoern A. Zeeb __le64 mem_descs[IPC_DRAM_MAP_ENTRY_NUM_MAX]; 1229af1bba4SBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_MEM_DESC_ADDR_ARRAY_S_VER_1 */ 123bfcc09ddSBjoern A. Zeeb /* 124bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch_hwm_cfg - hwm config 125bfcc09ddSBjoern A. Zeeb * @hwm_base_addr: hwm start address 126bfcc09ddSBjoern A. Zeeb * @hwm_size: hwm size in DWs 127bfcc09ddSBjoern A. Zeeb * @debug_token_config: debug preset 128bfcc09ddSBjoern A. Zeeb */ 129bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_hwm_cfg { 130bfcc09ddSBjoern A. Zeeb __le64 hwm_base_addr; 131bfcc09ddSBjoern A. Zeeb __le32 hwm_size; 132bfcc09ddSBjoern A. Zeeb __le32 debug_token_config; 133bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_HWM_CFG_S */ 134bfcc09ddSBjoern A. Zeeb 135bfcc09ddSBjoern A. Zeeb /* 136bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch_rbd_cfg - RBDs configuration 137bfcc09ddSBjoern A. Zeeb * @free_rbd_addr: default queue free RB CB base address 138bfcc09ddSBjoern A. Zeeb * @reserved: reserved 139bfcc09ddSBjoern A. Zeeb */ 140bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_rbd_cfg { 141bfcc09ddSBjoern A. Zeeb __le64 free_rbd_addr; 142bfcc09ddSBjoern A. Zeeb __le32 reserved; 143bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_RBD_CFG_S */ 144bfcc09ddSBjoern A. Zeeb 145bfcc09ddSBjoern A. Zeeb /* 146bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch_uefi_cfg - prph scratch reduce power table 147bfcc09ddSBjoern A. Zeeb * @base_addr: reduce power table address 1489af1bba4SBjoern A. Zeeb * @size: the size of the entire power table image 149bfcc09ddSBjoern A. Zeeb */ 150bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_uefi_cfg { 151bfcc09ddSBjoern A. Zeeb __le64 base_addr; 152bfcc09ddSBjoern A. Zeeb __le32 size; 153bfcc09ddSBjoern A. Zeeb __le32 reserved; 154bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_UEFI_CFG_S */ 155bfcc09ddSBjoern A. Zeeb 156bfcc09ddSBjoern A. Zeeb /* 1579af1bba4SBjoern A. Zeeb * struct iwl_prph_scratch_step_cfg - prph scratch step configuration 1589af1bba4SBjoern A. Zeeb * @mbx_addr_0: [0:7] revision, 1599af1bba4SBjoern A. Zeeb * [8:15] cnvi_to_cnvr length, 1609af1bba4SBjoern A. Zeeb * [16:23] cnvr_to_cnvi channel length, 1619af1bba4SBjoern A. Zeeb * [24:31] radio1 reserved 1629af1bba4SBjoern A. Zeeb * @mbx_addr_1: [0:7] radio2 reserved 1639af1bba4SBjoern A. Zeeb */ 1649af1bba4SBjoern A. Zeeb 1659af1bba4SBjoern A. Zeeb struct iwl_prph_scratch_step_cfg { 1669af1bba4SBjoern A. Zeeb __le32 mbx_addr_0; 1679af1bba4SBjoern A. Zeeb __le32 mbx_addr_1; 1689af1bba4SBjoern A. Zeeb } __packed; 1699af1bba4SBjoern A. Zeeb 1709af1bba4SBjoern A. Zeeb /* 171bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch_ctrl_cfg - prph scratch ctrl and config 172bfcc09ddSBjoern A. Zeeb * @version: version information of context info and HW 173bfcc09ddSBjoern A. Zeeb * @control: control flags of FH configurations 174bfcc09ddSBjoern A. Zeeb * @pnvm_cfg: ror configuration 175bfcc09ddSBjoern A. Zeeb * @hwm_cfg: hwm configuration 176bfcc09ddSBjoern A. Zeeb * @rbd_cfg: default RX queue configuration 1779af1bba4SBjoern A. Zeeb * @step_cfg: step configuration 178bfcc09ddSBjoern A. Zeeb */ 179bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_ctrl_cfg { 180bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_version version; 181bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_control control; 182bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_pnvm_cfg pnvm_cfg; 183bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_hwm_cfg hwm_cfg; 184bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_rbd_cfg rbd_cfg; 185bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_uefi_cfg reduce_power_cfg; 1869af1bba4SBjoern A. Zeeb struct iwl_prph_scratch_step_cfg step_cfg; 187bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_CTRL_CFG_S */ 188bfcc09ddSBjoern A. Zeeb 189bfcc09ddSBjoern A. Zeeb /* 190bfcc09ddSBjoern A. Zeeb * struct iwl_prph_scratch - peripheral scratch mapping 191bfcc09ddSBjoern A. Zeeb * @ctrl_cfg: control and configuration of prph scratch 192bfcc09ddSBjoern A. Zeeb * @dram: firmware images addresses in DRAM 193*a4128aadSBjoern A. Zeeb * @fseq_override: FSEQ override parameters 194*a4128aadSBjoern A. Zeeb * @step_analog_params: STEP analog calibration values 195bfcc09ddSBjoern A. Zeeb * @reserved: reserved 196bfcc09ddSBjoern A. Zeeb */ 197bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch { 198bfcc09ddSBjoern A. Zeeb struct iwl_prph_scratch_ctrl_cfg ctrl_cfg; 199*a4128aadSBjoern A. Zeeb __le32 fseq_override; 200*a4128aadSBjoern A. Zeeb __le32 step_analog_params; 201*a4128aadSBjoern A. Zeeb __le32 reserved[8]; 202bfcc09ddSBjoern A. Zeeb struct iwl_context_info_dram dram; 203bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_SCRATCH_S */ 204bfcc09ddSBjoern A. Zeeb 205bfcc09ddSBjoern A. Zeeb /* 206bfcc09ddSBjoern A. Zeeb * struct iwl_prph_info - peripheral information 207bfcc09ddSBjoern A. Zeeb * @boot_stage_mirror: reflects the value in the Boot Stage CSR register 208bfcc09ddSBjoern A. Zeeb * @ipc_status_mirror: reflects the value in the IPC Status CSR register 209bfcc09ddSBjoern A. Zeeb * @sleep_notif: indicates the peripheral sleep status 210bfcc09ddSBjoern A. Zeeb * @reserved: reserved 211bfcc09ddSBjoern A. Zeeb */ 212bfcc09ddSBjoern A. Zeeb struct iwl_prph_info { 213bfcc09ddSBjoern A. Zeeb __le32 boot_stage_mirror; 214bfcc09ddSBjoern A. Zeeb __le32 ipc_status_mirror; 215bfcc09ddSBjoern A. Zeeb __le32 sleep_notif; 216bfcc09ddSBjoern A. Zeeb __le32 reserved; 217bfcc09ddSBjoern A. Zeeb } __packed; /* PERIPH_INFO_S */ 218bfcc09ddSBjoern A. Zeeb 219bfcc09ddSBjoern A. Zeeb /* 220bfcc09ddSBjoern A. Zeeb * struct iwl_context_info_gen3 - device INIT configuration 221bfcc09ddSBjoern A. Zeeb * @version: version of the context information 222bfcc09ddSBjoern A. Zeeb * @size: size of context information in DWs 223bfcc09ddSBjoern A. Zeeb * @config: context in which the peripheral would execute - a subset of 224bfcc09ddSBjoern A. Zeeb * capability csr register published by the peripheral 225bfcc09ddSBjoern A. Zeeb * @prph_info_base_addr: the peripheral information structure start address 226bfcc09ddSBjoern A. Zeeb * @cr_head_idx_arr_base_addr: the completion ring head index array 227bfcc09ddSBjoern A. Zeeb * start address 228bfcc09ddSBjoern A. Zeeb * @tr_tail_idx_arr_base_addr: the transfer ring tail index array 229bfcc09ddSBjoern A. Zeeb * start address 230bfcc09ddSBjoern A. Zeeb * @cr_tail_idx_arr_base_addr: the completion ring tail index array 231bfcc09ddSBjoern A. Zeeb * start address 232bfcc09ddSBjoern A. Zeeb * @tr_head_idx_arr_base_addr: the transfer ring head index array 233bfcc09ddSBjoern A. Zeeb * start address 234bfcc09ddSBjoern A. Zeeb * @cr_idx_arr_size: number of entries in the completion ring index array 235bfcc09ddSBjoern A. Zeeb * @tr_idx_arr_size: number of entries in the transfer ring index array 236bfcc09ddSBjoern A. Zeeb * @mtr_base_addr: the message transfer ring start address 237bfcc09ddSBjoern A. Zeeb * @mcr_base_addr: the message completion ring start address 238bfcc09ddSBjoern A. Zeeb * @mtr_size: number of entries which the message transfer ring can hold 239bfcc09ddSBjoern A. Zeeb * @mcr_size: number of entries which the message completion ring can hold 240bfcc09ddSBjoern A. Zeeb * @mtr_doorbell_vec: the doorbell vector associated with the message 241bfcc09ddSBjoern A. Zeeb * transfer ring 242bfcc09ddSBjoern A. Zeeb * @mcr_doorbell_vec: the doorbell vector associated with the message 243bfcc09ddSBjoern A. Zeeb * completion ring 244bfcc09ddSBjoern A. Zeeb * @mtr_msi_vec: the MSI which shall be generated by the peripheral after 245bfcc09ddSBjoern A. Zeeb * completing a transfer descriptor in the message transfer ring 246bfcc09ddSBjoern A. Zeeb * @mcr_msi_vec: the MSI which shall be generated by the peripheral after 247bfcc09ddSBjoern A. Zeeb * completing a completion descriptor in the message completion ring 248bfcc09ddSBjoern A. Zeeb * @mtr_opt_header_size: the size of the optional header in the transfer 249bfcc09ddSBjoern A. Zeeb * descriptor associated with the message transfer ring in DWs 250bfcc09ddSBjoern A. Zeeb * @mtr_opt_footer_size: the size of the optional footer in the transfer 251bfcc09ddSBjoern A. Zeeb * descriptor associated with the message transfer ring in DWs 252bfcc09ddSBjoern A. Zeeb * @mcr_opt_header_size: the size of the optional header in the completion 253bfcc09ddSBjoern A. Zeeb * descriptor associated with the message completion ring in DWs 254bfcc09ddSBjoern A. Zeeb * @mcr_opt_footer_size: the size of the optional footer in the completion 255bfcc09ddSBjoern A. Zeeb * descriptor associated with the message completion ring in DWs 256bfcc09ddSBjoern A. Zeeb * @msg_rings_ctrl_flags: message rings control flags 257bfcc09ddSBjoern A. Zeeb * @prph_info_msi_vec: the MSI which shall be generated by the peripheral 258bfcc09ddSBjoern A. Zeeb * after updating the Peripheral Information structure 259bfcc09ddSBjoern A. Zeeb * @prph_scratch_base_addr: the peripheral scratch structure start address 260bfcc09ddSBjoern A. Zeeb * @prph_scratch_size: the size of the peripheral scratch structure in DWs 261bfcc09ddSBjoern A. Zeeb * @reserved: reserved 262bfcc09ddSBjoern A. Zeeb */ 263bfcc09ddSBjoern A. Zeeb struct iwl_context_info_gen3 { 264bfcc09ddSBjoern A. Zeeb __le16 version; 265bfcc09ddSBjoern A. Zeeb __le16 size; 266bfcc09ddSBjoern A. Zeeb __le32 config; 267bfcc09ddSBjoern A. Zeeb __le64 prph_info_base_addr; 268bfcc09ddSBjoern A. Zeeb __le64 cr_head_idx_arr_base_addr; 269bfcc09ddSBjoern A. Zeeb __le64 tr_tail_idx_arr_base_addr; 270bfcc09ddSBjoern A. Zeeb __le64 cr_tail_idx_arr_base_addr; 271bfcc09ddSBjoern A. Zeeb __le64 tr_head_idx_arr_base_addr; 272bfcc09ddSBjoern A. Zeeb __le16 cr_idx_arr_size; 273bfcc09ddSBjoern A. Zeeb __le16 tr_idx_arr_size; 274bfcc09ddSBjoern A. Zeeb __le64 mtr_base_addr; 275bfcc09ddSBjoern A. Zeeb __le64 mcr_base_addr; 276bfcc09ddSBjoern A. Zeeb __le16 mtr_size; 277bfcc09ddSBjoern A. Zeeb __le16 mcr_size; 278bfcc09ddSBjoern A. Zeeb __le16 mtr_doorbell_vec; 279bfcc09ddSBjoern A. Zeeb __le16 mcr_doorbell_vec; 280bfcc09ddSBjoern A. Zeeb __le16 mtr_msi_vec; 281bfcc09ddSBjoern A. Zeeb __le16 mcr_msi_vec; 282bfcc09ddSBjoern A. Zeeb u8 mtr_opt_header_size; 283bfcc09ddSBjoern A. Zeeb u8 mtr_opt_footer_size; 284bfcc09ddSBjoern A. Zeeb u8 mcr_opt_header_size; 285bfcc09ddSBjoern A. Zeeb u8 mcr_opt_footer_size; 286bfcc09ddSBjoern A. Zeeb __le16 msg_rings_ctrl_flags; 287bfcc09ddSBjoern A. Zeeb __le16 prph_info_msi_vec; 288bfcc09ddSBjoern A. Zeeb __le64 prph_scratch_base_addr; 289bfcc09ddSBjoern A. Zeeb __le32 prph_scratch_size; 290bfcc09ddSBjoern A. Zeeb __le32 reserved; 291bfcc09ddSBjoern A. Zeeb } __packed; /* IPC_CONTEXT_INFO_S */ 292bfcc09ddSBjoern A. Zeeb 293bfcc09ddSBjoern A. Zeeb int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans, 294bfcc09ddSBjoern A. Zeeb const struct fw_img *fw); 295bfcc09ddSBjoern A. Zeeb void iwl_pcie_ctxt_info_gen3_free(struct iwl_trans *trans, bool alive); 296bfcc09ddSBjoern A. Zeeb 2979af1bba4SBjoern A. Zeeb int iwl_trans_pcie_ctx_info_gen3_load_pnvm(struct iwl_trans *trans, 2989af1bba4SBjoern A. Zeeb const struct iwl_pnvm_image *pnvm_payloads, 2999af1bba4SBjoern A. Zeeb const struct iwl_ucode_capabilities *capa); 3009af1bba4SBjoern A. Zeeb void iwl_trans_pcie_ctx_info_gen3_set_pnvm(struct iwl_trans *trans, 3019af1bba4SBjoern A. Zeeb const struct iwl_ucode_capabilities *capa); 3029af1bba4SBjoern A. Zeeb int 3039af1bba4SBjoern A. Zeeb iwl_trans_pcie_ctx_info_gen3_load_reduce_power(struct iwl_trans *trans, 3049af1bba4SBjoern A. Zeeb const struct iwl_pnvm_image *payloads, 3059af1bba4SBjoern A. Zeeb const struct iwl_ucode_capabilities *capa); 3069af1bba4SBjoern A. Zeeb void 3079af1bba4SBjoern A. Zeeb iwl_trans_pcie_ctx_info_gen3_set_reduce_power(struct iwl_trans *trans, 3089af1bba4SBjoern A. Zeeb const struct iwl_ucode_capabilities *capa); 3099af1bba4SBjoern A. Zeeb int iwl_trans_pcie_ctx_info_gen3_set_step(struct iwl_trans *trans, 3109af1bba4SBjoern A. Zeeb u32 mbx_addr_0_step, u32 mbx_addr_1_step); 311bfcc09ddSBjoern A. Zeeb #endif /* __iwl_context_info_file_gen3_h__ */ 312