diff options
Diffstat (limited to 'arch/arm/mach-omap2/powerdomains.h')
-rw-r--r-- | arch/arm/mach-omap2/powerdomains.h | 134 |
1 files changed, 47 insertions, 87 deletions
diff --git a/arch/arm/mach-omap2/powerdomains.h b/arch/arm/mach-omap2/powerdomains.h index 057b2e3e2c35..105cbcaefd3b 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 |
@@ -12,26 +12,21 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | /* | ||
16 | * To Do List | ||
17 | * -> Move the Sleep/Wakeup dependencies from Power Domain framework to | ||
18 | * Clock Domain Framework | ||
19 | */ | ||
20 | |||
15 | #ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS | 21 | #ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS |
16 | #define ARCH_ARM_MACH_OMAP2_POWERDOMAINS | 22 | #define ARCH_ARM_MACH_OMAP2_POWERDOMAINS |
17 | 23 | ||
18 | /* | 24 | /* |
19 | * This file contains all of the powerdomains that have some element | 25 | * This file contains all of the powerdomains that have some element |
20 | * of software control for the OMAP24xx and OMAP34XX chips. | 26 | * of software control for the OMAP24xx and OMAP34xx chips. |
21 | * | ||
22 | * A few notes: | ||
23 | * | 27 | * |
24 | * 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 |
25 | * powerdomains that can be controlled in software. | 29 | * powerdomains that can be controlled in software. |
26 | * | ||
27 | * A useful validation rule for struct powerdomain: | ||
28 | * Any powerdomain referenced by a wkdep_srcs or sleepdep_srcs array | ||
29 | * must have a dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really | ||
30 | * just software-controllable dependencies. Non-software-controllable | ||
31 | * dependencies do exist, but they are not encoded below (yet). | ||
32 | * | ||
33 | * 24xx does not support programmable sleep dependencies (SLEEPDEP) | ||
34 | * | ||
35 | */ | 30 | */ |
36 | 31 | ||
37 | /* | 32 | /* |
@@ -41,26 +36,17 @@ | |||
41 | * | 36 | * |
42 | * 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 |
43 | * powerdomain is called the "DSP power domain." On the 2430, the | 38 | * powerdomain is called the "DSP power domain." On the 2430, the |
44 | * 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 |
45 | * powerdomain is still called the "DSP power domain." On the 3430, | 40 | * accelerators) the IVA2 or IVA2.1. Its powerdomain is still called |
46 | * 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 |
47 | * 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." | ||
48 | * | 44 | * |
49 | * 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 |
50 | * core, and has nothing to do with the DSP/IVA2. | 46 | * core, and has nothing to do with the DSP/IVA2. |
51 | * | 47 | * |
52 | * 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 |
53 | * address offset is different between the C55 and C64 DSPs. | 49 | * address offset is different between the C55 and C64 DSPs. |
54 | * | ||
55 | * The overly-specific dep_bit names are due to a bit name collision | ||
56 | * with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift | ||
57 | * value are the same for all powerdomains: 2 | ||
58 | */ | ||
59 | |||
60 | /* | ||
61 | * XXX should dep_bit be a mask, so we can test to see if it is 0 as a | ||
62 | * sanity check? | ||
63 | * XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE | ||
64 | */ | 50 | */ |
65 | 51 | ||
66 | #include <plat/powerdomain.h> | 52 | #include <plat/powerdomain.h> |
@@ -68,69 +54,23 @@ | |||
68 | #include "prcm-common.h" | 54 | #include "prcm-common.h" |
69 | #include "prm.h" | 55 | #include "prm.h" |
70 | #include "cm.h" | 56 | #include "cm.h" |
71 | |||
72 | /* OMAP2/3-common powerdomains and wakeup dependencies */ | ||
73 | |||
74 | /* | ||
75 | * 2420/2430 PM_WKDEP_GFX: CORE, MPU, WKUP | ||
76 | * 3430ES1 PM_WKDEP_GFX: adds IVA2, removes CORE | ||
77 | * 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE | ||
78 | */ | ||
79 | static struct pwrdm_dep gfx_sgx_wkdeps[] = { | ||
80 | { | ||
81 | .pwrdm_name = "core_pwrdm", | ||
82 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX) | ||
83 | }, | ||
84 | { | ||
85 | .pwrdm_name = "iva2_pwrdm", | ||
86 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
87 | }, | ||
88 | { | ||
89 | .pwrdm_name = "mpu_pwrdm", | ||
90 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | | ||
91 | CHIP_IS_OMAP3430) | ||
92 | }, | ||
93 | { | ||
94 | .pwrdm_name = "wkup_pwrdm", | ||
95 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | | ||
96 | CHIP_IS_OMAP3430) | ||
97 | }, | ||
98 | { NULL }, | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * 3430: CM_SLEEPDEP_CAM: MPU | ||
103 | * 3430ES1: CM_SLEEPDEP_GFX: MPU | ||
104 | * 3430ES2: CM_SLEEPDEP_SGX: MPU | ||
105 | */ | ||
106 | static struct pwrdm_dep cam_gfx_sleepdeps[] = { | ||
107 | { | ||
108 | .pwrdm_name = "mpu_pwrdm", | ||
109 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
110 | }, | ||
111 | { NULL }, | ||
112 | }; | ||
113 | |||
114 | |||
115 | #include "powerdomains24xx.h" | 57 | #include "powerdomains24xx.h" |
116 | #include "powerdomains34xx.h" | 58 | #include "powerdomains34xx.h" |
59 | #include "powerdomains44xx.h" | ||
117 | 60 | ||
61 | /* OMAP2/3-common powerdomains */ | ||
118 | 62 | ||
119 | /* | 63 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
120 | * OMAP2/3 common powerdomains | ||
121 | */ | ||
122 | 64 | ||
123 | /* | 65 | /* |
124 | * The GFX powerdomain is not present on 3430ES2, but currently we do not | 66 | * The GFX powerdomain is not present on 3430ES2, but currently we do not |
125 | * have a macro to filter it out at compile-time. | 67 | * have a macro to filter it out at compile-time. |
126 | */ | 68 | */ |
127 | static struct powerdomain gfx_pwrdm = { | 69 | static struct powerdomain gfx_omap2_pwrdm = { |
128 | .name = "gfx_pwrdm", | 70 | .name = "gfx_pwrdm", |
129 | .prcm_offs = GFX_MOD, | 71 | .prcm_offs = GFX_MOD, |
130 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | | 72 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | |
131 | CHIP_IS_OMAP3430ES1), | 73 | CHIP_IS_OMAP3430ES1), |
132 | .wkdep_srcs = gfx_sgx_wkdeps, | ||
133 | .sleepdep_srcs = cam_gfx_sleepdeps, | ||
134 | .pwrsts = PWRSTS_OFF_RET_ON, | 74 | .pwrsts = PWRSTS_OFF_RET_ON, |
135 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 75 | .pwrsts_logic_ret = PWRDM_POWER_RET, |
136 | .banks = 1, | 76 | .banks = 1, |
@@ -142,22 +82,24 @@ static struct powerdomain gfx_pwrdm = { | |||
142 | }, | 82 | }, |
143 | }; | 83 | }; |
144 | 84 | ||
145 | static struct powerdomain wkup_pwrdm = { | 85 | static struct powerdomain wkup_omap2_pwrdm = { |
146 | .name = "wkup_pwrdm", | 86 | .name = "wkup_pwrdm", |
147 | .prcm_offs = WKUP_MOD, | 87 | .prcm_offs = WKUP_MOD, |
148 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430), | 88 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430), |
149 | .dep_bit = OMAP_EN_WKUP_SHIFT, | ||
150 | }; | 89 | }; |
151 | 90 | ||
91 | #endif | ||
152 | 92 | ||
153 | 93 | ||
154 | /* As powerdomains are added or removed above, this list must also be changed */ | 94 | /* As powerdomains are added or removed above, this list must also be changed */ |
155 | static struct powerdomain *powerdomains_omap[] __initdata = { | 95 | static struct powerdomain *powerdomains_omap[] __initdata = { |
156 | 96 | ||
157 | &gfx_pwrdm, | 97 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
158 | &wkup_pwrdm, | 98 | &wkup_omap2_pwrdm, |
99 | &gfx_omap2_pwrdm, | ||
100 | #endif | ||
159 | 101 | ||
160 | #ifdef CONFIG_ARCH_OMAP24XX | 102 | #ifdef CONFIG_ARCH_OMAP2 |
161 | &dsp_pwrdm, | 103 | &dsp_pwrdm, |
162 | &mpu_24xx_pwrdm, | 104 | &mpu_24xx_pwrdm, |
163 | &core_24xx_pwrdm, | 105 | &core_24xx_pwrdm, |
@@ -167,12 +109,12 @@ static struct powerdomain *powerdomains_omap[] __initdata = { | |||
167 | &mdm_pwrdm, | 109 | &mdm_pwrdm, |
168 | #endif | 110 | #endif |
169 | 111 | ||
170 | #ifdef CONFIG_ARCH_OMAP34XX | 112 | #ifdef CONFIG_ARCH_OMAP3 |
171 | &iva2_pwrdm, | 113 | &iva2_pwrdm, |
172 | &mpu_34xx_pwrdm, | 114 | &mpu_3xxx_pwrdm, |
173 | &neon_pwrdm, | 115 | &neon_pwrdm, |
174 | &core_34xx_pre_es3_1_pwrdm, | 116 | &core_3xxx_pre_es3_1_pwrdm, |
175 | &core_34xx_es3_1_pwrdm, | 117 | &core_3xxx_es3_1_pwrdm, |
176 | &cam_pwrdm, | 118 | &cam_pwrdm, |
177 | &dss_pwrdm, | 119 | &dss_pwrdm, |
178 | &per_pwrdm, | 120 | &per_pwrdm, |
@@ -186,6 +128,24 @@ static struct powerdomain *powerdomains_omap[] __initdata = { | |||
186 | &dpll5_pwrdm, | 128 | &dpll5_pwrdm, |
187 | #endif | 129 | #endif |
188 | 130 | ||
131 | #ifdef CONFIG_ARCH_OMAP4 | ||
132 | &core_44xx_pwrdm, | ||
133 | &gfx_44xx_pwrdm, | ||
134 | &abe_44xx_pwrdm, | ||
135 | &dss_44xx_pwrdm, | ||
136 | &tesla_44xx_pwrdm, | ||
137 | &wkup_44xx_pwrdm, | ||
138 | &cpu0_44xx_pwrdm, | ||
139 | &cpu1_44xx_pwrdm, | ||
140 | &emu_44xx_pwrdm, | ||
141 | &mpu_44xx_pwrdm, | ||
142 | &ivahd_44xx_pwrdm, | ||
143 | &cam_44xx_pwrdm, | ||
144 | &l3init_44xx_pwrdm, | ||
145 | &l4per_44xx_pwrdm, | ||
146 | &always_on_core_44xx_pwrdm, | ||
147 | &cefuse_44xx_pwrdm, | ||
148 | #endif | ||
189 | NULL | 149 | NULL |
190 | }; | 150 | }; |
191 | 151 | ||