blob: 71976738f4abc59497e04b08dc812803b0f9517a [file] [log] [blame]
Houston Hoffman4ca03b62016-03-14 21:11:51 -07001/*
2 * Copyright (c) 2016 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28#include "qdf_types.h"
29#include "dummy.h"
30#include "hif_debug.h"
31
32/**
33 * hif_dummy_bus_prevent_linkdown() - prevent linkdown
34 * @hif_ctx: hif context
35 * @flag: weather to keep the bus alive or not
36 *
37 * Dummy function for busses and platforms that do not support
38 * link down. This may need to be replaced with a wakelock.
39 */
40void hif_dummy_bus_prevent_linkdown(struct hif_softc *scn, bool flag)
41{
42 HIF_ERROR("wlan: %s pcie power collapse ignored",
43 (flag ? "disable" : "enable"));
44}
45
46/**
47 * hif_reset_soc(): reset soc
48 *
49 * this function resets soc
50 *
51 * @hif_ctx: HIF context
52 *
53 * Return: void
54 */
55/* Function to reset SoC */
56void hif_dummy_reset_soc(struct hif_softc *hif_ctx)
57{
58}
59
60/**
61 * hif_dummy_suspend() - suspend the bus
62 * @hif_ctx: hif context
63 *
64 * dummy for busses that don't need to suspend.
65 *
66 * Return: 0 for success and non-zero for failure
67 */
68int hif_dummy_bus_suspend(struct hif_softc *hif_ctx)
69{
70 return 0;
71}
72
73/**
74 * hif_dummy_resume() - hif resume API
75 *
76 * This function resumes the bus. but snoc doesn't need to resume.
77 * Therefore do nothing.
78 *
79 * Return: 0 for success and non-zero for failure
80 */
81int hif_dummy_bus_resume(struct hif_softc *hif_ctx)
82{
83 return 0;
84}
85
86/**
87 * hif_dummy_target_sleep_state_adjust() - api to adjust state of target
88 * @scn: hif context
89 * @sleep_ok: allow or deny target to go to sleep
90 * @wait_for_it: ensure target has change
91 */
92int hif_dummy_target_sleep_state_adjust(struct hif_softc *scn,
93 bool sleep_ok, bool wait_for_it)
94{
95 return 0;
96}
Houston Hoffmanb4149dd2016-03-23 15:55:41 -070097
98/**
99 * hif_dummy_enable_power_management - dummy call
100 * hif_ctx: hif context
101 * is_packet_log_enabled: true if packet log is enabled
102 */
103void hif_dummy_enable_power_management(struct hif_softc *hif_ctx,
104 bool is_packet_log_enabled)
105{}
106
107/**
108 * hif_dummy_disable_power_management - dummy call
109 * hif_ctx: hif context
Nirav Shah3573f952016-05-12 18:37:03 +0530110 *
111 * Return: none
Houston Hoffmanb4149dd2016-03-23 15:55:41 -0700112 */
113void hif_dummy_disable_power_management(struct hif_softc *hif_ctx)
114{}
Nirav Shah3573f952016-05-12 18:37:03 +0530115
116/**
117 * hif_dummy_disable_isr - dummy call
118 * hif_ctx: hif context
119 *
120 * Return: none
121 */
122void hif_dummy_disable_isr(struct hif_softc *scn)
123{}
124
125/**
126 * hif_dummy_nointrs - dummy call
127 * hif_sc: hif context
128 *
129 * Return: none
130 */
131void hif_dummy_nointrs(struct hif_softc *hif_sc)
132{}
133
134/**
135 * hif_dummy_bus_configure - dummy call
136 * hif_ctx: hif context
137 *
138 * Return: 0 for sucess
139 */
140int hif_dummy_bus_configure(struct hif_softc *hif_sc)
141{
142 return 0;
143}
144
145/**
146 * hif_dummy_get_config_item - dummy call
147 * @hif_sc: hif context
148 * @opcode: configuration type
149 * @config: configuration value to set
150 * @config_len: configuration length
151 *
152 * Return: 0 for sucess
153 */
154QDF_STATUS
155hif_dummy_get_config_item(struct hif_softc *hif_sc,
156 int opcode, void *config, uint32_t config_len)
157{
158 return 0;
159}
160
161/**
162 * hif_dummy_set_mailbox_swap - dummy call
163 * @hif_sc: hif context
164 *
165 * Return: None
166 */
167void
168hif_dummy_set_mailbox_swap(struct hif_softc *hif_sc)
169{
170 return;
171}
172
173/**
174 * hif_dummy_claim_device - dummy call
175 * @hif_sc: hif context
176 *
177 * Return: None
178 */
179void
180hif_dummy_claim_device(struct hif_softc *hif_sc)
181{
182 return;
183}
184
185/**
Nirav Shah3573f952016-05-12 18:37:03 +0530186 * hif_dummy_cancel_deferred_target_sleep - dummy call
187 * @hif_sc: hif context
188 *
189 * Return: None
190 */
191void
192hif_dummy_cancel_deferred_target_sleep(struct hif_softc *hif_sc)
193{
194 return;
195}
196
197/**
198 * hif_dummy_irq_enable - dummy call
199 * hif_ctx: hif context
200 * @irq_id: irq id
201 *
202 * Return: none
203 */
204void hif_dummy_irq_enable(struct hif_softc *hif_sc, int irq_id)
205{}
206
207/**
208 * hif_dummy_irq_disable - dummy call
209 * hif_ctx: hif context
210 * @irq_id: irq id
211 *
212 * Return: none
213 */
214void hif_dummy_irq_disable(struct hif_softc *hif_sc, int irq_id)
215{}
216
217/**
218 * hif_dummy_dump_registers - dummy call
219 * hif_sc: hif context
220 *
221 * Return: 0 for sucess
222 */
223int hif_dummy_dump_registers(struct hif_softc *hif_sc)
224{
225 return 0;
226}
227
228/**
229 * hif_dummy_dump_target_memory - dummy call
230 * @hif_sc: hif context
231 * @ramdump_base: base
232 * @address: address
233 * @size: size
234 *
235 * Return: None
236 */
237void hif_dummy_dump_target_memory(struct hif_softc *hif_sc, void *ramdump_base,
238 uint32_t address, uint32_t size)
239{
240}
241
242/**
243 * hif_dummy_ipa_get_ce_resource - dummy call
244 * @scn: HIF context
245 * @sr_base_paddr: source base address
246 * @sr_ring_size: source ring size
247 * @reg_paddr: bus physical address
248 *
249 * Return: None
250 */
251void hif_dummy_ipa_get_ce_resource(struct hif_softc *hif_sc,
252 qdf_dma_addr_t *sr_base_paddr,
253 uint32_t *sr_ring_size,
254 qdf_dma_addr_t *reg_paddr)
255{
256}
257
258/**
259 * hif_dummy_mask_interrupt_call - dummy call
260 * @hif_sc: hif context
261 *
262 * Return: None
263 */
264void
265hif_dummy_mask_interrupt_call(struct hif_softc *hif_sc)
266{
267 return;
268}