aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clockdomain.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:28 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:28 -0400
commitb71c72178e24118214f21567a15adcad61b4238a (patch)
tree65d550588f5c76db32905c6ceddc2dc20ef0a1cd /arch/arm/mach-omap2/clockdomain.h
parent5c3e4ec48586f6dfb482f1c524748948ba14021e (diff)
ARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems
The idle status of the IP blocks and clocks inside the EMU clockdomain isn't taken into account by the PRCM hardware when deciding whether the clockdomain is idle. Add a workaround flag in the clockdomain code, CLKDM_MISSING_IDLE_REPORTING, to deal with this problem, and add the code necessary to support it. If CLKDM_MISSING_IDLE_REPORTING is set on a clockdomain, the clockdomain will be forced active whenever an IP block inside that clockdomain is in use, even if the clockdomain supports hardware-supervised idle. When the kernel indicates that the last active IP block inside the clockdomain is no longer used, the clockdomain will be forced idle, or, if that mode is not supported in the hardware, it will be placed into hardware-supervised idle. This patch is an equal collaboration with Jon Hunter <jon-hunter@ti.com>. Ming Lei <ming.lei@canonical.com>, Will Deacon <will.deacon@arm.com>, Madhav Vij <mvij@ti.com>, Kevin Hilman <khilman@ti.com>, Benoît Cousson <b-cousson@ti.com>, and Santosh Shilimkar <santosh.shilimkar@ti.com> all made essential contributions to the understanding of EMU clockdomain power management on OMAP. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Jon Hunter <jon-hunter@ti.com> Cc: Ming Lei <ming.lei@canonical.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Madhav Vij <mvij@ti.com> Cc: Kevin Hilman <khilman@ti.com> Cc: Benoît Cousson <b-cousson@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Jon Hunter <jon-hunter@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.h')
-rw-r--r--arch/arm/mach-omap2/clockdomain.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 5601dc13785e..629576be7444 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -1,9 +1,7 @@
1/* 1/*
2 * arch/arm/plat-omap/include/mach/clockdomain.h
3 *
4 * OMAP2/3 clockdomain framework functions 2 * OMAP2/3 clockdomain framework functions
5 * 3 *
6 * Copyright (C) 2008 Texas Instruments, Inc. 4 * Copyright (C) 2008, 2012 Texas Instruments, Inc.
7 * Copyright (C) 2008-2011 Nokia Corporation 5 * Copyright (C) 2008-2011 Nokia Corporation
8 * 6 *
9 * Paul Walmsley 7 * Paul Walmsley
@@ -34,6 +32,20 @@
34 * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is 32 * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is
35 * active whenever the MPU is active. True for interconnects and 33 * active whenever the MPU is active. True for interconnects and
36 * the WKUP clockdomains. 34 * the WKUP clockdomains.
35 * CLKDM_MISSING_IDLE_REPORTING: The idle status of the IP blocks and
36 * clocks inside this clockdomain are not taken into account by
37 * the PRCM when determining whether the clockdomain is idle.
38 * Without this flag, if the clockdomain is set to
39 * hardware-supervised idle mode, the PRCM may transition the
40 * enclosing powerdomain to a low power state, even when devices
41 * inside the clockdomain and powerdomain are in use. (An example
42 * of such a clockdomain is the EMU clockdomain on OMAP3/4.) If
43 * this flag is set, and the clockdomain does not support the
44 * force-sleep mode, then the HW_AUTO mode will be used to put the
45 * clockdomain to sleep. Similarly, if the clockdomain supports
46 * the force-wakeup mode, then it will be used whenever a clock or
47 * IP block inside the clockdomain is active, rather than the
48 * HW_AUTO mode.
37 */ 49 */
38#define CLKDM_CAN_FORCE_SLEEP (1 << 0) 50#define CLKDM_CAN_FORCE_SLEEP (1 << 0)
39#define CLKDM_CAN_FORCE_WAKEUP (1 << 1) 51#define CLKDM_CAN_FORCE_WAKEUP (1 << 1)
@@ -41,6 +53,7 @@
41#define CLKDM_CAN_DISABLE_AUTO (1 << 3) 53#define CLKDM_CAN_DISABLE_AUTO (1 << 3)
42#define CLKDM_NO_AUTODEPS (1 << 4) 54#define CLKDM_NO_AUTODEPS (1 << 4)
43#define CLKDM_ACTIVE_WITH_MPU (1 << 5) 55#define CLKDM_ACTIVE_WITH_MPU (1 << 5)
56#define CLKDM_MISSING_IDLE_REPORTING (1 << 6)
44 57
45#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) 58#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
46#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) 59#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)
@@ -187,6 +200,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);
187void clkdm_allow_idle(struct clockdomain *clkdm); 200void clkdm_allow_idle(struct clockdomain *clkdm);
188void clkdm_deny_idle(struct clockdomain *clkdm); 201void clkdm_deny_idle(struct clockdomain *clkdm);
189bool clkdm_in_hwsup(struct clockdomain *clkdm); 202bool clkdm_in_hwsup(struct clockdomain *clkdm);
203bool clkdm_missing_idle_reporting(struct clockdomain *clkdm);
190 204
191int clkdm_wakeup(struct clockdomain *clkdm); 205int clkdm_wakeup(struct clockdomain *clkdm);
192int clkdm_sleep(struct clockdomain *clkdm); 206int clkdm_sleep(struct clockdomain *clkdm);