Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9162446ybi; Tue, 23 Jul 2019 23:05:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqx57e3GiLeCg4V8MgzTnYpdEzgQGdsP5YbZ7L2pOcfKSu5xwAfJcIperWdY5QPsANUNdGg9 X-Received: by 2002:a62:b60e:: with SMTP id j14mr9692502pff.54.1563948341248; Tue, 23 Jul 2019 23:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563948341; cv=none; d=google.com; s=arc-20160816; b=U4EoMd7XsHSZLCQrIi8BnR7iUiFnGvGL//dkTellgw8E92Bsd3uqSm2CthbICR7LQv PI1be0n3p2Bwz5B8Osk4BSvk5aRzQk03AzM/3G1qU4hnArxHulv3KBFpqM2EkA4xCe01 fCllPQxPBEYAASqLz/QuVYvmAOUIEloIfXqKriteiCnQ76utq3yWIvwJDGV5dzdYSWxr i4W8tJ9v0uVmSf/v3Auh6UGpttS0o5n5e7B9SQf6MbBcPkwzZlrc6smyYQIhT5L5sTDH 2mwJ33tEd8brEismhi/P4yf1wEDaV4RXEa9AfWeOeRwdJSY6qTeqjXtl8mq2jdwQlTfM wqwg== 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=QJnUX9lNAD+TUt44eA+wSUxHsJ9TQ/w9C5Em1dgKjW8=; b=zg+GMfZf+lgxS9ZhwYmUYTvDwqm4SKmTvlzfWlaQWnbIUamtD4x2Ukr7gZyu5vBjqp kOfmBOzYLYC98dwFbZxtX84MhepqFP4MNg7AOeLTPGrlGgKiI2JCi0GK0ErZnzX8pAxp C5xkwUQMYBFJBvVDhNq+uTa7Hn5fEFCMETqS57fyncgEBuodF+MJ6cRaCkKizDjLntwF /Pq1jAzKQeJTSGXQerLK7GlP5DjXPwfPLdIG1h989aj1EownM0H4XCgCzTSghCQNIs2s NOVkaAwDyZRySL/Wzype+n2Cj85CYbWMm4hwo42vAGfWk8hW0obxlPcD/8SUfvY8FYjp xIhg== 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 i127si12755004pfc.177.2019.07.23.23.05.25; Tue, 23 Jul 2019 23:05:41 -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 S1726351AbfGXGFC (ORCPT + 99 others); Wed, 24 Jul 2019 02:05:02 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:49310 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbfGXGFC (ORCPT ); Wed, 24 Jul 2019 02:05:02 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x6O64pu7011109, 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 x6O64pu7011109 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Jul 2019 14:04:51 +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; Wed, 24 Jul 2019 14:04:50 +0800 From: To: CC: , , Subject: [PATCH 1/5] rtw88: switch specified efuse bank Date: Wed, 24 Jul 2019 14:04:29 +0800 Message-ID: <1563948273-17910-2-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563948273-17910-1-git-send-email-yhchuang@realtek.com> References: <1563948273-17910-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 --- 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