blob: 097a9f58708c7d46f30a3c5711c4afbd3693edbc [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
Soby Mathew73b7bf92017-05-03 12:58:41 +01002 * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
Dan Handley9df48042015-03-19 18:58:55 +00003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Dan Handley9df48042015-03-19 18:58:55 +00005 */
6
Soby Mathew200fffd2016-10-21 11:34:59 +01007#ifndef __CSS_SCP_H__
8#define __CSS_SCP_H__
Dan Handley9df48042015-03-19 18:58:55 +00009
Soby Mathew73b7bf92017-05-03 12:58:41 +010010#include <types.h>
11#include "../scpi/css_scpi.h"
Dan Handley9df48042015-03-19 18:58:55 +000012
Soby Mathew73b7bf92017-05-03 12:58:41 +010013/* Forward declarations */
14struct psci_power_state;
15
16/* API for power management by SCP */
17void css_scp_suspend(const struct psci_power_state *target_state);
18void css_scp_off(const struct psci_power_state *target_state);
Soby Mathew200fffd2016-10-21 11:34:59 +010019void css_scp_on(u_register_t mpidr);
20int css_scp_get_power_state(u_register_t mpidr, unsigned int power_level);
21void __dead2 css_scp_sys_shutdown(void);
22void __dead2 css_scp_sys_reboot(void);
Dan Handley9df48042015-03-19 18:58:55 +000023
Soby Mathew73b7bf92017-05-03 12:58:41 +010024/* API for SCP Boot Image transfer. Return 0 on success, -1 on error */
25int css_scp_boot_image_xfer(void *image, unsigned int image_size);
26
27/*
28 * API to wait for SCP to signal till it's ready after booting the transferred
29 * image.
30 */
31static inline int css_scp_boot_ready(void)
32{
33 VERBOSE("Waiting for SCP to signal it is ready to go on\n");
34 return scpi_wait_ready();
35}
36
Soby Mathew200fffd2016-10-21 11:34:59 +010037#endif /* __CSS_SCP_H__ */