All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] ath10k: sdio: workaround firmware UART pin configuration bug
@ 2019-04-12 13:28 ` Kalle Valo
  0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2019-04-12 13:28 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

From: Wen Gong <wgong@codeaurora.org>

On QCA6174 SDIO devices the SDIO interrupt will fail if UART is
disabled from ath10k. SDIO firmware enables UART printouts by
default. If ath10k will try to enable UART again the firmware
will configure it's GPIO line incorrectly and SDIO interrupts
won't work anymore. The workaround is to set UART pin again (19
for QCA6174 SDIO) if uart_print is 0.

Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1.

Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/core.c |   10 +++++++++-
 drivers/net/wireless/ath/ath10k/hw.h   |    5 +++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 835b8de92d55..cfd7bb29a1ec 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2065,8 +2065,16 @@ static int ath10k_init_uart(struct ath10k *ar)
 		return ret;
 	}
 
-	if (!uart_print)
+	if (!uart_print && ar->hw_params.uart_pin_workaround) {
+		ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
+					 ar->hw_params.uart_pin);
+		if (ret) {
+			ath10k_warn(ar, "failed to set UART TX pin: %d", ret);
+			return ret;
+		}
+
 		return 0;
+	}
 
 	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin);
 	if (ret) {
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 71314999aa24..a92fce1bb6f0 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -606,6 +606,11 @@ struct ath10k_hw_params {
 
 	/* target supporting fw download via diag ce */
 	bool fw_diag_ce_download;
+
+	/* need to set uart pin if disable uart print, workaround for a
+	 * firmware bug
+	 */
+	bool uart_pin_workaround;
 };
 
 struct htt_rx_desc;


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-04-23 13:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-12 13:28 [PATCH 1/6] ath10k: sdio: workaround firmware UART pin configuration bug Kalle Valo
2019-04-12 13:28 ` Kalle Valo
2019-04-12 13:28 ` [PATCH 2/6] ath10k: don't disable interrupts in ath10k_sdio_remove() Kalle Valo
2019-04-12 13:28   ` Kalle Valo
2019-04-12 13:28 ` [PATCH 3/6] ath10k: htt: don't use txdone_fifo with SDIO Kalle Valo
2019-04-12 13:28   ` Kalle Valo
2019-04-12 13:28 ` [PATCH 4/6] ath10k: initialise struct ath10k_bus params to zero Kalle Valo
2019-04-12 13:28   ` Kalle Valo
2019-04-12 13:28 ` [PATCH 5/6] ath10k: htt: support MSDU ids with SDIO Kalle Valo
2019-04-12 13:28   ` Kalle Valo
2019-04-12 13:29 ` [PATCH 6/6] ath10k: fix use-after-free on SDIO data frames Kalle Valo
2019-04-12 13:29   ` Kalle Valo
2019-04-23 13:25 ` [PATCH 1/6] ath10k: sdio: workaround firmware UART pin configuration bug Kalle Valo
2019-04-23 13:25 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.