zephyr/soc/xtensa/intel_adsp/ace/include/adsp_timestamp.h
Tomasz Lissowski 042cb6ac4e soc: intel_adsp: enable DfTTS-based time stamping on ACE platforms
This patch enables time stamping controlled by DSP Timers / Time Stamping
logic on ACE1.5 / ACE2.0 platforms.

Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
2024-01-19 12:59:00 +01:00

29 lines
902 B
C

/*
* Copyright (c) 2023 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_SOC_INTEL_ADSP_ACE_TIMESTAMP_H_
#define ZEPHYR_SOC_INTEL_ADSP_ACE_TIMESTAMP_H_
#include <stdint.h>
/* Captured timestamp data - contains a copy of all DfTTS snapshot registers. */
struct intel_adsp_timestamp {
uint32_t iscs; /* copy of DfISCS register */
uint64_t lscs; /* copy of DfLSCS register */
uint64_t dwccs; /* copy of DfDWCCS register */
uint64_t artcs; /* copy of DfARTCS register */
uint32_t lwccs; /* copy of DfLWCCS register */
};
/*
* @brief Perform timestamping process using DfTTS logic.
*
* @param tsctrl Value to be applied to DfTSCTRL register to control timestamping logic
* @param timestamp Captured timestamp data
*/
int intel_adsp_get_timestamp(uint32_t tsctrl, struct intel_adsp_timestamp *timestamp);
#endif /* ZEPHYR_SOC_INTEL_ADSP_ACE_TIMESTAMP_H_ */