Skip to content

Commit

Permalink
MLK-25334-2 PCI: imx: export one property to disable l1ss support or not
Browse files Browse the repository at this point in the history
Some HW boards might not support the L1.1 ASPM, although the L1.1 ASPM
is supported by the SOC chip.
So, export one property to disable L1.1 ASPM supported or not.

Signed-off-by: Richard Zhu <[email protected]>
Reviewed-by: Jun Li <[email protected]>
(cherry picked from commit 4e42c418396d545a48a4eb47a04ce73a27b0415e)
  • Loading branch information
Richard Zhu committed Mar 12, 2021
1 parent 439d54d commit 3edfbde
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/pci/controller/dwc/pci-imx6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,6 +2446,10 @@ static int imx6_pcie_probe(struct platform_device *pdev)
imx6_pcie->ext_osc = 0;
if (of_property_read_u32(node, "local-addr", &imx6_pcie->local_addr))
imx6_pcie->local_addr = 0;
if (of_property_read_bool(node, "l1ss-disabled"))
imx6_pcie->l1ss_clkreq = 0;
else
imx6_pcie->l1ss_clkreq = 1;

/* Fetch GPIOs */
imx6_pcie->clkreq_gpio = of_get_named_gpio(node, "clkreq-gpio", 0);
Expand Down Expand Up @@ -2932,6 +2936,10 @@ static void imx6_pcie_l1ss_quirk(struct pci_dev *dev)
if (!(imx6_pcie->drvdata->flags & IMX6_PCIE_FLAG_SUPPORTS_L1SS))
return;

/* Make sure the L1SS is not force disabled. */
if (imx6_pcie->l1ss_clkreq == 0)
return;

reg = dw_pcie_find_ext_capability(pci, PCI_EXT_CAP_ID_L1SS);
rc_l1sub = dw_pcie_readl_dbi(pci, reg + PCI_L1SS_CAP);

Expand Down

0 comments on commit 3edfbde

Please sign in to comment.