mm: hugetlb: fix hugepage memory leak caused by wrong reserve count
[linux/fpc-iii.git] / arch / arm / mach-omap2 / powerdomains2xxx_data.c
blob578eef86fcf2b514e5f98cf4190a808de456bb92
1 /*
2 * OMAP2XXX powerdomain definitions
4 * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation
7 * Paul Walmsley, Jouni Högander
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.
14 #include <linux/kernel.h>
15 #include <linux/init.h>
17 #include "soc.h"
18 #include "powerdomain.h"
19 #include "powerdomains2xxx_3xxx_data.h"
21 #include "prcm-common.h"
22 #include "prm2xxx_3xxx.h"
23 #include "prm-regbits-24xx.h"
25 /* 24XX powerdomains and dependencies */
27 /* Powerdomains */
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,
38 .pwrsts_mem_on = {
39 [0] = PWRSTS_ON,
41 .voltdm = { .name = "core" },
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,
53 .pwrsts_mem_on = {
54 [0] = PWRSTS_ON,
56 .voltdm = { .name = "core" },
59 static struct powerdomain core_24xx_pwrdm = {
60 .name = "core_pwrdm",
61 .prcm_offs = CORE_MOD,
62 .pwrsts = PWRSTS_OFF_RET_ON,
63 .pwrsts_logic_ret = PWRSTS_RET,
64 .banks = 3,
65 .pwrsts_mem_ret = {
66 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
67 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
68 [2] = PWRSTS_OFF_RET, /* MEM3RETSTATE */
70 .pwrsts_mem_on = {
71 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
72 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
73 [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
75 .voltdm = { .name = "core" },
80 * 2430-specific powerdomains
83 /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
85 static struct powerdomain mdm_pwrdm = {
86 .name = "mdm_pwrdm",
87 .prcm_offs = OMAP2430_MDM_MOD,
88 .pwrsts = PWRSTS_OFF_RET_ON,
89 .pwrsts_logic_ret = PWRSTS_RET,
90 .banks = 1,
91 .pwrsts_mem_ret = {
92 [0] = PWRSTS_RET, /* MEMRETSTATE */
94 .pwrsts_mem_on = {
95 [0] = PWRSTS_ON, /* MEMONSTATE */
97 .voltdm = { .name = "core" },
104 static struct powerdomain *powerdomains_omap24xx[] __initdata = {
105 &wkup_omap2_pwrdm,
106 &gfx_omap2_pwrdm,
107 &dsp_pwrdm,
108 &mpu_24xx_pwrdm,
109 &core_24xx_pwrdm,
110 NULL
113 static struct powerdomain *powerdomains_omap2430[] __initdata = {
114 &mdm_pwrdm,
115 NULL
118 void __init omap242x_powerdomains_init(void)
120 if (!cpu_is_omap2420())
121 return;
123 pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
124 pwrdm_register_pwrdms(powerdomains_omap24xx);
125 pwrdm_complete_init();
128 void __init omap243x_powerdomains_init(void)
130 if (!cpu_is_omap2430())
131 return;
133 pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
134 pwrdm_register_pwrdms(powerdomains_omap24xx);
135 pwrdm_register_pwrdms(powerdomains_omap2430);
136 pwrdm_complete_init();