Skip to content

Commit 6af7775

Browse files
P33Mpelwell
authored andcommitted
PCI: brcmstb: don't use ASPM state defines for register bits
In commit b478e16 ("PCI/ASPM: Consolidate link state defines") PCIE_LINK_STATE_L1 and PCIE_LINK_STATE_L0s grew some bits for more granular control of ASPM. This broke the aspm-no-l0s override, instead disabling link ASPM completely if this DT property was specified. Just open-code the link capability register field bits. Fixes: caab002 ("PCI: brcmstb: Disable L0s component of ASPM if requested") Fixes: 0693b42 ("PCI: brcmstb: Split post-link up initialization to brcm_pcie_start_link()") Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
1 parent b4d81db commit 6af7775

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,10 +1539,11 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
15391539
tmp &= ~PCIE_MISC_RC_BAR3_CONFIG_LO_SIZE_MASK;
15401540
writel(tmp, base + PCIE_MISC_RC_BAR3_CONFIG_LO);
15411541

1542-
/* Don't advertise L0s capability if 'aspm-no-l0s' */
1543-
aspm_support = PCIE_LINK_STATE_L1;
1542+
/* Always advertise L1 capability */
1543+
aspm_support = BIT(1);
1544+
/* Advertise L0s capability unless 'aspm-no-l0s' is set */
15441545
if (!of_property_read_bool(pcie->np, "aspm-no-l0s"))
1545-
aspm_support |= PCIE_LINK_STATE_L0S;
1546+
aspm_support |= BIT(0);
15461547
tmp = readl(base + PCIE_RC_CFG_PRIV1_LINK_CAPABILITY);
15471548
u32p_replace_bits(&tmp, aspm_support,
15481549
PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK);

0 commit comments

Comments
 (0)