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.
- 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/ptp_clock_kernel.h
Detected Declarations
struct idpf_ptp_cmdstruct idpf_ptp_dev_clk_regsstruct idpf_ptp_secondary_mbxstruct idpf_ptp_tx_tstamp_statusstruct idpf_ptp_tx_tstampstruct idpf_ptp_vport_tx_tstamp_capsstruct idpf_ptpstruct idpf_ptp_dev_timersenum idpf_ptp_accessenum idpf_ptp_tx_tstamp_statefunction idpf_ptp_info_to_adapterfunction idpf_ptp_is_vport_tx_tstamp_enafunction idpf_ptp_is_vport_rx_tstamp_enafunction idpf_ptp_initfunction idpf_ptp_releasefunction idpf_ptp_get_features_accessfunction idpf_ptp_get_dev_clk_timefunction idpf_ptp_get_cross_timefunction idpf_ptp_set_dev_clk_timefunction idpf_ptp_adj_dev_clk_finefunction idpf_ptp_adj_dev_clk_timefunction idpf_ptp_get_vport_tstamps_capsfunction idpf_ptp_get_tx_tstampfunction idpf_ptp_set_timestamp_modefunction idpf_ptp_extend_tsfunction idpf_ptp_tstamp_extend_32b_to_64bfunction idpf_ptp_request_tsfunction idpf_tstamp_task
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
- Immediate include surface: `linux/ptp_clock_kernel.h`.
- Detected declarations: `struct idpf_ptp_cmd`, `struct idpf_ptp_dev_clk_regs`, `struct idpf_ptp_secondary_mbx`, `struct idpf_ptp_tx_tstamp_status`, `struct idpf_ptp_tx_tstamp`, `struct idpf_ptp_vport_tx_tstamp_caps`, `struct idpf_ptp`, `struct idpf_ptp_dev_timers`, `enum idpf_ptp_access`, `enum idpf_ptp_tx_tstamp_state`.
- 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.