1 /* SPDX-License-Identifier: GPL-2.0 */
3 * HiSilicon PCIe Trace and Tuning (PTT) support
4 * Copyright (c) 2022 HiSilicon Technologies Co., Ltd.
7 #ifndef INCLUDE__HISI_PTT_PKT_DECODER_H__
8 #define INCLUDE__HISI_PTT_PKT_DECODER_H__
13 #define HISI_PTT_8DW_CHECK_MASK GENMASK(31, 11)
14 #define HISI_PTT_IS_8DW_PKT GENMASK(31, 11)
15 #define HISI_PTT_MAX_SPACE_LEN 10
16 #define HISI_PTT_FIELD_LENTH 4
18 enum hisi_ptt_pkt_type
{
24 static int hisi_ptt_pkt_size
[] = {
25 [HISI_PTT_4DW_PKT
] = 16,
26 [HISI_PTT_8DW_PKT
] = 32,
29 int hisi_ptt_pkt_desc(const unsigned char *buf
, int pos
, enum hisi_ptt_pkt_type type
);