#include <linux/msi.h>
#include <linux/pci.h>
#include <linux/firmware.h>
#include "core.h"
#include "debug.h"
#include "mhi.h"
#include "pci.h"
#define MHI_TIMEOUT_DEFAULT_MS …
#define OTP_INVALID_BOARD_ID …
#define OTP_VALID_DUALMAC_BOARD_ID_MASK …
#define MHI_CB_INVALID …
static const struct mhi_channel_config ath12k_mhi_channels_qcn9274[] = …;
static struct mhi_event_config ath12k_mhi_events_qcn9274[] = …;
const struct mhi_controller_config ath12k_mhi_config_qcn9274 = …;
static const struct mhi_channel_config ath12k_mhi_channels_wcn7850[] = …;
static struct mhi_event_config ath12k_mhi_events_wcn7850[] = …;
const struct mhi_controller_config ath12k_mhi_config_wcn7850 = …;
void ath12k_mhi_set_mhictrl_reset(struct ath12k_base *ab)
{ … }
static void ath12k_mhi_reset_txvecdb(struct ath12k_base *ab)
{ … }
static void ath12k_mhi_reset_txvecstatus(struct ath12k_base *ab)
{ … }
static void ath12k_mhi_reset_rxvecdb(struct ath12k_base *ab)
{ … }
static void ath12k_mhi_reset_rxvecstatus(struct ath12k_base *ab)
{ … }
void ath12k_mhi_clear_vector(struct ath12k_base *ab)
{ … }
static int ath12k_mhi_get_msi(struct ath12k_pci *ab_pci)
{ … }
static int ath12k_mhi_op_runtime_get(struct mhi_controller *mhi_cntrl)
{ … }
static void ath12k_mhi_op_runtime_put(struct mhi_controller *mhi_cntrl)
{ … }
static char *ath12k_mhi_op_callback_to_str(enum mhi_callback reason)
{ … }
static void ath12k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl,
enum mhi_callback cb)
{ … }
static int ath12k_mhi_op_read_reg(struct mhi_controller *mhi_cntrl,
void __iomem *addr,
u32 *out)
{ … }
static void ath12k_mhi_op_write_reg(struct mhi_controller *mhi_cntrl,
void __iomem *addr,
u32 val)
{ … }
int ath12k_mhi_register(struct ath12k_pci *ab_pci)
{ … }
void ath12k_mhi_unregister(struct ath12k_pci *ab_pci)
{ … }
static char *ath12k_mhi_state_to_str(enum ath12k_mhi_state mhi_state)
{
switch (mhi_state) {
case ATH12K_MHI_INIT:
return "INIT";
case ATH12K_MHI_DEINIT:
return "DEINIT";
case ATH12K_MHI_POWER_ON:
return "POWER_ON";
case ATH12K_MHI_POWER_OFF:
return "POWER_OFF";
case ATH12K_MHI_POWER_OFF_KEEP_DEV:
return "POWER_OFF_KEEP_DEV";
case ATH12K_MHI_FORCE_POWER_OFF:
return "FORCE_POWER_OFF";
case ATH12K_MHI_SUSPEND:
return "SUSPEND";
case ATH12K_MHI_RESUME:
return "RESUME";
case ATH12K_MHI_TRIGGER_RDDM:
return "TRIGGER_RDDM";
case ATH12K_MHI_RDDM_DONE:
return "RDDM_DONE";
default:
return "UNKNOWN";
}
};
static void ath12k_mhi_set_state_bit(struct ath12k_pci *ab_pci,
enum ath12k_mhi_state mhi_state)
{ … }
static int ath12k_mhi_check_state_bit(struct ath12k_pci *ab_pci,
enum ath12k_mhi_state mhi_state)
{ … }
static int ath12k_mhi_set_state(struct ath12k_pci *ab_pci,
enum ath12k_mhi_state mhi_state)
{ … }
int ath12k_mhi_start(struct ath12k_pci *ab_pci)
{ … }
void ath12k_mhi_stop(struct ath12k_pci *ab_pci, bool is_suspend)
{ … }
void ath12k_mhi_suspend(struct ath12k_pci *ab_pci)
{ … }
void ath12k_mhi_resume(struct ath12k_pci *ab_pci)
{ … }