drivers/net/dsa/mv88e6xxx/smi.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/mv88e6xxx/smi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/mv88e6xxx/smi.h- Extension
.h- Size
- 1628 bytes
- Lines
- 56
- 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
chip.h
Detected Declarations
function mv88e6xxx_smi_readfunction mv88e6xxx_smi_write
Annotated Snippet
#ifndef _MV88E6XXX_SMI_H
#define _MV88E6XXX_SMI_H
#include "chip.h"
/* Offset 0x00: SMI Command Register */
#define MV88E6XXX_SMI_CMD 0x00
#define MV88E6XXX_SMI_CMD_BUSY 0x8000
#define MV88E6XXX_SMI_CMD_MODE_MASK 0x1000
#define MV88E6XXX_SMI_CMD_MODE_45 0x0000
#define MV88E6XXX_SMI_CMD_MODE_22 0x1000
#define MV88E6XXX_SMI_CMD_OP_MASK 0x0c00
#define MV88E6XXX_SMI_CMD_OP_22_WRITE 0x0400
#define MV88E6XXX_SMI_CMD_OP_22_READ 0x0800
#define MV88E6XXX_SMI_CMD_OP_45_WRITE_ADDR 0x0000
#define MV88E6XXX_SMI_CMD_OP_45_WRITE_DATA 0x0400
#define MV88E6XXX_SMI_CMD_OP_45_READ_DATA 0x0800
#define MV88E6XXX_SMI_CMD_OP_45_READ_DATA_INC 0x0c00
#define MV88E6XXX_SMI_CMD_DEV_ADDR_MASK 0x003e
#define MV88E6XXX_SMI_CMD_REG_ADDR_MASK 0x001f
/* Offset 0x01: SMI Data Register */
#define MV88E6XXX_SMI_DATA 0x01
int mv88e6xxx_smi_init(struct mv88e6xxx_chip *chip,
struct mii_bus *bus, int sw_addr);
static inline int mv88e6xxx_smi_read(struct mv88e6xxx_chip *chip,
int dev, int reg, u16 *data)
{
if (chip->smi_ops && chip->smi_ops->read)
return chip->smi_ops->read(chip, dev, reg, data);
return -EOPNOTSUPP;
}
static inline int mv88e6xxx_smi_write(struct mv88e6xxx_chip *chip,
int dev, int reg, u16 data)
{
if (chip->smi_ops && chip->smi_ops->write)
return chip->smi_ops->write(chip, dev, reg, data);
return -EOPNOTSUPP;
}
#endif /* _MV88E6XXX_SMI_H */
Annotation
- Immediate include surface: `chip.h`.
- Detected declarations: `function mv88e6xxx_smi_read`, `function mv88e6xxx_smi_write`.
- 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.