Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 2 | /* |
Paul Walmsley | 98fa3d8 | 2010-01-26 20:13:13 -0700 | [diff] [blame] | 3 | * OMAP3 powerdomain definitions |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 4 | * |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 5 | * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc. |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 6 | * Copyright (C) 2007-2011 Nokia Corporation |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 7 | * |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 8 | * Paul Walmsley, Jouni Högander |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 9 | */ |
| 10 | |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
Tony Lindgren | d9a5f4d | 2012-03-07 17:28:01 -0800 | [diff] [blame] | 13 | #include <linux/bug.h> |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 14 | |
Tony Lindgren | dbc0416 | 2012-08-31 10:59:07 -0700 | [diff] [blame] | 15 | #include "soc.h" |
Paul Walmsley | 72e06d0 | 2010-12-21 21:05:16 -0700 | [diff] [blame] | 16 | #include "powerdomain.h" |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 17 | #include "powerdomains2xxx_3xxx_data.h" |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 18 | #include "prcm-common.h" |
Paul Walmsley | 59fb659 | 2010-12-21 15:30:55 -0700 | [diff] [blame] | 19 | #include "prm2xxx_3xxx.h" |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 20 | #include "prm-regbits-34xx.h" |
Paul Walmsley | 59fb659 | 2010-12-21 15:30:55 -0700 | [diff] [blame] | 21 | #include "cm2xxx_3xxx.h" |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 22 | #include "cm-regbits-34xx.h" |
| 23 | |
| 24 | /* |
| 25 | * 34XX-specific powerdomains, dependencies |
| 26 | */ |
| 27 | |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 28 | /* |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 29 | * Powerdomains |
| 30 | */ |
| 31 | |
| 32 | static struct powerdomain iva2_pwrdm = { |
| 33 | .name = "iva2_pwrdm", |
| 34 | .prcm_offs = OMAP3430_IVA2_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 35 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 36 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 37 | .banks = 4, |
| 38 | .pwrsts_mem_ret = { |
| 39 | [0] = PWRSTS_OFF_RET, |
| 40 | [1] = PWRSTS_OFF_RET, |
| 41 | [2] = PWRSTS_OFF_RET, |
| 42 | [3] = PWRSTS_OFF_RET, |
| 43 | }, |
| 44 | .pwrsts_mem_on = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 45 | [0] = PWRSTS_ON, |
| 46 | [1] = PWRSTS_ON, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 47 | [2] = PWRSTS_OFF_ON, |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 48 | [3] = PWRSTS_ON, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 49 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 50 | .voltdm = { .name = "mpu_iva" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 51 | }; |
| 52 | |
Paul Walmsley | 98fa3d8 | 2010-01-26 20:13:13 -0700 | [diff] [blame] | 53 | static struct powerdomain mpu_3xxx_pwrdm = { |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 54 | .name = "mpu_pwrdm", |
| 55 | .prcm_offs = MPU_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 56 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 57 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
Thara Gopinath | 3863c74 | 2009-12-08 16:33:15 -0700 | [diff] [blame] | 58 | .flags = PWRDM_HAS_MPU_QUIRK, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 59 | .banks = 1, |
| 60 | .pwrsts_mem_ret = { |
| 61 | [0] = PWRSTS_OFF_RET, |
| 62 | }, |
| 63 | .pwrsts_mem_on = { |
| 64 | [0] = PWRSTS_OFF_ON, |
| 65 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 66 | .voltdm = { .name = "mpu_iva" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 67 | }; |
| 68 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 69 | static struct powerdomain mpu_am35x_pwrdm = { |
| 70 | .name = "mpu_pwrdm", |
| 71 | .prcm_offs = MPU_MOD, |
| 72 | .pwrsts = PWRSTS_ON, |
| 73 | .pwrsts_logic_ret = PWRSTS_ON, |
| 74 | .flags = PWRDM_HAS_MPU_QUIRK, |
| 75 | .banks = 1, |
| 76 | .pwrsts_mem_ret = { |
| 77 | [0] = PWRSTS_ON, |
| 78 | }, |
| 79 | .pwrsts_mem_on = { |
| 80 | [0] = PWRSTS_ON, |
| 81 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 82 | .voltdm = { .name = "mpu_iva" }, |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 83 | }; |
| 84 | |
Anand Gadiyar | 58dcfb3 | 2010-07-14 13:38:49 +0000 | [diff] [blame] | 85 | /* |
| 86 | * The USBTLL Save-and-Restore mechanism is broken on |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 87 | * 3430s up to ES3.0 and 3630ES1.0. Hence this feature |
Anand Gadiyar | 58dcfb3 | 2010-07-14 13:38:49 +0000 | [diff] [blame] | 88 | * needs to be disabled on these chips. |
| 89 | * Refer: 3430 errata ID i459 and 3630 errata ID i579 |
Jean Pihet | 447b8da | 2010-11-17 17:52:11 +0000 | [diff] [blame] | 90 | * |
| 91 | * Note: setting the SAR flag could help for errata ID i478 |
| 92 | * which applies to 3430 <= ES3.1, but since the SAR feature |
| 93 | * is broken, do not use it. |
Anand Gadiyar | 58dcfb3 | 2010-07-14 13:38:49 +0000 | [diff] [blame] | 94 | */ |
Paul Walmsley | 98fa3d8 | 2010-01-26 20:13:13 -0700 | [diff] [blame] | 95 | static struct powerdomain core_3xxx_pre_es3_1_pwrdm = { |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 96 | .name = "core_pwrdm", |
| 97 | .prcm_offs = CORE_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 98 | .pwrsts = PWRSTS_OFF_RET_ON, |
Thara Gopinath | 4133a44 | 2010-02-24 12:05:50 -0700 | [diff] [blame] | 99 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 100 | .banks = 2, |
| 101 | .pwrsts_mem_ret = { |
| 102 | [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */ |
| 103 | [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */ |
| 104 | }, |
| 105 | .pwrsts_mem_on = { |
| 106 | [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */ |
| 107 | [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */ |
| 108 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 109 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 110 | }; |
| 111 | |
Paul Walmsley | 98fa3d8 | 2010-01-26 20:13:13 -0700 | [diff] [blame] | 112 | static struct powerdomain core_3xxx_es3_1_pwrdm = { |
Paul Walmsley | 7eb1afc | 2009-02-05 20:45:28 -0700 | [diff] [blame] | 113 | .name = "core_pwrdm", |
| 114 | .prcm_offs = CORE_MOD, |
Paul Walmsley | 7eb1afc | 2009-02-05 20:45:28 -0700 | [diff] [blame] | 115 | .pwrsts = PWRSTS_OFF_RET_ON, |
Thara Gopinath | 4133a44 | 2010-02-24 12:05:50 -0700 | [diff] [blame] | 116 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
Jean Pihet | 447b8da | 2010-11-17 17:52:11 +0000 | [diff] [blame] | 117 | /* |
| 118 | * Setting the SAR flag for errata ID i478 which applies |
| 119 | * to 3430 <= ES3.1 |
| 120 | */ |
Paul Walmsley | 7eb1afc | 2009-02-05 20:45:28 -0700 | [diff] [blame] | 121 | .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */ |
| 122 | .banks = 2, |
| 123 | .pwrsts_mem_ret = { |
| 124 | [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */ |
| 125 | [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */ |
| 126 | }, |
| 127 | .pwrsts_mem_on = { |
| 128 | [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */ |
| 129 | [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */ |
| 130 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 131 | .voltdm = { .name = "core" }, |
Paul Walmsley | 7eb1afc | 2009-02-05 20:45:28 -0700 | [diff] [blame] | 132 | }; |
| 133 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 134 | static struct powerdomain core_am35x_pwrdm = { |
| 135 | .name = "core_pwrdm", |
| 136 | .prcm_offs = CORE_MOD, |
| 137 | .pwrsts = PWRSTS_ON, |
| 138 | .pwrsts_logic_ret = PWRSTS_ON, |
| 139 | .banks = 2, |
| 140 | .pwrsts_mem_ret = { |
| 141 | [0] = PWRSTS_ON, /* MEM1RETSTATE */ |
| 142 | [1] = PWRSTS_ON, /* MEM2RETSTATE */ |
| 143 | }, |
| 144 | .pwrsts_mem_on = { |
| 145 | [0] = PWRSTS_ON, /* MEM1ONSTATE */ |
| 146 | [1] = PWRSTS_ON, /* MEM2ONSTATE */ |
| 147 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 148 | .voltdm = { .name = "core" }, |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 149 | }; |
| 150 | |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 151 | static struct powerdomain dss_pwrdm = { |
| 152 | .name = "dss_pwrdm", |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 153 | .prcm_offs = OMAP3430_DSS_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 154 | .pwrsts = PWRSTS_OFF_RET_ON, |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 155 | .pwrsts_logic_ret = PWRSTS_RET, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 156 | .banks = 1, |
| 157 | .pwrsts_mem_ret = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 158 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 159 | }, |
| 160 | .pwrsts_mem_on = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 161 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 162 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 163 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 164 | }; |
| 165 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 166 | static struct powerdomain dss_am35x_pwrdm = { |
| 167 | .name = "dss_pwrdm", |
| 168 | .prcm_offs = OMAP3430_DSS_MOD, |
| 169 | .pwrsts = PWRSTS_ON, |
| 170 | .pwrsts_logic_ret = PWRSTS_ON, |
| 171 | .banks = 1, |
| 172 | .pwrsts_mem_ret = { |
| 173 | [0] = PWRSTS_ON, /* MEMRETSTATE */ |
| 174 | }, |
| 175 | .pwrsts_mem_on = { |
| 176 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 177 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 178 | .voltdm = { .name = "core" }, |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 179 | }; |
| 180 | |
Paul Walmsley | be48ea7 | 2009-01-27 19:44:28 -0700 | [diff] [blame] | 181 | /* |
| 182 | * Although the 34XX TRM Rev K Table 4-371 notes that retention is a |
| 183 | * possible SGX powerstate, the SGX device itself does not support |
| 184 | * retention. |
| 185 | */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 186 | static struct powerdomain sgx_pwrdm = { |
| 187 | .name = "sgx_pwrdm", |
| 188 | .prcm_offs = OMAP3430ES2_SGX_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 189 | /* XXX This is accurate for 3430 SGX, but what about GFX? */ |
Paul Walmsley | be48ea7 | 2009-01-27 19:44:28 -0700 | [diff] [blame] | 190 | .pwrsts = PWRSTS_OFF_ON, |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 191 | .pwrsts_logic_ret = PWRSTS_RET, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 192 | .banks = 1, |
| 193 | .pwrsts_mem_ret = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 194 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 195 | }, |
| 196 | .pwrsts_mem_on = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 197 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 198 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 199 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 200 | }; |
| 201 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 202 | static struct powerdomain sgx_am35x_pwrdm = { |
| 203 | .name = "sgx_pwrdm", |
| 204 | .prcm_offs = OMAP3430ES2_SGX_MOD, |
| 205 | .pwrsts = PWRSTS_ON, |
| 206 | .pwrsts_logic_ret = PWRSTS_ON, |
| 207 | .banks = 1, |
| 208 | .pwrsts_mem_ret = { |
| 209 | [0] = PWRSTS_ON, /* MEMRETSTATE */ |
| 210 | }, |
| 211 | .pwrsts_mem_on = { |
| 212 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 213 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 214 | .voltdm = { .name = "core" }, |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 215 | }; |
| 216 | |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 217 | static struct powerdomain cam_pwrdm = { |
| 218 | .name = "cam_pwrdm", |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 219 | .prcm_offs = OMAP3430_CAM_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 220 | .pwrsts = PWRSTS_OFF_RET_ON, |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 221 | .pwrsts_logic_ret = PWRSTS_RET, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 222 | .banks = 1, |
| 223 | .pwrsts_mem_ret = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 224 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 225 | }, |
| 226 | .pwrsts_mem_on = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 227 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 228 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 229 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 230 | }; |
| 231 | |
| 232 | static struct powerdomain per_pwrdm = { |
| 233 | .name = "per_pwrdm", |
| 234 | .prcm_offs = OMAP3430_PER_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 235 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 236 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 237 | .banks = 1, |
| 238 | .pwrsts_mem_ret = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 239 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 240 | }, |
| 241 | .pwrsts_mem_on = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 242 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 243 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 244 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 245 | }; |
| 246 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 247 | static struct powerdomain per_am35x_pwrdm = { |
| 248 | .name = "per_pwrdm", |
| 249 | .prcm_offs = OMAP3430_PER_MOD, |
| 250 | .pwrsts = PWRSTS_ON, |
| 251 | .pwrsts_logic_ret = PWRSTS_ON, |
| 252 | .banks = 1, |
| 253 | .pwrsts_mem_ret = { |
| 254 | [0] = PWRSTS_ON, /* MEMRETSTATE */ |
| 255 | }, |
| 256 | .pwrsts_mem_on = { |
| 257 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 258 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 259 | .voltdm = { .name = "core" }, |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 260 | }; |
| 261 | |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 262 | static struct powerdomain emu_pwrdm = { |
| 263 | .name = "emu_pwrdm", |
| 264 | .prcm_offs = OMAP3430_EMU_MOD, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 265 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 266 | }; |
| 267 | |
| 268 | static struct powerdomain neon_pwrdm = { |
| 269 | .name = "neon_pwrdm", |
| 270 | .prcm_offs = OMAP3430_NEON_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 271 | .pwrsts = PWRSTS_OFF_RET_ON, |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 272 | .pwrsts_logic_ret = PWRSTS_RET, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 273 | .voltdm = { .name = "mpu_iva" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 274 | }; |
| 275 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 276 | static struct powerdomain neon_am35x_pwrdm = { |
| 277 | .name = "neon_pwrdm", |
| 278 | .prcm_offs = OMAP3430_NEON_MOD, |
| 279 | .pwrsts = PWRSTS_ON, |
| 280 | .pwrsts_logic_ret = PWRSTS_ON, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 281 | .voltdm = { .name = "mpu_iva" }, |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 282 | }; |
| 283 | |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 284 | static struct powerdomain usbhost_pwrdm = { |
| 285 | .name = "usbhost_pwrdm", |
| 286 | .prcm_offs = OMAP3430ES2_USBHOST_MOD, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 287 | .pwrsts = PWRSTS_OFF_RET_ON, |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 288 | .pwrsts_logic_ret = PWRSTS_RET, |
Kalle Jokiniemi | 867d320 | 2009-04-23 13:58:51 +0300 | [diff] [blame] | 289 | /* |
| 290 | * REVISIT: Enabling usb host save and restore mechanism seems to |
| 291 | * leave the usb host domain permanently in ACTIVE mode after |
| 292 | * changing the usb host power domain state from OFF to active once. |
| 293 | * Disabling for now. |
| 294 | */ |
| 295 | /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 296 | .banks = 1, |
| 297 | .pwrsts_mem_ret = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 298 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 299 | }, |
| 300 | .pwrsts_mem_on = { |
Paul Walmsley | 4cb49fe | 2011-03-07 19:28:15 -0700 | [diff] [blame] | 301 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 302 | }, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 303 | .voltdm = { .name = "core" }, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 304 | }; |
| 305 | |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 306 | static struct powerdomain dpll1_pwrdm = { |
| 307 | .name = "dpll1_pwrdm", |
| 308 | .prcm_offs = MPU_MOD, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 309 | .voltdm = { .name = "mpu_iva" }, |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 310 | }; |
| 311 | |
| 312 | static struct powerdomain dpll2_pwrdm = { |
| 313 | .name = "dpll2_pwrdm", |
| 314 | .prcm_offs = OMAP3430_IVA2_MOD, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 315 | .voltdm = { .name = "mpu_iva" }, |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 316 | }; |
| 317 | |
| 318 | static struct powerdomain dpll3_pwrdm = { |
| 319 | .name = "dpll3_pwrdm", |
| 320 | .prcm_offs = PLL_MOD, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 321 | .voltdm = { .name = "core" }, |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 322 | }; |
| 323 | |
| 324 | static struct powerdomain dpll4_pwrdm = { |
| 325 | .name = "dpll4_pwrdm", |
| 326 | .prcm_offs = PLL_MOD, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 327 | .voltdm = { .name = "core" }, |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 328 | }; |
| 329 | |
| 330 | static struct powerdomain dpll5_pwrdm = { |
| 331 | .name = "dpll5_pwrdm", |
| 332 | .prcm_offs = PLL_MOD, |
Paul Walmsley | 562e54d | 2013-01-26 00:58:17 -0700 | [diff] [blame] | 333 | .voltdm = { .name = "core" }, |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 334 | }; |
| 335 | |
Aida Mynzhasova | 0f0dd08 | 2013-08-23 04:48:42 -0600 | [diff] [blame] | 336 | static struct powerdomain alwon_81xx_pwrdm = { |
| 337 | .name = "alwon_pwrdm", |
| 338 | .prcm_offs = TI81XX_PRM_ALWON_MOD, |
| 339 | .pwrsts = PWRSTS_OFF_ON, |
| 340 | .voltdm = { .name = "core" }, |
| 341 | }; |
| 342 | |
Aida Mynzhasova | c3ed359 | 2013-05-30 19:04:50 +0400 | [diff] [blame] | 343 | static struct powerdomain device_81xx_pwrdm = { |
| 344 | .name = "device_pwrdm", |
| 345 | .prcm_offs = TI81XX_PRM_DEVICE_MOD, |
| 346 | .voltdm = { .name = "core" }, |
| 347 | }; |
| 348 | |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 349 | static struct powerdomain gem_814x_pwrdm = { |
| 350 | .name = "gem_pwrdm", |
| 351 | .prcm_offs = TI814X_PRM_DSP_MOD, |
| 352 | .pwrsts = PWRSTS_OFF_ON, |
| 353 | .voltdm = { .name = "dsp" }, |
| 354 | }; |
| 355 | |
| 356 | static struct powerdomain ivahd_814x_pwrdm = { |
| 357 | .name = "ivahd_pwrdm", |
| 358 | .prcm_offs = TI814X_PRM_HDVICP_MOD, |
| 359 | .pwrsts = PWRSTS_OFF_ON, |
| 360 | .voltdm = { .name = "iva" }, |
| 361 | }; |
| 362 | |
| 363 | static struct powerdomain hdvpss_814x_pwrdm = { |
| 364 | .name = "hdvpss_pwrdm", |
| 365 | .prcm_offs = TI814X_PRM_HDVPSS_MOD, |
| 366 | .pwrsts = PWRSTS_OFF_ON, |
| 367 | .voltdm = { .name = "dsp" }, |
| 368 | }; |
| 369 | |
| 370 | static struct powerdomain sgx_814x_pwrdm = { |
| 371 | .name = "sgx_pwrdm", |
| 372 | .prcm_offs = TI814X_PRM_GFX_MOD, |
| 373 | .pwrsts = PWRSTS_OFF_ON, |
| 374 | .voltdm = { .name = "core" }, |
| 375 | }; |
| 376 | |
| 377 | static struct powerdomain isp_814x_pwrdm = { |
| 378 | .name = "isp_pwrdm", |
| 379 | .prcm_offs = TI814X_PRM_ISP_MOD, |
| 380 | .pwrsts = PWRSTS_OFF_ON, |
| 381 | .voltdm = { .name = "core" }, |
| 382 | }; |
| 383 | |
Tony Lindgren | 418d4eb | 2015-12-22 15:39:52 -0800 | [diff] [blame] | 384 | static struct powerdomain active_81xx_pwrdm = { |
Aida Mynzhasova | c3ed359 | 2013-05-30 19:04:50 +0400 | [diff] [blame] | 385 | .name = "active_pwrdm", |
| 386 | .prcm_offs = TI816X_PRM_ACTIVE_MOD, |
| 387 | .pwrsts = PWRSTS_OFF_ON, |
| 388 | .voltdm = { .name = "core" }, |
| 389 | }; |
| 390 | |
Tony Lindgren | 418d4eb | 2015-12-22 15:39:52 -0800 | [diff] [blame] | 391 | static struct powerdomain default_81xx_pwrdm = { |
Aida Mynzhasova | c3ed359 | 2013-05-30 19:04:50 +0400 | [diff] [blame] | 392 | .name = "default_pwrdm", |
| 393 | .prcm_offs = TI81XX_PRM_DEFAULT_MOD, |
| 394 | .pwrsts = PWRSTS_OFF_ON, |
| 395 | .voltdm = { .name = "core" }, |
| 396 | }; |
| 397 | |
| 398 | static struct powerdomain ivahd0_816x_pwrdm = { |
| 399 | .name = "ivahd0_pwrdm", |
| 400 | .prcm_offs = TI816X_PRM_IVAHD0_MOD, |
| 401 | .pwrsts = PWRSTS_OFF_ON, |
| 402 | .voltdm = { .name = "mpu_iva" }, |
| 403 | }; |
| 404 | |
| 405 | static struct powerdomain ivahd1_816x_pwrdm = { |
| 406 | .name = "ivahd1_pwrdm", |
| 407 | .prcm_offs = TI816X_PRM_IVAHD1_MOD, |
| 408 | .pwrsts = PWRSTS_OFF_ON, |
| 409 | .voltdm = { .name = "mpu_iva" }, |
| 410 | }; |
| 411 | |
| 412 | static struct powerdomain ivahd2_816x_pwrdm = { |
| 413 | .name = "ivahd2_pwrdm", |
| 414 | .prcm_offs = TI816X_PRM_IVAHD2_MOD, |
| 415 | .pwrsts = PWRSTS_OFF_ON, |
| 416 | .voltdm = { .name = "mpu_iva" }, |
| 417 | }; |
| 418 | |
| 419 | static struct powerdomain sgx_816x_pwrdm = { |
| 420 | .name = "sgx_pwrdm", |
| 421 | .prcm_offs = TI816X_PRM_SGX_MOD, |
| 422 | .pwrsts = PWRSTS_OFF_ON, |
| 423 | .voltdm = { .name = "core" }, |
| 424 | }; |
| 425 | |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 426 | /* As powerdomains are added or removed above, this list must also be changed */ |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 427 | static struct powerdomain *powerdomains_omap3430_common[] __initdata = { |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 428 | &wkup_omap2_pwrdm, |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 429 | &iva2_pwrdm, |
| 430 | &mpu_3xxx_pwrdm, |
| 431 | &neon_pwrdm, |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 432 | &cam_pwrdm, |
| 433 | &dss_pwrdm, |
| 434 | &per_pwrdm, |
| 435 | &emu_pwrdm, |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 436 | &dpll1_pwrdm, |
| 437 | &dpll2_pwrdm, |
| 438 | &dpll3_pwrdm, |
| 439 | &dpll4_pwrdm, |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 440 | NULL |
| 441 | }; |
| 442 | |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 443 | static struct powerdomain *powerdomains_omap3430es1[] __initdata = { |
| 444 | &gfx_omap2_pwrdm, |
| 445 | &core_3xxx_pre_es3_1_pwrdm, |
| 446 | NULL |
| 447 | }; |
| 448 | |
| 449 | /* also includes 3630ES1.0 */ |
| 450 | static struct powerdomain *powerdomains_omap3430es2_es3_0[] __initdata = { |
| 451 | &core_3xxx_pre_es3_1_pwrdm, |
| 452 | &sgx_pwrdm, |
| 453 | &usbhost_pwrdm, |
| 454 | &dpll5_pwrdm, |
| 455 | NULL |
| 456 | }; |
| 457 | |
| 458 | /* also includes 3630ES1.1+ */ |
| 459 | static struct powerdomain *powerdomains_omap3430es3_1plus[] __initdata = { |
| 460 | &core_3xxx_es3_1_pwrdm, |
| 461 | &sgx_pwrdm, |
| 462 | &usbhost_pwrdm, |
| 463 | &dpll5_pwrdm, |
| 464 | NULL |
| 465 | }; |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 466 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 467 | static struct powerdomain *powerdomains_am35x[] __initdata = { |
| 468 | &wkup_omap2_pwrdm, |
| 469 | &mpu_am35x_pwrdm, |
| 470 | &neon_am35x_pwrdm, |
| 471 | &core_am35x_pwrdm, |
| 472 | &sgx_am35x_pwrdm, |
| 473 | &dss_am35x_pwrdm, |
| 474 | &per_am35x_pwrdm, |
| 475 | &emu_pwrdm, |
| 476 | &dpll1_pwrdm, |
| 477 | &dpll3_pwrdm, |
| 478 | &dpll4_pwrdm, |
| 479 | &dpll5_pwrdm, |
| 480 | NULL |
| 481 | }; |
| 482 | |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 483 | static struct powerdomain *powerdomains_ti814x[] __initdata = { |
| 484 | &alwon_81xx_pwrdm, |
| 485 | &device_81xx_pwrdm, |
Tony Lindgren | 418d4eb | 2015-12-22 15:39:52 -0800 | [diff] [blame] | 486 | &active_81xx_pwrdm, |
| 487 | &default_81xx_pwrdm, |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 488 | &gem_814x_pwrdm, |
| 489 | &ivahd_814x_pwrdm, |
| 490 | &hdvpss_814x_pwrdm, |
| 491 | &sgx_814x_pwrdm, |
| 492 | &isp_814x_pwrdm, |
| 493 | NULL |
| 494 | }; |
| 495 | |
| 496 | static struct powerdomain *powerdomains_ti816x[] __initdata = { |
Aida Mynzhasova | 0f0dd08 | 2013-08-23 04:48:42 -0600 | [diff] [blame] | 497 | &alwon_81xx_pwrdm, |
Aida Mynzhasova | c3ed359 | 2013-05-30 19:04:50 +0400 | [diff] [blame] | 498 | &device_81xx_pwrdm, |
Tony Lindgren | 418d4eb | 2015-12-22 15:39:52 -0800 | [diff] [blame] | 499 | &active_81xx_pwrdm, |
| 500 | &default_81xx_pwrdm, |
Aida Mynzhasova | c3ed359 | 2013-05-30 19:04:50 +0400 | [diff] [blame] | 501 | &ivahd0_816x_pwrdm, |
| 502 | &ivahd1_816x_pwrdm, |
| 503 | &ivahd2_816x_pwrdm, |
| 504 | &sgx_816x_pwrdm, |
| 505 | NULL |
| 506 | }; |
| 507 | |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 508 | /* TI81XX specific ops */ |
| 509 | #define TI81XX_PM_PWSTCTRL 0x0000 |
| 510 | #define TI81XX_RM_RSTCTRL 0x0010 |
| 511 | #define TI81XX_PM_PWSTST 0x0004 |
| 512 | |
| 513 | static int ti81xx_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) |
| 514 | { |
| 515 | omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK, |
| 516 | (pwrst << OMAP_POWERSTATE_SHIFT), |
| 517 | pwrdm->prcm_offs, TI81XX_PM_PWSTCTRL); |
| 518 | return 0; |
| 519 | } |
| 520 | |
| 521 | static int ti81xx_pwrdm_read_next_pwrst(struct powerdomain *pwrdm) |
| 522 | { |
| 523 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, |
| 524 | TI81XX_PM_PWSTCTRL, |
| 525 | OMAP_POWERSTATE_MASK); |
| 526 | } |
| 527 | |
| 528 | static int ti81xx_pwrdm_read_pwrst(struct powerdomain *pwrdm) |
| 529 | { |
| 530 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, |
| 531 | (pwrdm->prcm_offs == TI814X_PRM_GFX_MOD) ? TI81XX_RM_RSTCTRL : |
| 532 | TI81XX_PM_PWSTST, |
| 533 | OMAP_POWERSTATEST_MASK); |
| 534 | } |
| 535 | |
| 536 | static int ti81xx_pwrdm_read_logic_pwrst(struct powerdomain *pwrdm) |
| 537 | { |
| 538 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, |
| 539 | (pwrdm->prcm_offs == TI814X_PRM_GFX_MOD) ? TI81XX_RM_RSTCTRL : |
| 540 | TI81XX_PM_PWSTST, |
| 541 | OMAP3430_LOGICSTATEST_MASK); |
| 542 | } |
| 543 | |
| 544 | static int ti81xx_pwrdm_wait_transition(struct powerdomain *pwrdm) |
| 545 | { |
| 546 | u32 c = 0; |
| 547 | |
| 548 | while ((omap2_prm_read_mod_reg(pwrdm->prcm_offs, |
| 549 | (pwrdm->prcm_offs == TI814X_PRM_GFX_MOD) ? TI81XX_RM_RSTCTRL : |
| 550 | TI81XX_PM_PWSTST) & |
| 551 | OMAP_INTRANSITION_MASK) && |
| 552 | (c++ < PWRDM_TRANSITION_BAILOUT)) |
| 553 | udelay(1); |
| 554 | |
| 555 | if (c > PWRDM_TRANSITION_BAILOUT) { |
| 556 | pr_err("powerdomain: %s timeout waiting for transition\n", |
| 557 | pwrdm->name); |
| 558 | return -EAGAIN; |
| 559 | } |
| 560 | |
| 561 | pr_debug("powerdomain: completed transition in %d loops\n", c); |
| 562 | |
| 563 | return 0; |
| 564 | } |
| 565 | |
| 566 | /* For dm814x we need to fix up fix GFX pwstst and rstctrl reg offsets */ |
| 567 | static struct pwrdm_ops ti81xx_pwrdm_operations = { |
| 568 | .pwrdm_set_next_pwrst = ti81xx_pwrdm_set_next_pwrst, |
| 569 | .pwrdm_read_next_pwrst = ti81xx_pwrdm_read_next_pwrst, |
| 570 | .pwrdm_read_pwrst = ti81xx_pwrdm_read_pwrst, |
| 571 | .pwrdm_read_logic_pwrst = ti81xx_pwrdm_read_logic_pwrst, |
| 572 | .pwrdm_wait_transition = ti81xx_pwrdm_wait_transition, |
| 573 | }; |
| 574 | |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 575 | void __init omap3xxx_powerdomains_init(void) |
| 576 | { |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 577 | unsigned int rev; |
| 578 | |
Tony Lindgren | c27964b | 2015-01-14 17:37:16 -0800 | [diff] [blame] | 579 | if (!cpu_is_omap34xx() && !cpu_is_ti81xx()) |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 580 | return; |
| 581 | |
Tony Lindgren | 9610c8a | 2015-08-06 22:09:40 -0700 | [diff] [blame] | 582 | /* Only 81xx needs custom pwrdm_operations */ |
| 583 | if (!cpu_is_ti81xx()) |
Javier Martinez Canillas | ae428a7 | 2015-09-17 15:38:05 +0200 | [diff] [blame] | 584 | pwrdm_register_platform_funcs(&omap3_pwrdm_operations); |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 585 | |
| 586 | rev = omap_rev(); |
| 587 | |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 588 | if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) { |
| 589 | pwrdm_register_pwrdms(powerdomains_am35x); |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 590 | } else if (rev == TI8148_REV_ES1_0 || rev == TI8148_REV_ES2_0 || |
| 591 | rev == TI8148_REV_ES2_1) { |
Tony Lindgren | 9610c8a | 2015-08-06 22:09:40 -0700 | [diff] [blame] | 592 | pwrdm_register_platform_funcs(&ti81xx_pwrdm_operations); |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 593 | pwrdm_register_pwrdms(powerdomains_ti814x); |
Aida Mynzhasova | c3ed359 | 2013-05-30 19:04:50 +0400 | [diff] [blame] | 594 | } else if (rev == TI8168_REV_ES1_0 || rev == TI8168_REV_ES1_1 |
| 595 | || rev == TI8168_REV_ES2_0 || rev == TI8168_REV_ES2_1) { |
Tony Lindgren | 9610c8a | 2015-08-06 22:09:40 -0700 | [diff] [blame] | 596 | pwrdm_register_platform_funcs(&ti81xx_pwrdm_operations); |
Tony Lindgren | 7c80a3f | 2015-07-16 01:55:57 -0700 | [diff] [blame] | 597 | pwrdm_register_pwrdms(powerdomains_ti816x); |
Mark A. Greer | ff7ad7e | 2012-06-27 18:43:59 -0600 | [diff] [blame] | 598 | } else { |
| 599 | pwrdm_register_pwrdms(powerdomains_omap3430_common); |
| 600 | |
| 601 | switch (rev) { |
| 602 | case OMAP3430_REV_ES1_0: |
| 603 | pwrdm_register_pwrdms(powerdomains_omap3430es1); |
| 604 | break; |
| 605 | case OMAP3430_REV_ES2_0: |
| 606 | case OMAP3430_REV_ES2_1: |
| 607 | case OMAP3430_REV_ES3_0: |
| 608 | case OMAP3630_REV_ES1_0: |
| 609 | pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0); |
| 610 | break; |
| 611 | case OMAP3430_REV_ES3_1: |
| 612 | case OMAP3430_REV_ES3_1_2: |
| 613 | case OMAP3630_REV_ES1_1: |
| 614 | case OMAP3630_REV_ES1_2: |
| 615 | pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus); |
| 616 | break; |
| 617 | default: |
| 618 | WARN(1, "OMAP3 powerdomain init: unknown chip type\n"); |
| 619 | } |
| 620 | } |
Paul Walmsley | 8179488 | 2011-09-14 11:34:21 -0600 | [diff] [blame] | 621 | |
Paul Walmsley | 129c65e | 2011-09-14 16:01:21 -0600 | [diff] [blame] | 622 | pwrdm_complete_init(); |
Paul Walmsley | 6e01478 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 623 | } |