PCI/ASPM: Simplify Clock Power Management setting
Update the Link Control Enable Clock Power Management bit the same way we update the ASPM Control bits, with a single call of pcie_capability_clear_and_set_word(). No functional change; this just makes both paths use the same style. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
777e61ea40
commit
0c0cbb6c5a
@ -127,15 +127,12 @@ static void pcie_set_clkpm_nocheck(struct pcie_link_state *link, int enable)
|
|||||||
{
|
{
|
||||||
struct pci_dev *child;
|
struct pci_dev *child;
|
||||||
struct pci_bus *linkbus = link->pdev->subordinate;
|
struct pci_bus *linkbus = link->pdev->subordinate;
|
||||||
|
u32 val = enable ? PCI_EXP_LNKCTL_CLKREQ_EN : 0;
|
||||||
|
|
||||||
list_for_each_entry(child, &linkbus->devices, bus_list) {
|
list_for_each_entry(child, &linkbus->devices, bus_list)
|
||||||
if (enable)
|
pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL,
|
||||||
pcie_capability_set_word(child, PCI_EXP_LNKCTL,
|
PCI_EXP_LNKCTL_CLKREQ_EN,
|
||||||
PCI_EXP_LNKCTL_CLKREQ_EN);
|
val);
|
||||||
else
|
|
||||||
pcie_capability_clear_word(child, PCI_EXP_LNKCTL,
|
|
||||||
PCI_EXP_LNKCTL_CLKREQ_EN);
|
|
||||||
}
|
|
||||||
link->clkpm_enabled = !!enable;
|
link->clkpm_enabled = !!enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user