2014-08-12 11:17:06 +01:00
|
|
|
/*
|
2017-02-16 16:17:19 +00:00
|
|
|
* Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved.
|
2014-08-12 11:17:06 +01:00
|
|
|
*
|
2017-05-03 09:38:09 +01:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2014-08-12 11:17:06 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <arch_helpers.h>
|
2015-01-15 11:49:49 +00:00
|
|
|
#include <assert.h>
|
2017-02-16 16:17:19 +00:00
|
|
|
#include <console.h>
|
2014-08-12 11:17:06 +01:00
|
|
|
#include <debug.h>
|
|
|
|
#include <platform.h>
|
|
|
|
#include "psci_private.h"
|
|
|
|
|
2017-06-07 15:42:42 +01:00
|
|
|
void __dead2 psci_system_off(void)
|
2014-08-12 11:17:06 +01:00
|
|
|
{
|
2015-07-13 14:10:57 +01:00
|
|
|
psci_print_power_domain_map();
|
2014-08-12 11:17:06 +01:00
|
|
|
|
2015-01-15 11:49:49 +00:00
|
|
|
assert(psci_plat_pm_ops->system_off);
|
|
|
|
|
2014-08-12 11:17:06 +01:00
|
|
|
/* Notify the Secure Payload Dispatcher */
|
|
|
|
if (psci_spd_pm && psci_spd_pm->svc_system_off) {
|
|
|
|
psci_spd_pm->svc_system_off();
|
|
|
|
}
|
|
|
|
|
2017-02-16 16:17:19 +00:00
|
|
|
console_flush();
|
|
|
|
|
2014-08-12 11:17:06 +01:00
|
|
|
/* Call the platform specific hook */
|
|
|
|
psci_plat_pm_ops->system_off();
|
|
|
|
|
|
|
|
/* This function does not return. We should never get here */
|
|
|
|
}
|
|
|
|
|
2017-06-07 15:42:42 +01:00
|
|
|
void __dead2 psci_system_reset(void)
|
2014-08-12 11:17:06 +01:00
|
|
|
{
|
2015-07-13 14:10:57 +01:00
|
|
|
psci_print_power_domain_map();
|
2014-08-12 11:17:06 +01:00
|
|
|
|
2015-01-15 11:49:49 +00:00
|
|
|
assert(psci_plat_pm_ops->system_reset);
|
|
|
|
|
2014-08-12 11:17:06 +01:00
|
|
|
/* Notify the Secure Payload Dispatcher */
|
|
|
|
if (psci_spd_pm && psci_spd_pm->svc_system_reset) {
|
|
|
|
psci_spd_pm->svc_system_reset();
|
|
|
|
}
|
|
|
|
|
2017-02-16 16:17:19 +00:00
|
|
|
console_flush();
|
|
|
|
|
2014-08-12 11:17:06 +01:00
|
|
|
/* Call the platform specific hook */
|
|
|
|
psci_plat_pm_ops->system_reset();
|
|
|
|
|
|
|
|
/* This function does not return. We should never get here */
|
|
|
|
}
|