Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6015376ybc; Wed, 27 Nov 2019 13:26:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyqJC2+zGDhlFCW55Pj8pqrcHUq7TKueLcu+jNRtgTj4ldxzcrr8LH9FbsYENZT93KeDUyz X-Received: by 2002:a17:906:13d5:: with SMTP id g21mr50720979ejc.72.1574889981305; Wed, 27 Nov 2019 13:26:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574889981; cv=none; d=google.com; s=arc-20160816; b=KuBQRuw2caR2ahnnEkKogSi8XvL0eGfnB3I854UGK2PRtcTIkHV4Ta1STr8iPNhxKw +r1+G1qWrxeWbPRsV/5tjCkBujAiUaF3uCMuOI9AZ4bYF+w6mCOqj8VKALQBoOESiwIE xZHtf5IkhiwDMkn0po4UpAQ8tjCKMG4TnJtlN/Hzu6rY4XcY4J160S5PsRdTm6Byyt3/ 70ShhFX34z50AfGKfufkMfch+j6fFZ+RrK3mbvzXvTFIGzRU/5Mn4hPcR8648MTGx54y hjtyM4sLuyS+hj2kjDBnO3kGJMNcFjqkNLOubugTkosJ9JERhne36UiommujiBc/NIxe YN4A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oEkerKaPctIR3MMiWwLc++OIL7+8G6xXy8ypffeFMX4=; b=NUSw41VfyuJzAt9OOzLEFSwObrHy2jho2d8cEFwhdyQGdHMEZcyWK6Y/cX1AMRA+WX yFPTay4Pf1qQX/Hkys9RXWsK4itPCTEcobF+aQOBSuUYI4eg0S+VG++YYCs64ztTEhXS pLxBsBngbE7LPA2jp2odkdzTyqFm4UX64YAz8F/az8q+Sq3dfcdCiuTnz4TZzR9zPXBb gr7Eko6K8N20r6MQm+dm1FCovxeLl8NPvGWdOyu8gDhF5OeHV4f14jyUqkkS1F8Wt9C6 5aTo/Yb26YNzyAV1+cFi9hHOui6wmEKc+QFhapyPHM9cJguOL7SYNGXIKMUDFPnc4gNN sm6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fj6uDsmE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16si830827ejd.79.2019.11.27.13.25.57; Wed, 27 Nov 2019 13:26:21 -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=Fj6uDsmE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732114AbfK0VEI (ORCPT + 99 others); Wed, 27 Nov 2019 16:04:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:57520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732111AbfK0VEH (ORCPT ); Wed, 27 Nov 2019 16:04:07 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A68D52086A; Wed, 27 Nov 2019 21:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888647; bh=6wPDkIfi1wyG2iZYHJrsHGb6q/8iTHRmXiBbUyAP03g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fj6uDsmELEpG5mBoRNHMtxYUtuxWSytMY18pMjdHAGczLhhL6I80Y8Z8IJX/+iXiB osxk4rtDIsZes71/mfsHAm8scbCE8QDREcj44rGtyzGwpWGGW3gJVunQt2QDOFG9S+ An1bW4wYn3iSn/AERU/5Pw6jzJrFHz+ixp8QcGFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maya Erez , Kalle Valo , Sasha Levin Subject: [PATCH 4.19 215/306] wil6210: fix RGF_CAF_ICR address for Talyn-MB Date: Wed, 27 Nov 2019 21:31:05 +0100 Message-Id: <20191127203130.799684406@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 920cb233f4db7..10673fa9388ec 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -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 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