Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10418072ybi; Wed, 24 Jul 2019 22:52:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqydVf+N2a8cIGNdmdVazpUTHIDj5BmwIfjibmuEIF4HGytxcU7kDorJ0+NslSI7d4jx+H2p X-Received: by 2002:a63:e54:: with SMTP id 20mr82937775pgo.244.1564033928982; Wed, 24 Jul 2019 22:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033928; cv=none; d=google.com; s=arc-20160816; b=piv70HDtMVz5Ci/y6X2pmJuuIqf/gLtxs5lGuXqxRzsIRp7UsRJg+GAOBLb3F+p+3i P2qwVch1nk0reXJaUjRDUjf2g19R0KpfMB4f4cG4Olr/2VNUA51OhlWXXoGknPAzTcEN 8JkrsDTkHGKvPsKIcWQkbrTEyS07M4FcWuxrINTTkVT1noGBWRt/HR0KaH3FVFfcQW4k 91oCON4xTpFfhuJ9DnSjihJ/AzQhIVxO6ZqNd+pKff6Es6pupFc/x2JaXc1XwvQLZF9m CkkNvaPoSX7hcLIt5mj8tozDnS86VQaYMbS7uVVsUHHag6ZkDJyaerH3Uf9TVo80218J ovrA== 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=mDUi2ruzvQlmq20+speMiBjIc0Q606CNw37sGcQMBS0=; b=Rk+4GmsPdbEXKs3U3BXaFyWxg0aHvweNcuDQtkolfyE1LKRUy6QD21Q2DKWR+LkDPo lfdLv3J57zXq54KKLM5hhck+tiOeye9um1+6CUddD1PC7RXcfAACil9ewyCKW/vy7JHV DuvGwclPn1FcKdarevQQOBReLPV087Z4wjBi7C15WdDWyf8kxT09DG0K59XrhFMUUahe expCzkDhq1aZoNVycjsegJRgDJ9YAqzw0og9EI535udMOFInFlgTwUldjMw/5phpkTv/ uSyvXnU5xVE3iMKVbWfrTWBlQ+qcvr0sC6nxbnbzSsqWCBLAeln6Kbd89Gx8DG9Up2IG sqbQ== 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 t6si14838809pjv.14.2019.07.24.22.51.54; Wed, 24 Jul 2019 22:52: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 S2389436AbfGYCyc (ORCPT + 99 others); Wed, 24 Jul 2019 22:54:32 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:60786 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387562AbfGYCyc (ORCPT ); Wed, 24 Jul 2019 22:54:32 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x6P2sNG3010420, 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 x6P2sNG3010420 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 25 Jul 2019 10:54:23 +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.439.0; Thu, 25 Jul 2019 10:54:22 +0800 From: To: CC: , , Subject: [PATCH v2 1/5] rtw88: switch specified efuse bank Date: Thu, 25 Jul 2019 10:53:27 +0800 Message-ID: <1564023211-3138-2-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564023211-3138-1-git-send-email-yhchuang@realtek.com> References: <1564023211-3138-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: Yan-Hsuan Chuang Allows to switch different type of efuse bank by passing the bank type to swtich to. Signed-off-by: Yan-Hsuan Chuang --- v1 -> v2 no change drivers/net/wireless/realtek/rtw88/efuse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/efuse.c b/drivers/net/wireless/realtek/rtw88/efuse.c index 212c837..66e56f3 100644 --- a/drivers/net/wireless/realtek/rtw88/efuse.c +++ b/drivers/net/wireless/realtek/rtw88/efuse.c @@ -9,10 +9,10 @@ #define RTW_EFUSE_BANK_WIFI 0x0 -static void switch_efuse_bank(struct rtw_dev *rtwdev) +static void switch_efuse_bank(struct rtw_dev *rtwdev, u8 efuse_bank) { rtw_write32_mask(rtwdev, REG_LDO_EFUSE_CTRL, BIT_MASK_EFUSE_BANK_SEL, - RTW_EFUSE_BANK_WIFI); + efuse_bank); } #define invalid_efuse_header(hdr1, hdr2) \ @@ -90,7 +90,7 @@ static int rtw_dump_physical_efuse_map(struct rtw_dev *rtwdev, u8 *map) u32 addr; u32 cnt; - switch_efuse_bank(rtwdev); + switch_efuse_bank(rtwdev, RTW_EFUSE_BANK_WIFI); /* disable 2.5V LDO */ chip->ops->cfg_ldo25(rtwdev, false); -- 2.7.4