Lines Matching defs:qphy

336 static int qmp_pcie_msm8996_serdes_init(struct qmp_phy *qphy)
338 struct qcom_qmp *qmp = qphy->qmp;
339 const struct qmp_phy_cfg *cfg = qphy->cfg;
340 void __iomem *serdes = qphy->serdes;
365 static int qmp_pcie_msm8996_com_init(struct qmp_phy *qphy)
367 struct qcom_qmp *qmp = qphy->qmp;
368 const struct qmp_phy_cfg *cfg = qphy->cfg;
369 void __iomem *serdes = qphy->serdes;
418 static int qmp_pcie_msm8996_com_exit(struct qmp_phy *qphy)
420 struct qcom_qmp *qmp = qphy->qmp;
421 const struct qmp_phy_cfg *cfg = qphy->cfg;
422 void __iomem *serdes = qphy->serdes;
450 struct qmp_phy *qphy = phy_get_drvdata(phy);
451 struct qcom_qmp *qmp = qphy->qmp;
455 ret = qmp_pcie_msm8996_com_init(qphy);
464 struct qmp_phy *qphy = phy_get_drvdata(phy);
465 struct qcom_qmp *qmp = qphy->qmp;
466 const struct qmp_phy_cfg *cfg = qphy->cfg;
467 void __iomem *tx = qphy->tx;
468 void __iomem *rx = qphy->rx;
469 void __iomem *pcs = qphy->pcs;
474 qmp_pcie_msm8996_serdes_init(qphy);
476 ret = reset_control_deassert(qphy->lane_rst);
479 qphy->index);
483 ret = clk_prepare_enable(qphy->pipe_clk);
521 clk_disable_unprepare(qphy->pipe_clk);
523 reset_control_assert(qphy->lane_rst);
530 struct qmp_phy *qphy = phy_get_drvdata(phy);
531 const struct qmp_phy_cfg *cfg = qphy->cfg;
533 clk_disable_unprepare(qphy->pipe_clk);
536 qphy_setbits(qphy->pcs, cfg->regs[QPHY_SW_RESET], SW_RESET);
539 qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL],
543 qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL,
551 struct qmp_phy *qphy = phy_get_drvdata(phy);
553 reset_control_assert(qphy->lane_rst);
555 qmp_pcie_msm8996_com_exit(qphy);
714 struct qmp_phy *qphy;
717 qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL);
718 if (!qphy)
721 qphy->cfg = cfg;
722 qphy->serdes = serdes;
727 qphy->tx = devm_of_iomap(dev, np, 0, NULL);
728 if (IS_ERR(qphy->tx))
729 return PTR_ERR(qphy->tx);
731 qphy->rx = devm_of_iomap(dev, np, 1, NULL);
732 if (IS_ERR(qphy->rx))
733 return PTR_ERR(qphy->rx);
735 qphy->pcs = devm_of_iomap(dev, np, 2, NULL);
736 if (IS_ERR(qphy->pcs))
737 return PTR_ERR(qphy->pcs);
739 qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL);
740 if (IS_ERR(qphy->pipe_clk)) {
741 return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
745 qphy->lane_rst = of_reset_control_get_exclusive_by_index(np, 0);
746 if (IS_ERR(qphy->lane_rst)) {
748 return PTR_ERR(qphy->lane_rst);
751 qphy->lane_rst);
758 dev_err(dev, "failed to create qphy %d\n", ret);
762 qphy->phy = generic_phy;
763 qphy->index = id;
764 qphy->qmp = qmp;
765 qmp->phys[id] = qphy;
766 phy_set_drvdata(generic_phy, qphy);