Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4323937ybe; Mon, 9 Sep 2019 07:42:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOd9ADUC1ef/4TyH4kfOtAdKVq/YZDc2M/GLZqzDfdn2VvPv5d8tbWsJI05iaFXEOsCga7 X-Received: by 2002:a17:906:88b:: with SMTP id n11mr20264885eje.60.1568040128682; Mon, 09 Sep 2019 07:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568040128; cv=none; d=google.com; s=arc-20160816; b=DEL8l/bL+fltrGLZ8f/BmrS+ohT2Rh6f8ynJhkRsQgeRCD9O/UvTYqmD4mYjuCcRTl V6AeTtebv4EIG62LE8rkzX73Q9KyO+F3J/0N75Tqg/hjrs0K1UuMB8MFUeL5jLf/hsor Wkj/bcnzvA0boaxhlCni413xMb7kNmxrOz4Dp1uMq539xPAhLK5jrx7lWlxs2fblTtFc jQ69juHLmtyRD4FjqA2gw4xlj/CfoBioREoa7t8a5RgOy4hh2Aa1c9XcT8Ji/fV6iS1Y +GQ63L+kWZsG8IE9LsLcmmpVwUOzeGl1/Y3T/Dnu4qlwx15ANyR8xzrpeG7o9mPKRInx kGLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=dQ15Ux3SDRmxRSRtmTjpMcdAcys9G6CYW8DFyVB2sV4=; b=zqGM9cBzhBUPam6ujO4qlz/oj6a6ePZFR5+GT37Ub5KFnRs3fXM1ikNkAG56HRIa1W 4rEWXOQcQ6vbJq9KGO4mF+ZSWuROHpGVOJ3ULzJM7g7DkSGFwQapfFmmtN9OIkTbt9R1 9pzcuCA2KG42dexp/rC2S5Qzd5t8VPz9qzmsmhJggC2BBq6MlA7s7P8Tc7kGK6gD4Q9S xiTSQKr/dZT91rtp3gV2sllTCee4TZuWvivHVZnS55SOsRPPxNjK9BinN6rc1x7QxtrC NTjWEnihZ+E+l4Zp0LA95Fzp6VVc+KXBu2kX7lMso0p3w8VE7N+lW0+78ASAnbGxTFp9 XUlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 t57si8867958edd.26.2019.09.09.07.41.42; Mon, 09 Sep 2019 07:42:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731809AbfIIHQ0 (ORCPT + 99 others); Mon, 9 Sep 2019 03:16:26 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:57952 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728494AbfIIHQZ (ORCPT ); Mon, 9 Sep 2019 03:16:25 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x897GJBb014351, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x897GJBb014351 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 9 Sep 2019 15:16:19 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.468.0; Mon, 9 Sep 2019 15:16:19 +0800 From: To: CC: , Subject: [PATCH v2 3/8] rtw88: 8822c: Enable interrupt migration Date: Mon, 9 Sep 2019 15:16:06 +0800 Message-ID: <1568013371-21805-4-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568013371-21805-1-git-send-email-yhchuang@realtek.com> References: <1568013371-21805-1-git-send-email-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Tsang-Shian Lin Enable 8822C Tx/Rx interrupt migration. In some platforms, performance test may cause heavy cpu loading and get bad results. Interrupt migration can decrease the amount of interrupts, and lower cpu loading. Signed-off-by: Tsang-Shian Lin Signed-off-by: Yan-Hsuan Chuang --- v1 -> v2 * no change drivers/net/wireless/realtek/rtw88/reg.h | 2 ++ drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h index 0bd0717..78ad053 100644 --- a/drivers/net/wireless/realtek/rtw88/reg.h +++ b/drivers/net/wireless/realtek/rtw88/reg.h @@ -193,6 +193,8 @@ #define REG_H2C_READ_ADDR 0x024C #define REG_H2C_INFO 0x0254 +#define REG_INT_MIG 0x0304 + #define REG_FWHW_TXQ_CTRL 0x0420 #define BIT_EN_BCNQ_DL BIT(22) #define BIT_EN_WR_FREE_TAIL BIT(20) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index b072d43..e11bbc3 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -1114,6 +1114,7 @@ static void rtw8822c_phy_set_param(struct rtw_dev *rtwdev) #define WLAN_MAC_OPT_NORM_FUNC1 0x98 #define WLAN_MAC_OPT_LB_FUNC1 0x80 #define WLAN_MAC_OPT_FUNC2 0x30810041 +#define WLAN_MAC_INT_MIG_CFG 0x33330000 #define WLAN_SIFS_CFG (WLAN_SIFS_CCK_CONT_TX | \ (WLAN_SIFS_OFDM_CONT_TX << BIT_SHIFT_SIFS_OFDM_CTX) | \ @@ -1251,6 +1252,9 @@ static int rtw8822c_mac_init(struct rtw_dev *rtwdev) value16 = BIT_SET_RXPSF_ERRTHR(value16, 0x07); rtw_write16(rtwdev, REG_RXPSF_CTRL, value16); + /* Interrupt migration configuration */ + rtw_write32(rtwdev, REG_INT_MIG, WLAN_MAC_INT_MIG_CFG); + return 0; } -- 2.7.4