blob: b20742feadabf42db6d30eeca00c82ba18252fe5 [file] [log] [blame]
Haojian Zhuang3846f142017-05-24 08:49:26 +08001/*
2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __HISI_IPC_H__
8#define __HISI_IPC_H__
9
10#define HISI_IPC_CORE_ACPU 0x0
11
12#define HISI_IPC_MCU_INT_SRC_ACPU0_PD 10
13#define HISI_IPC_MCU_INT_SRC_ACPU1_PD 11
14#define HISI_IPC_MCU_INT_SRC_ACPU2_PD 12
15#define HISI_IPC_MCU_INT_SRC_ACPU3_PD 13
16#define HISI_IPC_MCU_INT_SRC_ACPU_PD 16
17#define HISI_IPC_MCU_INT_SRC_ACPU4_PD 26
18#define HISI_IPC_MCU_INT_SRC_ACPU5_PD 27
19#define HISI_IPC_MCU_INT_SRC_ACPU6_PD 28
20#define HISI_IPC_MCU_INT_SRC_ACPU7_PD 29
21
22#define HISI_IPC_SEM_CPUIDLE 27
23#define HISI_IPC_INT_SRC_NUM 32
24
25#define HISI_IPC_PM_ON 0
26#define HISI_IPC_PM_OFF 1
27
28#define HISI_IPC_OK (0)
29#define HISI_IPC_ERROR (-1)
30
31#define HISI_IPC_BASE_ADDR (0xF7510000)
32#define HISI_IPC_CPU_RAW_INT_ADDR (0xF7510420)
33#define HISI_IPC_ACPU_CTRL(i) (0xF7510800 + (i << 3))
34
35void hisi_ipc_spin_lock(unsigned int signal);
36void hisi_ipc_spin_unlock(unsigned int signal);
37void hisi_ipc_cpu_on(unsigned int cpu, unsigned int cluster);
38void hisi_ipc_cpu_off(unsigned int cpu, unsigned int cluster);
39void hisi_ipc_cpu_suspend(unsigned int cpu, unsigned int cluster);
40void hisi_ipc_cluster_on(unsigned int cpu, unsigned int cluster);
41void hisi_ipc_cluster_off(unsigned int cpu, unsigned int cluster);
42void hisi_ipc_cluster_suspend(unsigned int cpu, unsigned int cluster);
43void hisi_ipc_psci_system_off(void);
44int hisi_ipc_init(void);
45
46#endif /* __HISI_IPC_H__ */