ath10k: add target IRAM recovery feature support
authorVenkateswara Naralasetty <vnaralas@codeaurora.org>
Fri, 6 Nov 2020 10:10:42 +0000 (15:40 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 23 Nov 2020 18:07:20 +0000 (20:07 +0200)
commit9af7c32ceca85da27867dd863697d2aafc80a3f8
tree6792cf4b9f080ca30d5800708016bc57afb6b89d
parent1057db1b8b7661c5031caa0244dfa6bee9adc938
ath10k: add target IRAM recovery feature support

This target IRAM recovery feature support is to copy target
IRAM contents available at ATH10K_MEM_REGION_TYPE_REG to host
memory for back up after firmware loaded. Target IRAM contents
are copied to wmi memory chunks allocated for the
WMI_IRAM_RECOVERY_HOST_MEM_REQ_ID and provide the wmi chunks
address to the firmware through wmi init command.

If firmware detects andy IRAM corruption through periodic
checksum validation, It will download the IRAM contents back
from the provided wmi memory chunks address using hif_memcpy.

This IRAM recovery feature prevent target assert in case of
unexpected target IRAM corruptions.

This patch also introduce a new feature flag 'iram-recovery' for
backward compatibility.

Tested-on: QCA9888 10.4-3.9.0.2-00094

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1604657442-23674-1-git-send-email-vnaralas@codeaurora.org
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/wmi.h