drivers/net/dsa/rzn1_a5psw.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/rzn1_a5psw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/rzn1_a5psw.h- Extension
.h- Size
- 8309 bytes
- Lines
- 263
- 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/clk.hlinux/debugfs.hlinux/kernel.hlinux/module.hlinux/of.hlinux/of_mdio.hlinux/platform_device.hlinux/pcs-rzn1-miic.hnet/dsa.h
Detected Declarations
struct fdb_entrystruct a5psw
Annotated Snippet
struct fdb_entry {
u8 mac[ETH_ALEN];
u16 valid:1;
u16 is_static:1;
u16 prio:3;
u16 port_mask:5;
u16 reserved:6;
} __packed;
union lk_data {
struct {
u32 lo;
u32 hi;
};
struct fdb_entry entry;
};
/**
* struct a5psw - switch struct
* @base: Base address of the switch
* @hclk: hclk_switch clock
* @clk: clk_switch clock
* @dev: Device associated to the switch
* @mii_bus: MDIO bus struct
* @mdio_freq: MDIO bus frequency requested
* @pcs: Array of PCS connected to the switch ports (not for the CPU)
* @ds: DSA switch struct
* @stats_lock: lock to access statistics (shared HI counter)
* @lk_lock: Lock for the lookup table
* @reg_lock: Lock for register read-modify-write operation
* @bridged_ports: Mask of ports that are bridged and should be flooded
* @br_dev: Bridge net device
*/
struct a5psw {
void __iomem *base;
struct clk *hclk;
struct clk *clk;
struct device *dev;
struct mii_bus *mii_bus;
struct phylink_pcs *pcs[A5PSW_PORTS_NUM - 1];
struct dsa_switch ds;
struct mutex lk_lock;
spinlock_t reg_lock;
u32 bridged_ports;
struct net_device *br_dev;
};
Annotation
- Immediate include surface: `linux/clk.h`, `linux/debugfs.h`, `linux/kernel.h`, `linux/module.h`, `linux/of.h`, `linux/of_mdio.h`, `linux/platform_device.h`, `linux/pcs-rzn1-miic.h`.
- Detected declarations: `struct fdb_entry`, `struct a5psw`.
- 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.