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