blob: e136895e0a37f27c9d555cb346ec84eeeb6b18a9 [file] [log] [blame]
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +03001/*
Paul Walmsley6e014782010-12-21 20:01:20 -07002 * OMAP2XXX powerdomain definitions
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +03003 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
Paul Walmsley6e014782010-12-21 20:01:20 -07005 * Copyright (C) 2007-2010 Nokia Corporation
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +03006 *
Paul Walmsley6e014782010-12-21 20:01:20 -07007 * Paul Walmsley, Jouni Högander
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +03008 *
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
Paul Walmsley6e014782010-12-21 20:01:20 -070014#include <linux/kernel.h>
15#include <linux/init.h>
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030016
Tony Lindgrence491cf2009-10-20 09:40:47 -070017#include <plat/powerdomain.h>
Paul Walmsley6e014782010-12-21 20:01:20 -070018#include "powerdomains2xxx_3xxx_data.h"
19#include "powerdomains.h"
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030020
21#include "prcm-common.h"
Paul Walmsley59fb6592010-12-21 15:30:55 -070022#include "prm2xxx_3xxx.h"
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030023#include "prm-regbits-24xx.h"
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030024
25/* 24XX powerdomains and dependencies */
26
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030027/* Powerdomains */
28
29static struct powerdomain dsp_pwrdm = {
30 .name = "dsp_pwrdm",
31 .prcm_offs = OMAP24XX_DSP_MOD,
32 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030033 .pwrsts = PWRSTS_OFF_RET_ON,
34 .pwrsts_logic_ret = PWRDM_POWER_RET,
35 .banks = 1,
36 .pwrsts_mem_ret = {
37 [0] = PWRDM_POWER_RET,
38 },
39 .pwrsts_mem_on = {
40 [0] = PWRDM_POWER_ON,
41 },
42};
43
44static struct powerdomain mpu_24xx_pwrdm = {
45 .name = "mpu_pwrdm",
46 .prcm_offs = MPU_MOD,
47 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030048 .pwrsts = PWRSTS_OFF_RET_ON,
49 .pwrsts_logic_ret = PWRSTS_OFF_RET,
50 .banks = 1,
51 .pwrsts_mem_ret = {
52 [0] = PWRDM_POWER_RET,
53 },
54 .pwrsts_mem_on = {
55 [0] = PWRDM_POWER_ON,
56 },
57};
58
59static struct powerdomain core_24xx_pwrdm = {
60 .name = "core_pwrdm",
61 .prcm_offs = CORE_MOD,
62 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030063 .pwrsts = PWRSTS_OFF_RET_ON,
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030064 .banks = 3,
65 .pwrsts_mem_ret = {
66 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
67 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
68 [2] = PWRSTS_OFF_RET, /* MEM3RETSTATE */
69 },
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 */
74 },
75};
76
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030077
78/*
79 * 2430-specific powerdomains
80 */
81
82#ifdef CONFIG_ARCH_OMAP2430
83
84/* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
85
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030086static struct powerdomain mdm_pwrdm = {
87 .name = "mdm_pwrdm",
88 .prcm_offs = OMAP2430_MDM_MOD,
89 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +030090 .pwrsts = PWRSTS_OFF_RET_ON,
91 .pwrsts_logic_ret = PWRDM_POWER_RET,
92 .banks = 1,
93 .pwrsts_mem_ret = {
94 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
95 },
96 .pwrsts_mem_on = {
97 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
98 },
99};
100
101#endif /* CONFIG_ARCH_OMAP2430 */
102
Paul Walmsley6e014782010-12-21 20:01:20 -0700103/* As powerdomains are added or removed above, this list must also be changed */
104static struct powerdomain *powerdomains_omap2xxx[] __initdata = {
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +0300105
Paul Walmsley6e014782010-12-21 20:01:20 -0700106 &wkup_omap2_pwrdm,
107 &gfx_omap2_pwrdm,
108
109#ifdef CONFIG_ARCH_OMAP2
110 &dsp_pwrdm,
111 &mpu_24xx_pwrdm,
112 &core_24xx_pwrdm,
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +0300113#endif
Paul Walmsley6e014782010-12-21 20:01:20 -0700114
115#ifdef CONFIG_ARCH_OMAP2430
116 &mdm_pwrdm,
117#endif
118 NULL
119};
120
121void __init omap2xxx_powerdomains_init(void)
122{
123 pwrdm_init(powerdomains_omap2xxx, &omap2_pwrdm_operations);
124}