Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp827311ybx; Thu, 7 Nov 2019 03:18:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwRjHlFY5EKE2FMizjaNGD/bz1i6mI3NQtqI7NUMQS5gj7mc1vFjlz+QFp387ovY86iOqxr X-Received: by 2002:aa7:d40b:: with SMTP id z11mr2880498edq.142.1573125503223; Thu, 07 Nov 2019 03:18:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573125503; cv=none; d=google.com; s=arc-20160816; b=iSmn7jRcYcyMK1mKrQfo/7xVFE5EFemB5lonb/WOOc+dCLM0xQm6/c/+QfPNIC2ja4 niv0S99OHieC1/z6hev5hXMAxaWZEM5GqXvCcYtN9edvlKmgB/p89E92ZLhuchzs6OaK w0B6i8Yve0QHaF6PKxeIAno15PRtJO06ThGw9KYqmKmrhUgSLdiArxS5uRRP3pnlysOL pv33ygqCZ2BuDbkg7l2ITvBPCx3oD/B/H9PjmA+jBBUChi22Dz/yZMtpCcQ9MLxvsnKL UiYiRhPrFqRznUPm/tGm1I0zoRi/zQRpSbM4n51/h6chjLfKKB7E13LT6NNWbXLehBCG IT6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:authenticated-by; bh=+0WTxx5FH/uvAvd6zka9YFKrRZYBkV2tqxkYm19q1pM=; b=Sru2GjJGk/HH24Mh9I9oVGduF8sz3HqbnDiybrXsu68vMfUIbHhkQJ2ohKsIoygjEs rs6wH+XAOiLZPy/he23V3L5OzFU1E2n/9eo2U5rA7DVaWU3LeWNDxVlplyrKsxWHFwZ9 PsDBXRU7Ez5BKJFT55m2m1qTbDwwbZqReoO3o3jFp6L37KzTc8h9+KYQ2PeRFwqCtMXK sew9moagz9ab6vhnT5BiOVSPfJ/nZNCT/Y+YlbrN6P4MNHGqKh0RSKNFxG8n+/7BiqVJ emAaDItSZNfX80CU+aAzLWv8MoKaAxNMsf35+uItZUjINvf5ts/8KV3ShLnHv5rN6GkF d1jg== 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 a47si1011429edc.145.2019.11.07.03.17.59; Thu, 07 Nov 2019 03:18:22 -0800 (PST) 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 S2388476AbfKGLQR (ORCPT + 99 others); Thu, 7 Nov 2019 06:16:17 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:43299 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388178AbfKGLQP (ORCPT ); Thu, 7 Nov 2019 06:16:15 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID xA7BG7TT012861, 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 xA7BG7TT012861 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 7 Nov 2019 19:16:07 +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; Thu, 7 Nov 2019 19:16:06 +0800 From: To: CC: , Subject: [PATCH 0/4] rtw88: enable PCI CLKREQ and ASPM Date: Thu, 7 Nov 2019 19:15:59 +0800 Message-ID: <20191107111603.12317-1-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 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: Yan-Hsuan Chuang This set enables PCI CLKREQ and ASPM for power save. Basically they should be enabled through PCI configuration space, but for some reasons (see comments in pci.c), they are disabled by default. So driver requires to check the configuration space and then enable them properly. Yan-Hsuan Chuang (4): rtw88: pci: use macros to access PCI DBI/MDIO registers rtw88: pci: use for loop instead of while loop for DBI/MDIO rtw88: pci: enable CLKREQ function if host supports it rtw88: allows to enable/disable HCI link PS mechanism drivers/net/wireless/realtek/rtw88/hci.h | 6 + drivers/net/wireless/realtek/rtw88/pci.c | 158 ++++++++++++++++++++--- drivers/net/wireless/realtek/rtw88/pci.h | 16 +++ drivers/net/wireless/realtek/rtw88/ps.c | 6 + 4 files changed, 168 insertions(+), 18 deletions(-) -- 2.17.1