wifi: ath12k: configure RDDM size to MHI for device recovery
authorWen Gong <quic_wgong@quicinc.com>
Tue, 10 Oct 2023 07:27:20 +0000 (10:27 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 12 Oct 2023 16:06:28 +0000 (19:06 +0300)
RDDM is Ram Dump Debug Module which is used to debug issues when the
firmware encounters an error. The rddm_size is needed by the firmware
while MHI goes to the RDDM state. Provide the size to MHI subsystem so
that the firmware restart works when the firmware crashes.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230721055305.20420-2-quic_wgong@quicinc.com
drivers/net/wireless/ath/ath12k/hw.c
drivers/net/wireless/ath/ath12k/hw.h
drivers/net/wireless/ath/ath12k/mhi.c

index f69649f58e822ab48f48d416fa4ebe14b9f77977..69299bff11e1cca9288c6d9af4462833f4f81692 100644 (file)
@@ -911,6 +911,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
                .rfkill_pin = 0,
                .rfkill_cfg = 0,
                .rfkill_on_level = 0,
+
+               .rddm_size = 0,
        },
        {
                .name = "wcn7850 hw2.0",
@@ -972,6 +974,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
                .rfkill_pin = 48,
                .rfkill_cfg = 0,
                .rfkill_on_level = 1,
+
+               .rddm_size = 0x780000,
        },
        {
                .name = "qcn9274 hw2.0",
@@ -1031,6 +1035,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
                .rfkill_pin = 0,
                .rfkill_cfg = 0,
                .rfkill_on_level = 0,
+
+               .rddm_size = 0,
        },
 };
 
index 1b4912bf57ad1dee69842421def48e64d6c5f4a3..2d6427cf41a4d149bba96961145c7851130c8c2c 100644 (file)
@@ -190,6 +190,8 @@ struct ath12k_hw_params {
        u32 rfkill_pin;
        u32 rfkill_cfg;
        u32 rfkill_on_level;
+
+       u32 rddm_size;
 };
 
 struct ath12k_hw_ops {
index f83d3e09ae3661b0e80af6dd9db1bfdc60d6a46e..39e640293cdc0d52192d7814b0c6cf90268bd494 100644 (file)
@@ -366,6 +366,7 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci)
        mhi_ctrl->fw_image = ab_pci->amss_path;
        mhi_ctrl->regs = ab->mem;
        mhi_ctrl->reg_len = ab->mem_len;
+       mhi_ctrl->rddm_size = ab->hw_params->rddm_size;
 
        ret = ath12k_mhi_get_msi(ab_pci);
        if (ret) {