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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/if_ether.hlinux/kernel.hlinux/module.hlinux/netdevice.hlinux/phylink.hlinux/platform_device.hlinux/soc/ti/k3-ringacc.hnet/devlink.hnet/xdp.ham65-cpsw-qos.h
Detected Declarations
struct am65_cptsstruct am65_cpsw_slave_datastruct am65_cpsw_portstruct am65_cpsw_hoststruct am65_cpsw_tx_chnstruct am65_cpsw_rx_flowstruct am65_cpsw_tx_swdatastruct am65_cpsw_swdatastruct am65_cpsw_rx_chnstruct am65_cpsw_pdatastruct am65_cpsw_devlinkstruct am65_cpsw_commonstruct am65_cpsw_ndev_privenum am65_cpsw_tx_buf_typeenum cpsw_devlink_param_id
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
- Immediate include surface: `linux/if_ether.h`, `linux/kernel.h`, `linux/module.h`, `linux/netdevice.h`, `linux/phylink.h`, `linux/platform_device.h`, `linux/soc/ti/k3-ringacc.h`, `net/devlink.h`.
- Detected declarations: `struct am65_cpts`, `struct am65_cpsw_slave_data`, `struct am65_cpsw_port`, `struct am65_cpsw_host`, `struct am65_cpsw_tx_chn`, `struct am65_cpsw_rx_flow`, `struct am65_cpsw_tx_swdata`, `struct am65_cpsw_swdata`, `struct am65_cpsw_rx_chn`, `struct am65_cpsw_pdata`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.