mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ice: add low level PTP clock access functions
Add the ice_ptp_hw.c file and some associated definitions to the ice driver folder. This file contains basic low level definitions for functions that interact with the device hardware. For now, only E810-based devices are supported. The ice hardware supports 2 major variants which have different PHYs with different procedures necessary for interacting with the device clock. Because the device captures timestamps in the PHY, each PHY has its own internal timer. The timers are synchronized in hardware by first preparing the source timer and the PHY timer shadow registers, and then issuing a synchronization command. This ensures that both the source timer and PHY timers are programmed simultaneously. The timers themselves are all driven from the same oscillator source. The functions in ice_ptp_hw.c abstract over the differences between how the PHYs in E810 are programmed vs how the PHYs in E822 devices are programmed. This series only implements E810 support, but E822 support will be added in a future change. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
7f9ab54d31
commit
03cb4473be
5 changed files with 770 additions and 0 deletions
|
@ -71,6 +71,18 @@
|
|||
*/
|
||||
#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
|
||||
|
||||
/**
|
||||
* upper_16_bits - return bits 16-31 of a number
|
||||
* @n: the number we're accessing
|
||||
*/
|
||||
#define upper_16_bits(n) ((u16)((n) >> 16))
|
||||
|
||||
/**
|
||||
* lower_16_bits - return bits 0-15 of a number
|
||||
* @n: the number we're accessing
|
||||
*/
|
||||
#define lower_16_bits(n) ((u16)((n) & 0xffff))
|
||||
|
||||
struct completion;
|
||||
struct pt_regs;
|
||||
struct user;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue