.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: ISC */ |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
15 | 4 | */ |
---|
16 | 5 | |
---|
17 | 6 | #ifndef _SNOC_H_ |
---|
.. | .. |
---|
19 | 8 | |
---|
20 | 9 | #include "hw.h" |
---|
21 | 10 | #include "ce.h" |
---|
| 11 | +#include "qmi.h" |
---|
22 | 12 | |
---|
23 | 13 | struct ath10k_snoc_drv_priv { |
---|
24 | 14 | enum ath10k_hw_rev hw_rev; |
---|
25 | 15 | u64 dma_mask; |
---|
| 16 | + u32 msa_size; |
---|
26 | 17 | }; |
---|
27 | 18 | |
---|
28 | 19 | struct snoc_state { |
---|
.. | .. |
---|
51 | 42 | u32 irq_line; |
---|
52 | 43 | }; |
---|
53 | 44 | |
---|
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, |
---|
62 | 50 | }; |
---|
63 | 51 | |
---|
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; |
---|
70 | 54 | |
---|
71 | 55 | struct ath10k_snoc { |
---|
72 | 56 | struct platform_device *dev; |
---|
73 | 57 | 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; |
---|
74 | 65 | void __iomem *mem; |
---|
75 | 66 | dma_addr_t mem_pa; |
---|
76 | 67 | struct ath10k_snoc_target_info target_info; |
---|
.. | .. |
---|
79 | 70 | struct ath10k_snoc_ce_irq ce_irqs[CE_COUNT_MAX]; |
---|
80 | 71 | struct ath10k_ce ce; |
---|
81 | 72 | 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); |
---|
84 | 82 | }; |
---|
85 | 83 | |
---|
86 | 84 | static inline struct ath10k_snoc *ath10k_snoc_priv(struct ath10k *ar) |
---|
.. | .. |
---|
88 | 86 | return (struct ath10k_snoc *)ar->drv_priv; |
---|
89 | 87 | } |
---|
90 | 88 | |
---|
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); |
---|
93 | 91 | |
---|
94 | 92 | #endif /* _SNOC_H_ */ |
---|