On 5/2/12, Rafael J. Wysocki <r...@sisk.pl> wrote:
> On Sunday, April 29, 2012, Rafael J. Wysocki wrote:
>> On Friday, April 06, 2012, Marek Szyprowski wrote:
>> > Some bootloaders disable power domains on boot and the platform startup
>> > code registers them in the 'disabled' state. Current gen_pd code
>> > assumed
>> > that the devices can be registered only to the power domain which is in
>> > 'enabled' state and these devices are active at the time of the
>> > registration. This is not correct in our case. This patch lets drivers
>> > to be registered into 'disabled' power domains and finally solves
>> > mysterious freezes and lack of resume/suspend calls on Samsung Exynos4
>> > NURI and UniversalC210 platforms.
>> >
>> > Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>> > Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>
>> > ---
>> >  drivers/base/power/domain.c |    7 +------
>> >  1 files changed, 1 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
>> > index 73ce9fb..05f5799f 100644
>> > --- a/drivers/base/power/domain.c
>> > +++ b/drivers/base/power/domain.c
>> > @@ -1211,11 +1211,6 @@ int __pm_genpd_add_device(struct
>> > generic_pm_domain *genpd, struct device *dev,
>> >
>> >    genpd_acquire_lock(genpd);
>> >
>> > -  if (genpd->status == GPD_STATE_POWER_OFF) {
>> > -          ret = -EINVAL;
>> > -          goto out;
>> > -  }
>> > -
>> >    if (genpd->prepared_count > 0) {
>> >            ret = -EAGAIN;
>> >            goto out;
>> > @@ -1239,7 +1234,7 @@ int __pm_genpd_add_device(struct generic_pm_domain
>> > *genpd, struct device *dev,
>> >    dev_pm_get_subsys_data(dev);
>> >    dev->power.subsys_data->domain_data = &gpd_data->base;
>> >    gpd_data->base.dev = dev;
>> > -  gpd_data->need_restore = false;
>> > +  gpd_data->need_restore = true;
>>
>> I think that should be:
>>
>> +    gpd_data->need_restore = genpd->status == GPD_STATE_POWER_OFF;
>>
>> Otherwise, on the next domain power off the device's state won't be
>> saved.
>
> Ping?
Hi Rafael,

Now Marek is on vacation util 6 May. He'll answer at that time.
Sorry.

Thank you,
Kyungmin Park
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to