1 /*
2  * Copyright (c) 2023 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_SOC_INTEL_ADSP_ACE_TIMESTAMP_H_
8 #define ZEPHYR_SOC_INTEL_ADSP_ACE_TIMESTAMP_H_
9 
10 #include <stdint.h>
11 
12 /* Captured timestamp data - contains a copy of all DfTTS snapshot registers. */
13 struct intel_adsp_timestamp {
14 	uint32_t iscs;		/* copy of DfISCS register */
15 	uint64_t lscs;		/* copy of DfLSCS register */
16 	uint64_t dwccs;		/* copy of DfDWCCS register */
17 	uint64_t artcs;		/* copy of DfARTCS register */
18 	uint32_t lwccs;		/* copy of DfLWCCS register */
19 };
20 
21 /*
22  * @brief Perform timestamping process using DfTTS logic.
23  *
24  * @param tsctrl Value to be applied to DfTSCTRL register to control timestamping logic
25  * @param timestamp Captured timestamp data
26  */
27 int intel_adsp_get_timestamp(uint32_t tsctrl, struct intel_adsp_timestamp *timestamp);
28 
29 #endif /* ZEPHYR_SOC_INTEL_ADSP_ACE_TIMESTAMP_H_ */
30