Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp768349ybc; Sat, 16 Nov 2019 08:21:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwy1kRYSIX3f4jZJre3cyYSEiUOpV7ho2fkuVklGJ8oIFHpTcYTB5adWw/uZB8mtahavHPr X-Received: by 2002:a17:906:5251:: with SMTP id y17mr11254111ejm.108.1573921266151; Sat, 16 Nov 2019 08:21:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921266; cv=none; d=google.com; s=arc-20160816; b=RRxlYuOuyVcxDKOQiB/tSbPAehxvTye2M+DVu1JsG1RwDJQDFMnGgT3HqzIfebfBOR vxSD8BwTgdWw7DLmAgeFqVLNyY21Y3oqJFaDtWGwjJa6Nm9Elw8tW64JPOmkkgzFndLS 7UGlsJMlaPvvYuIfDz3KAcTO49PdrvYCk1IsxdejFXwV69Rgd438gJ8DE6HeV1/1zU+n USkdZXDCKsnlsm1pJCmPgMh3/Ph+ln3U3Kttt4h9xxsrwyB/n1W3Jz3on6kCq8ewKCxO 2AT9Qj4XJ3qUQY95/bi6OWgwQFUfZPrXkjP4Wg0uAcWLtjS4qC8hxxLvBB61GqyihdIE iSqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CA/4/kVnzWLjUwB3zn2qomFh+BZHle9J35jUPPU+A9k=; b=NhQdrj26U/imoxt+baAB8cH/NYE0KJ1HWt68TUgU2LiRvaZjpCx34e4+nwLLMs6YIY n6l+MXx3vRlln4Pv10CQPGECKyhgzs+DmbK5GWHmEK/Y2AdqqLbkrLrGf4JCZHjyUlwe jnMwl/7zKskac98d8cGP5T3ebZkk8PWgrO3YeMNPC97M6aLa84Kb/PNr9iPjk+ABdnYz v+TXXgkaXpnR89wwo8uw9UI6zSgfebzcqOGSKpVPIJVDoR0VA49aDafp/sli0G/JUXRG nmxjDkAcuew4g4ss8aJjrwe4TDNSuQhtdeknXAjiG0L+yDgKtEiLB2T4746eX++/GaIn sx/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y6hwIvRu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw9si7998465ejb.284.2019.11.16.08.20.41; Sat, 16 Nov 2019 08:21:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y6hwIvRu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730815AbfKPQSW (ORCPT + 99 others); Sat, 16 Nov 2019 11:18:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:52836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729407AbfKPPqa (ORCPT ); Sat, 16 Nov 2019 10:46:30 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F01E20830; Sat, 16 Nov 2019 15:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919189; bh=K2mUBlq0bWqG4T1h8dGfD3rHxWPBe1z4CoWD4grBUYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y6hwIvRujf8ID2ed8hMruWfET/MhCQbdov+qwxZKqC5TB+vsLPJyuhXXHQ42AWUYD Cf9yIcMjHI/Y4nBVuMGiOij9MjMTmhWjdoRqo6C02ZjEBh2qtNMhDnrkTpesQzYbH8 MnCcFY24x41MzIbcHqAL+ivFF8XgLCLb+lF1c4D4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maya Erez , Kalle Valo , Sasha Levin , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 198/237] wil6210: fix RGF_CAF_ICR address for Talyn-MB Date: Sat, 16 Nov 2019 10:40:33 -0500 Message-Id: <20191116154113.7417-198-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maya Erez [ 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 Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wil6210/main.c | 11 +++++++++-- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index a0fe8cbad104f..aeed45f127ad6 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -1396,8 +1396,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 diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 17c294b1ead13..75fe1a3b70466 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -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) -- 2.20.1