From: Hong jinkun <jinkun.hong@rock-chips.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, Russell King <linux@arm.linux.org.uk>, Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, Grant Likely <grant.likely@linaro.org>, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>, linux-doc@vger.kernel.org, dianders@chromium.org, Heiko Stuebner <heiko@sntech.de>, linux-rockchip@lists.infradead.org, Ulf Hansson <ulf.hansson@linaro.org>, Jack Dai <jack.dai@rock-chips.com> Subject: Re: [PATCH v7 1/3] power-domain: add power domain drivers for Rockchip platform Date: Wed, 29 Oct 2014 09:00:09 +0800 [thread overview] Message-ID: <54503C19.9060607@rock-chips.com> (raw) In-Reply-To: <20141027233904.GD7594@dtor-ws> 在 2014/10/28 7:39, Dmitry Torokhov 写道: > On Fri, Oct 24, 2014 at 09:44:31AM -0700, Dmitry Torokhov wrote: >> Hi Jinkun, >> >> On Fri, Oct 24, 2014 at 12:29:19AM -0700, jinkun.hong wrote: >>> +static int rockchip_pd_power(struct rockchip_domain *pd, bool power_on) >>> +{ >>> + int ret = 0; >>> + struct rockchip_dev_entry *de; >>> + >>> + mutex_lock(&pd->dev_lock); >>> + /* no clk, set power domain will fail */ >>> + if (list_empty(&pd->dev_list)) { >>> + pr_err("%s: no devices in %s power domain\n", __func__, >>> + pd->base.name); >>> + goto out; >>> + } >>> + >>> + list_for_each_entry(de, &pd->dev_list, node) { >>> + pm_clk_resume(de->dev); >>> + } >>> + >>> + ret = rockchip_pmu_set_power_domain(pd, power_on); >>> + >>> + list_for_each_entry(de, &pd->dev_list, node) { >>> + pm_clk_suspend(de->dev); >>> + } >>> +out: >>> + mutex_unlock(&pd->dev_lock); >>> + return ret; >>> +} >> For my education, could you please tell me why we need to enable all >> clocks of all devices in a power domain when we are talking to the PMU >> and then turn them immediately off? Sorry for late reply.RK3288 reset circuit are first asynchronous reset and then sync revoked. All reset revocation actions are needed to synchronize the clocks. If there is no clock open, power_up reset will cause the corresponding reset can not be undone, there will be risks. >> Would not we want to enable clocks >> in start()) callbacks, like Ulf mentioned? Can you tell me which one patch it. Thank you! > Jinkun, any update on this question? > > Thanks. >
WARNING: multiple messages have this Message-ID (diff)
From: jinkun.hong@rock-chips.com (Hong jinkun) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 1/3] power-domain: add power domain drivers for Rockchip platform Date: Wed, 29 Oct 2014 09:00:09 +0800 [thread overview] Message-ID: <54503C19.9060607@rock-chips.com> (raw) In-Reply-To: <20141027233904.GD7594@dtor-ws> ? 2014/10/28 7:39, Dmitry Torokhov ??: > On Fri, Oct 24, 2014 at 09:44:31AM -0700, Dmitry Torokhov wrote: >> Hi Jinkun, >> >> On Fri, Oct 24, 2014 at 12:29:19AM -0700, jinkun.hong wrote: >>> +static int rockchip_pd_power(struct rockchip_domain *pd, bool power_on) >>> +{ >>> + int ret = 0; >>> + struct rockchip_dev_entry *de; >>> + >>> + mutex_lock(&pd->dev_lock); >>> + /* no clk, set power domain will fail */ >>> + if (list_empty(&pd->dev_list)) { >>> + pr_err("%s: no devices in %s power domain\n", __func__, >>> + pd->base.name); >>> + goto out; >>> + } >>> + >>> + list_for_each_entry(de, &pd->dev_list, node) { >>> + pm_clk_resume(de->dev); >>> + } >>> + >>> + ret = rockchip_pmu_set_power_domain(pd, power_on); >>> + >>> + list_for_each_entry(de, &pd->dev_list, node) { >>> + pm_clk_suspend(de->dev); >>> + } >>> +out: >>> + mutex_unlock(&pd->dev_lock); >>> + return ret; >>> +} >> For my education, could you please tell me why we need to enable all >> clocks of all devices in a power domain when we are talking to the PMU >> and then turn them immediately off? Sorry for late reply.RK3288 reset circuit are first asynchronous reset and then sync revoked. All reset revocation actions are needed to synchronize the clocks. If there is no clock open, power_up reset will cause the corresponding reset can not be undone, there will be risks. >> Would not we want to enable clocks >> in start()) callbacks, like Ulf mentioned? Can you tell me which one patch it. Thank you! > Jinkun, any update on this question? > > Thanks. >
next prev parent reply other threads:[~2014-10-29 1:00 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-24 7:29 [PATCH v7 0/3] ARM: rk3288 : Add PM Domain support jinkun.hong 2014-10-24 7:29 ` jinkun.hong 2014-10-24 7:29 ` [PATCH v7 1/3] power-domain: add power domain drivers for Rockchip platform jinkun.hong 2014-10-24 7:29 ` jinkun.hong 2014-10-24 16:44 ` Dmitry Torokhov 2014-10-24 16:44 ` Dmitry Torokhov 2014-10-27 23:39 ` Dmitry Torokhov 2014-10-27 23:39 ` Dmitry Torokhov 2014-10-29 1:00 ` Hong jinkun [this message] 2014-10-29 1:00 ` Hong jinkun 2014-10-29 10:26 ` Eddie Cai(蔡枫) 2014-10-24 7:29 ` [PATCH v7 2/3] dt-bindings: add document of Rockchip power domain jinkun.hong 2014-10-24 7:29 ` jinkun.hong 2014-10-24 7:29 ` [PATCH v7 3/3] ARM: dts: add rk3288 power-domain node jinkun.hong 2014-10-24 7:29 ` jinkun.hong 2014-10-31 18:03 ` [PATCH v7 0/3] ARM: rk3288 : Add PM Domain support Doug Anderson 2014-10-31 18:03 ` Doug Anderson 2014-10-31 18:03 ` Doug Anderson 2014-10-31 18:32 ` Dmitry Torokhov 2014-10-31 18:32 ` Dmitry Torokhov 2014-10-31 18:32 ` Dmitry Torokhov 2014-11-03 15:41 ` Kever Yang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=54503C19.9060607@rock-chips.com \ --to=jinkun.hong@rock-chips.com \ --cc=devicetree@vger.kernel.org \ --cc=dianders@chromium.org \ --cc=dmitry.torokhov@gmail.com \ --cc=galak@codeaurora.org \ --cc=grant.likely@linaro.org \ --cc=heiko@sntech.de \ --cc=ijc+devicetree@hellion.org.uk \ --cc=jack.dai@rock-chips.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=linux@arm.linux.org.uk \ --cc=mark.rutland@arm.com \ --cc=pawel.moll@arm.com \ --cc=rdunlap@infradead.org \ --cc=robh+dt@kernel.org \ --cc=ulf.hansson@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.