Skip to contentSkip to conversation

PCI: apple: Enable clock gating

PATCH Applied Hector Martin 3 participants 3 messages Nov 17, 2021 – Nov 30, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: apple: Enable clock gating

These pokes are not required to make the PCIe port work, but it sounds like this should save some power at least.

---
 drivers/pci/controller/pcie-apple.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pci/controller/pcie-apple.c +3 -0
index 420c291a5c68..03bfe977c579 100644
@@ -553,6 +553,9 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
 		return ret;
 	}
 
+	rmw_clear(PORT_REFCLK_CGDIS, port->base + PORT_REFCLK);
+	rmw_clear(PORT_APPCLK_CGDIS, port->base + PORT_APPCLK);
+
 	ret = apple_pcie_port_setup_irq(port);
 	if (ret)
 		return ret;
Signature · 1 line
2.33.0
maintainer Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 27 lines · Hector Martin

These pokes are not required to make the PCIe port work, but it sounds like this should save some power at least.

---
 drivers/pci/controller/pcie-apple.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pci/controller/pcie-apple.c +3 -0
index 420c291a5c68..03bfe977c579 100644
@@ -553,6 +553,9 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
 		return ret;
 	}
 
+	rmw_clear(PORT_REFCLK_CGDIS, port->base + PORT_REFCLK);
+	rmw_clear(PORT_APPCLK_CGDIS, port->base + PORT_APPCLK);
+
 	ret = apple_pcie_port_setup_irq(port);
 	if (ret)
 		return ret;
Signature · 1 line
2.33.0
	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.