Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp655921ybk; Fri, 15 May 2020 10:06:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT+fK8lBOGZWoc7tS/KmB11Q7O3v7AGTujgXCHLqrxzmmsSmZd2OhF+o/USe6S7/h4pUkr X-Received: by 2002:a17:906:78c:: with SMTP id l12mr3504920ejc.189.1589562398893; Fri, 15 May 2020 10:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589562398; cv=none; d=google.com; s=arc-20160816; b=m12W0usBPZtF7uZdS67HnHzs+3IjM8z0VmclR7K6xVMuVskLux4ml66gXzB79icytL GSN2olJixCimcLB2mF1i9gTgYFKkl8oI0wYPExYleM8AcrD5arFSQyXEtfUUPumFnDZd fyWffQh6qtH/9cmrxhNoLTJg5kysKSLlzlNC6myrlB1KLaf7z+IVM8iGWh0xcJQDbyP7 NMmG+3AhkuSqXO3BXtgBOoN/3meKcQ3N+eoW9p4/KqpN17+7iS/blyixYG397mbq8q2Z XNjAl0qZv3jY4CrY8x47uVY4Q6oIxmti2/ismIqRb5OVc+wfeGfDKeemotAVdYlO+DFs NLYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=MXBnL7oTXl4oVGt1VmovtmswjcG6s7FTMyyp5iIEdzQ=; b=OGVWiHTNdAdgO0/1CHGuQdHRDgOKABfgkGtb0QRuvaBTd2yjXw+TG/yTxqJoA4RNCI UCKSDMCCG6VqylpXwOAinZJRY3VKwFgH7LqdY1l9PTnOm5u69yVVV8y5DqqgmZ9gT0Uh fplQoG040Ue80sCDt9ACr6dqwMSjBosgV0ZhG6PU3XiLodBqtwfuH2S3j2sdwFgocJwP lmrsPAI8WxqxwixGz6b5PvG/KaWPRZKXHvQkU5ywe5ySGORiXqmQOc9XT1vou5v79uoE NvnCZSca/XXE+zH1rs1DSNgYHWYCz+1kfvvtgkgz9gMOS37ddEhbNoz/ffdAq0iL2+na 8+Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq12si1559774ejb.472.2020.05.15.10.06.14; Fri, 15 May 2020 10:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726183AbgEORDz (ORCPT + 99 others); Fri, 15 May 2020 13:03:55 -0400 Received: from 220-134-220-36.HINET-IP.hinet.net ([220.134.220.36]:52599 "EHLO ns.kevlo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbgEORDz (ORCPT ); Fri, 15 May 2020 13:03:55 -0400 Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.15.2/8.15.2) with ESMTPS id 04F6Bti6015739 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 15 May 2020 14:11:55 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.15.2/8.15.2/Submit) id 04F6Bt6C015738; Fri, 15 May 2020 14:11:55 +0800 (CST) (envelope-from kevlo) Date: Fri, 15 May 2020 14:11:53 +0800 From: Kevin Lo To: linux-wireless@vger.kernel.org Cc: Yan-Hsuan Chuang Subject: [PATCH] rtw88: no need to set registers for SDIO Message-ID: <20200515061153.GA15714@ns.kevlo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org There's no need to set SDIO related registers when powering up/down the chip. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c b/drivers/net/wireless/realtek/rtw88/rtw8723d.c index b517af417e0e..5e0b7999bc8a 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c @@ -2092,16 +2092,6 @@ static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8723d[] = { RTW_PWR_INTF_ALL_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(3) | BIT(7), 0}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, BIT(0), 0}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_POLLING, BIT(1), BIT(1)}, {0x004A, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_USB_MSK, @@ -2112,11 +2102,6 @@ static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8723d[] = { RTW_PWR_INTF_ALL_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(3) | BIT(4), 0}, - {0x0023, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(4), 0}, {0x0301, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_PCI_MSK, @@ -2324,11 +2309,6 @@ static const struct rtw_pwr_seq_cmd trans_act_to_lps_8723d[] = { RTW_PWR_INTF_ALL_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(1), 0}, - {0x0093, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, 0xFF, 0x00}, {0x0553, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, @@ -2408,11 +2388,6 @@ static const struct rtw_pwr_seq_cmd trans_act_to_cardemu_8723d[] = { }; static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8723d[] = { - {0x0007, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, 0xFF, 0x20}, {0x0005, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_SDIO_MSK, @@ -2433,21 +2408,6 @@ static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8723d[] = { RTW_PWR_INTF_USB_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(0), 1}, - {0x0023, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(4), BIT(4)}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, BIT(0), BIT(0)}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_POLLING, BIT(1), 0}, {0xFFFF, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c index 18c5a5a96d90..e0d911bbe534 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c @@ -1550,16 +1550,6 @@ static void rtw8822b_bf_config_bfee(struct rtw_dev *rtwdev, struct rtw_vif *vif, } static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822b[] = { - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, BIT(0), 0}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_POLLING, BIT(1), BIT(1)}, {0x004A, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_USB_MSK, @@ -1688,11 +1678,6 @@ static const struct rtw_pwr_seq_cmd trans_cardemu_to_act_8822b[] = { RTW_PWR_INTF_ALL_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, 0xFF, 0x0c}, - {0x0068, - RTW_PWR_CUT_C_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(4), BIT(4)}, {0x0029, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, @@ -1721,11 +1706,6 @@ static const struct rtw_pwr_seq_cmd trans_cardemu_to_act_8822b[] = { }; static const struct rtw_pwr_seq_cmd trans_act_to_cardemu_8822b[] = { - {0x0003, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(2), 0}, {0x0093, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, @@ -1794,11 +1774,6 @@ static const struct rtw_pwr_seq_cmd trans_act_to_cardemu_8822b[] = { }; static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8822b[] = { - {0x0005, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(7), BIT(7)}, {0x0007, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_SDIO_MSK, @@ -1819,46 +1794,6 @@ static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8822b[] = { RTW_PWR_INTF_USB_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(0), 0}, - {0x0067, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(5), 0}, - {0x0067, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(4), 0}, - {0x004F, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(0), 0}, - {0x0067, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(1), 0}, - {0x0046, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(6), BIT(6)}, - {0x0067, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(2), 0}, - {0x0046, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(7), BIT(7)}, - {0x0062, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(4), BIT(4)}, {0x0081, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, @@ -1869,41 +1804,11 @@ static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8822b[] = { RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_SDIO_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(3) | BIT(4), BIT(3)}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, BIT(0), BIT(0)}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_POLLING, BIT(1), 0}, {0x0090, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_PCI_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(1), 0}, - {0x0044, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, 0xFF, 0}, - {0x0040, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, 0xFF, 0x90}, - {0x0041, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, 0xFF, 0x00}, - {0x0042, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, 0xFF, 0x04}, {0xFFFF, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index d697d70170af..4cb85502d8ad 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -3562,16 +3562,6 @@ static void rtw8822c_pwr_track(struct rtw_dev *rtwdev) } static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822c[] = { - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, BIT(0), 0}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_POLLING, BIT(1), BIT(1)}, {0x002E, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK, @@ -3782,11 +3772,6 @@ static const struct rtw_pwr_seq_cmd trans_act_to_cardemu_8822c[] = { }; static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8822c[] = { - {0x0005, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_MAC, - RTW_PWR_CMD_WRITE, BIT(7), BIT(7)}, {0x0007, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_SDIO_MSK, @@ -3832,11 +3817,6 @@ static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8822c[] = { RTW_PWR_INTF_PCI_MSK, RTW_PWR_ADDR_MAC, RTW_PWR_CMD_WRITE, BIT(2), BIT(2)}, - {0x0086, - RTW_PWR_CUT_ALL_MSK, - RTW_PWR_INTF_SDIO_MSK, - RTW_PWR_ADDR_SDIO, - RTW_PWR_CMD_WRITE, BIT(0), BIT(0)}, {0xFFFF, RTW_PWR_CUT_ALL_MSK, RTW_PWR_INTF_ALL_MSK,