Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / mach-omap2 / powerdomains2xxx_data.c
blobfa259adbdc61ef405b9d2f7640a6a9d56b6d5e63
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * OMAP2XXX powerdomain definitions
5 * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc.
6 * Copyright (C) 2007-2011 Nokia Corporation
8 * Paul Walmsley, Jouni Högander
9 */
11 #include <linux/kernel.h>
12 #include <linux/init.h>
14 #include "soc.h"
15 #include "powerdomain.h"
16 #include "powerdomains2xxx_3xxx_data.h"
18 #include "prcm-common.h"
19 #include "prm2xxx_3xxx.h"
20 #include "prm-regbits-24xx.h"
22 /* 24XX powerdomains and dependencies */
24 /* Powerdomains */
26 static struct powerdomain dsp_pwrdm = {
27 .name = "dsp_pwrdm",
28 .prcm_offs = OMAP24XX_DSP_MOD,
29 .pwrsts = PWRSTS_OFF_RET_ON,
30 .pwrsts_logic_ret = PWRSTS_RET,
31 .banks = 1,
32 .pwrsts_mem_ret = {
33 [0] = PWRSTS_RET,
35 .pwrsts_mem_on = {
36 [0] = PWRSTS_ON,
38 .voltdm = { .name = "core" },
41 static struct powerdomain mpu_24xx_pwrdm = {
42 .name = "mpu_pwrdm",
43 .prcm_offs = MPU_MOD,
44 .pwrsts = PWRSTS_OFF_RET_ON,
45 .pwrsts_logic_ret = PWRSTS_OFF_RET,
46 .banks = 1,
47 .pwrsts_mem_ret = {
48 [0] = PWRSTS_RET,
50 .pwrsts_mem_on = {
51 [0] = PWRSTS_ON,
53 .voltdm = { .name = "core" },
56 static struct powerdomain core_24xx_pwrdm = {
57 .name = "core_pwrdm",
58 .prcm_offs = CORE_MOD,
59 .pwrsts = PWRSTS_OFF_RET_ON,
60 .pwrsts_logic_ret = PWRSTS_RET,
61 .banks = 3,
62 .pwrsts_mem_ret = {
63 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
64 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
65 [2] = PWRSTS_OFF_RET, /* MEM3RETSTATE */
67 .pwrsts_mem_on = {
68 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
69 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
70 [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
72 .voltdm = { .name = "core" },
77 * 2430-specific powerdomains
80 /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
82 static struct powerdomain mdm_pwrdm = {
83 .name = "mdm_pwrdm",
84 .prcm_offs = OMAP2430_MDM_MOD,
85 .pwrsts = PWRSTS_OFF_RET_ON,
86 .pwrsts_logic_ret = PWRSTS_RET,
87 .banks = 1,
88 .pwrsts_mem_ret = {
89 [0] = PWRSTS_RET, /* MEMRETSTATE */
91 .pwrsts_mem_on = {
92 [0] = PWRSTS_ON, /* MEMONSTATE */
94 .voltdm = { .name = "core" },
101 static struct powerdomain *powerdomains_omap24xx[] __initdata = {
102 &wkup_omap2_pwrdm,
103 &gfx_omap2_pwrdm,
104 &dsp_pwrdm,
105 &mpu_24xx_pwrdm,
106 &core_24xx_pwrdm,
107 NULL
110 static struct powerdomain *powerdomains_omap2430[] __initdata = {
111 &mdm_pwrdm,
112 NULL
115 void __init omap242x_powerdomains_init(void)
117 if (!cpu_is_omap2420())
118 return;
120 pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
121 pwrdm_register_pwrdms(powerdomains_omap24xx);
122 pwrdm_complete_init();
125 void __init omap243x_powerdomains_init(void)
127 if (!cpu_is_omap2430())
128 return;
130 pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
131 pwrdm_register_pwrdms(powerdomains_omap24xx);
132 pwrdm_register_pwrdms(powerdomains_omap2430);
133 pwrdm_complete_init();