Re: [PATCH v3 07/13] ARM: shmobile: R-Mobile: Use generic_pm_domain.attach_dev() for pm_clk setup
From: Geert Uytterhoeven
Date: Fri Oct 03 2014 - 12:01:30 EST
On Fri, 26 Sep 2014, Geert Uytterhoeven wrote:
> On Thu, Sep 25, 2014 at 6:28 PM, Geert Uytterhoeven
> <geert+renesas@xxxxxxxxx> wrote:
> > diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
> > index 717e6413d29cb998..ae846dfcd69293f7 100644
> > --- a/arch/arm/mach-shmobile/pm-rmobile.c
> > +++ b/arch/arm/mach-shmobile/pm-rmobile.c
> > @@ -101,6 +101,17 @@ static bool rmobile_pd_active_wakeup(struct device *dev)
> > return true;
> > }
> >
> > +static void rmobile_pd_attach_dev(struct device *dev)
> > +{
> > + if (pm_clk_no_clocks(dev))
> > + pm_clk_add(dev, NULL);
>
> With !CONFIG_PM_RUNTIME, this doesn't work well in the DT case,
> as the clocks are no longer enabled by runtime PM
> (some clocks may have been enabled by boot loader/reset state though).
>
> In the legacy case, this works more or less, as genpd takes over after
> the pm_clk domain has been initialized, which implies enabling the clocks
> if !CONFIG_PM_RUNTIME.
>
> Will fix...
The patch below fixes that.
I'll update the whole series, and will repost after v3.18-rc1, after the
prerequisites are in.