linux/drivers/net/wireless/ath/ath12k/pci.h

/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
 * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 */
#ifndef ATH12K_PCI_H
#define ATH12K_PCI_H

#include <linux/mhi.h>

#include "core.h"

#define PCIE_SOC_GLOBAL_RESET
#define PCIE_SOC_GLOBAL_RESET_V

#define WLAON_WARM_SW_ENTRY
#define WLAON_SOC_RESET_CAUSE_REG

#define PCIE_Q6_COOKIE_ADDR
#define PCIE_Q6_COOKIE_DATA

/* register to wake the UMAC from power collapse */
#define PCIE_SCRATCH_0_SOC_PCIE_REG

/* register used for handshake mechanism to validate UMAC is awake */
#define PCIE_SOC_WAKE_PCIE_LOCAL_REG

#define PCIE_PCIE_PARF_LTSSM
#define PARM_LTSSM_VALUE

#define GCC_GCC_PCIE_HOT_RST
#define GCC_GCC_PCIE_HOT_RST_VAL

#define PCIE_PCIE_INT_ALL_CLEAR
#define PCIE_SMLH_REQ_RST_LINK_DOWN
#define PCIE_INT_CLEAR_ALL

#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_REG(ab)
#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_VAL
#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_MSK
#define PCIE_PCS_OSC_DTCT_CONFIG1_REG(ab)
#define PCIE_PCS_OSC_DTCT_CONFIG1_VAL
#define PCIE_PCS_OSC_DTCT_CONFIG2_REG(ab)
#define PCIE_PCS_OSC_DTCT_CONFIG2_VAL
#define PCIE_PCS_OSC_DTCT_CONFIG4_REG(ab)
#define PCIE_PCS_OSC_DTCT_CONFIG4_VAL
#define PCIE_PCS_OSC_DTCT_CONFIG_MSK

#define WLAON_QFPROM_PWR_CTRL_REG
#define QFPROM_PWR_CTRL_VDD4BLOW_MASK

#define QCN9274_QFPROM_RAW_RFA_PDET_ROW13_LSB
#define OTP_BOARD_ID_MASK

#define PCI_BAR_WINDOW0_BASE
#define PCI_BAR_WINDOW0_END
#define PCI_SOC_RANGE_MASK
#define PCI_SOC_PCI_REG_BASE
#define PCI_SOC_PCI_REG_END
#define PCI_PARF_BASE
#define PCI_PARF_END
#define PCI_MHIREGLEN_REG
#define PCI_MHI_REGION_END
#define QRTR_PCI_DOMAIN_NR_MASK
#define QRTR_PCI_BUS_NUMBER_MASK

#define ATH12K_PCI_SOC_HW_VERSION_1
#define ATH12K_PCI_SOC_HW_VERSION_2

struct ath12k_msi_user {};

struct ath12k_msi_config {};

enum ath12k_pci_flags {};

struct ath12k_pci_ops {};

struct ath12k_pci {};

static inline struct ath12k_pci *ath12k_pci_priv(struct ath12k_base *ab)
{}

int ath12k_pci_get_user_msi_assignment(struct ath12k_base *ab, char *user_name,
				       int *num_vectors, u32 *user_base_data,
				       u32 *base_vector);
int ath12k_pci_get_msi_irq(struct device *dev, unsigned int vector);
void ath12k_pci_write32(struct ath12k_base *ab, u32 offset, u32 value);
u32 ath12k_pci_read32(struct ath12k_base *ab, u32 offset);
int ath12k_pci_map_service_to_pipe(struct ath12k_base *ab, u16 service_id,
				   u8 *ul_pipe, u8 *dl_pipe);
void ath12k_pci_get_msi_address(struct ath12k_base *ab, u32 *msi_addr_lo,
				u32 *msi_addr_hi);
void ath12k_pci_get_ce_msi_idx(struct ath12k_base *ab, u32 ce_id,
			       u32 *msi_idx);
void ath12k_pci_hif_ce_irq_enable(struct ath12k_base *ab);
void ath12k_pci_hif_ce_irq_disable(struct ath12k_base *ab);
void ath12k_pci_ext_irq_enable(struct ath12k_base *ab);
void ath12k_pci_ext_irq_disable(struct ath12k_base *ab);
int ath12k_pci_hif_suspend(struct ath12k_base *ab);
int ath12k_pci_hif_resume(struct ath12k_base *ab);
void ath12k_pci_stop(struct ath12k_base *ab);
int ath12k_pci_start(struct ath12k_base *ab);
int ath12k_pci_power_up(struct ath12k_base *ab);
void ath12k_pci_power_down(struct ath12k_base *ab, bool is_suspend);
#endif /* ATH12K_PCI_H */