Commit 65371a3f authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Kalle Valo
Browse files

wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets



Add a sub-driver for SDIO based chipsets which implements the following
functionality:
- register accessors for 8, 16 and 32 bits for all states of the card
  (including usage of 4x 8 bit access for one 32 bit buffer if the card
  is not fully powered on yet - or if it's fully powered on then 1x 32
  bit access is used)
- checking whether there's space in the TX FIFO queue to transmit data
- transfers from the host to the device for actual network traffic,
  reserved pages (for firmware download) and H2C (host-to-card)
  transfers
- receiving data from the device
- deep power saving state

The transmit path is optimized so DMA-capable SDIO host controllers can
directly use the buffers provided because the buffer's physical
addresses are 8 byte aligned.

The receive path is prepared to support RX aggregation where the
chipset combines multiple MAC frames into one bigger buffer to reduce
SDIO transfer overhead.

Co-developed-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230405200729.632435-3-martin.blumenstingl@googlemail.com
parent 6a925660
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@ config RTW88_CORE
config RTW88_PCI
	tristate

config RTW88_SDIO
	tristate

config RTW88_USB
	tristate

+3 −0
Original line number Diff line number Diff line
@@ -59,5 +59,8 @@ rtw88_8821cu-objs := rtw8821cu.o
obj-$(CONFIG_RTW88_PCI)		+= rtw88_pci.o
rtw88_pci-objs			:= pci.o

obj-$(CONFIG_RTW88_SDIO)	+= rtw88_sdio.o
rtw88_sdio-objs			:= sdio.o

obj-$(CONFIG_RTW88_USB)		+= rtw88_usb.o
rtw88_usb-objs			:= usb.o
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ enum rtw_debug_mask {
	RTW_DBG_ADAPTIVITY	= 0x00008000,
	RTW_DBG_HW_SCAN		= 0x00010000,
	RTW_DBG_STATE		= 0x00020000,
	RTW_DBG_SDIO		= 0x00040000,

	RTW_DBG_ALL		= 0xffffffff
};
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#include "reg.h"
#include "fw.h"
#include "debug.h"
#include "sdio.h"

void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw,
			 u8 primary_ch_idx)
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@

#define RTW_HW_PORT_NUM		5
#define cut_version_to_mask(cut) (0x1 << ((cut) + 1))
#define SDIO_LOCAL_OFFSET	0x10250000
#define DDMA_POLLING_COUNT	1000
#define C2H_PKT_BUF		256
#define REPORT_BUF		128
Loading