aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomains44xx_data.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:14 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:14 -0500
commita64bb9cda8b12f599766c7dfe81770d2082a133a (patch)
tree29886a8c126757dde407a315220e69d1b6a4554a /arch/arm/mach-omap2/powerdomains44xx_data.c
parentc4d7e58fb52c632d8e33cd23a4917d7a7f8302ac (diff)
OMAP4: powerdomains: add PRCM partition data; use OMAP4 PRM functions
OMAP4 powerdomain control registers are split between the PRM hardware module and the PRCM_MPU local PRCM. Add this PRCM partition information to each OMAP4 powerdomain record, and convert the OMAP4 powerdomain function implementations to use the OMAP4 PRM instance functions. Also fixes a potential null pointer dereference of pwrdm->name. The autogeneration scripts have been updated. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: BenoƮt Cousson <b-cousson@ti.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomains44xx_data.c')
-rw-r--r--arch/arm/mach-omap2/powerdomains44xx_data.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c
index 069a21d54911..823f4770f947 100644
--- a/arch/arm/mach-omap2/powerdomains44xx_data.c
+++ b/arch/arm/mach-omap2/powerdomains44xx_data.c
@@ -26,6 +26,7 @@
26#include "powerdomains.h" 26#include "powerdomains.h"
27 27
28#include "prcm-common.h" 28#include "prcm-common.h"
29#include "prcm44xx.h"
29#include "prm-regbits-44xx.h" 30#include "prm-regbits-44xx.h"
30#include "prm44xx.h" 31#include "prm44xx.h"
31#include "prcm_mpu44xx.h" 32#include "prcm_mpu44xx.h"
@@ -34,6 +35,7 @@
34static struct powerdomain core_44xx_pwrdm = { 35static struct powerdomain core_44xx_pwrdm = {
35 .name = "core_pwrdm", 36 .name = "core_pwrdm",
36 .prcm_offs = OMAP4430_PRM_CORE_INST, 37 .prcm_offs = OMAP4430_PRM_CORE_INST,
38 .prcm_partition = OMAP4430_PRM_PARTITION,
37 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 39 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
38 .pwrsts = PWRSTS_RET_ON, 40 .pwrsts = PWRSTS_RET_ON,
39 .pwrsts_logic_ret = PWRSTS_OFF_RET, 41 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -59,6 +61,7 @@ static struct powerdomain core_44xx_pwrdm = {
59static struct powerdomain gfx_44xx_pwrdm = { 61static struct powerdomain gfx_44xx_pwrdm = {
60 .name = "gfx_pwrdm", 62 .name = "gfx_pwrdm",
61 .prcm_offs = OMAP4430_PRM_GFX_INST, 63 .prcm_offs = OMAP4430_PRM_GFX_INST,
64 .prcm_partition = OMAP4430_PRM_PARTITION,
62 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 65 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
63 .pwrsts = PWRSTS_OFF_ON, 66 .pwrsts = PWRSTS_OFF_ON,
64 .banks = 1, 67 .banks = 1,
@@ -75,6 +78,7 @@ static struct powerdomain gfx_44xx_pwrdm = {
75static struct powerdomain abe_44xx_pwrdm = { 78static struct powerdomain abe_44xx_pwrdm = {
76 .name = "abe_pwrdm", 79 .name = "abe_pwrdm",
77 .prcm_offs = OMAP4430_PRM_ABE_INST, 80 .prcm_offs = OMAP4430_PRM_ABE_INST,
81 .prcm_partition = OMAP4430_PRM_PARTITION,
78 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 82 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
79 .pwrsts = PWRSTS_OFF_RET_ON, 83 .pwrsts = PWRSTS_OFF_RET_ON,
80 .pwrsts_logic_ret = PWRDM_POWER_OFF, 84 .pwrsts_logic_ret = PWRDM_POWER_OFF,
@@ -94,6 +98,7 @@ static struct powerdomain abe_44xx_pwrdm = {
94static struct powerdomain dss_44xx_pwrdm = { 98static struct powerdomain dss_44xx_pwrdm = {
95 .name = "dss_pwrdm", 99 .name = "dss_pwrdm",
96 .prcm_offs = OMAP4430_PRM_DSS_INST, 100 .prcm_offs = OMAP4430_PRM_DSS_INST,
101 .prcm_partition = OMAP4430_PRM_PARTITION,
97 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
98 .pwrsts = PWRSTS_OFF_RET_ON, 103 .pwrsts = PWRSTS_OFF_RET_ON,
99 .pwrsts_logic_ret = PWRSTS_OFF, 104 .pwrsts_logic_ret = PWRSTS_OFF,
@@ -111,6 +116,7 @@ static struct powerdomain dss_44xx_pwrdm = {
111static struct powerdomain tesla_44xx_pwrdm = { 116static struct powerdomain tesla_44xx_pwrdm = {
112 .name = "tesla_pwrdm", 117 .name = "tesla_pwrdm",
113 .prcm_offs = OMAP4430_PRM_TESLA_INST, 118 .prcm_offs = OMAP4430_PRM_TESLA_INST,
119 .prcm_partition = OMAP4430_PRM_PARTITION,
114 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 120 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
115 .pwrsts = PWRSTS_OFF_RET_ON, 121 .pwrsts = PWRSTS_OFF_RET_ON,
116 .pwrsts_logic_ret = PWRSTS_OFF_RET, 122 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -132,6 +138,7 @@ static struct powerdomain tesla_44xx_pwrdm = {
132static struct powerdomain wkup_44xx_pwrdm = { 138static struct powerdomain wkup_44xx_pwrdm = {
133 .name = "wkup_pwrdm", 139 .name = "wkup_pwrdm",
134 .prcm_offs = OMAP4430_PRM_WKUP_INST, 140 .prcm_offs = OMAP4430_PRM_WKUP_INST,
141 .prcm_partition = OMAP4430_PRM_PARTITION,
135 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 142 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
136 .pwrsts = PWRSTS_ON, 143 .pwrsts = PWRSTS_ON,
137 .banks = 1, 144 .banks = 1,
@@ -147,6 +154,7 @@ static struct powerdomain wkup_44xx_pwrdm = {
147static struct powerdomain cpu0_44xx_pwrdm = { 154static struct powerdomain cpu0_44xx_pwrdm = {
148 .name = "cpu0_pwrdm", 155 .name = "cpu0_pwrdm",
149 .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST, 156 .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST,
157 .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
150 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 158 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
151 .pwrsts = PWRSTS_OFF_RET_ON, 159 .pwrsts = PWRSTS_OFF_RET_ON,
152 .pwrsts_logic_ret = PWRSTS_OFF_RET, 160 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -163,6 +171,7 @@ static struct powerdomain cpu0_44xx_pwrdm = {
163static struct powerdomain cpu1_44xx_pwrdm = { 171static struct powerdomain cpu1_44xx_pwrdm = {
164 .name = "cpu1_pwrdm", 172 .name = "cpu1_pwrdm",
165 .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST, 173 .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST,
174 .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
166 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 175 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
167 .pwrsts = PWRSTS_OFF_RET_ON, 176 .pwrsts = PWRSTS_OFF_RET_ON,
168 .pwrsts_logic_ret = PWRSTS_OFF_RET, 177 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -179,6 +188,7 @@ static struct powerdomain cpu1_44xx_pwrdm = {
179static struct powerdomain emu_44xx_pwrdm = { 188static struct powerdomain emu_44xx_pwrdm = {
180 .name = "emu_pwrdm", 189 .name = "emu_pwrdm",
181 .prcm_offs = OMAP4430_PRM_EMU_INST, 190 .prcm_offs = OMAP4430_PRM_EMU_INST,
191 .prcm_partition = OMAP4430_PRM_PARTITION,
182 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 192 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
183 .pwrsts = PWRSTS_OFF_ON, 193 .pwrsts = PWRSTS_OFF_ON,
184 .banks = 1, 194 .banks = 1,
@@ -194,6 +204,7 @@ static struct powerdomain emu_44xx_pwrdm = {
194static struct powerdomain mpu_44xx_pwrdm = { 204static struct powerdomain mpu_44xx_pwrdm = {
195 .name = "mpu_pwrdm", 205 .name = "mpu_pwrdm",
196 .prcm_offs = OMAP4430_PRM_MPU_INST, 206 .prcm_offs = OMAP4430_PRM_MPU_INST,
207 .prcm_partition = OMAP4430_PRM_PARTITION,
197 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 208 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
198 .pwrsts = PWRSTS_OFF_RET_ON, 209 .pwrsts = PWRSTS_OFF_RET_ON,
199 .pwrsts_logic_ret = PWRSTS_OFF_RET, 210 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -214,6 +225,7 @@ static struct powerdomain mpu_44xx_pwrdm = {
214static struct powerdomain ivahd_44xx_pwrdm = { 225static struct powerdomain ivahd_44xx_pwrdm = {
215 .name = "ivahd_pwrdm", 226 .name = "ivahd_pwrdm",
216 .prcm_offs = OMAP4430_PRM_IVAHD_INST, 227 .prcm_offs = OMAP4430_PRM_IVAHD_INST,
228 .prcm_partition = OMAP4430_PRM_PARTITION,
217 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 229 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
218 .pwrsts = PWRSTS_OFF_RET_ON, 230 .pwrsts = PWRSTS_OFF_RET_ON,
219 .pwrsts_logic_ret = PWRDM_POWER_OFF, 231 .pwrsts_logic_ret = PWRDM_POWER_OFF,
@@ -237,6 +249,7 @@ static struct powerdomain ivahd_44xx_pwrdm = {
237static struct powerdomain cam_44xx_pwrdm = { 249static struct powerdomain cam_44xx_pwrdm = {
238 .name = "cam_pwrdm", 250 .name = "cam_pwrdm",
239 .prcm_offs = OMAP4430_PRM_CAM_INST, 251 .prcm_offs = OMAP4430_PRM_CAM_INST,
252 .prcm_partition = OMAP4430_PRM_PARTITION,
240 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 253 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
241 .pwrsts = PWRSTS_OFF_ON, 254 .pwrsts = PWRSTS_OFF_ON,
242 .banks = 1, 255 .banks = 1,
@@ -253,6 +266,7 @@ static struct powerdomain cam_44xx_pwrdm = {
253static struct powerdomain l3init_44xx_pwrdm = { 266static struct powerdomain l3init_44xx_pwrdm = {
254 .name = "l3init_pwrdm", 267 .name = "l3init_pwrdm",
255 .prcm_offs = OMAP4430_PRM_L3INIT_INST, 268 .prcm_offs = OMAP4430_PRM_L3INIT_INST,
269 .prcm_partition = OMAP4430_PRM_PARTITION,
256 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 270 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
257 .pwrsts = PWRSTS_OFF_RET_ON, 271 .pwrsts = PWRSTS_OFF_RET_ON,
258 .pwrsts_logic_ret = PWRSTS_OFF_RET, 272 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -270,6 +284,7 @@ static struct powerdomain l3init_44xx_pwrdm = {
270static struct powerdomain l4per_44xx_pwrdm = { 284static struct powerdomain l4per_44xx_pwrdm = {
271 .name = "l4per_pwrdm", 285 .name = "l4per_pwrdm",
272 .prcm_offs = OMAP4430_PRM_L4PER_INST, 286 .prcm_offs = OMAP4430_PRM_L4PER_INST,
287 .prcm_partition = OMAP4430_PRM_PARTITION,
273 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 288 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
274 .pwrsts = PWRSTS_OFF_RET_ON, 289 .pwrsts = PWRSTS_OFF_RET_ON,
275 .pwrsts_logic_ret = PWRSTS_OFF_RET, 290 .pwrsts_logic_ret = PWRSTS_OFF_RET,
@@ -292,6 +307,7 @@ static struct powerdomain l4per_44xx_pwrdm = {
292static struct powerdomain always_on_core_44xx_pwrdm = { 307static struct powerdomain always_on_core_44xx_pwrdm = {
293 .name = "always_on_core_pwrdm", 308 .name = "always_on_core_pwrdm",
294 .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST, 309 .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST,
310 .prcm_partition = OMAP4430_PRM_PARTITION,
295 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 311 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
296 .pwrsts = PWRSTS_ON, 312 .pwrsts = PWRSTS_ON,
297}; 313};
@@ -300,6 +316,7 @@ static struct powerdomain always_on_core_44xx_pwrdm = {
300static struct powerdomain cefuse_44xx_pwrdm = { 316static struct powerdomain cefuse_44xx_pwrdm = {
301 .name = "cefuse_pwrdm", 317 .name = "cefuse_pwrdm",
302 .prcm_offs = OMAP4430_PRM_CEFUSE_INST, 318 .prcm_offs = OMAP4430_PRM_CEFUSE_INST,
319 .prcm_partition = OMAP4430_PRM_PARTITION,
303 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 320 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
304 .pwrsts = PWRSTS_OFF_ON, 321 .pwrsts = PWRSTS_OFF_ON,
305}; 322};