Search Linux Wireless

Re: [PATCH] rtw88: no need to set registers for SDIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin Lo <kevlo@xxxxxxxxx> wrote:

> There's no need to set SDIO related registers when powering up/down the chip.
> 
> Signed-off-by: Kevin Lo <kevlo@xxxxxxxxx>
> 
> 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,

Patch applied to wireless-drivers-next.git, thanks.

07d0f5534935 rtw88: no need to set registers for SDIO

-- 
https://patchwork.kernel.org/patch/11552623/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux