linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] arch/sh: pcie-sh7786: set CLK_SET_TO_ENABLE on the PCIe PHY clock
@ 2018-03-26 21:25 Thomas Petazzoni
  2018-03-27  7:25 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2018-03-26 21:25 UTC (permalink / raw)
  To: linux-sh

The PCIe PHY clock (bit 0 of register SH4A_PCIEPHYCTRL) is enabled by
setting the bit, and disabled by clearing the bit, so let's use the
CLK_SET_TO_ENABLE flag to tell this to the SH clock subsystem.

Without this, the clock is effectively disabled when it's needed, and
enabled when not.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/sh/drivers/pci/pcie-sh7786.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c
index 382e7ecf4c82..29df5c6fe22c 100644
--- a/arch/sh/drivers/pci/pcie-sh7786.c
+++ b/arch/sh/drivers/pci/pcie-sh7786.c
@@ -240,6 +240,7 @@ static int __init pcie_clk_init(struct sh7786_pcie_port *port)
 	clk->parent = &fixed_pciexclkp;
 	clk->enable_reg = (void __iomem *)(chan->reg_base + SH4A_PCIEPHYCTLR);
 	clk->enable_bit = BITS_CKE;
+	clk->flags = CLK_SET_TO_ENABLE;
 
 	ret = sh_clk_mstp_register(clk, 1);
 	if (unlikely(ret < 0))
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-27  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26 21:25 [PATCH 2/5] arch/sh: pcie-sh7786: set CLK_SET_TO_ENABLE on the PCIe PHY clock Thomas Petazzoni
2018-03-27  7:25 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).