#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interconnect.h>
#include <linux/mfd/syscon.h>
#include <linux/phy/pcie.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/module.h>
#include "../../pci.h"
#include "pcie-designware.h"
#include "pcie-qcom-common.h"
#define PARF_SYS_CTRL …
#define PARF_DB_CTRL …
#define PARF_PM_CTRL …
#define PARF_MHI_CLOCK_RESET_CTRL …
#define PARF_MHI_BASE_ADDR_LOWER …
#define PARF_MHI_BASE_ADDR_UPPER …
#define PARF_DEBUG_INT_EN …
#define PARF_AXI_MSTR_RD_HALT_NO_WRITES …
#define PARF_AXI_MSTR_WR_ADDR_HALT …
#define PARF_Q2A_FLUSH …
#define PARF_LTSSM …
#define PARF_CFG_BITS …
#define PARF_INT_ALL_STATUS …
#define PARF_INT_ALL_CLEAR …
#define PARF_INT_ALL_MASK …
#define PARF_SLV_ADDR_MSB_CTRL …
#define PARF_DBI_BASE_ADDR …
#define PARF_DBI_BASE_ADDR_HI …
#define PARF_SLV_ADDR_SPACE_SIZE …
#define PARF_SLV_ADDR_SPACE_SIZE_HI …
#define PARF_NO_SNOOP_OVERIDE …
#define PARF_ATU_BASE_ADDR …
#define PARF_ATU_BASE_ADDR_HI …
#define PARF_SRIS_MODE …
#define PARF_DEBUG_CNT_PM_LINKST_IN_L2 …
#define PARF_DEBUG_CNT_PM_LINKST_IN_L1 …
#define PARF_DEBUG_CNT_PM_LINKST_IN_L0S …
#define PARF_DEBUG_CNT_AUX_CLK_IN_L1SUB_L1 …
#define PARF_DEBUG_CNT_AUX_CLK_IN_L1SUB_L2 …
#define PARF_DEVICE_TYPE …
#define PARF_BDF_TO_SID_CFG …
#define PARF_INT_ALL_5_MASK …
#define PARF_INT_ALL_LINK_DOWN …
#define PARF_INT_ALL_BME …
#define PARF_INT_ALL_PM_TURNOFF …
#define PARF_INT_ALL_DEBUG …
#define PARF_INT_ALL_LTR …
#define PARF_INT_ALL_MHI_Q6 …
#define PARF_INT_ALL_MHI_A7 …
#define PARF_INT_ALL_DSTATE_CHANGE …
#define PARF_INT_ALL_L1SUB_TIMEOUT …
#define PARF_INT_ALL_MMIO_WRITE …
#define PARF_INT_ALL_CFG_WRITE …
#define PARF_INT_ALL_BRIDGE_FLUSH_N …
#define PARF_INT_ALL_LINK_UP …
#define PARF_INT_ALL_AER_LEGACY …
#define PARF_INT_ALL_PLS_ERR …
#define PARF_INT_ALL_PME_LEGACY …
#define PARF_INT_ALL_PLS_PME …
#define PARF_INT_ALL_EDMA …
#define PARF_BDF_TO_SID_BYPASS …
#define PARF_DEBUG_INT_PM_DSTATE_CHANGE …
#define PARF_DEBUG_INT_CFG_BUS_MASTER_EN …
#define PARF_DEBUG_INT_RADM_PM_TURNOFF …
#define WR_NO_SNOOP_OVERIDE_EN …
#define RD_NO_SNOOP_OVERIDE_EN …
#define PARF_DEVICE_TYPE_EP …
#define PARF_PM_CTRL_REQ_EXIT_L1 …
#define PARF_PM_CTRL_READY_ENTR_L23 …
#define PARF_PM_CTRL_REQ_NOT_ENTR_L1 …
#define PARF_MSTR_AXI_CLK_EN …
#define PARF_AXI_MSTR_RD_HALT_NO_WRITE_EN …
#define PARF_AXI_MSTR_WR_ADDR_HALT_EN …
#define PARF_Q2A_FLUSH_EN …
#define PARF_SYS_CTRL_AUX_PWR_DET …
#define PARF_SYS_CTRL_CORE_CLK_CGC_DIS …
#define PARF_SYS_CTRL_MSTR_ACLK_CGC_DIS …
#define PARF_SYS_CTRL_SLV_DBI_WAKE_DISABLE …
#define PARF_DB_CTRL_INSR_DBNCR_BLOCK …
#define PARF_DB_CTRL_RMVL_DBNCR_BLOCK …
#define PARF_DB_CTRL_DBI_WKP_BLOCK …
#define PARF_DB_CTRL_SLV_WKP_BLOCK …
#define PARF_DB_CTRL_MST_WKP_BLOCK …
#define PARF_CFG_BITS_REQ_EXIT_L1SS_MSI_LTR_EN …
#define PARF_INT_ALL_5_MHI_RAM_DATA_PARITY_ERR …
#define ELBI_SYS_STTS …
#define ELBI_CS2_ENABLE …
#define DBI_CON_STATUS …
#define DBI_CON_STATUS_POWER_STATE_MASK …
#define XMLH_LINK_UP …
#define CORE_RESET_TIME_US_MIN …
#define CORE_RESET_TIME_US_MAX …
#define WAKE_DELAY_US …
#define QCOM_PCIE_LINK_SPEED_TO_BW(speed) …
#define to_pcie_ep(x) …
enum qcom_pcie_ep_link_status { … };
struct qcom_pcie_ep_cfg { … };
struct qcom_pcie_ep { … };
static int qcom_pcie_ep_core_reset(struct qcom_pcie_ep *pcie_ep)
{ … }
static void qcom_pcie_ep_configure_tcsr(struct qcom_pcie_ep *pcie_ep)
{ … }
static int qcom_pcie_dw_link_up(struct dw_pcie *pci)
{ … }
static int qcom_pcie_dw_start_link(struct dw_pcie *pci)
{ … }
static void qcom_pcie_dw_stop_link(struct dw_pcie *pci)
{ … }
static void qcom_pcie_dw_write_dbi2(struct dw_pcie *pci, void __iomem *base,
u32 reg, size_t size, u32 val)
{ … }
static void qcom_pcie_ep_icc_update(struct qcom_pcie_ep *pcie_ep)
{ … }
static int qcom_pcie_enable_resources(struct qcom_pcie_ep *pcie_ep)
{ … }
static void qcom_pcie_disable_resources(struct qcom_pcie_ep *pcie_ep)
{ … }
static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
{ … }
static void qcom_pcie_perst_assert(struct dw_pcie *pci)
{ … }
static const struct dw_pcie_ops pci_ops = …;
static int qcom_pcie_ep_get_io_resources(struct platform_device *pdev,
struct qcom_pcie_ep *pcie_ep)
{ … }
static int qcom_pcie_ep_get_resources(struct platform_device *pdev,
struct qcom_pcie_ep *pcie_ep)
{ … }
static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq, void *data)
{ … }
static irqreturn_t qcom_pcie_ep_perst_irq_thread(int irq, void *data)
{ … }
static int qcom_pcie_ep_enable_irq_resources(struct platform_device *pdev,
struct qcom_pcie_ep *pcie_ep)
{ … }
static int qcom_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
unsigned int type, u16 interrupt_num)
{ … }
static int qcom_pcie_ep_link_transition_count(struct seq_file *s, void *data)
{ … }
static void qcom_pcie_ep_init_debugfs(struct qcom_pcie_ep *pcie_ep)
{ … }
static const struct pci_epc_features qcom_pcie_epc_features = …;
static const struct pci_epc_features *
qcom_pcie_epc_get_features(struct dw_pcie_ep *pci_ep)
{ … }
static void qcom_pcie_ep_init(struct dw_pcie_ep *ep)
{ … }
static const struct dw_pcie_ep_ops pci_ep_ops = …;
static int qcom_pcie_ep_probe(struct platform_device *pdev)
{ … }
static void qcom_pcie_ep_remove(struct platform_device *pdev)
{ … }
static const struct qcom_pcie_ep_cfg cfg_1_34_0 = …;
static const struct of_device_id qcom_pcie_ep_match[] = …;
MODULE_DEVICE_TABLE(of, qcom_pcie_ep_match);
static struct platform_driver qcom_pcie_ep_driver = …;
builtin_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;