Skip to content

Commit e35d13a

Browse files
Mani-SadhasivamLorenzo Pieralisi
authored andcommitted
PCI: qcom: Use post init sequence of IP v2.3.2 for v2.4.0
The post init sequence of IP v2.4.0 is same as v2.3.2. So let's reuse the v2.3.2 sequence which now also disables hotplug capability of the controller as it is not at all supported on any SoCs making use of this IP. Link: https://lore.kernel.org/r/20230619150408.8468-8-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent 25966e7 commit e35d13a

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

drivers/pci/controller/dwc/pcie-qcom.c

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -703,34 +703,6 @@ static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie)
703703
return 0;
704704
}
705705

706-
static int qcom_pcie_post_init_2_4_0(struct qcom_pcie *pcie)
707-
{
708-
u32 val;
709-
710-
/* enable PCIe clocks and resets */
711-
val = readl(pcie->parf + PARF_PHY_CTRL);
712-
val &= ~PHY_TEST_PWR_DOWN;
713-
writel(val, pcie->parf + PARF_PHY_CTRL);
714-
715-
/* change DBI base address */
716-
writel(0, pcie->parf + PARF_DBI_BASE_ADDR);
717-
718-
/* MAC PHY_POWERDOWN MUX DISABLE */
719-
val = readl(pcie->parf + PARF_SYS_CTRL);
720-
val &= ~MAC_PHY_POWERDOWN_IN_P2_D_MUX_EN;
721-
writel(val, pcie->parf + PARF_SYS_CTRL);
722-
723-
val = readl(pcie->parf + PARF_MHI_CLOCK_RESET_CTRL);
724-
val |= BYPASS;
725-
writel(val, pcie->parf + PARF_MHI_CLOCK_RESET_CTRL);
726-
727-
val = readl(pcie->parf + PARF_AXI_MSTR_WR_ADDR_HALT_V2);
728-
val |= EN;
729-
writel(val, pcie->parf + PARF_AXI_MSTR_WR_ADDR_HALT_V2);
730-
731-
return 0;
732-
}
733-
734706
static int qcom_pcie_get_resources_2_3_3(struct qcom_pcie *pcie)
735707
{
736708
struct qcom_pcie_resources_2_3_3 *res = &pcie->res.v2_3_3;
@@ -1276,7 +1248,7 @@ static const struct qcom_pcie_ops ops_2_3_2 = {
12761248
static const struct qcom_pcie_ops ops_2_4_0 = {
12771249
.get_resources = qcom_pcie_get_resources_2_4_0,
12781250
.init = qcom_pcie_init_2_4_0,
1279-
.post_init = qcom_pcie_post_init_2_4_0,
1251+
.post_init = qcom_pcie_post_init_2_3_2,
12801252
.deinit = qcom_pcie_deinit_2_4_0,
12811253
.ltssm_enable = qcom_pcie_2_3_2_ltssm_enable,
12821254
};

0 commit comments

Comments
 (0)