xref: /wlan-dirver/qca-wifi-host-cmn/hif/src/dispatcher/snoc_api.h (revision 4865edfd190c086bbe2c69aae12a8226f877b91e)
1 /*
2  * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _SNOC_API_H_
20 #define _SNOC_API_H_
21 QDF_STATUS hif_snoc_open(struct hif_softc *hif_ctx,
22 			 enum qdf_bus_type bus_type);
23 void hif_snoc_close(struct hif_softc *hif_ctx);
24 int hif_snoc_bus_suspend(struct hif_softc *hif_ctx);
25 int hif_snoc_bus_resume(struct hif_softc *hif_ctx);
26 int hif_snoc_bus_suspend_noirq(struct hif_softc *scn);
27 void hif_snoc_disable_isr(struct hif_softc *hif_ctx);
28 void hif_snoc_nointrs(struct hif_softc *scn);
29 QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
30 			  struct device *dev, void *bdev,
31 			  const struct hif_bus_id *bid,
32 			  enum hif_enable_type type);
33 void hif_snoc_disable_bus(struct hif_softc *scn);
34 int hif_snoc_bus_configure(struct hif_softc *scn);
35 void hif_snoc_irq_disable(struct hif_softc *scn, int ce_id);
36 void hif_snoc_irq_enable(struct hif_softc *scn, int ce_id);
37 int hif_snoc_dump_registers(struct hif_softc *scn);
38 void hif_snoc_display_stats(struct hif_softc *hif_ctx);
39 void hif_snoc_clear_stats(struct hif_softc *hif_ctx);
40 int hif_snoc_map_ce_to_irq(struct hif_softc *scn, int ce_id);
41 bool hif_snoc_needs_bmi(struct hif_softc *scn);
42 #endif /* _SNOC_API_H_ */
43