linux/drivers/net/wireless/ath/ath11k/qmi.h

/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#ifndef ATH11K_QMI_H
#define ATH11K_QMI_H

#include <linux/mutex.h>
#include <linux/soc/qcom/qmi.h>

#define ATH11K_HOST_VERSION_STRING
#define ATH11K_QMI_WLANFW_TIMEOUT_MS
#define ATH11K_QMI_MAX_BDF_FILE_NAME_SIZE
#define ATH11K_QMI_CALDB_ADDRESS
#define ATH11K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01
#define ATH11K_QMI_WLFW_SERVICE_ID_V01
#define ATH11K_QMI_WLFW_SERVICE_VERS_V01
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750
#define ATH11K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01
#define ATH11K_QMI_RESP_LEN_MAX
#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01
#define ATH11K_QMI_CALDB_SIZE
#define ATH11K_QMI_BDF_EXT_STR_LENGTH
#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT

#define QMI_WLFW_REQUEST_MEM_IND_V01
#define QMI_WLFW_FW_MEM_READY_IND_V01
#define QMI_WLFW_COLD_BOOT_CAL_DONE_IND_V01
#define QMI_WLFW_FW_READY_IND_V01
#define QMI_WLFW_FW_INIT_DONE_IND_V01

#define QMI_WLANFW_MAX_DATA_SIZE_V01
#define ATH11K_FIRMWARE_MODE_OFF
#define ATH11K_COLD_BOOT_FW_RESET_DELAY

#define ATH11K_QMI_DEVICE_BAR_SIZE

struct ath11k_base;

enum ath11k_qmi_file_type {};

enum ath11k_qmi_bdf_type {};

enum ath11k_qmi_event_type {};

struct ath11k_qmi_driver_event {};

struct ath11k_qmi_ce_cfg {};

struct ath11k_qmi_event_msg {};

struct target_mem_chunk {};

struct target_info {};

struct m3_mem_region {};

struct ath11k_qmi {};

#define QMI_WLANFW_HOST_CAP_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_HOST_CAP_REQ_V01
#define QMI_WLANFW_HOST_CAP_RESP_MSG_V01_MAX_LEN
#define QMI_WLFW_HOST_CAP_RESP_V01
#define QMI_WLFW_MAX_NUM_GPIO_V01
#define QMI_IPQ8074_FW_MEM_MODE
#define HOST_DDR_REGION_TYPE
#define BDF_MEM_REGION_TYPE
#define M3_DUMP_REGION_TYPE
#define CALDB_MEM_REGION_TYPE

struct qmi_wlanfw_host_cap_req_msg_v01 {};

struct qmi_wlanfw_host_cap_resp_msg_v01 {};

#define QMI_WLANFW_IND_REGISTER_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_IND_REGISTER_REQ_V01
#define QMI_WLANFW_IND_REGISTER_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_IND_REGISTER_RESP_V01
#define QMI_WLANFW_CLIENT_ID

struct qmi_wlanfw_ind_register_req_msg_v01 {};

struct qmi_wlanfw_ind_register_resp_msg_v01 {};

#define QMI_WLANFW_REQUEST_MEM_IND_MSG_V01_MAX_LEN
#define QMI_WLANFW_RESPOND_MEM_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_RESPOND_MEM_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_REQUEST_MEM_IND_V01
#define QMI_WLANFW_RESPOND_MEM_REQ_V01
#define QMI_WLANFW_RESPOND_MEM_RESP_V01
#define QMI_WLANFW_MAX_NUM_MEM_CFG_V01

struct qmi_wlanfw_mem_cfg_s_v01 {};

enum qmi_wlanfw_mem_type_enum_v01 {};

struct qmi_wlanfw_mem_seg_s_v01 {};

struct qmi_wlanfw_request_mem_ind_msg_v01 {};

struct qmi_wlanfw_mem_seg_resp_s_v01 {};

struct qmi_wlanfw_respond_mem_req_msg_v01 {};

struct qmi_wlanfw_respond_mem_resp_msg_v01 {};

struct qmi_wlanfw_fw_mem_ready_ind_msg_v01 {};

struct qmi_wlanfw_fw_ready_ind_msg_v01 {};

