aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 22:01:20 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 22:01:20 -0500
commit6e01478ae8a4322c9a2b2d6efed50196265ed5f2 (patch)
tree599403c4442e99f8a63a0635e1712e4a564b50a2
parent4b4f62c4672805466652a785070cc2ac8a398e16 (diff)
OMAP2+: powerdomains: move powerdomain static data to .c files
Static data should be declared in .c files, not .h files. It should be possible to #include .h files at any point without creating multiple copies of the same data. We converted the clock data to .c files some time ago. This patch does the same for the powerdomain data. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com>
-rw-r--r--arch/arm/mach-omap2/Makefile13
-rw-r--r--arch/arm/mach-omap2/io.c21
-rw-r--r--arch/arm/mach-omap2/powerdomain2xxx_3xxx.c7
-rw-r--r--arch/arm/mach-omap2/powerdomain44xx.c1
-rw-r--r--arch/arm/mach-omap2/powerdomains.h9
-rw-r--r--arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c (renamed from arch/arm/mach-omap2/powerdomains_data.c)88
-rw-r--r--arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.h22
-rw-r--r--arch/arm/mach-omap2/powerdomains2xxx_data.c (renamed from arch/arm/mach-omap2/powerdomains24xx.h)43
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c (renamed from arch/arm/mach-omap2/powerdomains34xx.h)43
-rw-r--r--arch/arm/mach-omap2/powerdomains44xx_data.c (renamed from arch/arm/mach-omap2/powerdomains44xx.h)33
-rw-r--r--arch/arm/plat-omap/include/plat/powerdomain.h13
11 files changed, 159 insertions, 134 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 1a1e978cd4b..4d6fa15f3b6 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -78,13 +78,18 @@ obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm.o
78obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm4xxx.o 78obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm4xxx.o
79 79
80# OMAP powerdomain framework 80# OMAP powerdomain framework
81powerdomain-common += powerdomain.o powerdomains_data.o powerdomain-common.o 81powerdomain-common += powerdomain.o powerdomain-common.o
82obj-$(CONFIG_ARCH_OMAP2) += $(powerdomain-common) \ 82obj-$(CONFIG_ARCH_OMAP2) += $(powerdomain-common) \
83 powerdomain2xxx_3xxx.o 83 powerdomain2xxx_3xxx.o \
84 powerdomains2xxx_data.o \
85 powerdomains2xxx_3xxx_data.o
84obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common) \ 86obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common) \
85 powerdomain2xxx_3xxx.o 87 powerdomain2xxx_3xxx.o \
88 powerdomains3xxx_data.o \
89 powerdomains2xxx_3xxx_data.o
86obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ 90obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \
87 powerdomain44xx.o 91 powerdomain44xx.o \
92 powerdomains44xx_data.o
88 93
89# Clock framework 94# Clock framework
90obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \ 95obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 80a8e0e4d03..40a548b203e 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -339,18 +339,25 @@ void __init omap2_init_common_infrastructure(void)
339{ 339{
340 u8 postsetup_state; 340 u8 postsetup_state;
341 341
342 pwrdm_fw_init(); 342 if (cpu_is_omap242x()) {
343 clkdm_init(clockdomains_omap, clkdm_autodeps); 343 omap2xxx_powerdomains_init();
344 if (cpu_is_omap242x()) 344 clkdm_init(clockdomains_omap, clkdm_autodeps);
345 omap2420_hwmod_init(); 345 omap2420_hwmod_init();
346 else if (cpu_is_omap243x()) 346 } else if (cpu_is_omap243x()) {
347 omap2xxx_powerdomains_init();
348 clkdm_init(clockdomains_omap, clkdm_autodeps);
347 omap2430_hwmod_init(); 349 omap2430_hwmod_init();
348 else if (cpu_is_omap34xx()) 350 } else if (cpu_is_omap34xx()) {
351 omap3xxx_powerdomains_init();
352 clkdm_init(clockdomains_omap, clkdm_autodeps);
349 omap3xxx_hwmod_init(); 353 omap3xxx_hwmod_init();
350 else if (cpu_is_omap44xx()) 354 } else if (cpu_is_omap44xx()) {
355 omap44xx_powerdomains_init();
356 clkdm_init(clockdomains_omap, clkdm_autodeps);
351 omap44xx_hwmod_init(); 357 omap44xx_hwmod_init();
352 else 358 } else {
353 pr_err("Could not init hwmod data - unknown SoC\n"); 359 pr_err("Could not init hwmod data - unknown SoC\n");
360 }
354 361
355 /* Set the default postsetup state for all hwmods */ 362 /* Set the default postsetup state for all hwmods */
356#ifdef CONFIG_PM_RUNTIME 363#ifdef CONFIG_PM_RUNTIME
diff --git a/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c b/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
index 6cdf67860cb..838ac758c51 100644
--- a/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
@@ -15,10 +15,15 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18
18#include <plat/prcm.h> 19#include <plat/prcm.h>
19#include "prm.h" 20
20#include "prm-regbits-34xx.h" 21#include "prm-regbits-34xx.h"
21#include "powerdomains.h" 22#include "powerdomains.h"
23#include "prm.h"
24#include "prm-regbits-24xx.h"
25#include "prm-regbits-34xx.h"
26
22 27
23/* Common functions across OMAP2 and OMAP3 */ 28/* Common functions across OMAP2 and OMAP3 */
24static int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) 29static int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c
index 2903c7cb2d5..366e8693ba5 100644
--- a/arch/arm/mach-omap2/powerdomain44xx.c
+++ b/arch/arm/mach-omap2/powerdomain44xx.c
@@ -15,6 +15,7 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18
18#include <plat/powerdomain.h> 19#include <plat/powerdomain.h>
19#include <plat/prcm.h> 20#include <plat/prcm.h>
20#include "prm.h" 21#include "prm.h"
diff --git a/arch/arm/mach-omap2/powerdomains.h b/arch/arm/mach-omap2/powerdomains.h
index 55cd8e6aa10..f83adaf889e 100644
--- a/arch/arm/mach-omap2/powerdomains.h
+++ b/arch/arm/mach-omap2/powerdomains.h
@@ -10,8 +10,8 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS 13#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS_H
14#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS 14#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS_H
15 15
16#include <plat/powerdomain.h> 16#include <plat/powerdomain.h>
17 17
@@ -24,4 +24,7 @@ extern u32 omap2_pwrdm_get_mem_bank_onstate_mask(u8 bank);
24extern u32 omap2_pwrdm_get_mem_bank_retst_mask(u8 bank); 24extern u32 omap2_pwrdm_get_mem_bank_retst_mask(u8 bank);
25extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank); 25extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank);
26 26
27#endif /* ARCH_ARM_MACH_OMAP2_POWERDOMAINS */ 27extern struct powerdomain wkup_omap2_pwrdm;
28extern struct powerdomain gfx_omap2_pwrdm;
29
30#endif
diff --git a/arch/arm/mach-omap2/powerdomains_data.c b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
index 29690c64bf1..14c6ef7e01e 100644
--- a/arch/arm/mach-omap2/powerdomains_data.c
+++ b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
@@ -2,10 +2,9 @@
2 * OMAP2/3 common powerdomain definitions 2 * OMAP2/3 common powerdomain definitions
3 * 3 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc. 4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2009 Nokia Corporation 5 * Copyright (C) 2007-2010 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Paul Walmsley, Jouni Högander
8 * Debugging and integration fixes by Jouni Högander
9 * 8 *
10 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
@@ -46,26 +45,20 @@
46 * address offset is different between the C55 and C64 DSPs. 45 * address offset is different between the C55 and C64 DSPs.
47 */ 46 */
48 47
49#include <linux/init.h>
50#include <plat/powerdomain.h> 48#include <plat/powerdomain.h>
51 49
52#include "prcm-common.h" 50#include "prcm-common.h"
53#include "prm.h" 51#include "prm.h"
54#include "cm.h" 52
55#include "powerdomains24xx.h"
56#include "powerdomains34xx.h"
57#include "powerdomains44xx.h"
58#include "powerdomains.h" 53#include "powerdomains.h"
59 54
60/* OMAP2/3-common powerdomains */ 55/* OMAP2/3-common powerdomains */
61 56
62#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
63
64/* 57/*
65 * The GFX powerdomain is not present on 3430ES2, but currently we do not 58 * The GFX powerdomain is not present on 3430ES2, but currently we do not
66 * have a macro to filter it out at compile-time. 59 * have a macro to filter it out at compile-time.
67 */ 60 */
68static struct powerdomain gfx_omap2_pwrdm = { 61struct powerdomain gfx_omap2_pwrdm = {
69 .name = "gfx_pwrdm", 62 .name = "gfx_pwrdm",
70 .prcm_offs = GFX_MOD, 63 .prcm_offs = GFX_MOD,
71 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | 64 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
@@ -81,79 +74,8 @@ static struct powerdomain gfx_omap2_pwrdm = {
81 }, 74 },
82}; 75};
83 76
84static struct powerdomain wkup_omap2_pwrdm = { 77struct powerdomain wkup_omap2_pwrdm = {
85 .name = "wkup_pwrdm", 78 .name = "wkup_pwrdm",
86 .prcm_offs = WKUP_MOD, 79 .prcm_offs = WKUP_MOD,
87 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430), 80 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
88}; 81};
89
90#endif
91
92
93/* As powerdomains are added or removed above, this list must also be changed */
94static struct powerdomain *powerdomains_omap[] __initdata = {
95
96#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
97 &wkup_omap2_pwrdm,
98 &gfx_omap2_pwrdm,
99#endif
100
101#ifdef CONFIG_ARCH_OMAP2
102 &dsp_pwrdm,
103 &mpu_24xx_pwrdm,
104 &core_24xx_pwrdm,
105#endif
106
107#ifdef CONFIG_ARCH_OMAP2430
108 &mdm_pwrdm,
109#endif
110
111#ifdef CONFIG_ARCH_OMAP3
112 &iva2_pwrdm,
113 &mpu_3xxx_pwrdm,
114 &neon_pwrdm,
115 &core_3xxx_pre_es3_1_pwrdm,
116 &core_3xxx_es3_1_pwrdm,
117 &cam_pwrdm,
118 &dss_pwrdm,
119 &per_pwrdm,
120 &emu_pwrdm,
121 &sgx_pwrdm,
122 &usbhost_pwrdm,
123 &dpll1_pwrdm,
124 &dpll2_pwrdm,
125 &dpll3_pwrdm,
126 &dpll4_pwrdm,
127 &dpll5_pwrdm,
128#endif
129
130#ifdef CONFIG_ARCH_OMAP4
131 &core_44xx_pwrdm,
132 &gfx_44xx_pwrdm,
133 &abe_44xx_pwrdm,
134 &dss_44xx_pwrdm,
135 &tesla_44xx_pwrdm,
136 &wkup_44xx_pwrdm,
137 &cpu0_44xx_pwrdm,
138 &cpu1_44xx_pwrdm,
139 &emu_44xx_pwrdm,
140 &mpu_44xx_pwrdm,
141 &ivahd_44xx_pwrdm,
142 &cam_44xx_pwrdm,
143 &l3init_44xx_pwrdm,
144 &l4per_44xx_pwrdm,
145 &always_on_core_44xx_pwrdm,
146 &cefuse_44xx_pwrdm,
147#endif
148 NULL
149};
150
151void pwrdm_fw_init(void)
152{
153 if (cpu_is_omap24xx())
154 pwrdm_init(powerdomains_omap, &omap2_pwrdm_operations);
155 else if (cpu_is_omap34xx())
156 pwrdm_init(powerdomains_omap, &omap3_pwrdm_operations);
157 else if (cpu_is_omap44xx())
158 pwrdm_init(powerdomains_omap, &omap4_pwrdm_operations);
159}
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.h b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.h
new file mode 100644
index 00000000000..45d684a3bf2
--- /dev/null
+++ b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.h
@@ -0,0 +1,22 @@
1/*
2 * OMAP2/3 common powerdomains - prototypes
3 *
4 * Copyright (C) 2008 Texas Instruments, Inc.
5 * Copyright (C) 2008-2010 Nokia Corporation
6 *
7 * Paul Walmsley
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ARCH_ARM_MACH_OMAP2_POWERDOMAINS2XXX_3XXX_DATA_H
15#define __ARCH_ARM_MACH_OMAP2_POWERDOMAINS2XXX_3XXX_DATA_H
16
17#include <plat/powerdomain.h>
18
19extern struct powerdomain gfx_omap2_pwrdm;
20extern struct powerdomain wkup_omap2_pwrdm;
21
22#endif
diff --git a/arch/arm/mach-omap2/powerdomains24xx.h b/arch/arm/mach-omap2/powerdomains2xxx_data.c
index 775093add9b..adc85d35928 100644
--- a/arch/arm/mach-omap2/powerdomains24xx.h
+++ b/arch/arm/mach-omap2/powerdomains2xxx_data.c
@@ -1,26 +1,22 @@
1/* 1/*
2 * OMAP24XX powerdomain definitions 2 * OMAP2XXX powerdomain definitions
3 * 3 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc. 4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2009 Nokia Corporation 5 * Copyright (C) 2007-2010 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Paul Walmsley, Jouni Högander
8 * Debugging and integration fixes by Jouni Högander
9 * 8 *
10 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
13 */ 12 */
14 13
15#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS24XX 14#include <linux/kernel.h>
16#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS24XX 15#include <linux/init.h>
17
18/*
19 * N.B. If powerdomains are added or removed from this file, update
20 * the array in mach-omap2/powerdomains.h.
21 */
22 16
23#include <plat/powerdomain.h> 17#include <plat/powerdomain.h>
18#include "powerdomains2xxx_3xxx_data.h"
19#include "powerdomains.h"
24 20
25#include "prcm-common.h" 21#include "prcm-common.h"
26#include "prm.h" 22#include "prm.h"
@@ -30,8 +26,6 @@
30 26
31/* 24XX powerdomains and dependencies */ 27/* 24XX powerdomains and dependencies */
32 28
33#ifdef CONFIG_ARCH_OMAP2
34
35/* Powerdomains */ 29/* Powerdomains */
36 30
37static struct powerdomain dsp_pwrdm = { 31static struct powerdomain dsp_pwrdm = {
@@ -82,9 +76,6 @@ static struct powerdomain core_24xx_pwrdm = {
82 }, 76 },
83}; 77};
84 78
85#endif /* CONFIG_ARCH_OMAP2 */
86
87
88 79
89/* 80/*
90 * 2430-specific powerdomains 81 * 2430-specific powerdomains
@@ -111,5 +102,25 @@ static struct powerdomain mdm_pwrdm = {
111 102
112#endif /* CONFIG_ARCH_OMAP2430 */ 103#endif /* CONFIG_ARCH_OMAP2430 */
113 104
105/* As powerdomains are added or removed above, this list must also be changed */
106static struct powerdomain *powerdomains_omap2xxx[] __initdata = {
114 107
108 &wkup_omap2_pwrdm,
109 &gfx_omap2_pwrdm,
110
111#ifdef CONFIG_ARCH_OMAP2
112 &dsp_pwrdm,
113 &mpu_24xx_pwrdm,
114 &core_24xx_pwrdm,
115#endif 115#endif
116
117#ifdef CONFIG_ARCH_OMAP2430
118 &mdm_pwrdm,
119#endif
120 NULL
121};
122
123void __init omap2xxx_powerdomains_init(void)
124{
125 pwrdm_init(powerdomains_omap2xxx, &omap2_pwrdm_operations);
126}
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index ce5c15bc41b..1ddc040d7bc 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -4,23 +4,19 @@
4 * Copyright (C) 2007-2008 Texas Instruments, Inc. 4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2010 Nokia Corporation 5 * Copyright (C) 2007-2010 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Paul Walmsley, Jouni Högander
8 * Debugging and integration fixes by Jouni Högander
9 * 8 *
10 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
13 */ 12 */
14 13
15#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX 14#include <linux/kernel.h>
16#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX 15#include <linux/init.h>
17
18/*
19 * N.B. If powerdomains are added or removed from this file, update
20 * the array in mach-omap2/powerdomains.h.
21 */
22 16
23#include <plat/powerdomain.h> 17#include <plat/powerdomain.h>
18#include "powerdomains2xxx_3xxx_data.h"
19#include "powerdomains.h"
24 20
25#include "prcm-common.h" 21#include "prcm-common.h"
26#include "prm.h" 22#include "prm.h"
@@ -260,8 +256,33 @@ static struct powerdomain dpll5_pwrdm = {
260 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2), 256 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
261}; 257};
262 258
259/* As powerdomains are added or removed above, this list must also be changed */
260static struct powerdomain *powerdomains_omap3xxx[] __initdata = {
263 261
264#endif /* CONFIG_ARCH_OMAP3 */ 262 &wkup_omap2_pwrdm,
263 &gfx_omap2_pwrdm,
264 &iva2_pwrdm,
265 &mpu_3xxx_pwrdm,
266 &neon_pwrdm,
267 &core_3xxx_pre_es3_1_pwrdm,
268 &core_3xxx_es3_1_pwrdm,
269 &cam_pwrdm,
270 &dss_pwrdm,
271 &per_pwrdm,
272 &emu_pwrdm,
273 &sgx_pwrdm,
274 &usbhost_pwrdm,
275 &dpll1_pwrdm,
276 &dpll2_pwrdm,
277 &dpll3_pwrdm,
278 &dpll4_pwrdm,
279 &dpll5_pwrdm,
280#endif
281 NULL
282};
265 283
266 284
267#endif 285void __init omap3xxx_powerdomains_init(void)
286{
287 pwrdm_init(powerdomains_omap3xxx, &omap3_pwrdm_operations);
288}
diff --git a/arch/arm/mach-omap2/powerdomains44xx.h b/arch/arm/mach-omap2/powerdomains44xx_data.c
index 9c01b55d610..2512f69fd9c 100644
--- a/arch/arm/mach-omap2/powerdomains44xx.h
+++ b/arch/arm/mach-omap2/powerdomains44xx_data.c
@@ -19,10 +19,11 @@
19 * published by the Free Software Foundation. 19 * published by the Free Software Foundation.
20 */ 20 */
21 21
22#ifndef __ARCH_ARM_MACH_OMAP2_POWERDOMAINS44XX_H 22#include <linux/kernel.h>
23#define __ARCH_ARM_MACH_OMAP2_POWERDOMAINS44XX_H 23#include <linux/init.h>
24 24
25#include <plat/powerdomain.h> 25#include <plat/powerdomain.h>
26#include "powerdomains.h"
26 27
27#include "prcm-common.h" 28#include "prcm-common.h"
28#include "cm.h" 29#include "cm.h"
@@ -30,8 +31,6 @@
30#include "prm.h" 31#include "prm.h"
31#include "prm-regbits-44xx.h" 32#include "prm-regbits-44xx.h"
32 33
33#if defined(CONFIG_ARCH_OMAP4)
34
35/* core_44xx_pwrdm: CORE power domain */ 34/* core_44xx_pwrdm: CORE power domain */
36static struct powerdomain core_44xx_pwrdm = { 35static struct powerdomain core_44xx_pwrdm = {
37 .name = "core_pwrdm", 36 .name = "core_pwrdm",
@@ -314,6 +313,28 @@ static struct powerdomain cefuse_44xx_pwrdm = {
314 * stdefuse 313 * stdefuse
315 */ 314 */
316 315
317#endif 316/* As powerdomains are added or removed above, this list must also be changed */
317static struct powerdomain *powerdomains_omap44xx[] __initdata = {
318 &core_44xx_pwrdm,
319 &gfx_44xx_pwrdm,
320 &abe_44xx_pwrdm,
321 &dss_44xx_pwrdm,
322 &tesla_44xx_pwrdm,
323 &wkup_44xx_pwrdm,
324 &cpu0_44xx_pwrdm,
325 &cpu1_44xx_pwrdm,
326 &emu_44xx_pwrdm,
327 &mpu_44xx_pwrdm,
328 &ivahd_44xx_pwrdm,
329 &cam_44xx_pwrdm,
330 &l3init_44xx_pwrdm,
331 &l4per_44xx_pwrdm,
332 &always_on_core_44xx_pwrdm,
333 &cefuse_44xx_pwrdm,
334 NULL
335};
318 336
319#endif 337void __init omap44xx_powerdomains_init(void)
338{
339 pwrdm_init(powerdomains_omap44xx, &omap4_pwrdm_operations);
340}
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h
index 583758cbd7d..b79eebb27a7 100644
--- a/arch/arm/plat-omap/include/plat/powerdomain.h
+++ b/arch/arm/plat-omap/include/plat/powerdomain.h
@@ -2,17 +2,20 @@
2 * OMAP2/3 powerdomain control 2 * OMAP2/3 powerdomain control
3 * 3 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc. 4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2009 Nokia Corporation 5 * Copyright (C) 2007-2010 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Written by Paul Walmsley
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 *
13 * XXX This should be moved to the mach-omap2/ directory at the earliest
14 * opportunity.
12 */ 15 */
13 16
14#ifndef ASM_ARM_ARCH_OMAP_POWERDOMAIN 17#ifndef ASM_ARM_PLAT_OMAP_INCLUDE_PLAT_POWERDOMAIN
15#define ASM_ARM_ARCH_OMAP_POWERDOMAIN 18#define ASM_ARM_PLAT_OMAP_INCLUDE_PLAT_POWERDOMAIN
16 19
17#include <linux/types.h> 20#include <linux/types.h>
18#include <linux/list.h> 21#include <linux/list.h>
@@ -206,4 +209,8 @@ int pwrdm_pre_transition(void);
206int pwrdm_post_transition(void); 209int pwrdm_post_transition(void);
207int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); 210int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
208 211
212extern void omap2xxx_powerdomains_init(void);
213extern void omap3xxx_powerdomains_init(void);
214extern void omap44xx_powerdomains_init(void);
215
209#endif 216#endif