Linux 3.8-rc5
[deliverable/linux.git] / arch / arm / mach-omap2 / powerdomains2xxx_data.c
CommitLineData
fe6a58f8 1/*
6e01478a 2 * OMAP2XXX powerdomain definitions
fe6a58f8 3 *
8179488a 4 * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc.
4cb49fec 5 * Copyright (C) 2007-2011 Nokia Corporation
fe6a58f8 6 *
6e01478a 7 * Paul Walmsley, Jouni Högander
fe6a58f8
PW
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
6e01478a
PW
14#include <linux/kernel.h>
15#include <linux/init.h>
fe6a58f8 16
e4c060db 17#include "soc.h"
72e06d08 18#include "powerdomain.h"
6e01478a 19#include "powerdomains2xxx_3xxx_data.h"
fe6a58f8
PW
20
21#include "prcm-common.h"
59fb659b 22#include "prm2xxx_3xxx.h"
fe6a58f8 23#include "prm-regbits-24xx.h"
fe6a58f8
PW
24
25/* 24XX powerdomains and dependencies */
26
fe6a58f8
PW
27/* Powerdomains */
28
29static struct powerdomain dsp_pwrdm = {
30 .name = "dsp_pwrdm",
31 .prcm_offs = OMAP24XX_DSP_MOD,
fe6a58f8 32 .pwrsts = PWRSTS_OFF_RET_ON,
4cb49fec 33 .pwrsts_logic_ret = PWRSTS_RET,
fe6a58f8
PW
34 .banks = 1,
35 .pwrsts_mem_ret = {
4cb49fec 36 [0] = PWRSTS_RET,
fe6a58f8
PW
37 },
38 .pwrsts_mem_on = {
4cb49fec 39 [0] = PWRSTS_ON,
fe6a58f8 40 },
aae030fa 41 .voltdm = { .name = "core" },
fe6a58f8
PW
42};
43
44static struct powerdomain mpu_24xx_pwrdm = {
45 .name = "mpu_pwrdm",
46 .prcm_offs = MPU_MOD,
fe6a58f8
PW
47 .pwrsts = PWRSTS_OFF_RET_ON,
48 .pwrsts_logic_ret = PWRSTS_OFF_RET,
49 .banks = 1,
50 .pwrsts_mem_ret = {
4cb49fec 51 [0] = PWRSTS_RET,
fe6a58f8
PW
52 },
53 .pwrsts_mem_on = {
4cb49fec 54 [0] = PWRSTS_ON,
fe6a58f8 55 },
aae030fa 56 .voltdm = { .name = "core" },
fe6a58f8
PW
57};
58
59static struct powerdomain core_24xx_pwrdm = {
60 .name = "core_pwrdm",
61 .prcm_offs = CORE_MOD,
fe6a58f8 62 .pwrsts = PWRSTS_OFF_RET_ON,
fe6a58f8
PW
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 },
aae030fa 74 .voltdm = { .name = "core" },
fe6a58f8
PW
75};
76
fe6a58f8
PW
77
78/*
79 * 2430-specific powerdomains
80 */
81
fe6a58f8
PW
82/* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
83
fe6a58f8
PW
84static struct powerdomain mdm_pwrdm = {
85 .name = "mdm_pwrdm",
86 .prcm_offs = OMAP2430_MDM_MOD,
fe6a58f8 87 .pwrsts = PWRSTS_OFF_RET_ON,
4cb49fec 88 .pwrsts_logic_ret = PWRSTS_RET,
fe6a58f8
PW
89 .banks = 1,
90 .pwrsts_mem_ret = {
4cb49fec 91 [0] = PWRSTS_RET, /* MEMRETSTATE */
fe6a58f8
PW
92 },
93 .pwrsts_mem_on = {
4cb49fec 94 [0] = PWRSTS_ON, /* MEMONSTATE */
fe6a58f8 95 },
aae030fa 96 .voltdm = { .name = "core" },
fe6a58f8
PW
97};
98
8179488a
PW
99/*
100 *
101 */
fe6a58f8 102
8179488a 103static struct powerdomain *powerdomains_omap24xx[] __initdata = {
6e01478a
PW
104 &wkup_omap2_pwrdm,
105 &gfx_omap2_pwrdm,
6e01478a
PW
106 &dsp_pwrdm,
107 &mpu_24xx_pwrdm,
108 &core_24xx_pwrdm,
8179488a
PW
109 NULL
110};
6e01478a 111
8179488a 112static struct powerdomain *powerdomains_omap2430[] __initdata = {
6e01478a 113 &mdm_pwrdm,
6e01478a
PW
114 NULL
115};
116
8179488a 117void __init omap242x_powerdomains_init(void)
6e01478a 118{
8179488a
PW
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
127void __init omap243x_powerdomains_init(void)
128{
129 if (!cpu_is_omap2430())
130 return;
131
129c65ee 132 pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
8179488a
PW
133 pwrdm_register_pwrdms(powerdomains_omap24xx);
134 pwrdm_register_pwrdms(powerdomains_omap2430);
129c65ee 135 pwrdm_complete_init();
6e01478a 136}
This page took 0.288168 seconds and 5 git commands to generate.