RE: [RFC] Runtime PM on the RZ/A series is never going to work right

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

On Wednesday, January 25, 2017, Geert Uytterhoeven wrote:
> >> I think you can handle that in drivers/clk/renesas/clk-mstp.c:
> >>   - in cpg_mstp_attach_dev(), add a call to pm_clk_resume(dev) after
> the
> >>     call to pm_clk_add_clk(),
> >>   - in cpg_mstp_detach_dev(), add a call to pm_clk_suspend(dev) before
> the
> >>     call to pm_clk_destroy().
> >> Yes, that means the module clocks are enabled all the time.
> >> Of course when running on RZ/A1H ;-)
> >
> > That might be OK.
> 
> Forgot to mention: you should also no longer set GENPD_FLAG_PM_CLK in
> cpg_mstp_add_clk_domain(). The flag won't hurt, it will just cause extra
> code to be executed.

So to be clear before I start hacking away, your suggestion here is
to do this ONLY for RZ/A1 so I don't screw up any other SoCs, right?

For example:

int cpg_mstp_attach_dev()
{
	...

	error = pm_clk_add_clk(dev, clk);
	if (error) {
		dev_err(dev, "pm_clk_add_clk %pC failed %d\n", clk, error);
		goto fail_destroy;
	}

+	if (of_device_is_compatible(np, "renesas,r7s72100-mstp-clocks"))
+		pm_clk_suspend(dev);

	...
}

Then, this would be OK to submit until I find some other way to do stable
runtime pm for RZ/A1? (which might not be possible...unless I put in the
silly delay)

A that point, any peripheral I use (status="okay") will stay on, but the
ones I don't use will stay off, correct?


Thank you,
Chris






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux