]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wil6210: fix RGF_CAF_ICR address for Talyn-MB
authorMaya Erez <merez@codeaurora.org>
Wed, 31 Oct 2018 08:52:20 +0000 (10:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:17:19 +0000 (09:17 +0100)
[ Upstream commit 7c69709f8ed27197b16aa1c3f9b0744402b2fa02 ]

RGF_CAF_ICR register location has changed in Talyn-MB.
Add RGF_CAF_ICR_TALYN_MB to support the new address.

Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/ath/wil6210/wil6210.h

index 920cb233f4db78c26918be86ef490b15a8b173f6..10673fa9388ec0b266d4963f8e008fe7dc27c8ee 100644 (file)
@@ -1397,8 +1397,15 @@ static void wil_pre_fw_config(struct wil6210_priv *wil)
        wil6210_clear_irq(wil);
        /* CAF_ICR - clear and mask */
        /* it is W1C, clear by writing back same value */
-       wil_s(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, ICR), 0);
-       wil_w(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, IMV), ~0);
+       if (wil->hw_version < HW_VER_TALYN_MB) {
+               wil_s(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, ICR), 0);
+               wil_w(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, IMV), ~0);
+       } else {
+               wil_s(wil,
+                     RGF_CAF_ICR_TALYN_MB + offsetof(struct RGF_ICR, ICR), 0);
+               wil_w(wil, RGF_CAF_ICR_TALYN_MB +
+                     offsetof(struct RGF_ICR, IMV), ~0);
+       }
        /* clear PAL_UNIT_ICR (potential D0->D3 leftover)
         * In Talyn-MB host cannot access this register due to
         * access control, hence PAL_UNIT_ICR is cleared by the FW
index 17c294b1ead13b3bfdca6328481a0a1a7db1a5ae..75fe1a3b70466165db6865957880bb7ccc613b6f 100644 (file)
@@ -319,6 +319,7 @@ struct RGF_ICR {
 /* MAC timer, usec, for packet lifetime */
 #define RGF_MAC_MTRL_COUNTER_0         (0x886aa8)
 
+#define RGF_CAF_ICR_TALYN_MB           (0x8893d4) /* struct RGF_ICR */
 #define RGF_CAF_ICR                    (0x88946c) /* struct RGF_ICR */
 #define RGF_CAF_OSC_CONTROL            (0x88afa4)
        #define BIT_CAF_OSC_XTAL_EN             BIT(0)