drivers/net/ethernet/ti/cpsw_sl.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ti/cpsw_sl.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/ti/cpsw_sl.h- Extension
.h- Size
- 2608 bytes
- Lines
- 74
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.h
Detected Declarations
struct cpsw_slenum cpsw_sl_regs
Annotated Snippet
#ifndef __TI_CPSW_SL_H__
#define __TI_CPSW_SL_H__
#include <linux/device.h>
enum cpsw_sl_regs {
CPSW_SL_IDVER,
CPSW_SL_MACCONTROL,
CPSW_SL_MACSTATUS,
CPSW_SL_SOFT_RESET,
CPSW_SL_RX_MAXLEN,
CPSW_SL_BOFFTEST,
CPSW_SL_RX_PAUSE,
CPSW_SL_TX_PAUSE,
CPSW_SL_EMCONTROL,
CPSW_SL_RX_PRI_MAP,
CPSW_SL_TX_GAP,
};
enum {
CPSW_SL_CTL_FULLDUPLEX = BIT(0), /* Full Duplex mode */
CPSW_SL_CTL_LOOPBACK = BIT(1), /* Loop Back Mode */
CPSW_SL_CTL_MTEST = BIT(2), /* Manufacturing Test mode */
CPSW_SL_CTL_RX_FLOW_EN = BIT(3), /* Receive Flow Control Enable */
CPSW_SL_CTL_TX_FLOW_EN = BIT(4), /* Transmit Flow Control Enable */
CPSW_SL_CTL_GMII_EN = BIT(5), /* GMII Enable */
CPSW_SL_CTL_TX_PACE = BIT(6), /* Transmit Pacing Enable */
CPSW_SL_CTL_GIG = BIT(7), /* Gigabit Mode */
CPSW_SL_CTL_XGIG = BIT(8), /* 10 Gigabit Mode */
CPSW_SL_CTL_TX_SHORT_GAP_EN = BIT(10), /* Transmit Short Gap Enable */
CPSW_SL_CTL_CMD_IDLE = BIT(11), /* Command Idle */
CPSW_SL_CTL_CRC_TYPE = BIT(12), /* Port CRC Type */
CPSW_SL_CTL_XGMII_EN = BIT(13), /* XGMII Enable */
CPSW_SL_CTL_IFCTL_A = BIT(15), /* Interface Control A */
CPSW_SL_CTL_IFCTL_B = BIT(16), /* Interface Control B */
CPSW_SL_CTL_GIG_FORCE = BIT(17), /* Gigabit Mode Force */
CPSW_SL_CTL_EXT_EN = BIT(18), /* External Control Enable */
CPSW_SL_CTL_EXT_EN_RX_FLO = BIT(19), /* Ext RX Flow Control Enable */
CPSW_SL_CTL_EXT_EN_TX_FLO = BIT(20), /* Ext TX Flow Control Enable */
CPSW_SL_CTL_TX_SG_LIM_EN = BIT(21), /* TXt Short Gap Limit Enable */
CPSW_SL_CTL_RX_CEF_EN = BIT(22), /* RX Copy Error Frames Enable */
CPSW_SL_CTL_RX_CSF_EN = BIT(23), /* RX Copy Short Frames Enable */
CPSW_SL_CTL_RX_CMF_EN = BIT(24), /* RX Copy MAC Control Frames Enable */
CPSW_SL_CTL_EXT_EN_XGIG = BIT(25), /* Ext XGIG Control En, k3 only */
CPSW_SL_CTL_FUNCS_COUNT
};
struct cpsw_sl;
struct cpsw_sl *cpsw_sl_get(const char *device_id, struct device *dev,
void __iomem *sl_base);
void cpsw_sl_reset(struct cpsw_sl *sl, unsigned long tmo);
u32 cpsw_sl_ctl_set(struct cpsw_sl *sl, u32 ctl_funcs);
u32 cpsw_sl_ctl_clr(struct cpsw_sl *sl, u32 ctl_funcs);
void cpsw_sl_ctl_reset(struct cpsw_sl *sl);
int cpsw_sl_wait_for_idle(struct cpsw_sl *sl, unsigned long tmo);
u32 cpsw_sl_reg_read(struct cpsw_sl *sl, enum cpsw_sl_regs reg);
void cpsw_sl_reg_write(struct cpsw_sl *sl, enum cpsw_sl_regs reg, u32 val);
#endif /* __TI_CPSW_SL_H__ */
Annotation
- Immediate include surface: `linux/device.h`.
- Detected declarations: `struct cpsw_sl`, `enum cpsw_sl_regs`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.