drivers/net/ethernet/ti/am65-cpsw-nuss.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ti/am65-cpsw-nuss.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/ti/am65-cpsw-nuss.h
Extension
.h
Size
5646 bytes
Lines
232
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct am65_cpsw_slave_data {
	bool				mac_only;
	struct cpsw_sl			*mac_sl;
	struct device_node		*port_np;
	phy_interface_t			phy_if;
	struct phy			*ifphy;
	struct phy			*serdes_phy;
	bool				rx_pause;
	bool				tx_pause;
	u8				mac_addr[ETH_ALEN];
	int				port_vlan;
	struct phylink			*phylink;
	struct phylink_config		phylink_config;
};

struct am65_cpsw_port {
	struct am65_cpsw_common		*common;
	struct net_device		*ndev;
	const char			*name;
	u32				port_id;
	void __iomem			*port_base;
	void __iomem			*sgmii_base;
	void __iomem			*stat_base;
	void __iomem			*fetch_ram_base;
	bool				disabled;
	struct am65_cpsw_slave_data	slave;
	bool				tx_ts_enabled;
	enum hwtstamp_rx_filters	rx_ts_filter;
	struct am65_cpsw_qos		qos;
	struct devlink_port		devlink_port;
	struct bpf_prog			*xdp_prog;
	struct xdp_rxq_info		xdp_rxq[AM65_CPSW_MAX_QUEUES];
	/* Only for suspend resume context */
	u32				vid_context;
};

enum am65_cpsw_tx_buf_type {
	AM65_CPSW_TX_BUF_TYPE_SKB,
	AM65_CPSW_TX_BUF_TYPE_XDP_TX,
	AM65_CPSW_TX_BUF_TYPE_XDP_NDO,
};

struct am65_cpsw_host {
	struct am65_cpsw_common		*common;
	void __iomem			*port_base;
	void __iomem			*stat_base;
	/* Only for suspend resume context */
	u32				vid_context;
};

struct am65_cpsw_tx_chn {
	struct device *dma_dev;
	struct napi_struct napi_tx;
	struct am65_cpsw_common	*common;
	struct k3_cppi_desc_pool *desc_pool;
	struct k3_udma_glue_tx_channel *tx_chn;
	spinlock_t lock; /* protect TX rings in multi-port mode */
	struct hrtimer tx_hrtimer;
	unsigned long tx_pace_timeout;
	int irq;
	u32 id;
	u32 descs_num;
	unsigned char dsize_log2;
	char tx_chn_name[128];
	u32 rate_mbps;
};

struct am65_cpsw_rx_flow {
	u32 id;
	struct napi_struct napi_rx;
	struct am65_cpsw_common	*common;
	int irq;
	bool irq_disabled;
	struct hrtimer rx_hrtimer;
	unsigned long rx_pace_timeout;
	struct page_pool *page_pool;
	char name[32];
};

struct am65_cpsw_tx_swdata {
	struct net_device *ndev;
	union {
		struct sk_buff *skb;
		struct xdp_frame *xdpf;
	};
};

struct am65_cpsw_swdata {
	u32 flow_id;
	struct page *page;

Annotation

Implementation Notes