xref: /wlan-dirver/qca-wifi-host-cmn/hif/src/dispatcher/snoc_api.h (revision c8e2987f9325baadee03d0265544a08c4a0217b0)
1 /*
2  * Copyright (c) 2016-2018 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 #ifndef _SNOC_API_H_
29 #define _SNOC_API_H_
30 QDF_STATUS hif_snoc_open(struct hif_softc *hif_ctx,
31 			 enum qdf_bus_type bus_type);
32 void hif_snoc_close(struct hif_softc *hif_ctx);
33 int hif_snoc_bus_suspend(struct hif_softc *hif_ctx);
34 int hif_snoc_bus_resume(struct hif_softc *hif_ctx);
35 int hif_snoc_bus_suspend_noirq(struct hif_softc *scn);
36 void hif_snoc_disable_isr(struct hif_softc *hif_ctx);
37 void hif_snoc_nointrs(struct hif_softc *scn);
38 QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
39 			  struct device *dev, void *bdev,
40 			  const struct hif_bus_id *bid,
41 			  enum hif_enable_type type);
42 void hif_snoc_disable_bus(struct hif_softc *scn);
43 int hif_snoc_bus_configure(struct hif_softc *scn);
44 void hif_snoc_irq_disable(struct hif_softc *scn, int ce_id);
45 void hif_snoc_irq_enable(struct hif_softc *scn, int ce_id);
46 int hif_snoc_dump_registers(struct hif_softc *scn);
47 void hif_snoc_display_stats(struct hif_softc *hif_ctx);
48 void hif_snoc_clear_stats(struct hif_softc *hif_ctx);
49 int hif_snoc_map_ce_to_irq(struct hif_softc *scn, int ce_id);
50 bool hif_snoc_needs_bmi(struct hif_softc *scn);
51 #endif /* _SNOC_API_H_ */
52