Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Marvell PTP driver
0003  *
0004  * Copyright (C) 2020 Marvell.
0005  *
0006  */
0007 
0008 #ifndef PTP_H
0009 #define PTP_H
0010 
0011 #include <linux/timecounter.h>
0012 #include <linux/time64.h>
0013 #include <linux/spinlock.h>
0014 
0015 struct ptp {
0016     struct pci_dev *pdev;
0017     void __iomem *reg_base;
0018     u64 (*read_ptp_tstmp)(struct ptp *ptp);
0019     spinlock_t ptp_lock; /* lock */
0020     u32 clock_rate;
0021 };
0022 
0023 struct ptp *ptp_get(void);
0024 void ptp_put(struct ptp *ptp);
0025 void ptp_start(struct ptp *ptp, u64 sclk, u32 ext_clk_freq, u32 extts);
0026 
0027 extern struct pci_driver ptp_driver;
0028 
0029 #endif