drivers/net/ethernet/intel/idpf/idpf_ptp.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/idpf/idpf_ptp.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/intel/idpf/idpf_ptp.h
Extension
.h
Size
11661 bytes
Lines
380
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 idpf_ptp_cmd {
	u32 exec_cmd_mask;
	u32 shtime_enable_mask;
};

/* struct idpf_ptp_dev_clk_regs - PTP device registers
 * @dev_clk_ns_l: low part of the device clock register
 * @dev_clk_ns_h: high part of the device clock register
 * @phy_clk_ns_l: low part of the PHY clock register
 * @phy_clk_ns_h: high part of the PHY clock register
 * @sys_time_ns_l: low part of the system time register
 * @sys_time_ns_h: high part of the system time register
 * @incval_l: low part of the increment value register
 * @incval_h: high part of the increment value register
 * @shadj_l: low part of the shadow adjust register
 * @shadj_h: high part of the shadow adjust register
 * @phy_incval_l: low part of the PHY increment value register
 * @phy_incval_h: high part of the PHY increment value register
 * @phy_shadj_l: low part of the PHY shadow adjust register
 * @phy_shadj_h: high part of the PHY shadow adjust register
 * @cmd: PTP command register
 * @phy_cmd: PHY command register
 * @cmd_sync: PTP command synchronization register
 */
struct idpf_ptp_dev_clk_regs {
	/* Main clock */
	void __iomem *dev_clk_ns_l;
	void __iomem *dev_clk_ns_h;

	/* PHY timer */
	void __iomem *phy_clk_ns_l;
	void __iomem *phy_clk_ns_h;

	/* System time */
	void __iomem *sys_time_ns_l;
	void __iomem *sys_time_ns_h;

	/* Main timer adjustments */
	void __iomem *incval_l;
	void __iomem *incval_h;
	void __iomem *shadj_l;
	void __iomem *shadj_h;

	/* PHY timer adjustments */
	void __iomem *phy_incval_l;
	void __iomem *phy_incval_h;
	void __iomem *phy_shadj_l;
	void __iomem *phy_shadj_h;

	/* Command */
	void __iomem *cmd;
	void __iomem *phy_cmd;
	void __iomem *cmd_sync;
};

/**
 * enum idpf_ptp_access - the type of access to PTP operations
 * @IDPF_PTP_NONE: no access
 * @IDPF_PTP_DIRECT: direct access through BAR registers
 * @IDPF_PTP_MAILBOX: access through mailbox messages
 */
enum idpf_ptp_access {
	IDPF_PTP_NONE = 0,
	IDPF_PTP_DIRECT,
	IDPF_PTP_MAILBOX,
};

/**
 * struct idpf_ptp_secondary_mbx - PTP secondary mailbox
 * @peer_mbx_q_id: PTP mailbox queue ID
 * @peer_id: Peer ID for PTP Device Control daemon
 * @valid: indicates whether secondary mailblox is supported by the Control
 *	   Plane
 */
struct idpf_ptp_secondary_mbx {
	u16 peer_mbx_q_id;
	u16 peer_id;
	bool valid:1;
};

/**
 * enum idpf_ptp_tx_tstamp_state - Tx timestamp states
 * @IDPF_PTP_FREE: Tx timestamp index free to use
 * @IDPF_PTP_REQUEST: Tx timestamp index set to the Tx descriptor
 * @IDPF_PTP_READ_VALUE: Tx timestamp value ready to be read
 */
enum idpf_ptp_tx_tstamp_state {
	IDPF_PTP_FREE,
	IDPF_PTP_REQUEST,
	IDPF_PTP_READ_VALUE,

Annotation

Implementation Notes