aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomains.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-01-26 22:12:59 -0500
committerPaul Walmsley <paul@pwsan.com>2010-01-26 22:12:59 -0500
commit55ed96945b1f3d0f4ad21a27b32ce4bd99d8c268 (patch)
tree0bec60498742922a9c00f39ff63eb48549d391fc /arch/arm/mach-omap2/powerdomains.h
parent6b04e0d99d4113ede24e263e3df246a17f490339 (diff)
OMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm
Move clockdomain wakeup dependency and sleep dependency data structures from the powerdomain layer to the clockdomain layer, where they belong. These dependencies were originally placed in the powerdomain layer due to unclear documentation; however, it is clear now that these dependencies are between clockdomains. For OMAP2/3, this is not such a big problem, but for OMAP4 this needs to be fixed. Thanks to Benoît Cousson <b-cousson@ti.com> for his advice on this patch. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoît Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomains.h')
-rw-r--r--arch/arm/mach-omap2/powerdomains.h88
1 files changed, 8 insertions, 80 deletions
diff --git a/arch/arm/mach-omap2/powerdomains.h b/arch/arm/mach-omap2/powerdomains.h
index d646c9979c38..faa8fc952d95 100644
--- a/arch/arm/mach-omap2/powerdomains.h
+++ b/arch/arm/mach-omap2/powerdomains.h
@@ -1,8 +1,8 @@
1/* 1/*
2 * OMAP2/3 common powerdomain definitions 2 * OMAP2/3 common powerdomain definitions
3 * 3 *
4 * Copyright (C) 2007-8 Texas Instruments, Inc. 4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-8 Nokia Corporation 5 * Copyright (C) 2007-2009 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Written by Paul Walmsley
8 * Debugging and integration fixes by Jouni Högander 8 * Debugging and integration fixes by Jouni Högander
@@ -25,19 +25,8 @@
25 * This file contains all of the powerdomains that have some element 25 * This file contains all of the powerdomains that have some element
26 * of software control for the OMAP24xx and OMAP34XX chips. 26 * of software control for the OMAP24xx and OMAP34XX chips.
27 * 27 *
28 * A few notes:
29 *
30 * This is not an exhaustive listing of powerdomains on the chips; only 28 * This is not an exhaustive listing of powerdomains on the chips; only
31 * powerdomains that can be controlled in software. 29 * powerdomains that can be controlled in software.
32 *
33 * A useful validation rule for struct powerdomain:
34 * Any powerdomain referenced by a wkdep_srcs or sleepdep_srcs array
35 * must have a dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really
36 * just software-controllable dependencies. Non-software-controllable
37 * dependencies do exist, but they are not encoded below (yet).
38 *
39 * 24xx does not support programmable sleep dependencies (SLEEPDEP)
40 *
41 */ 30 */
42 31
43/* 32/*
@@ -47,26 +36,17 @@
47 * 36 *
48 * On the 2420, this is a 'C55 DSP called, simply, the DSP. Its 37 * On the 2420, this is a 'C55 DSP called, simply, the DSP. Its
49 * powerdomain is called the "DSP power domain." On the 2430, the 38 * powerdomain is called the "DSP power domain." On the 2430, the
50 * on-board DSP is a 'C64 DSP, now called the IVA2 or IVA2.1. Its 39 * on-board DSP is a 'C64 DSP, now called (along with its hardware
51 * powerdomain is still called the "DSP power domain." On the 3430, 40 * accelerators) the IVA2 or IVA2.1. Its powerdomain is still called
52 * the DSP is a 'C64 DSP like the 2430, also known as the IVA2; but 41 * the "DSP power domain." On the 3430, the DSP is a 'C64 DSP like the
53 * its powerdomain is now called the "IVA2 power domain." 42 * 2430, also known as the IVA2; but its powerdomain is now called the
43 * "IVA2 power domain."
54 * 44 *
55 * The 2420 also has something called the IVA, which is a separate ARM 45 * The 2420 also has something called the IVA, which is a separate ARM
56 * core, and has nothing to do with the DSP/IVA2. 46 * core, and has nothing to do with the DSP/IVA2.
57 * 47 *
58 * Ideally the DSP/IVA2 could just be the same powerdomain, but the PRCM 48 * Ideally the DSP/IVA2 could just be the same powerdomain, but the PRCM
59 * address offset is different between the C55 and C64 DSPs. 49 * address offset is different between the C55 and C64 DSPs.
60 *
61 * The overly-specific dep_bit names are due to a bit name collision
62 * with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift
63 * value are the same for all powerdomains: 2
64 */
65
66/*
67 * XXX should dep_bit be a mask, so we can test to see if it is 0 as a
68 * sanity check?
69 * XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE
70 */ 50 */
71 51
72#include <plat/powerdomain.h> 52#include <plat/powerdomain.h>
@@ -74,60 +54,11 @@
74#include "prcm-common.h" 54#include "prcm-common.h"
75#include "prm.h" 55#include "prm.h"
76#include "cm.h" 56#include "cm.h"
77
78/* OMAP2/3-common powerdomains and wakeup dependencies */
79
80#ifndef CONFIG_ARCH_OMAP4
81/*
82 * 2420/2430 PM_WKDEP_GFX: CORE, MPU, WKUP
83 * 3430ES1 PM_WKDEP_GFX: adds IVA2, removes CORE
84 * 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE
85 */
86static struct pwrdm_dep gfx_sgx_wkdeps[] = {
87 {
88 .pwrdm_name = "core_pwrdm",
89 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX)
90 },
91 {
92 .pwrdm_name = "iva2_pwrdm",
93 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
94 },
95 {
96 .pwrdm_name = "mpu_pwrdm",
97 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
98 CHIP_IS_OMAP3430)
99 },
100 {
101 .pwrdm_name = "wkup_pwrdm",
102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
103 CHIP_IS_OMAP3430)
104 },
105 { NULL },
106};
107
108/*
109 * 3430: CM_SLEEPDEP_CAM: MPU
110 * 3430ES1: CM_SLEEPDEP_GFX: MPU
111 * 3430ES2: CM_SLEEPDEP_SGX: MPU
112 */
113static struct pwrdm_dep cam_gfx_sleepdeps[] = {
114 {
115 .pwrdm_name = "mpu_pwrdm",
116 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
117 },
118 { NULL },
119};
120#endif
121
122
123#include "powerdomains24xx.h" 57#include "powerdomains24xx.h"
124#include "powerdomains34xx.h" 58#include "powerdomains34xx.h"
125#include "powerdomains44xx.h" 59#include "powerdomains44xx.h"
126 60
127 61/* OMAP2/3-common powerdomains */
128/*
129 * OMAP2/3 common powerdomains
130 */
131 62
132#if defined(CONFIG_ARCH_OMAP24XX) | defined(CONFIG_ARCH_OMAP34XX) 63#if defined(CONFIG_ARCH_OMAP24XX) | defined(CONFIG_ARCH_OMAP34XX)
133 64
@@ -140,8 +71,6 @@ static struct powerdomain gfx_omap2_pwrdm = {
140 .prcm_offs = GFX_MOD, 71 .prcm_offs = GFX_MOD,
141 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | 72 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
142 CHIP_IS_OMAP3430ES1), 73 CHIP_IS_OMAP3430ES1),
143 .wkdep_srcs = gfx_sgx_wkdeps,
144 .sleepdep_srcs = cam_gfx_sleepdeps,
145 .pwrsts = PWRSTS_OFF_RET_ON, 74 .pwrsts = PWRSTS_OFF_RET_ON,
146 .pwrsts_logic_ret = PWRDM_POWER_RET, 75 .pwrsts_logic_ret = PWRDM_POWER_RET,
147 .banks = 1, 76 .banks = 1,
@@ -157,7 +86,6 @@ static struct powerdomain wkup_omap2_pwrdm = {
157 .name = "wkup_pwrdm", 86 .name = "wkup_pwrdm",
158 .prcm_offs = WKUP_MOD, 87 .prcm_offs = WKUP_MOD,
159 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430), 88 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
160 .dep_bit = OMAP_EN_WKUP_SHIFT,
161}; 89};
162 90
163#endif 91#endif