aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2015-06-10 15:00:21 -0400
committerBjorn Helgaas <bhelgaas@google.com>2015-06-10 15:00:21 -0400
commit0c0cbb6c5a04a169320df1812e58b10362865e95 (patch)
tree934e5da8eff7c0b858eab59a1a167f22a1713818
parent777e61ea40e4a94081b3123c76ea3fe977c368a2 (diff)
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>
-rw-r--r--drivers/pci/pcie/aspm.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index a84f87247d2f..317e3558a35e 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -127,15 +127,12 @@ static void pcie_set_clkpm_nocheck(struct pcie_link_state *link, int enable)
127{ 127{
128 struct pci_dev *child; 128 struct pci_dev *child;
129 struct pci_bus *linkbus = link->pdev->subordinate; 129 struct pci_bus *linkbus = link->pdev->subordinate;
130 u32 val = enable ? PCI_EXP_LNKCTL_CLKREQ_EN : 0;
130 131
131 list_for_each_entry(child, &linkbus->devices, bus_list) { 132 list_for_each_entry(child, &linkbus->devices, bus_list)
132 if (enable) 133 pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL,
133 pcie_capability_set_word(child, PCI_EXP_LNKCTL, 134 PCI_EXP_LNKCTL_CLKREQ_EN,
134 PCI_EXP_LNKCTL_CLKREQ_EN); 135 val);
135 else
136 pcie_capability_clear_word(child, PCI_EXP_LNKCTL,
137 PCI_EXP_LNKCTL_CLKREQ_EN);
138 }
139 link->clkpm_enabled = !!enable; 136 link->clkpm_enabled = !!enable;
140} 137}
141 138