#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include "phy-qcom-qmp-common.h"
#include "phy-qcom-qmp.h"
#define PLL_READY_GATE_EN …
#define PCS_READY …
#define PHY_INIT_COMPLETE_TIMEOUT …
#define POWER_DOWN_DELAY_US_MIN …
#define POWER_DOWN_DELAY_US_MAX …
enum qphy_reg_layout { … };
static const unsigned int pciephy_regs_layout[QPHY_LAYOUT_SIZE] = …;
static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = …;
static const struct qmp_phy_init_tbl msm8996_pcie_tx_tbl[] = …;
static const struct qmp_phy_init_tbl msm8996_pcie_rx_tbl[] = …;
static const struct qmp_phy_init_tbl msm8996_pcie_pcs_tbl[] = …;
struct qmp_phy_cfg { … };
struct qmp_phy { … };
struct qcom_qmp { … };
static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val)
{ … }
static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val)
{ … }
static const char * const msm8996_phy_clk_l[] = …;
static const char * const msm8996_pciephy_reset_l[] = …;
static const char * const qmp_phy_vreg_l[] = …;
static const struct qmp_phy_cfg msm8996_pciephy_cfg = …;
static int qmp_pcie_msm8996_serdes_init(struct qmp_phy *qphy)
{ … }
static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy)
{ … }
static int qmp_pcie_msm8996_com_exit(struct qmp_phy *qphy)
{ … }
static int qmp_pcie_msm8996_init(struct phy *phy)
{ … }
static int qmp_pcie_msm8996_power_on(struct phy *phy)
{ … }
static int qmp_pcie_msm8996_power_off(struct phy *phy)
{ … }
static int qmp_pcie_msm8996_exit(struct phy *phy)
{ … }
static int qmp_pcie_msm8996_enable(struct phy *phy)
{ … }
static int qmp_pcie_msm8996_disable(struct phy *phy)
{ … }
static int qmp_pcie_msm8996_vreg_init(struct device *dev, const struct qmp_phy_cfg *cfg)
{ … }
static int qmp_pcie_msm8996_reset_init(struct device *dev, const struct qmp_phy_cfg *cfg)
{ … }
static int qmp_pcie_msm8996_clk_init(struct device *dev, const struct qmp_phy_cfg *cfg)
{ … }
static void phy_clk_release_provider(void *res)
{ … }
static int phy_pipe_clk_register(struct qcom_qmp *qmp, struct device_node *np)
{ … }
static const struct phy_ops qmp_pcie_msm8996_ops = …;
static void qcom_qmp_reset_control_put(void *data)
{ … }
static int qmp_pcie_msm8996_create(struct device *dev, struct device_node *np, int id,
void __iomem *serdes, const struct qmp_phy_cfg *cfg)
{ … }
static const struct of_device_id qmp_pcie_msm8996_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, qmp_pcie_msm8996_of_match_table);
static int qmp_pcie_msm8996_probe(struct platform_device *pdev)
{ … }
static struct platform_driver qmp_pcie_msm8996_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;