From patchwork Mon Aug 28 19:18:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Erez X-Patchwork-Id: 9926047 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B9F860375 for ; Mon, 28 Aug 2017 19:19:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F20922879B for ; Mon, 28 Aug 2017 19:19:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6ED72879E; Mon, 28 Aug 2017 19:19:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 741612879B for ; Mon, 28 Aug 2017 19:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751372AbdH1TTF (ORCPT ); Mon, 28 Aug 2017 15:19:05 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:41752 "EHLO alexa-out-lv-01.qualcomm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751192AbdH1TTE (ORCPT ); Mon, 28 Aug 2017 15:19:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1503947944; x=1535483944; h=cc:from:to:subject:date:message-id:in-reply-to: references; bh=iaXqgXyPSK/n6q9bxt3oUGVdjuphy++D2GG6KugD4Zc=; b=N7hFN8JapLECgc3oYPpFvDHdFu9279y6GHR1rhNGD8pB/whb2VoSoriR tLAhtanEyEdoCe5D6OtMvxbDe4p4+hHOSdEqggl3nQGpQAZ5KjVMSXJD5 /i5rJ0EqgisYSKubKnKQRhzh4CG+4AlVBtDtOQfLMDwzwPunS0Tm7ffFa U=; X-IronPort-AV: E=Sophos;i="5.41,442,1498546800"; d="scan'208";a="4181693" Received: from ironmsg03-r-new.qualcomm.com (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by alexa-out-lv-01.qualcomm.com with ESMTP; 28 Aug 2017 12:19:04 -0700 Cc: Dedy Lansky , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, Maya Erez X-IronPort-AV: E=McAfee;i="5900,7806,8637"; a="1430573174" X-MGA-submission: =?us-ascii?q?MDEIGEWHSWzMZViFaiEZO1e+WXBnyb/9YngEbF?= =?us-ascii?q?mjN3LkrHT51ZRx+29zTgxNO0VbnQP7T8uqXVazOtoUPLnyIyx4DSqONE?= =?us-ascii?q?UZMsVGaYaTYWATjAq1Vp1KpkaOE+WtvM3Sc2UBarc7hO/LrINnLAoUB5?= =?us-ascii?q?Q3?= Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by Ironmsg03-R.qualcomm.com with ESMTP; 28 Aug 2017 12:19:02 -0700 From: Maya Erez To: Kalle Valo Subject: [PATCH 5/7] wil6210: clear PAL_UNIT_ICR part of device reset Date: Mon, 28 Aug 2017 22:18:45 +0300 Message-Id: <1503947927-18877-6-git-send-email-qca_merez@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503947927-18877-1-git-send-email-qca_merez@qca.qualcomm.com> References: <1503947927-18877-1-git-send-email-qca_merez@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dedy Lansky When FW starts running it can get D0 to D3 interrupt that is a leftover from previous system suspend while FW was not running. As this interrupt is not relevant anymore, clear it part of device reset procedure. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/main.c | 2 ++ drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index 927e332..bac829a 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -943,6 +943,8 @@ static void wil_pre_fw_config(struct wil6210_priv *wil) /* 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); + /* clear PAL_UNIT_ICR (potential D0->D3 leftover) */ + wil_s(wil, RGF_PAL_UNIT_ICR + offsetof(struct RGF_ICR, ICR), 0); if (wil->fw_calib_result > 0) { __le32 val = cpu_to_le32(wil->fw_calib_result | diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index a8c2680..315ec8b 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -268,6 +268,7 @@ struct RGF_ICR { #define BIT_DMA_PSEUDO_CAUSE_MISC BIT(2) #define RGF_HP_CTRL (0x88265c) +#define RGF_PAL_UNIT_ICR (0x88266c) /* struct RGF_ICR */ #define RGF_PCIE_LOS_COUNTER_CTL (0x882dc4) /* MAC timer, usec, for packet lifetime */