css_scp.h 1.02 KB
Newer Older
1
/*
2
 * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

7
8
#ifndef __CSS_SCP_H__
#define __CSS_SCP_H__
9

10
11
#include <types.h>
#include "../scpi/css_scpi.h"
12

13
14
15
16
17
18
/* Forward declarations */
struct psci_power_state;

/* API for power management by SCP */
void css_scp_suspend(const struct psci_power_state *target_state);
void css_scp_off(const struct psci_power_state *target_state);
19
20
21
22
void css_scp_on(u_register_t mpidr);
int css_scp_get_power_state(u_register_t mpidr, unsigned int power_level);
void __dead2 css_scp_sys_shutdown(void);
void __dead2 css_scp_sys_reboot(void);
23

24
25
26
27
28
29
30
31
32
33
34
35
36
/* API for SCP Boot Image transfer. Return 0 on success, -1 on error */
int css_scp_boot_image_xfer(void *image, unsigned int image_size);

/*
 * API to wait for SCP to signal till it's ready after booting the transferred
 * image.
 */
static inline int css_scp_boot_ready(void)
{
	VERBOSE("Waiting for SCP to signal it is ready to go on\n");
	return scpi_wait_ready();
}

37
#endif	/* __CSS_SCP_H__ */