mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
wifi: ath12k: avoid m3 firmware download in AHB device IPQ5332
Current ath12k devices, QCN9274 and WCN7850, supports m3.bin firmware download through ath12k driver. The new ath12k AHB based device IPQ5332 supports m3 firmware download through remoteproc driver. Hence, add new parameter (fw.m3_loader) in ath12k_hw_params to avoid m3 firmware download in IPQ5332. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1 Signed-off-by: Balamurugan S <quic_bselvara@quicinc.com> Co-developed-by: P Praneesh <quic_ppranees@quicinc.com> Signed-off-by: P Praneesh <quic_ppranees@quicinc.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Link: https://patch.msgid.link/20250321-ath12k-ahb-v12-5-bb389ed76ae5@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
5fa2fab69f
commit
11794f8540
|
|
@ -1235,6 +1235,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
|
|||
.dir = "QCN9274/hw1.0",
|
||||
.board_size = 256 * 1024,
|
||||
.cal_offset = 128 * 1024,
|
||||
.m3_loader = ath12k_m3_fw_loader_driver,
|
||||
},
|
||||
.max_radios = 1,
|
||||
.single_pdev_only = false,
|
||||
|
|
@ -1312,6 +1313,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
|
|||
.dir = "WCN7850/hw2.0",
|
||||
.board_size = 256 * 1024,
|
||||
.cal_offset = 256 * 1024,
|
||||
.m3_loader = ath12k_m3_fw_loader_driver,
|
||||
},
|
||||
|
||||
.max_radios = 1,
|
||||
|
|
@ -1391,6 +1393,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
|
|||
.dir = "QCN9274/hw2.0",
|
||||
.board_size = 256 * 1024,
|
||||
.cal_offset = 128 * 1024,
|
||||
.m3_loader = ath12k_m3_fw_loader_driver,
|
||||
},
|
||||
.max_radios = 2,
|
||||
.single_pdev_only = false,
|
||||
|
|
@ -1467,6 +1470,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
|
|||
.dir = "IPQ5332/hw1.0",
|
||||
.board_size = 256 * 1024,
|
||||
.cal_offset = 128 * 1024,
|
||||
.m3_loader = ath12k_m3_fw_loader_remoteproc,
|
||||
},
|
||||
.max_radios = 1,
|
||||
.single_pdev_only = false,
|
||||
|
|
|
|||
|
|
@ -146,6 +146,11 @@ struct ath12k_hw_hal_params {
|
|||
u32 wbm2sw_cc_enable;
|
||||
};
|
||||
|
||||
enum ath12k_m3_fw_loaders {
|
||||
ath12k_m3_fw_loader_driver,
|
||||
ath12k_m3_fw_loader_remoteproc,
|
||||
};
|
||||
|
||||
struct ath12k_hw_params {
|
||||
const char *name;
|
||||
u16 hw_rev;
|
||||
|
|
@ -154,6 +159,7 @@ struct ath12k_hw_params {
|
|||
const char *dir;
|
||||
size_t board_size;
|
||||
size_t cal_offset;
|
||||
enum ath12k_m3_fw_loaders m3_loader;
|
||||
} fw;
|
||||
|
||||
u8 max_radios;
|
||||
|
|
|
|||
|
|
@ -2168,10 +2168,12 @@ int ath12k_qmi_host_cap_send(struct ath12k_base *ab)
|
|||
req.bdf_support_valid = 1;
|
||||
req.bdf_support = 1;
|
||||
|
||||
req.m3_support_valid = 1;
|
||||
req.m3_support = 1;
|
||||
req.m3_cache_support_valid = 1;
|
||||
req.m3_cache_support = 1;
|
||||
if (ab->hw_params->fw.m3_loader == ath12k_m3_fw_loader_driver) {
|
||||
req.m3_support_valid = 1;
|
||||
req.m3_support = 1;
|
||||
req.m3_cache_support_valid = 1;
|
||||
req.m3_cache_support = 1;
|
||||
}
|
||||
|
||||
req.cal_done_valid = 1;
|
||||
req.cal_done = ab->qmi.cal_done;
|
||||
|
|
@ -2939,6 +2941,9 @@ static void ath12k_qmi_m3_free(struct ath12k_base *ab)
|
|||
{
|
||||
struct m3_mem_region *m3_mem = &ab->qmi.m3_mem;
|
||||
|
||||
if (ab->hw_params->fw.m3_loader == ath12k_m3_fw_loader_remoteproc)
|
||||
return;
|
||||
|
||||
if (!m3_mem->vaddr)
|
||||
return;
|
||||
|
||||
|
|
@ -3019,15 +3024,16 @@ int ath12k_qmi_wlanfw_m3_info_send(struct ath12k_base *ab)
|
|||
struct qmi_txn txn;
|
||||
int ret = 0;
|
||||
|
||||
ret = ath12k_qmi_m3_load(ab);
|
||||
if (ret) {
|
||||
ath12k_err(ab, "failed to load m3 firmware: %d", ret);
|
||||
return ret;
|
||||
if (ab->hw_params->fw.m3_loader == ath12k_m3_fw_loader_driver) {
|
||||
ret = ath12k_qmi_m3_load(ab);
|
||||
if (ret) {
|
||||
ath12k_err(ab, "failed to load m3 firmware: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
req.addr = m3_mem->paddr;
|
||||
req.size = m3_mem->size;
|
||||
}
|
||||
|
||||
req.addr = m3_mem->paddr;
|
||||
req.size = m3_mem->size;
|
||||
|
||||
ret = qmi_txn_init(&ab->qmi.handle, &txn,
|
||||
qmi_wlanfw_m3_info_resp_msg_v01_ei, &resp);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user