OMAP4: powerdomain: Add pwrdm_clear_all_prev_pwrst
[linux-2.6.git] / arch / arm / mach-omap2 / powerdomains24xx.h
1 /*
2  * OMAP24XX powerdomain definitions
3  *
4  * Copyright (C) 2007-2008 Texas Instruments, Inc.
5  * Copyright (C) 2007-2009 Nokia Corporation
6  *
7  * Written by Paul Walmsley
8  * Debugging and integration fixes by Jouni Högander
9  *
10  * 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
12  * published by the Free Software Foundation.
13  */
14
15 #ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS24XX
16 #define ARCH_ARM_MACH_OMAP2_POWERDOMAINS24XX
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
23 #include <plat/powerdomain.h>
24
25 #include "prcm-common.h"
26 #include "prm.h"
27 #include "prm-regbits-24xx.h"
28 #include "cm.h"
29 #include "cm-regbits-24xx.h"
30
31 /* 24XX powerdomains and dependencies */
32
33 #ifdef CONFIG_ARCH_OMAP2
34
35 /* Powerdomains */
36
37 static struct powerdomain dsp_pwrdm = {
38         .name             = "dsp_pwrdm",
39         .prcm_offs        = OMAP24XX_DSP_MOD,
40         .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
41         .pwrsts           = PWRSTS_OFF_RET_ON,
42         .pwrsts_logic_ret = PWRDM_POWER_RET,
43         .banks            = 1,
44         .pwrsts_mem_ret   = {
45                 [0] = PWRDM_POWER_RET,
46         },
47         .pwrsts_mem_on    = {
48                 [0] = PWRDM_POWER_ON,
49         },
50 };
51
52 static struct powerdomain mpu_24xx_pwrdm = {
53         .name             = "mpu_pwrdm",
54         .prcm_offs        = MPU_MOD,
55         .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
56         .pwrsts           = PWRSTS_OFF_RET_ON,
57         .pwrsts_logic_ret = PWRSTS_OFF_RET,
58         .banks            = 1,
59         .pwrsts_mem_ret   = {
60                 [0] = PWRDM_POWER_RET,
61         },
62         .pwrsts_mem_on    = {
63                 [0] = PWRDM_POWER_ON,
64         },
65 };
66
67 static struct powerdomain core_24xx_pwrdm = {
68         .name             = "core_pwrdm",
69         .prcm_offs        = CORE_MOD,
70         .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
71         .pwrsts           = PWRSTS_OFF_RET_ON,
72         .banks            = 3,
73         .pwrsts_mem_ret   = {
74                 [0] = PWRSTS_OFF_RET,    /* MEM1RETSTATE */
75                 [1] = PWRSTS_OFF_RET,    /* MEM2RETSTATE */
76                 [2] = PWRSTS_OFF_RET,    /* MEM3RETSTATE */
77         },
78         .pwrsts_mem_on    = {
79                 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
80                 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
81                 [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
82         },
83 };
84
85 #endif     /* CONFIG_ARCH_OMAP2 */
86
87
88
89 /*
90  * 2430-specific powerdomains
91  */
92
93 #ifdef CONFIG_ARCH_OMAP2430
94
95 /* XXX 2430 KILLDOMAINWKUP bit?  No current users apparently */
96
97 static struct powerdomain mdm_pwrdm = {
98         .name             = "mdm_pwrdm",
99         .prcm_offs        = OMAP2430_MDM_MOD,
100         .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
101         .pwrsts           = PWRSTS_OFF_RET_ON,
102         .pwrsts_logic_ret = PWRDM_POWER_RET,
103         .banks            = 1,
104         .pwrsts_mem_ret   = {
105                 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
106         },
107         .pwrsts_mem_on    = {
108                 [0] = PWRDM_POWER_ON,  /* MEMONSTATE */
109         },
110 };
111
112 #endif     /* CONFIG_ARCH_OMAP2430 */
113
114
115 #endif