ath10k: move enable_pll_clk call to ath10k_core_start()
authorKalle Valo <kvalo@codeaurora.org>
Mon, 17 Aug 2020 10:31:40 +0000 (13:31 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 18 Aug 2020 09:42:04 +0000 (12:42 +0300)
There's no reason to have call for enable_pll_clk in ath10k_bmi_start(), move
it to ath10k_core_start() instead. This way it's possible to call
ath10k_bmi_start() from sdio.c during firmware dump creation. And also the
function call is more visible when it's in core.c.

No functional changes, compile tested only.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1597421745-4329-1-git-send-email-kvalo@codeaurora.org
drivers/net/wireless/ath/ath10k/bmi.c
drivers/net/wireless/ath/ath10k/core.c

index 5b6db6e66f65df59957b4247897cdc6bcc170766..8b9d537c8900969179ae0f9be6953a436c4ab2d1 100644 (file)
 
 void ath10k_bmi_start(struct ath10k *ar)
 {
-       int ret;
-
        ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi start\n");
 
        ar->bmi.done_sent = false;
-
-       /* Enable hardware clock to speed up firmware download */
-       if (ar->hw_params.hw_ops->enable_pll_clk) {
-               ret = ar->hw_params.hw_ops->enable_pll_clk(ar);
-               ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi enable pll ret %d\n", ret);
-       }
 }
 
 int ath10k_bmi_done(struct ath10k *ar)
index 2f48086e323b13dc0161a3522ae4461bb626e329..fe075b384a0bd0e6356ef4d838e8f2fbbb2af239 100644 (file)
@@ -2615,6 +2615,13 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
                      ar->running_fw->fw_file.fw_features)) {
                ath10k_bmi_start(ar);
 
+               /* Enable hardware clock to speed up firmware download */
+               if (ar->hw_params.hw_ops->enable_pll_clk) {
+                       status = ar->hw_params.hw_ops->enable_pll_clk(ar);
+                       ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot enable pll ret %d\n",
+                                  status);
+               }
+
                if (ath10k_init_configure_target(ar)) {
                        status = -EINVAL;
                        goto err;