aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/snoc.c
diff options
context:
space:
mode:
authorRakesh Pillai <pillair@codeaurora.org>2020-06-26 23:23:01 +0530
committerKalle Valo <kvalo@codeaurora.org>2020-08-18 12:48:35 +0300
commitcaf275463d37e1359d1767d774052cbca60a4854 (patch)
tree9c3de41ddea01b873dc749f8ea9140dd83cddca0 /drivers/net/wireless/ath/ath10k/snoc.c
parentath11k: reset MHI during power down and power up (diff)
downloadlinux-dev-caf275463d37e1359d1767d774052cbca60a4854.tar.xz
linux-dev-caf275463d37e1359d1767d774052cbca60a4854.zip
ath10k: Register shutdown handler
As a part of device shutdown the smmu driver will be stopped and henceforth any IOVA address translation will not be done. The wlan driver, being one of the smmu driver consumer, should stop all the dma related activity as a part of shutdown, and thereby ensuring that no dma activity is done once the smmu driver shuts down. During the device shutdown, the smmu calls shutdown for all its consumers in order to indicate them to stop all their dma activities. Register the shutdown handler to stop the wlan driver and avoid any dma operations. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai <pillair@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1593193981-30161-1-git-send-email-pillair@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/snoc.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/snoc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 354d49b1cd45..645ed5f63ef8 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1772,9 +1772,18 @@ static int ath10k_snoc_remove(struct platform_device *pdev)
return 0;
}
+static void ath10k_snoc_shutdown(struct platform_device *pdev)
+{
+ struct ath10k *ar = platform_get_drvdata(pdev);
+
+ ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc shutdown\n");
+ ath10k_snoc_remove(pdev);
+}
+
static struct platform_driver ath10k_snoc_driver = {
.probe = ath10k_snoc_probe,
.remove = ath10k_snoc_remove,
+ .shutdown = ath10k_snoc_shutdown,
.driver = {
.name = "ath10k_snoc",
.of_match_table = ath10k_snoc_dt_match,