summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/sys/timepps.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/cpukit/score/include/sys/timepps.h b/cpukit/score/include/sys/timepps.h
index 85bb6813cf..419e781be3 100644
--- a/cpukit/score/include/sys/timepps.h
+++ b/cpukit/score/include/sys/timepps.h
@@ -135,6 +135,13 @@ struct pps_kcbind_args {
struct mtx;
+#define KCMODE_EDGEMASK 0x03
+#define KCMODE_ABIFLAG 0x80000000 /* Internal use: abi-aware driver. */
+
+#define PPS_ABI_VERSION 1
+
+#define PPSFLAG_MTX_SPIN 0x01 /* Driver mtx is MTX_SPIN type. */
+
struct pps_state {
/* Capture information. */
struct timehands *capth;
@@ -142,9 +149,6 @@ struct pps_state {
unsigned capgen;
unsigned capcount;
- /* pointer to mutex protecting this state, if any */
- struct mtx *mtx;
-
/* State information. */
pps_params_t ppsparam;
pps_info_t ppsinfo;
@@ -153,11 +157,19 @@ struct pps_state {
int ppscap;
struct timecounter *ppstc;
unsigned ppscount[3];
+ /*
+ * The following fields are valid if the driver calls pps_init_abi().
+ */
+ uint16_t driver_abi; /* Driver sets before pps_init_abi(). */
+ uint16_t kernel_abi; /* Kernel sets during pps_init_abi(). */
+ struct mtx *driver_mtx; /* Optional, valid if non-NULL. */
+ uint32_t flags;
};
void pps_capture(struct pps_state *pps);
void pps_event(struct pps_state *pps, int event);
void pps_init(struct pps_state *pps);
+void pps_init_abi(struct pps_state *pps);
int pps_ioctl(unsigned long cmd, caddr_t data, struct pps_state *pps);
void hardpps(struct timespec *tsp, long nsec);