This will make it possible to easily support
different hardware with different uart pin
configuration.

Signed-off-by: Michal Kazior <michal.kaz...@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 ++-
 drivers/net/wireless/ath/ath10k/core.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index 204aa04..0bce152 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -58,6 +58,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] 
= {
                .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
                .supported_chips = qca988x_supported_chips,
                .num_supported_chips = ARRAY_SIZE(qca988x_supported_chips),
+               .uart_pin = 7,
                .fw = {
                        .dir = QCA988X_HW_2_0_FW_DIR,
                        .fw = QCA988X_HW_2_0_FW_FILE,
@@ -708,7 +709,7 @@ static int ath10k_init_uart(struct ath10k *ar)
        if (!uart_print)
                return 0;
 
-       ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, 7);
+       ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin);
        if (ret) {
                ath10k_warn(ar, "could not enable UART prints (%d)\n", ret);
                return ret;
diff --git a/drivers/net/wireless/ath/ath10k/core.h 
b/drivers/net/wireless/ath/ath10k/core.h
index 1cc81e8..f8dd904 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -477,6 +477,7 @@ struct ath10k {
                u32 patch_load_addr;
                const u32 *supported_chips;
                int num_supported_chips;
+               int uart_pin;
                struct ath10k_hw_params_fw {
                        const char *dir;
                        const char *fw;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to