OSDN Git Service

PCI: apple: Enable clock gating
authorHector Martin <marcan@marcan.st>
Wed, 17 Nov 2021 14:19:16 +0000 (23:19 +0900)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 30 Nov 2021 16:43:15 +0000 (16:43 +0000)
These pokes are not required to make the PCIe port work, but it sounds
like this should save some power at least.

Link: https://lore.kernel.org/r/20211117141916.197192-1-marcan@marcan.st
Tested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
drivers/pci/controller/pcie-apple.c

index 1bf4d75..fa5e9c3 100644 (file)
@@ -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;