forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/net/wireless/ath/ath10k/snoc.h
....@@ -1,17 +1,6 @@
1
+/* SPDX-License-Identifier: ISC */
12 /*
23 * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3
- *
4
- * Permission to use, copy, modify, and/or distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
154 */
165
176 #ifndef _SNOC_H_
....@@ -19,10 +8,12 @@
198
209 #include "hw.h"
2110 #include "ce.h"
11
+#include "qmi.h"
2212
2313 struct ath10k_snoc_drv_priv {
2414 enum ath10k_hw_rev hw_rev;
2515 u64 dma_mask;
16
+ u32 msa_size;
2617 };
2718
2819 struct snoc_state {
....@@ -51,26 +42,26 @@
5142 u32 irq_line;
5243 };
5344
54
-struct ath10k_wcn3990_vreg_info {
55
- struct regulator *reg;
56
- const char *name;
57
- u32 min_v;
58
- u32 max_v;
59
- u32 load_ua;
60
- unsigned long settle_delay;
61
- bool required;
45
+enum ath10k_snoc_flags {
46
+ ATH10K_SNOC_FLAG_REGISTERED,
47
+ ATH10K_SNOC_FLAG_UNREGISTERING,
48
+ ATH10K_SNOC_FLAG_RECOVERY,
49
+ ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK,
6250 };
6351
64
-struct ath10k_wcn3990_clk_info {
65
- struct clk *handle;
66
- const char *name;
67
- u32 freq;
68
- bool required;
69
-};
52
+struct clk_bulk_data;
53
+struct regulator_bulk_data;
7054
7155 struct ath10k_snoc {
7256 struct platform_device *dev;
7357 struct ath10k *ar;
58
+ unsigned int use_tz;
59
+ struct ath10k_firmware {
60
+ struct device *dev;
61
+ dma_addr_t fw_start_addr;
62
+ struct iommu_domain *iommu_domain;
63
+ size_t mapped_mem_size;
64
+ } fw;
7465 void __iomem *mem;
7566 dma_addr_t mem_pa;
7667 struct ath10k_snoc_target_info target_info;
....@@ -79,8 +70,15 @@
7970 struct ath10k_snoc_ce_irq ce_irqs[CE_COUNT_MAX];
8071 struct ath10k_ce ce;
8172 struct timer_list rx_post_retry;
82
- struct ath10k_wcn3990_vreg_info *vreg;
83
- struct ath10k_wcn3990_clk_info *clk;
73
+ struct regulator_bulk_data *vregs;
74
+ size_t num_vregs;
75
+ struct clk_bulk_data *clks;
76
+ size_t num_clks;
77
+ struct ath10k_qmi *qmi;
78
+ unsigned long flags;
79
+ bool xo_cal_supported;
80
+ u32 xo_cal_data;
81
+ DECLARE_BITMAP(pending_ce_irqs, CE_COUNT_MAX);
8482 };
8583
8684 static inline struct ath10k_snoc *ath10k_snoc_priv(struct ath10k *ar)
....@@ -88,7 +86,7 @@
8886 return (struct ath10k_snoc *)ar->drv_priv;
8987 }
9088
91
-void ath10k_snoc_write32(struct ath10k *ar, u32 offset, u32 value);
92
-u32 ath10k_snoc_read32(struct ath10k *ar, u32 offset);
89
+int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type);
90
+void ath10k_snoc_fw_crashed_dump(struct ath10k *ar);
9391
9492 #endif /* _SNOC_H_ */