Skip to content

Commit 3181085

Browse files
pcie: aspm: Disable L0s\L1 for individual links
Some PCIe devices might expose L0s\L1 capability but they still might not function properly when ASPM is enabled. Hence, add support to allow individual pcie devices to advertise ASPM incompatibility through dtsi flags and prevent it's enablement. Signed-off-by: Sushrut Shree Trivedi <sushruts@qti.qualcomm.com>
1 parent 7ea01f6 commit 3181085

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/pci/pcie/aspm.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,18 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
853853
parent_lnkctl & ~PCI_EXP_LNKCTL_ASPMC);
854854
}
855855

856+
if (of_property_read_bool(child->dev.of_node, "aspm-no-l0s") ||
857+
of_property_read_bool(parent->dev.of_node, "aspm-no-l0s")) {
858+
parent->aspm_l0s_support = 0;
859+
child->aspm_l0s_support = 0;
860+
}
861+
862+
if (of_property_read_bool(child->dev.of_node, "aspm-no-l1") ||
863+
of_property_read_bool(parent->dev.of_node, "aspm-no-l1")) {
864+
parent->aspm_l1_support = 0;
865+
child->aspm_l1_support = 0;
866+
}
867+
856868
/*
857869
* Setup L0s state
858870
*

0 commit comments

Comments
 (0)