include/linux/soc/mediatek/mtk_wed.h

Source file repositories/reference/linux-study-clean/include/linux/soc/mediatek/mtk_wed.h

File Facts

System
Linux kernel
Corpus path
include/linux/soc/mediatek/mtk_wed.h
Extension
.h
Size
9506 bytes
Lines
334
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mtk_wed_bm_desc {
	__le32 buf0;
	__le32 token;
} __packed __aligned(4);

enum mtk_wed_bus_tye {
	MTK_WED_BUS_PCIE,
	MTK_WED_BUS_AXI,
};

#define MTK_WED_RING_CONFIGURED		BIT(0)
struct mtk_wed_ring {
	struct mtk_wdma_desc *desc;
	dma_addr_t desc_phys;
	u32 desc_size;
	int size;
	u32 flags;

	u32 reg_base;
	void __iomem *wpdma;
};

struct mtk_wed_wo_rx_stats {
	__le16 wlan_idx;
	__le16 tid;
	__le32 rx_pkt_cnt;
	__le32 rx_byte_cnt;
	__le32 rx_err_cnt;
	__le32 rx_drop_cnt;
};

struct mtk_wed_buf {
	void *p;
	dma_addr_t phy_addr;
};

struct mtk_wed_device {
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
	const struct mtk_wed_ops *ops;
	struct device *dev;
	struct mtk_wed_hw *hw;
	bool init_done, running;
	int wdma_idx;
	int irq;
	u8 version;

	/* used by wlan driver */
	u32 rev_id;

	struct mtk_wed_ring tx_ring[MTK_WED_TX_QUEUES];
	struct mtk_wed_ring rx_ring[MTK_WED_RX_QUEUES];
	struct mtk_wed_ring txfree_ring;
	struct mtk_wed_ring tx_wdma[MTK_WED_TX_QUEUES];
	struct mtk_wed_ring rx_wdma[MTK_WED_RX_QUEUES];
	struct mtk_wed_ring rx_rro_ring[MTK_WED_RX_QUEUES];
	struct mtk_wed_ring rx_page_ring[MTK_WED_RX_PAGE_QUEUES];
	struct mtk_wed_ring ind_cmd_ring;

	struct {
		int size;
		struct mtk_wed_buf *pages;
		struct mtk_wdma_desc *desc;
		dma_addr_t desc_phys;
	} tx_buf_ring;

	struct {
		int size;
		struct mtk_wed_bm_desc *desc;
		dma_addr_t desc_phys;
	} rx_buf_ring;

	struct {
		struct mtk_wed_ring ring;
		dma_addr_t miod_phys;
		dma_addr_t fdbk_phys;
	} rro;

	struct {
		int size;
		struct mtk_wed_buf *pages;
		struct mtk_wed_bm_desc *desc;
		dma_addr_t desc_phys;
	} hw_rro;

	/* filled by driver: */
	struct {
		union {
			struct platform_device *platform_dev;
			struct pci_dev *pci_dev;
		};

Annotation

Implementation Notes