Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5cbd9a4 authored by Tzahi Sabo's avatar Tzahi Sabo Committed by Maya Erez
Browse files

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.

Change-Id: Iefa7a9f7ae00dec2ab085972cca79bc009ad4e05
Signed-off-by: default avatarTzahi Sabo <stzahi@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Git-commit: f2b6b46e483b9a084088853ecc4123118791829e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent d4b75b56
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1600,6 +1600,7 @@ int wil_vr_update_profile(struct wil6210_priv *wil, u8 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);

@@ -1656,6 +1657,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
+1 −0
Original line number Diff line number Diff line
@@ -521,6 +521,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);
+1 −0
Original line number Diff line number Diff line
@@ -1490,4 +1490,5 @@ int wmi_addba_rx_resp_edma(struct wil6210_priv *wil, u8 mid, u8 cid,
void update_supported_bands(struct wil6210_priv *wil);
int wmi_reset_spi_slave(struct wil6210_priv *wil);

void wil_clear_fw_log_addr(struct wil6210_priv *wil);
#endif /* __WIL6210_H__ */