]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/mach-omap2/powerdomains2xxx_data.c
Merge branch 'stable/for-jens-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / arm / mach-omap2 / powerdomains2xxx_data.c
1 /*
2  * OMAP2XXX powerdomain definitions
3  *
4  * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc.
5  * Copyright (C) 2007-2011 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 "soc.h"
18 #include "powerdomain.h"
19 #include "powerdomains2xxx_3xxx_data.h"
20
21 #include "prcm-common.h"
22 #include "prm2xxx_3xxx.h"
23 #include "prm-regbits-24xx.h"
24
25 /* 24XX powerdomains and dependencies */
26
27 /* Powerdomains */
28
29 static struct powerdomain dsp_pwrdm = {
30         .name             = "dsp_pwrdm",
31         .prcm_offs        = OMAP24XX_DSP_MOD,
32         .pwrsts           = PWRSTS_OFF_RET_ON,
33         .pwrsts_logic_ret = PWRSTS_RET,
34         .banks            = 1,
35         .pwrsts_mem_ret   = {
36                 [0] = PWRSTS_RET,
37         },
38         .pwrsts_mem_on    = {
39                 [0] = PWRSTS_ON,
40         },
41         .voltdm           = { .name = "core" },
42 };
43
44 static struct powerdomain mpu_24xx_pwrdm = {
45         .name             = "mpu_pwrdm",
46         .prcm_offs        = MPU_MOD,
47         .pwrsts           = PWRSTS_OFF_RET_ON,
48         .pwrsts_logic_ret = PWRSTS_OFF_RET,
49         .banks            = 1,
50         .pwrsts_mem_ret   = {
51                 [0] = PWRSTS_RET,
52         },
53         .pwrsts_mem_on    = {
54                 [0] = PWRSTS_ON,
55         },
56         .voltdm           = { .name = "core" },
57 };
58
59 static struct powerdomain core_24xx_pwrdm = {
60         .name             = "core_pwrdm",
61         .prcm_offs        = CORE_MOD,
62         .pwrsts           = PWRSTS_OFF_RET_ON,
63         .banks            = 3,
64         .pwrsts_mem_ret   = {
65                 [0] = PWRSTS_OFF_RET,    /* MEM1RETSTATE */
66                 [1] = PWRSTS_OFF_RET,    /* MEM2RETSTATE */
67                 [2] = PWRSTS_OFF_RET,    /* MEM3RETSTATE */
68         },
69         .pwrsts_mem_on    = {
70                 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
71                 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
72                 [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
73         },
74         .voltdm           = { .name = "core" },
75 };
76
77
78 /*
79  * 2430-specific powerdomains
80  */
81
82 /* XXX 2430 KILLDOMAINWKUP bit?  No current users apparently */
83
84 static struct powerdomain mdm_pwrdm = {
85         .name             = "mdm_pwrdm",
86         .prcm_offs        = OMAP2430_MDM_MOD,
87         .pwrsts           = PWRSTS_OFF_RET_ON,
88         .pwrsts_logic_ret = PWRSTS_RET,
89         .banks            = 1,
90         .pwrsts_mem_ret   = {
91                 [0] = PWRSTS_RET, /* MEMRETSTATE */
92         },
93         .pwrsts_mem_on    = {
94                 [0] = PWRSTS_ON,  /* MEMONSTATE */
95         },
96         .voltdm           = { .name = "core" },
97 };
98
99 /*
100  *
101  */
102
103 static struct powerdomain *powerdomains_omap24xx[] __initdata = {
104         &wkup_omap2_pwrdm,
105         &gfx_omap2_pwrdm,
106         &dsp_pwrdm,
107         &mpu_24xx_pwrdm,
108         &core_24xx_pwrdm,
109         NULL
110 };
111
112 static struct powerdomain *powerdomains_omap2430[] __initdata = {
113         &mdm_pwrdm,
114         NULL
115 };
116
117 void __init omap242x_powerdomains_init(void)
118 {
119         if (!cpu_is_omap2420())
120                 return;
121
122         pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
123         pwrdm_register_pwrdms(powerdomains_omap24xx);
124         pwrdm_complete_init();
125 }
126
127 void __init omap243x_powerdomains_init(void)
128 {
129         if (!cpu_is_omap2430())
130                 return;
131
132         pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
133         pwrdm_register_pwrdms(powerdomains_omap24xx);
134         pwrdm_register_pwrdms(powerdomains_omap2430);
135         pwrdm_complete_init();
136 }