blob: 3582878708890f0759489a396ab122515a978d20 [file] [log] [blame]
Varun Wadekar921b9062015-08-25 17:03:14 +05301/*
Varun Wadekarc2c3a2a2016-01-08 17:38:51 -08002 * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
Varun Wadekar921b9062015-08-25 17:03:14 +05303 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
Varun Wadekarabd153c2015-09-14 09:31:39 +053031#include <arch.h>
32#include <arch_helpers.h>
Varun Wadekara64806a2016-01-05 15:17:41 -080033#include <assert.h>
34#include <bl_common.h>
35#include <context.h>
36#include <context_mgmt.h>
Varun Wadekarabd153c2015-09-14 09:31:39 +053037#include <debug.h>
Varun Wadekar89645092016-02-09 14:55:44 -080038#include <denver.h>
Varun Wadekarabd153c2015-09-14 09:31:39 +053039#include <mce.h>
Varun Wadekar4a0b37a2016-04-09 00:36:42 -070040#include <platform.h>
Varun Wadekar921b9062015-08-25 17:03:14 +053041#include <psci.h>
Varun Wadekarb8776152016-03-03 13:52:52 -080042#include <smmu.h>
Varun Wadekar93bed2a2016-03-18 13:07:33 -070043#include <string.h>
Varun Wadekar782c83d2017-03-14 14:25:35 -070044#include <t18x_ari.h>
Varun Wadekar921b9062015-08-25 17:03:14 +053045#include <tegra_private.h>
46
Varun Wadekard66ee542016-02-29 10:24:30 -080047extern void prepare_cpu_pwr_dwn(void);
Varun Wadekar93bed2a2016-03-18 13:07:33 -070048extern void tegra186_cpu_reset_handler(void);
49extern uint32_t __tegra186_cpu_reset_handler_data,
50 __tegra186_cpu_reset_handler_end;
51
52/* TZDRAM offset for saving SMMU context */
53#define TEGRA186_SMMU_CTX_OFFSET 16
Varun Wadekard66ee542016-02-29 10:24:30 -080054
Varun Wadekar42236572016-01-18 19:03:19 -080055/* state id mask */
56#define TEGRA186_STATE_ID_MASK 0xF
57/* constants to get power state's wake time */
58#define TEGRA186_WAKE_TIME_MASK 0xFFFFFF
59#define TEGRA186_WAKE_TIME_SHIFT 4
Varun Wadekar698e7c62016-03-28 15:05:03 -070060/* default core wake mask for CPU_SUSPEND */
61#define TEGRA186_CORE_WAKE_MASK 0x180c
Varun Wadekarb8776152016-03-03 13:52:52 -080062/* context size to save during system suspend */
Varun Wadekar93bed2a2016-03-18 13:07:33 -070063#define TEGRA186_SE_CONTEXT_SIZE 3
Varun Wadekar42236572016-01-18 19:03:19 -080064
Varun Wadekarb8776152016-03-03 13:52:52 -080065static uint32_t se_regs[TEGRA186_SE_CONTEXT_SIZE];
Varun Wadekar42236572016-01-18 19:03:19 -080066static unsigned int wake_time[PLATFORM_CORE_COUNT];
67
Varun Wadekard66ee542016-02-29 10:24:30 -080068/* System power down state */
69uint32_t tegra186_system_powerdn_state = TEGRA_ARI_MISC_CCPLEX_SHUTDOWN_POWER_OFF;
70
Varun Wadekarc2c3a2a2016-01-08 17:38:51 -080071int32_t tegra_soc_validate_power_state(unsigned int power_state,
72 psci_power_state_t *req_state)
Varun Wadekar921b9062015-08-25 17:03:14 +053073{
Varun Wadekar42236572016-01-18 19:03:19 -080074 int state_id = psci_get_pstate_id(power_state) & TEGRA186_STATE_ID_MASK;
Varun Wadekar4a0b37a2016-04-09 00:36:42 -070075 int cpu = plat_my_core_pos();
Varun Wadekar89645092016-02-09 14:55:44 -080076
Varun Wadekar4a0b37a2016-04-09 00:36:42 -070077 /* save the core wake time (us) */
Varun Wadekar89645092016-02-09 14:55:44 -080078 wake_time[cpu] = (power_state >> TEGRA186_WAKE_TIME_SHIFT) &
79 TEGRA186_WAKE_TIME_MASK;
Varun Wadekar42236572016-01-18 19:03:19 -080080
81 /* Sanity check the requested state id */
82 switch (state_id) {
83 case PSTATE_ID_CORE_IDLE:
84 case PSTATE_ID_CORE_POWERDN:
Varun Wadekar4a0b37a2016-04-09 00:36:42 -070085
86 /* Core powerdown request */
Varun Wadekar42236572016-01-18 19:03:19 -080087 req_state->pwr_domain_state[MPIDR_AFFLVL0] = state_id;
Varun Wadekar4a0b37a2016-04-09 00:36:42 -070088 req_state->pwr_domain_state[MPIDR_AFFLVL1] = state_id;
Varun Wadekar42236572016-01-18 19:03:19 -080089
90 break;
91
92 default:
93 ERROR("%s: unsupported state id (%d)\n", __func__, state_id);
94 return PSCI_E_INVALID_PARAMS;
95 }
96
97 return PSCI_E_SUCCESS;
98}
99
100int tegra_soc_pwr_domain_suspend(const psci_power_state_t *target_state)
101{
102 const plat_local_state_t *pwr_domain_state;
Varun Wadekarb8776152016-03-03 13:52:52 -0800103 unsigned int stateid_afflvl0, stateid_afflvl2;
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700104 int cpu = plat_my_core_pos();
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700105 plat_params_from_bl2_t *params_from_bl2 = bl31_get_plat_params();
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700106 mce_cstate_info_t cstate_info = { 0 };
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700107 uint64_t smmu_ctx_base;
Varun Wadekarb8776152016-03-03 13:52:52 -0800108 uint32_t val;
109
Varun Wadekar42236572016-01-18 19:03:19 -0800110 /* get the state ID */
111 pwr_domain_state = target_state->pwr_domain_state;
112 stateid_afflvl0 = pwr_domain_state[MPIDR_AFFLVL0] &
113 TEGRA186_STATE_ID_MASK;
Varun Wadekarb8776152016-03-03 13:52:52 -0800114 stateid_afflvl2 = pwr_domain_state[PLAT_MAX_PWR_LVL] &
115 TEGRA186_STATE_ID_MASK;
Varun Wadekar42236572016-01-18 19:03:19 -0800116
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700117 if ((stateid_afflvl0 == PSTATE_ID_CORE_IDLE) ||
118 (stateid_afflvl0 == PSTATE_ID_CORE_POWERDN)) {
Varun Wadekar42236572016-01-18 19:03:19 -0800119
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700120 /* Enter CPU idle/powerdown */
121 val = (stateid_afflvl0 == PSTATE_ID_CORE_IDLE) ?
122 TEGRA_ARI_CORE_C6 : TEGRA_ARI_CORE_C7;
123 (void)mce_command_handler(MCE_CMD_ENTER_CSTATE, val,
124 wake_time[cpu], 0);
Varun Wadekarc2c3a2a2016-01-08 17:38:51 -0800125
Varun Wadekarb8776152016-03-03 13:52:52 -0800126 } else if (stateid_afflvl2 == PSTATE_ID_SOC_POWERDN) {
127
Varun Wadekarb8776152016-03-03 13:52:52 -0800128 /* save SE registers */
129 se_regs[0] = mmio_read_32(TEGRA_SE0_BASE +
130 SE_MUTEX_WATCHDOG_NS_LIMIT);
131 se_regs[1] = mmio_read_32(TEGRA_RNG1_BASE +
132 RNG_MUTEX_WATCHDOG_NS_LIMIT);
133 se_regs[2] = mmio_read_32(TEGRA_PKA1_BASE +
134 PKA_MUTEX_WATCHDOG_NS_LIMIT);
135
136 /* save 'Secure Boot' Processor Feature Config Register */
137 val = mmio_read_32(TEGRA_MISC_BASE + MISCREG_PFCFG);
138 mmio_write_32(TEGRA_SCRATCH_BASE + SECURE_SCRATCH_RSV6, val);
139
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700140 /* save SMMU context to TZDRAM */
141 smmu_ctx_base = params_from_bl2->tzdram_base +
142 ((uintptr_t)&__tegra186_cpu_reset_handler_data -
143 (uintptr_t)tegra186_cpu_reset_handler) +
144 TEGRA186_SMMU_CTX_OFFSET;
145 tegra_smmu_save_context((uintptr_t)smmu_ctx_base);
Varun Wadekarb8776152016-03-03 13:52:52 -0800146
147 /* Prepare for system suspend */
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700148 cstate_info.cluster = TEGRA_ARI_CLUSTER_CC7;
149 cstate_info.system = TEGRA_ARI_SYSTEM_SC7;
150 cstate_info.system_state_force = 1;
151 cstate_info.update_wake_mask = 1;
152 mce_update_cstate_info(&cstate_info);
Varun Wadekarb8776152016-03-03 13:52:52 -0800153
Varun Wadekara9002bb2016-03-28 15:11:43 -0700154 /* Loop until system suspend is allowed */
155 do {
156 val = mce_command_handler(MCE_CMD_IS_SC7_ALLOWED,
157 TEGRA_ARI_CORE_C7,
158 MCE_CORE_SLEEP_TIME_INFINITE,
159 0);
160 } while (val == 0);
161
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700162 /* Instruct the MCE to enter system suspend state */
Varun Wadekarb8776152016-03-03 13:52:52 -0800163 (void)mce_command_handler(MCE_CMD_ENTER_CSTATE,
164 TEGRA_ARI_CORE_C7, MCE_CORE_SLEEP_TIME_INFINITE, 0);
Varun Wadekar921b9062015-08-25 17:03:14 +0530165 }
166
167 return PSCI_E_SUCCESS;
168}
Varun Wadekarabd153c2015-09-14 09:31:39 +0530169
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700170/*******************************************************************************
171 * Platform handler to calculate the proper target power level at the
172 * specified affinity level
173 ******************************************************************************/
174plat_local_state_t tegra_soc_get_target_pwr_state(unsigned int lvl,
175 const plat_local_state_t *states,
176 unsigned int ncpu)
177{
178 plat_local_state_t target = *states;
179 int cpu = plat_my_core_pos(), ret, cluster_powerdn = 1;
180 int core_pos = read_mpidr() & MPIDR_CPU_MASK;
181 mce_cstate_info_t cstate_info = { 0 };
182
183 /* get the current core's power state */
184 target = *(states + core_pos);
185
186 /* CPU suspend */
187 if (lvl == MPIDR_AFFLVL1 && target == PSTATE_ID_CORE_POWERDN) {
188
189 /* Program default wake mask */
190 cstate_info.wake_mask = TEGRA186_CORE_WAKE_MASK;
191 cstate_info.update_wake_mask = 1;
192 mce_update_cstate_info(&cstate_info);
193
194 /* Check if CCx state is allowed. */
195 ret = mce_command_handler(MCE_CMD_IS_CCX_ALLOWED,
196 TEGRA_ARI_CORE_C7, wake_time[cpu], 0);
197 if (ret)
198 return PSTATE_ID_CORE_POWERDN;
199 }
200
201 /* CPU off */
202 if (lvl == MPIDR_AFFLVL1 && target == PLAT_MAX_OFF_STATE) {
203
204 /* find out the number of ON cpus in the cluster */
205 do {
206 target = *states++;
207 if (target != PLAT_MAX_OFF_STATE)
208 cluster_powerdn = 0;
209 } while (--ncpu);
210
211 /* Enable cluster powerdn from last CPU in the cluster */
212 if (cluster_powerdn) {
213
214 /* Enable CC7 state and turn off wake mask */
215 cstate_info.cluster = TEGRA_ARI_CLUSTER_CC7;
216 cstate_info.update_wake_mask = 1;
217 mce_update_cstate_info(&cstate_info);
218
219 /* Check if CCx state is allowed. */
220 ret = mce_command_handler(MCE_CMD_IS_CCX_ALLOWED,
221 TEGRA_ARI_CORE_C7,
222 MCE_CORE_SLEEP_TIME_INFINITE,
223 0);
224 if (ret)
225 return PSTATE_ID_CORE_POWERDN;
226
227 } else {
228
229 /* Turn off wake_mask */
230 cstate_info.update_wake_mask = 1;
231 mce_update_cstate_info(&cstate_info);
232 }
233 }
234
235 /* System Suspend */
236 if ((lvl == MPIDR_AFFLVL2) || (target == PSTATE_ID_SOC_POWERDN))
237 return PSTATE_ID_SOC_POWERDN;
238
239 /* default state */
240 return PSCI_LOCAL_STATE_RUN;
241}
242
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700243int tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_state)
244{
245 const plat_local_state_t *pwr_domain_state =
246 target_state->pwr_domain_state;
247 plat_params_from_bl2_t *params_from_bl2 = bl31_get_plat_params();
248 unsigned int stateid_afflvl2 = pwr_domain_state[PLAT_MAX_PWR_LVL] &
249 TEGRA186_STATE_ID_MASK;
250 uint32_t val;
251
252 if (stateid_afflvl2 == PSTATE_ID_SOC_POWERDN) {
253 /*
254 * The TZRAM loses power when we enter system suspend. To
255 * allow graceful exit from system suspend, we need to copy
256 * BL3-1 over to TZDRAM.
257 */
258 val = params_from_bl2->tzdram_base +
259 ((uintptr_t)&__tegra186_cpu_reset_handler_end -
260 (uintptr_t)tegra186_cpu_reset_handler);
261 memcpy16((void *)(uintptr_t)val, (void *)(uintptr_t)BL31_BASE,
262 (uintptr_t)&__BL31_END__ - (uintptr_t)BL31_BASE);
263 }
264
265 return PSCI_E_SUCCESS;
266}
267
Varun Wadekarc2c3a2a2016-01-08 17:38:51 -0800268int tegra_soc_pwr_domain_on(u_register_t mpidr)
Varun Wadekarabd153c2015-09-14 09:31:39 +0530269{
270 int target_cpu = mpidr & MPIDR_CPU_MASK;
271 int target_cluster = (mpidr & MPIDR_CLUSTER_MASK) >>
272 MPIDR_AFFINITY_BITS;
273
274 if (target_cluster > MPIDR_AFFLVL1) {
275 ERROR("%s: unsupported CPU (0x%lx)\n", __func__, mpidr);
276 return PSCI_E_NOT_PRESENT;
277 }
278
279 /* construct the target CPU # */
280 target_cpu |= (target_cluster << 2);
281
282 mce_command_handler(MCE_CMD_ONLINE_CORE, target_cpu, 0, 0);
283
284 return PSCI_E_SUCCESS;
285}
286
Varun Wadekarb8776152016-03-03 13:52:52 -0800287int tegra_soc_pwr_domain_on_finish(const psci_power_state_t *target_state)
288{
Varun Wadekar5a402562016-04-29 11:25:46 -0700289 int stateid_afflvl2 = target_state->pwr_domain_state[PLAT_MAX_PWR_LVL];
290 int stateid_afflvl0 = target_state->pwr_domain_state[MPIDR_AFFLVL0];
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700291 mce_cstate_info_t cstate_info = { 0 };
Varun Wadekarb8776152016-03-03 13:52:52 -0800292
293 /*
Varun Wadekar5a402562016-04-29 11:25:46 -0700294 * Reset power state info for CPUs when onlining, we set
295 * deepest power when offlining a core but that may not be
296 * requested by non-secure sw which controls idle states. It
297 * will re-init this info from non-secure software when the
298 * core come online.
Varun Wadekard2da47a2016-04-09 00:40:45 -0700299 */
Varun Wadekar5a402562016-04-29 11:25:46 -0700300 if (stateid_afflvl0 == PLAT_MAX_OFF_STATE) {
301
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700302 cstate_info.cluster = TEGRA_ARI_CLUSTER_CC1;
303 cstate_info.update_wake_mask = 1;
304 mce_update_cstate_info(&cstate_info);
Varun Wadekar5a402562016-04-29 11:25:46 -0700305 }
Varun Wadekard2da47a2016-04-09 00:40:45 -0700306
307 /*
Varun Wadekarb8776152016-03-03 13:52:52 -0800308 * Check if we are exiting from deep sleep and restore SE
309 * context if we are.
310 */
Varun Wadekar5a402562016-04-29 11:25:46 -0700311 if (stateid_afflvl2 == PSTATE_ID_SOC_POWERDN) {
312
Varun Wadekarb8776152016-03-03 13:52:52 -0800313 mmio_write_32(TEGRA_SE0_BASE + SE_MUTEX_WATCHDOG_NS_LIMIT,
314 se_regs[0]);
315 mmio_write_32(TEGRA_RNG1_BASE + RNG_MUTEX_WATCHDOG_NS_LIMIT,
316 se_regs[1]);
317 mmio_write_32(TEGRA_PKA1_BASE + PKA_MUTEX_WATCHDOG_NS_LIMIT,
318 se_regs[2]);
319
320 /* Init SMMU */
321 tegra_smmu_init();
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700322
323 /*
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700324 * Reset power state info for the last core doing SC7
325 * entry and exit, we set deepest power state as CC7
326 * and SC7 for SC7 entry which may not be requested by
327 * non-secure SW which controls idle states.
Varun Wadekar93bed2a2016-03-18 13:07:33 -0700328 */
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700329 cstate_info.cluster = TEGRA_ARI_CLUSTER_CC7;
330 cstate_info.system = TEGRA_ARI_SYSTEM_SC1;
331 cstate_info.update_wake_mask = 1;
332 mce_update_cstate_info(&cstate_info);
Varun Wadekarb8776152016-03-03 13:52:52 -0800333 }
334
335 return PSCI_E_SUCCESS;
336}
337
Varun Wadekarc2c3a2a2016-01-08 17:38:51 -0800338int tegra_soc_pwr_domain_off(const psci_power_state_t *target_state)
Varun Wadekarabd153c2015-09-14 09:31:39 +0530339{
Varun Wadekare26a55a2016-02-26 11:09:21 -0800340 int impl = (read_midr() >> MIDR_IMPL_SHIFT) & MIDR_IMPL_MASK;
Varun Wadekara64806a2016-01-05 15:17:41 -0800341
Varun Wadekare26a55a2016-02-26 11:09:21 -0800342 /* Disable Denver's DCO operations */
343 if (impl == DENVER_IMPL)
344 denver_disable_dco();
345
Varun Wadekarabd153c2015-09-14 09:31:39 +0530346 /* Turn off CPU */
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700347 (void)mce_command_handler(MCE_CMD_ENTER_CSTATE, TEGRA_ARI_CORE_C7,
Varun Wadekar89645092016-02-09 14:55:44 -0800348 MCE_CORE_SLEEP_TIME_INFINITE, 0);
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700349
350 return PSCI_E_SUCCESS;
Varun Wadekarabd153c2015-09-14 09:31:39 +0530351}
Varun Wadekar782c83d2017-03-14 14:25:35 -0700352
353__dead2 void tegra_soc_prepare_system_off(void)
354{
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700355 mce_cstate_info_t cstate_info = { 0 };
Varun Wadekard66ee542016-02-29 10:24:30 -0800356 uint32_t val;
357
358 if (tegra186_system_powerdn_state == TEGRA_ARI_MISC_CCPLEX_SHUTDOWN_POWER_OFF) {
359
360 /* power off the entire system */
361 mce_enter_ccplex_state(tegra186_system_powerdn_state);
362
363 } else if (tegra186_system_powerdn_state == TEGRA_ARI_SYSTEM_SC8) {
364
Varun Wadekara9002bb2016-03-28 15:11:43 -0700365 /* Prepare for quasi power down */
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700366 cstate_info.cluster = TEGRA_ARI_CLUSTER_CC7;
367 cstate_info.system = TEGRA_ARI_SYSTEM_SC8;
368 cstate_info.system_state_force = 1;
369 cstate_info.update_wake_mask = 1;
370 mce_update_cstate_info(&cstate_info);
Varun Wadekara9002bb2016-03-28 15:11:43 -0700371
Varun Wadekard66ee542016-02-29 10:24:30 -0800372 /* loop until other CPUs power down */
373 do {
374 val = mce_command_handler(MCE_CMD_IS_SC7_ALLOWED,
375 TEGRA_ARI_CORE_C7,
376 MCE_CORE_SLEEP_TIME_INFINITE,
377 0);
378 } while (val == 0);
379
Varun Wadekard66ee542016-02-29 10:24:30 -0800380 /* Enter quasi power down state */
381 (void)mce_command_handler(MCE_CMD_ENTER_CSTATE,
382 TEGRA_ARI_CORE_C7, MCE_CORE_SLEEP_TIME_INFINITE, 0);
383
384 /* disable GICC */
385 tegra_gic_cpuif_deactivate();
386
387 /* power down core */
388 prepare_cpu_pwr_dwn();
389
Varun Wadekar4a0b37a2016-04-09 00:36:42 -0700390 /* flush L1/L2 data caches */
391 dcsw_op_all(DCCISW);
392
Varun Wadekard66ee542016-02-29 10:24:30 -0800393 } else {
394 ERROR("%s: unsupported power down state (%d)\n", __func__,
395 tegra186_system_powerdn_state);
396 }
397
398 wfi();
399
400 /* wait for the system to power down */
401 for (;;) {
402 ;
403 }
Varun Wadekar782c83d2017-03-14 14:25:35 -0700404}
Varun Wadekar38020c92016-01-07 14:36:12 -0800405
406int tegra_soc_prepare_system_reset(void)
407{
408 mce_enter_ccplex_state(TEGRA_ARI_MISC_CCPLEX_SHUTDOWN_REBOOT);
409
410 return PSCI_E_SUCCESS;
411}