wil6210: clear FW and ucode log address

Clear the FW and ucode log address on device initialization to allow
user space app identify when the address was set by FW/ucode and it can
start read.

Signed-off-by: Tzahi Sabo <stzahi@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Maya Erez 2019-06-16 10:26:02 +03:00 committed by Kalle Valo
parent dedec35b40
commit f2b6b46e48
3 changed files with 17 additions and 0 deletions

View File

@ -1522,6 +1522,7 @@ int wil_ps_update(struct wil6210_priv *wil, enum wmi_ps_profile_type ps_profile)
static void wil_pre_fw_config(struct wil6210_priv *wil)
{
wil_clear_fw_log_addr(wil);
/* Mark FW as loaded from host */
wil_s(wil, RGF_USER_USAGE_6, 1);
@ -1578,6 +1579,20 @@ static int wil_restore_vifs(struct wil6210_priv *wil)
return 0;
}
/*
* Clear FW and ucode log start addr to indicate FW log is not ready. The host
* driver clears the addresses before FW starts and FW initializes the address
* when it is ready to send logs.
*/
void wil_clear_fw_log_addr(struct wil6210_priv *wil)
{
/* FW log addr */
wil_w(wil, RGF_USER_USAGE_1, 0);
/* ucode log addr */
wil_w(wil, RGF_USER_USAGE_2, 0);
wil_dbg_misc(wil, "Cleared FW and ucode log address");
}
/*
* We reset all the structures, and we reset the UMAC.
* After calling this routine, you're expected to reload

View File

@ -420,6 +420,7 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
/* rollback to bus_disable */
wil_clear_fw_log_addr(wil);
rc = wil_if_add(wil);
if (rc) {
wil_err(wil, "wil_if_add failed: %d\n", rc);

View File

@ -1425,4 +1425,5 @@ int wmi_addba_rx_resp_edma(struct wil6210_priv *wil, u8 mid, u8 cid,
void update_supported_bands(struct wil6210_priv *wil);
void wil_clear_fw_log_addr(struct wil6210_priv *wil);
#endif /* __WIL6210_H__ */