aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomains2xxx_data.c
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 /arch/arm/mach-omap2/powerdomains2xxx_data.c
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>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomains2xxx_data.c')
-rw-r--r--arch/arm/mach-omap2/powerdomains2xxx_data.c126
1 files changed, 126 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_data.c b/arch/arm/mach-omap2/powerdomains2xxx_data.c
new file mode 100644
index 000000000000..adc85d359289
--- /dev/null
+++ b/arch/arm/mach-omap2/powerdomains2xxx_data.c
@@ -0,0 +1,126 @@
1/*
2 * OMAP2XXX powerdomain definitions
3 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2010 Nokia Corporation
6 *
7 * Paul Walmsley, Jouni Högander
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#include <linux/kernel.h>
15#include <linux/init.h>
16
17#include <plat/powerdomain.h>
18#include "powerdomains2xxx_3xxx_data.h"
19#include "powerdomains.h"
20
21#include "prcm-common.h"
22#include "prm.h"
23#include "prm-regbits-24xx.h"
24#include "cm.h"
25#include "cm-regbits-24xx.h"
26
27/* 24XX powerdomains and dependencies */
28
29/* Powerdomains */
30
31static struct powerdomain dsp_pwrdm = {
32 .name = "dsp_pwrdm",
33 .prcm_offs = OMAP24XX_DSP_MOD,
34 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
35 .pwrsts = PWRSTS_OFF_RET_ON,
36 .pwrsts_logic_ret = PWRDM_POWER_RET,
37 .banks = 1,
38 .pwrsts_mem_ret = {
39 [0] = PWRDM_POWER_RET,
40 },
41 .pwrsts_mem_on = {
42 [0] = PWRDM_POWER_ON,
43 },
44};
45
46static struct powerdomain mpu_24xx_pwrdm = {
47 .name = "mpu_pwrdm",
48 .prcm_offs = MPU_MOD,
49 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
50 .pwrsts = PWRSTS_OFF_RET_ON,
51 .pwrsts_logic_ret = PWRSTS_OFF_RET,
52 .banks = 1,
53 .pwrsts_mem_ret = {
54 [0] = PWRDM_POWER_RET,
55 },
56 .pwrsts_mem_on = {
57 [0] = PWRDM_POWER_ON,
58 },
59};
60
61static struct powerdomain core_24xx_pwrdm = {
62 .name = "core_pwrdm",
63 .prcm_offs = CORE_MOD,
64 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
65 .pwrsts = PWRSTS_OFF_RET_ON,
66 .banks = 3,
67 .pwrsts_mem_ret = {
68 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
69 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
70 [2] = PWRSTS_OFF_RET, /* MEM3RETSTATE */
71 },
72 .pwrsts_mem_on = {
73 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
74 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
75 [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
76 },
77};
78
79
80/*
81 * 2430-specific powerdomains
82 */
83
84#ifdef CONFIG_ARCH_OMAP2430
85
86/* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
87
88static struct powerdomain mdm_pwrdm = {
89 .name = "mdm_pwrdm",
90 .prcm_offs = OMAP2430_MDM_MOD,
91 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
92 .pwrsts = PWRSTS_OFF_RET_ON,
93 .pwrsts_logic_ret = PWRDM_POWER_RET,
94 .banks = 1,
95 .pwrsts_mem_ret = {
96 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
97 },
98 .pwrsts_mem_on = {
99 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
100 },
101};
102
103#endif /* CONFIG_ARCH_OMAP2430 */
104
105/* As powerdomains are added or removed above, this list must also be changed */
106static struct powerdomain *powerdomains_omap2xxx[] __initdata = {
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
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}