1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
3 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
6 #ifndef _ATH12K_COREDUMP_H_
7 #define _ATH12K_COREDUMP_H_
9 #define ATH12K_FW_CRASH_DUMP_V2 2
11 enum ath12k_fw_crash_dump_type {
12 FW_CRASH_DUMP_PAGING_DATA,
13 FW_CRASH_DUMP_RDDM_DATA,
14 FW_CRASH_DUMP_REMOTE_MEM_DATA,
15 FW_CRASH_DUMP_PAGEABLE_DATA,
16 FW_CRASH_DUMP_M3_DUMP,
20 FW_CRASH_DUMP_TYPE_MAX,
23 #define COREDUMP_TLV_HDR_SIZE 8
25 struct ath12k_tlv_dump_data {
26 /* see ath11k_fw_crash_dump_type above */
32 /* pad to 32-bit boundaries as needed */
36 struct ath12k_dump_file_data {
37 /* "ATH12K-FW-DUMP" */
39 /* total dump len in bytes */
41 /* file dump version */
45 /* qrtr instance id */
50 /* time-of-day stamp */
52 /* time-of-day stamp, nano-seconds */
54 /* room for growth w/out changing binary format */
59 #ifdef CONFIG_ATH12K_COREDUMP
60 enum ath12k_fw_crash_dump_type ath12k_coredump_get_dump_type
61 (enum ath12k_qmi_target_mem type);
62 void ath12k_coredump_upload(struct work_struct *work);
63 void ath12k_coredump_collect(struct ath12k_base *ab);
65 static inline enum ath12k_fw_crash_dump_type ath12k_coredump_get_dump_type
66 (enum ath12k_qmi_target_mem type)
68 return FW_CRASH_DUMP_TYPE_MAX;
71 static inline void ath12k_coredump_upload(struct work_struct *work)
75 static inline void ath12k_coredump_collect(struct ath12k_base *ab)