x86: Make the vdso2c compiler use the host architecture headers
[linux/fpc-iii.git] / arch / arm / mach-omap2 / powerdomains43xx_data.c
blob95fee54c38ab6c83a1c402339f54413b4a770793
1 /*
2 * AM43xx Power domains framework
4 * Copyright (C) 2013 Texas Instruments, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 #include <linux/kernel.h>
12 #include <linux/init.h>
14 #include "powerdomain.h"
16 #include "prcm-common.h"
17 #include "prcm44xx.h"
18 #include "prcm43xx.h"
20 static struct powerdomain gfx_43xx_pwrdm = {
21 .name = "gfx_pwrdm",
22 .voltdm = { .name = "core" },
23 .prcm_offs = AM43XX_PRM_GFX_INST,
24 .prcm_partition = AM43XX_PRM_PARTITION,
25 .pwrsts = PWRSTS_OFF_ON,
26 .banks = 1,
27 .pwrsts_mem_on = {
28 [0] = PWRSTS_ON, /* gfx_mem */
30 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
33 static struct powerdomain mpu_43xx_pwrdm = {
34 .name = "mpu_pwrdm",
35 .voltdm = { .name = "mpu" },
36 .prcm_offs = AM43XX_PRM_MPU_INST,
37 .prcm_partition = AM43XX_PRM_PARTITION,
38 .pwrsts = PWRSTS_OFF_RET_ON,
39 .pwrsts_logic_ret = PWRSTS_OFF_RET,
40 .banks = 3,
41 .pwrsts_mem_ret = {
42 [0] = PWRSTS_OFF_RET, /* mpu_l1 */
43 [1] = PWRSTS_OFF_RET, /* mpu_l2 */
44 [2] = PWRSTS_OFF_RET, /* mpu_ram */
46 .pwrsts_mem_on = {
47 [0] = PWRSTS_ON, /* mpu_l1 */
48 [1] = PWRSTS_ON, /* mpu_l2 */
49 [2] = PWRSTS_ON, /* mpu_ram */
51 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
54 static struct powerdomain rtc_43xx_pwrdm = {
55 .name = "rtc_pwrdm",
56 .voltdm = { .name = "rtc" },
57 .prcm_offs = AM43XX_PRM_RTC_INST,
58 .prcm_partition = AM43XX_PRM_PARTITION,
59 .pwrsts = PWRSTS_ON,
62 static struct powerdomain wkup_43xx_pwrdm = {
63 .name = "wkup_pwrdm",
64 .voltdm = { .name = "core" },
65 .prcm_offs = AM43XX_PRM_WKUP_INST,
66 .prcm_partition = AM43XX_PRM_PARTITION,
67 .pwrsts = PWRSTS_ON,
68 .banks = 1,
69 .pwrsts_mem_on = {
70 [0] = PWRSTS_ON, /* debugss_mem */
74 static struct powerdomain tamper_43xx_pwrdm = {
75 .name = "tamper_pwrdm",
76 .voltdm = { .name = "tamper" },
77 .prcm_offs = AM43XX_PRM_TAMPER_INST,
78 .prcm_partition = AM43XX_PRM_PARTITION,
79 .pwrsts = PWRSTS_ON,
82 static struct powerdomain cefuse_43xx_pwrdm = {
83 .name = "cefuse_pwrdm",
84 .voltdm = { .name = "core" },
85 .prcm_offs = AM43XX_PRM_CEFUSE_INST,
86 .prcm_partition = AM43XX_PRM_PARTITION,
87 .pwrsts = PWRSTS_OFF_ON,
88 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
91 static struct powerdomain per_43xx_pwrdm = {
92 .name = "per_pwrdm",
93 .voltdm = { .name = "core" },
94 .prcm_offs = AM43XX_PRM_PER_INST,
95 .prcm_partition = AM43XX_PRM_PARTITION,
96 .pwrsts = PWRSTS_OFF_RET_ON,
97 .pwrsts_logic_ret = PWRSTS_OFF_RET,
98 .banks = 4,
99 .pwrsts_mem_ret = {
100 [0] = PWRSTS_OFF_RET, /* icss_mem */
101 [1] = PWRSTS_OFF_RET, /* per_mem */
102 [2] = PWRSTS_OFF_RET, /* ram1_mem */
103 [3] = PWRSTS_OFF_RET, /* ram2_mem */
105 .pwrsts_mem_on = {
106 [0] = PWRSTS_ON, /* icss_mem */
107 [1] = PWRSTS_ON, /* per_mem */
108 [2] = PWRSTS_ON, /* ram1_mem */
109 [3] = PWRSTS_ON, /* ram2_mem */
111 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
114 static struct powerdomain *powerdomains_am43xx[] __initdata = {
115 &gfx_43xx_pwrdm,
116 &mpu_43xx_pwrdm,
117 &rtc_43xx_pwrdm,
118 &wkup_43xx_pwrdm,
119 &tamper_43xx_pwrdm,
120 &cefuse_43xx_pwrdm,
121 &per_43xx_pwrdm,
122 NULL
125 static int am43xx_check_vcvp(void)
127 return 0;
130 void __init am43xx_powerdomains_init(void)
132 omap4_pwrdm_operations.pwrdm_has_voltdm = am43xx_check_vcvp;
133 pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
134 pwrdm_register_pwrdms(powerdomains_am43xx);
135 pwrdm_complete_init();