drm: bridge: adv7511: remove s32 format from i2s capabilities
[drm/drm-misc.git] / drivers / net / wireless / ath / ath12k / coredump.c
blob72d675d15e6483c9b91281d7a37e576a3ea76195
1 // SPDX-License-Identifier: BSD-3-Clause-Clear
2 /*
3 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
5 */
6 #include <linux/devcoredump.h>
7 #include "hif.h"
8 #include "coredump.h"
9 #include "debug.h"
11 enum
12 ath12k_fw_crash_dump_type ath12k_coredump_get_dump_type(enum ath12k_qmi_target_mem type)
14 enum ath12k_fw_crash_dump_type dump_type;
16 switch (type) {
17 case HOST_DDR_REGION_TYPE:
18 dump_type = FW_CRASH_DUMP_REMOTE_MEM_DATA;
19 break;
20 case M3_DUMP_REGION_TYPE:
21 dump_type = FW_CRASH_DUMP_M3_DUMP;
22 break;
23 case PAGEABLE_MEM_REGION_TYPE:
24 dump_type = FW_CRASH_DUMP_PAGEABLE_DATA;
25 break;
26 case BDF_MEM_REGION_TYPE:
27 case CALDB_MEM_REGION_TYPE:
28 dump_type = FW_CRASH_DUMP_NONE;
29 break;
30 default:
31 dump_type = FW_CRASH_DUMP_TYPE_MAX;
32 break;
35 return dump_type;
38 void ath12k_coredump_upload(struct work_struct *work)
40 struct ath12k_base *ab = container_of(work, struct ath12k_base, dump_work);
42 ath12k_info(ab, "Uploading coredump\n");
43 /* dev_coredumpv() takes ownership of the buffer */
44 dev_coredumpv(ab->dev, ab->dump_data, ab->ath12k_coredump_len, GFP_KERNEL);
45 ab->dump_data = NULL;
48 void ath12k_coredump_collect(struct ath12k_base *ab)
50 ath12k_hif_coredump_download(ab);