struct qmi_wlanfw_fw_cold_cal_done_ind_msg_v01 {};

struct qmi_wlfw_fw_init_done_ind_msg_v01 {};

#define QMI_WLANFW_CAP_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_CAP_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_CAP_REQ_V01
#define QMI_WLANFW_CAP_RESP_V01
#define QMI_WLANFW_DEVICE_INFO_REQ_V01
#define QMI_WLANFW_DEVICE_INFO_REQ_MSG_V01_MAX_LEN

enum qmi_wlanfw_pipedir_enum_v01 {};

struct qmi_wlanfw_ce_tgt_pipe_cfg_s_v01 {};

struct qmi_wlanfw_ce_svc_pipe_cfg_s_v01 {};

struct qmi_wlanfw_shadow_reg_cfg_s_v01 {};

struct qmi_wlanfw_shadow_reg_v2_cfg_s_v01 {};

struct qmi_wlanfw_memory_region_info_s_v01 {};

struct qmi_wlanfw_rf_chip_info_s_v01 {};

struct qmi_wlanfw_rf_board_info_s_v01 {};

struct qmi_wlanfw_soc_info_s_v01 {};

struct qmi_wlanfw_fw_version_info_s_v01 {};

enum qmi_wlanfw_cal_temp_id_enum_v01 {};

struct qmi_wlanfw_cap_resp_msg_v01 {};

struct qmi_wlanfw_cap_req_msg_v01 {};

struct qmi_wlanfw_device_info_req_msg_v01 {};

struct qmi_wlanfw_device_info_resp_msg_v01 {};

#define QMI_WLANFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_BDF_DOWNLOAD_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_BDF_DOWNLOAD_RESP_V01
#define QMI_WLANFW_BDF_DOWNLOAD_REQ_V01
/* TODO: Need to check with MCL and FW team that data can be pointer and
 * can be last element in structure
 */
struct qmi_wlanfw_bdf_download_req_msg_v01 {};

struct qmi_wlanfw_bdf_download_resp_msg_v01 {};

#define QMI_WLANFW_M3_INFO_REQ_MSG_V01_MAX_MSG_LEN
#define QMI_WLANFW_M3_INFO_RESP_MSG_V01_MAX_MSG_LEN
#define QMI_WLANFW_M3_INFO_RESP_V01
#define QMI_WLANFW_M3_INFO_REQ_V01

struct qmi_wlanfw_m3_info_req_msg_v01 {};

struct qmi_wlanfw_m3_info_resp_msg_v01 {};

#define QMI_WLANFW_WLAN_MODE_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_MODE_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_CFG_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_CFG_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_INI_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_MODE_REQ_V01
#define QMI_WLANFW_WLAN_MODE_RESP_V01
#define QMI_WLANFW_WLAN_CFG_REQ_V01
#define QMI_WLANFW_WLAN_CFG_RESP_V01
#define QMI_WLANFW_WLAN_INI_REQ_V01
#define QMI_WLANFW_MAX_STR_LEN_V01
#define QMI_WLANFW_MAX_NUM_CE_V01
#define QMI_WLANFW_MAX_NUM_SVC_V01
#define QMI_WLANFW_MAX_NUM_SHADOW_REG_V01
#define QMI_WLANFW_MAX_NUM_SHADOW_REG_V2_V01

struct qmi_wlanfw_wlan_mode_req_msg_v01 {};

struct qmi_wlanfw_wlan_mode_resp_msg_v01 {};

struct qmi_wlanfw_wlan_cfg_req_msg_v01 {};

struct qmi_wlanfw_wlan_cfg_resp_msg_v01 {};

struct qmi_wlanfw_wlan_ini_req_msg_v01 {};

struct qmi_wlanfw_wlan_ini_resp_msg_v01 {};

int ath11k_qmi_firmware_start(struct ath11k_base *ab,
			      u32 mode);
void ath11k_qmi_firmware_stop(struct ath11k_base *ab);
void ath11k_qmi_deinit_service(struct ath11k_base *ab);
int ath11k_qmi_init_service(struct ath11k_base *ab);
void ath11k_qmi_free_resource(struct ath11k_base *ab);
int ath11k_qmi_fwreset_from_cold_boot(struct ath11k_base *ab);

#endif