diff mbox series

PCI: apple: Enable clock gating

Message ID 20211117141916.197192-1-marcan@marcan.st
State New
Headers show
Series PCI: apple: Enable clock gating | expand

Commit Message

Hector Martin Nov. 17, 2021, 2:19 p.m. UTC
These pokes are not required to make the PCIe port work, but it sounds
like this should save some power at least.

Signed-off-by: Hector Martin <marcan@marcan.st>
---
 drivers/pci/controller/pcie-apple.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Marc Zyngier Nov. 17, 2021, 5:56 p.m. UTC | #1
On Wed, 17 Nov 2021 14:19:16 +0000,
Hector Martin <marcan@marcan.st> wrote:
> 
> These pokes are not required to make the PCIe port work, but it sounds
> like this should save some power at least.
> 
> Signed-off-by: Hector Martin <marcan@marcan.st>
> ---
>  drivers/pci/controller/pcie-apple.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
> index 420c291a5c68..03bfe977c579 100644
> --- a/drivers/pci/controller/pcie-apple.c
> +++ b/drivers/pci/controller/pcie-apple.c
> @@ -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;
> -- 
> 2.33.0
> 
> 

Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>

	M.
Lorenzo Pieralisi Nov. 30, 2021, 4:44 p.m. UTC | #2
On Wed, 17 Nov 2021 23:19:16 +0900, Hector Martin wrote:
> These pokes are not required to make the PCIe port work, but it sounds
> like this should save some power at least.
> 
> 

Applied to pci/apple, thanks!

[1/1] PCI: apple: Enable clock gating
      https://git.kernel.org/lpieralisi/pci/c/754bb7ad29

Thanks,
Lorenzo
diff mbox series

Patch

diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
index 420c291a5c68..03bfe977c579 100644
--- a/drivers/pci/controller/pcie-apple.c
+++ b/drivers/pci/controller/pcie-apple.c
@@ -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;