From: Rajendra Nayak <rnayak@ti.com> To: linux-omap@vger.kernel.org Cc: paul@pwsan.com, khilman@ti.com, b-cousson@ti.com, santosh.shilimkar@ti.com, linux-arm-kernel@lists.infradead.org, Rajendra Nayak <rnayak@ti.com> Subject: [PATCH 1/8] OMAP2+: clockdomain: Add an api to read idle mode Date: Thu, 9 Jun 2011 16:24:06 +0530 [thread overview] Message-ID: <1307616853-28395-2-git-send-email-rnayak@ti.com> (raw) In-Reply-To: <1307616853-28395-1-git-send-email-rnayak@ti.com> Add a clockdomain api to check if hardware supervised idle transitions are enabled on a clockdomain. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clockdomain.c | 21 +++++++++++++++++++++ arch/arm/mach-omap2/clockdomain.h | 3 +++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 6cb6c03..2ab3686 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -795,6 +795,27 @@ void clkdm_deny_idle(struct clockdomain *clkdm) arch_clkdm->clkdm_deny_idle(clkdm); } +/** + * clkdm_is_idle - Check if the clkdm hwsup/autoidle is enabled + * @clkdm: struct clockdomain * + * + * Returns true if the clockdomain is in hardware-supervised + * idle mode, or 0 otherwise. + * + */ +int clkdm_is_idle(struct clockdomain *clkdm) +{ + if (!clkdm) + return -EINVAL; + + if (!arch_clkdm || !arch_clkdm->clkdm_is_idle) + return -EINVAL; + + pr_debug("clockdomain: reading idle state for %s\n", clkdm->name); + + return arch_clkdm->clkdm_is_idle(clkdm); +} + /* Clockdomain-to-clock framework interface code */ diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 5823584..085ed82 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -138,6 +138,7 @@ struct clockdomain { * @clkdm_wakeup: Force a clockdomain to wakeup * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain + * @clkdm_is_idle: Check if hw supervised idle transitions are enabled * @clkdm_clk_enable: Put the clkdm in right state for a clock enable * @clkdm_clk_disable: Put the clkdm in right state for a clock disable */ @@ -154,6 +155,7 @@ struct clkdm_ops { int (*clkdm_wakeup)(struct clockdomain *clkdm); void (*clkdm_allow_idle)(struct clockdomain *clkdm); void (*clkdm_deny_idle)(struct clockdomain *clkdm); + int (*clkdm_is_idle)(struct clockdomain *clkdm); int (*clkdm_clk_enable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm); }; @@ -177,6 +179,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); void clkdm_allow_idle(struct clockdomain *clkdm); void clkdm_deny_idle(struct clockdomain *clkdm); +int clkdm_is_idle(struct clockdomain *clkdm); int clkdm_wakeup(struct clockdomain *clkdm); int clkdm_sleep(struct clockdomain *clkdm); -- 1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: rnayak@ti.com (Rajendra Nayak) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/8] OMAP2+: clockdomain: Add an api to read idle mode Date: Thu, 9 Jun 2011 16:24:06 +0530 [thread overview] Message-ID: <1307616853-28395-2-git-send-email-rnayak@ti.com> (raw) In-Reply-To: <1307616853-28395-1-git-send-email-rnayak@ti.com> Add a clockdomain api to check if hardware supervised idle transitions are enabled on a clockdomain. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clockdomain.c | 21 +++++++++++++++++++++ arch/arm/mach-omap2/clockdomain.h | 3 +++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 6cb6c03..2ab3686 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -795,6 +795,27 @@ void clkdm_deny_idle(struct clockdomain *clkdm) arch_clkdm->clkdm_deny_idle(clkdm); } +/** + * clkdm_is_idle - Check if the clkdm hwsup/autoidle is enabled + * @clkdm: struct clockdomain * + * + * Returns true if the clockdomain is in hardware-supervised + * idle mode, or 0 otherwise. + * + */ +int clkdm_is_idle(struct clockdomain *clkdm) +{ + if (!clkdm) + return -EINVAL; + + if (!arch_clkdm || !arch_clkdm->clkdm_is_idle) + return -EINVAL; + + pr_debug("clockdomain: reading idle state for %s\n", clkdm->name); + + return arch_clkdm->clkdm_is_idle(clkdm); +} + /* Clockdomain-to-clock framework interface code */ diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 5823584..085ed82 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -138,6 +138,7 @@ struct clockdomain { * @clkdm_wakeup: Force a clockdomain to wakeup * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain + * @clkdm_is_idle: Check if hw supervised idle transitions are enabled * @clkdm_clk_enable: Put the clkdm in right state for a clock enable * @clkdm_clk_disable: Put the clkdm in right state for a clock disable */ @@ -154,6 +155,7 @@ struct clkdm_ops { int (*clkdm_wakeup)(struct clockdomain *clkdm); void (*clkdm_allow_idle)(struct clockdomain *clkdm); void (*clkdm_deny_idle)(struct clockdomain *clkdm); + int (*clkdm_is_idle)(struct clockdomain *clkdm); int (*clkdm_clk_enable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm); }; @@ -177,6 +179,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); void clkdm_allow_idle(struct clockdomain *clkdm); void clkdm_deny_idle(struct clockdomain *clkdm); +int clkdm_is_idle(struct clockdomain *clkdm); int clkdm_wakeup(struct clockdomain *clkdm); int clkdm_sleep(struct clockdomain *clkdm); -- 1.7.0.4
next prev parent reply other threads:[~2011-06-09 10:54 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-09 10:54 [PATCH 0/8] Fix module-mode enable sequence on OMAP4 Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak [this message] 2011-06-09 10:54 ` [PATCH 1/8] OMAP2+: clockdomain: Add an api to read idle mode Rajendra Nayak 2011-06-09 10:54 ` [PATCH 2/8] OMAP2+: clockdomain: Add SoC support for clkdm_is_idle Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` [PATCH 3/8] OMAP2+: PM: Initialise sleep_switch to a non-valid value Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` [PATCH 4/8] OMAP2+: PM: idle clkdms only if already in idle Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` [PATCH 5/8] OMAP4: PM: TEMP: Prevent l3init from idling/force sleep Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` [PATCH 6/8] OMAP2+: hwmod: Follow the recomended PRCM clock enable sequence Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` [PATCH 7/8] OMAP: clock: Add flags to identify optional clock nodes Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-09 10:54 ` [PATCH 8/8] OMAP: clock: Enable clockdomain only for optional clocks Rajendra Nayak 2011-06-09 10:54 ` Rajendra Nayak 2011-06-23 15:04 ` [PATCH 5/8] OMAP4: PM: TEMP: Prevent l3init from idling/force sleep Paul Walmsley 2011-06-23 15:04 ` Paul Walmsley 2011-06-23 15:22 ` Russell King - ARM Linux 2011-06-23 15:22 ` Russell King - ARM Linux 2011-07-06 5:30 ` Paul Walmsley 2011-07-06 5:30 ` Paul Walmsley 2011-06-10 0:15 ` [PATCH 4/8] OMAP2+: PM: idle clkdms only if already in idle Todd Poynor 2011-06-10 0:15 ` Todd Poynor 2011-06-10 11:22 ` Rajendra Nayak 2011-06-10 11:22 ` Rajendra Nayak 2011-06-27 6:34 ` Paul Walmsley 2011-06-27 6:34 ` Paul Walmsley 2011-06-27 23:36 ` Rajendra Nayak 2011-06-27 23:36 ` Rajendra Nayak 2011-06-10 0:07 ` [PATCH 1/8] OMAP2+: clockdomain: Add an api to read idle mode Todd Poynor 2011-06-10 0:07 ` Todd Poynor 2011-06-10 11:08 ` Rajendra Nayak 2011-06-10 11:08 ` Rajendra Nayak
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=1307616853-28395-2-git-send-email-rnayak@ti.com \ --to=rnayak@ti.com \ --cc=b-cousson@ti.com \ --cc=khilman@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=paul@pwsan.com \ --cc=santosh.shilimkar@ti.com \ /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.