xref: /linux/drivers/net/wireless/ath/ath11k/mhi.h (revision 0be3ff0c)
1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
2 /*
3  * Copyright (c) 2020 The Linux Foundation. All rights reserved.
4  */
5 #ifndef _ATH11K_MHI_H
6 #define _ATH11K_MHI_H
7 
8 #include "pci.h"
9 
10 #define PCIE_TXVECDB				0x360
11 #define PCIE_TXVECSTATUS			0x368
12 #define PCIE_RXVECDB				0x394
13 #define PCIE_RXVECSTATUS			0x39C
14 
15 #define MHISTATUS				0x48
16 #define MHICTRL					0x38
17 #define MHICTRL_RESET_MASK			0x2
18 
19 enum ath11k_mhi_state {
20 	ATH11K_MHI_INIT,
21 	ATH11K_MHI_DEINIT,
22 	ATH11K_MHI_POWER_ON,
23 	ATH11K_MHI_POWER_OFF,
24 	ATH11K_MHI_FORCE_POWER_OFF,
25 	ATH11K_MHI_SUSPEND,
26 	ATH11K_MHI_RESUME,
27 	ATH11K_MHI_TRIGGER_RDDM,
28 	ATH11K_MHI_RDDM,
29 	ATH11K_MHI_RDDM_DONE,
30 };
31 
32 int ath11k_mhi_start(struct ath11k_pci *ar_pci);
33 void ath11k_mhi_stop(struct ath11k_pci *ar_pci);
34 int ath11k_mhi_register(struct ath11k_pci *ar_pci);
35 void ath11k_mhi_unregister(struct ath11k_pci *ar_pci);
36 void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab);
37 void ath11k_mhi_clear_vector(struct ath11k_base *ab);
38 
39 void ath11k_mhi_suspend(struct ath11k_pci *ar_pci);
40 void ath11k_mhi_resume(struct ath11k_pci *ar_pci);
41 
42 #endif
43