drivers/net/dsa/mv88e6xxx/chip.h

Source file repositories/reference/linux-study-clean/drivers/net/dsa/mv88e6xxx/chip.h

File Facts

System
Linux kernel
Corpus path
drivers/net/dsa/mv88e6xxx/chip.h
Extension
.h
Size
24451 bytes
Lines
894
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 mv88e6xxx_info {
	enum mv88e6xxx_family family;
	u16 prod_num;
	const char *name;
	unsigned int num_databases;
	unsigned int num_macs;
	unsigned int num_ports;
	unsigned int num_internal_phys;
	unsigned int num_gpio;
	unsigned int num_tcam_entries;
	unsigned int max_vid;
	unsigned int max_sid;
	unsigned int port_base_addr;
	unsigned int phy_base_addr;
	unsigned int global1_addr;
	unsigned int global2_addr;
	unsigned int tcam_addr;
	unsigned int age_time_coeff;
	unsigned int g1_irqs;
	unsigned int g2_irqs;
	int stats_type;
	bool pvt;

	/* Mark certain ports as invalid. This is required for example for the
	 * MV88E6220 (which is in general a MV88E6250 with 7 ports) but the
	 * ports 2-4 are not routet to pins.
	 */
	unsigned int invalid_port_mask;
	/* Multi-chip Addressing Mode.
	 * Some chips respond to only 2 registers of its own SMI device address
	 * when it is non-zero, and use indirect access to internal registers.
	 */
	bool multi_chip;
	/* Dual-chip Addressing Mode
	 * Some chips respond to only half of the 32 SMI addresses,
	 * allowing two to coexist on the same SMI interface.
	 */
	bool dual_chip;

	enum mv88e6xxx_edsa_support edsa_support;

	/* Mask for FromPort and ToPort value of PortVec used in ATU Move
	 * operation. 0 means that the ATU Move operation is not supported.
	 */
	u8 atu_move_port_mask;
	const struct mv88e6xxx_ops *ops;

	/* Supports PTP */
	bool ptp_support;

	/* Internal PHY start index. 0 means that internal PHYs range starts at
	 * port 0, 1 means internal PHYs range starts at port 1, etc
	 */
	unsigned int internal_phys_offset;
};

struct mv88e6xxx_atu_entry {
	u8	state;
	bool	trunk;
	u16	portvec;
	u8	mac[ETH_ALEN];
};

struct mv88e6xxx_vtu_entry {
	u16	vid;
	u16	fid;
	u8	sid;
	bool	valid;
	bool	policy;
	u8	member[DSA_MAX_PORTS];
	u8	state[DSA_MAX_PORTS];	/* Older silicon has no STU */
};

struct mv88e6xxx_stu_entry {
	u8	sid;
	bool	valid;
	u8	state[DSA_MAX_PORTS];
};

struct mv88e6xxx_bus_ops;
struct mv88e6xxx_irq_ops;
struct mv88e6xxx_gpio_ops;
struct mv88e6xxx_avb_ops;
struct mv88e6xxx_ptp_ops;
struct mv88e6xxx_pcs_ops;
struct mv88e6xxx_cc_coeffs;
struct mv88e6xxx_tcam_ops;

struct mv88e6xxx_irq {
	u16 masked;

Annotation

Implementation Notes