1 /*
2  * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 #ifndef __SSPM_H__
7 #define __SSPM_H__
8 /* These should sync with sspm.bin */
9 #define IPI_ID_PLATFORM			0
10 #define IPI_ID_SUSPEND			6
11 #define PINR_OFFSET_PLATFORM		0
12 #define PINR_SIZE_PLATFORM		3
13 #define PINR_OFFSET_SUSPEND		2
14 #define PINR_SIZE_SUSPEND		8
15 
16 #define MBOX0_BASE			0x10450000
17 #define MBOX1_BASE			0x10460000
18 #define MBOX3_BASE			0x10480000
19 #define MBOX_OUT_IRQ_OFS		0x1000
20 #define MBOX_IN_IRQ_OFS			0x1004
21 
22 #define SHAREMBOX_OFFSET_MCDI		0
23 #define SHAREMBOX_SIZE_MCDI		20
24 #define SHAREMBOX_OFFSET_SUSPEND	26
25 #define SHAREMBOX_SIZE_SUSPEND		6
26 
27 int sspm_mbox_read(uint32_t slot, uint32_t *data, uint32_t len);
28 int sspm_mbox_write(uint32_t slot, uint32_t *data, uint32_t len);
29 int sspm_ipi_send_non_blocking(uint32_t id, uint32_t *data);
30 int sspm_ipi_recv_non_blocking(uint32_t slot, uint32_t *data, uint32_t len);
31 int sspm_alive_show(void);
32 #endif /* __SSPM_H__ */
33