| 1 |
/* SPDX-License-Identifier: BSD-3-Clause-Clear */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. |
| 4 |
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. |
| 5 |
*/ |
| 6 |
#ifndef _ATH12K_MHI_H |
| 7 |
#define _ATH12K_MHI_H |
| 8 |
|
| 9 |
#include "pci.h" |
| 10 |
|
| 11 |
#define PCIE_TXVECDB 0x360 |
| 12 |
#define PCIE_TXVECSTATUS 0x368 |
| 13 |
#define PCIE_RXVECDB 0x394 |
| 14 |
#define PCIE_RXVECSTATUS 0x39C |
| 15 |
|
| 16 |
#define MHISTATUS 0x48 |
| 17 |
#define MHICTRL 0x38 |
| 18 |
#define MHICTRL_RESET_MASK 0x2 |
| 19 |
|
| 20 |
enum ath12k_mhi_state { |
| 21 |
ATH12K_MHI_INIT, |
| 22 |
ATH12K_MHI_DEINIT, |
| 23 |
ATH12K_MHI_POWER_ON, |
| 24 |
ATH12K_MHI_POWER_OFF, |
| 25 |
ATH12K_MHI_POWER_OFF_KEEP_DEV, |
| 26 |
ATH12K_MHI_FORCE_POWER_OFF, |
| 27 |
ATH12K_MHI_SUSPEND, |
| 28 |
ATH12K_MHI_RESUME, |
| 29 |
ATH12K_MHI_TRIGGER_RDDM, |
| 30 |
ATH12K_MHI_RDDM, |
| 31 |
ATH12K_MHI_RDDM_DONE, |
| 32 |
}; |
| 33 |
|
| 34 |
int ath12k_mhi_start(struct ath12k_pci *ar_pci); |
| 35 |
void ath12k_mhi_stop(struct ath12k_pci *ar_pci, bool is_suspend); |
| 36 |
int ath12k_mhi_register(struct ath12k_pci *ar_pci); |
| 37 |
void ath12k_mhi_unregister(struct ath12k_pci *ar_pci); |
| 38 |
void ath12k_mhi_set_mhictrl_reset(struct ath12k_base *ab); |
| 39 |
void ath12k_mhi_clear_vector(struct ath12k_base *ab); |
| 40 |
|
| 41 |
void ath12k_mhi_suspend(struct ath12k_pci *ar_pci); |
| 42 |
void ath12k_mhi_resume(struct ath12k_pci *ar_pci); |
| 43 |
void ath12k_mhi_coredump(struct mhi_controller *mhi_ctrl, bool in_panic); |
| 44 |
#endif |