summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch
new file mode 100644
index 00000000..d9b05173
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch
@@ -0,0 +1,77 @@
1From 988f50cb51d18e81ed2f7673a09694d28c9d086a Mon Sep 17 00:00:00 2001
2From: Rajendra Nayak <rnayak@ti.com>
3Date: Tue, 5 Apr 2011 15:22:31 +0530
4Subject: [PATCH 1/6] OMAP2+: clockdomain: Add an api to read idle mode
5
6Add a clockdomain api to check if hardware supervised
7idle transitions are enabled on a clockdomain.
8
9Signed-off-by: Rajendra Nayak <rnayak@ti.com>
10---
11 arch/arm/mach-omap2/clockdomain.c | 21 +++++++++++++++++++++
12 arch/arm/mach-omap2/clockdomain.h | 3 +++
13 2 files changed, 24 insertions(+), 0 deletions(-)
14
15diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
16index 6cb6c03..2ab3686 100644
17--- a/arch/arm/mach-omap2/clockdomain.c
18+++ b/arch/arm/mach-omap2/clockdomain.c
19@@ -795,6 +795,27 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
20 arch_clkdm->clkdm_deny_idle(clkdm);
21 }
22
23+/**
24+ * clkdm_is_idle - Check if the clkdm hwsup/autoidle is enabled
25+ * @clkdm: struct clockdomain *
26+ *
27+ * Returns true if the clockdomain is in hardware-supervised
28+ * idle mode, or 0 otherwise.
29+ *
30+ */
31+int clkdm_is_idle(struct clockdomain *clkdm)
32+{
33+ if (!clkdm)
34+ return -EINVAL;
35+
36+ if (!arch_clkdm || !arch_clkdm->clkdm_is_idle)
37+ return -EINVAL;
38+
39+ pr_debug("clockdomain: reading idle state for %s\n", clkdm->name);
40+
41+ return arch_clkdm->clkdm_is_idle(clkdm);
42+}
43+
44
45 /* Clockdomain-to-clock framework interface code */
46
47diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
48index 5823584..085ed82 100644
49--- a/arch/arm/mach-omap2/clockdomain.h
50+++ b/arch/arm/mach-omap2/clockdomain.h
51@@ -138,6 +138,7 @@ struct clockdomain {
52 * @clkdm_wakeup: Force a clockdomain to wakeup
53 * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain
54 * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain
55+ * @clkdm_is_idle: Check if hw supervised idle transitions are enabled
56 * @clkdm_clk_enable: Put the clkdm in right state for a clock enable
57 * @clkdm_clk_disable: Put the clkdm in right state for a clock disable
58 */
59@@ -154,6 +155,7 @@ struct clkdm_ops {
60 int (*clkdm_wakeup)(struct clockdomain *clkdm);
61 void (*clkdm_allow_idle)(struct clockdomain *clkdm);
62 void (*clkdm_deny_idle)(struct clockdomain *clkdm);
63+ int (*clkdm_is_idle)(struct clockdomain *clkdm);
64 int (*clkdm_clk_enable)(struct clockdomain *clkdm);
65 int (*clkdm_clk_disable)(struct clockdomain *clkdm);
66 };
67@@ -177,6 +179,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);
68
69 void clkdm_allow_idle(struct clockdomain *clkdm);
70 void clkdm_deny_idle(struct clockdomain *clkdm);
71+int clkdm_is_idle(struct clockdomain *clkdm);
72
73 int clkdm_wakeup(struct clockdomain *clkdm);
74 int clkdm_sleep(struct clockdomain *clkdm);
75--
761.6.6.1
77