drivers/net/ethernet/ti/cpsw_ale.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ti/cpsw_ale.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/ti/cpsw_ale.h- Extension
.h- Size
- 5327 bytes
- Lines
- 200
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct reg_fieldsstruct cpsw_ale_paramsstruct ale_entry_fldstruct regmapstruct cpsw_aleenum ale_fieldsenum cpsw_ale_controlenum cpsw_ale_port_statefunction cpsw_ale_get_vlan_p0_untag
Annotated Snippet
struct cpsw_ale_params {
struct device *dev;
void __iomem *ale_regs;
unsigned long ale_ageout; /* in secs */
unsigned long ale_entries;
unsigned long num_policers;
unsigned long ale_ports;
/* NU Switch has specific handling as number of bits in ALE entries
* are different than other versions of ALE. Also there are specific
* registers for unknown vlan specific fields. So use nu_switch_ale
* to identify this hardware.
*/
bool nu_switch_ale;
const struct reg_field *reg_fields;
int num_fields;
const char *dev_id;
unsigned long bus_freq;
};
struct ale_entry_fld;
struct regmap;
enum ale_fields {
MINOR_VER,
MAJOR_VER,
ALE_ENTRIES,
ALE_POLICERS,
POL_PORT_MEN,
POL_TRUNK_ID,
POL_PORT_NUM,
POL_PRI_MEN,
POL_PRI_VAL,
POL_OUI_MEN,
POL_OUI_INDEX,
POL_DST_MEN,
POL_DST_INDEX,
POL_SRC_MEN,
POL_SRC_INDEX,
POL_OVLAN_MEN,
POL_OVLAN_INDEX,
POL_IVLAN_MEN,
POL_IVLAN_INDEX,
POL_ETHERTYPE_MEN,
POL_ETHERTYPE_INDEX,
POL_IPSRC_MEN,
POL_IPSRC_INDEX,
POL_IPDST_MEN,
POL_IPDST_INDEX,
POL_EN,
POL_RED_DROP_EN,
POL_YELLOW_DROP_EN,
POL_YELLOW_THRESH,
POL_POL_MATCH_MODE,
POL_PRIORITY_THREAD_EN,
POL_MAC_ONLY_DEF_DIS,
POL_TEST_CLR,
POL_TEST_CLR_RED,
POL_TEST_CLR_YELLOW,
POL_TEST_CLR_SELECTED,
POL_TEST_ENTRY,
POL_STATUS_HIT,
POL_STATUS_HIT_RED,
POL_STATUS_HIT_YELLOW,
ALE_DEFAULT_THREAD_EN,
ALE_DEFAULT_THREAD_VAL,
ALE_THREAD_CLASS_INDEX,
ALE_THREAD_ENABLE,
ALE_THREAD_VALUE,
/* terminator */
ALE_FIELDS_MAX,
};
struct cpsw_ale {
struct cpsw_ale_params params;
struct timer_list timer;
struct regmap *regmap;
struct regmap_field *fields[ALE_FIELDS_MAX];
unsigned long ageout;
u32 version;
u32 features;
/* These bits are different on NetCP NU Switch ALE */
u32 port_mask_bits;
u32 port_num_bits;
u32 vlan_field_bits;
unsigned long *p0_untag_vid_mask;
const struct ale_entry_fld *vlan_entry_tbl;
};
enum cpsw_ale_control {
/* global */
Annotation
- Detected declarations: `struct reg_fields`, `struct cpsw_ale_params`, `struct ale_entry_fld`, `struct regmap`, `struct cpsw_ale`, `enum ale_fields`, `enum cpsw_ale_control`, `enum cpsw_ale_port_state`, `function cpsw_ale_get_vlan_p0_untag`.
- 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.