arm-trusted-firmware/plat/hisilicon/hikey/include/hisi_ipc.h
Antonio Nino Diaz c3cf06f1a3 Standardise header guards across codebase
All identifiers, regardless of use, that start with two underscores are
reserved. This means they can't be used in header guards.

The style that this project is now to use the full name of the file in
capital letters followed by 'H'. For example, for a file called
"uart_example.h", the header guard is UART_EXAMPLE_H.

The exceptions are files that are imported from other projects:

- CryptoCell driver
- dt-bindings folders
- zlib headers

Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-11-08 10:20:19 +00:00

47 lines
1.4 KiB
C

/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef HISI_IPC_H
#define HISI_IPC_H
#define HISI_IPC_CORE_ACPU 0x0
#define HISI_IPC_MCU_INT_SRC_ACPU0_PD 10
#define HISI_IPC_MCU_INT_SRC_ACPU1_PD 11
#define HISI_IPC_MCU_INT_SRC_ACPU2_PD 12
#define HISI_IPC_MCU_INT_SRC_ACPU3_PD 13
#define HISI_IPC_MCU_INT_SRC_ACPU_PD 16
#define HISI_IPC_MCU_INT_SRC_ACPU4_PD 26
#define HISI_IPC_MCU_INT_SRC_ACPU5_PD 27
#define HISI_IPC_MCU_INT_SRC_ACPU6_PD 28
#define HISI_IPC_MCU_INT_SRC_ACPU7_PD 29
#define HISI_IPC_SEM_CPUIDLE 27
#define HISI_IPC_INT_SRC_NUM 32
#define HISI_IPC_PM_ON 0
#define HISI_IPC_PM_OFF 1
#define HISI_IPC_OK (0)
#define HISI_IPC_ERROR (-1)
#define HISI_IPC_BASE_ADDR (0xF7510000)
#define HISI_IPC_CPU_RAW_INT_ADDR (0xF7510420)
#define HISI_IPC_ACPU_CTRL(i) (0xF7510800 + (i << 3))
void hisi_ipc_spin_lock(unsigned int signal);
void hisi_ipc_spin_unlock(unsigned int signal);
void hisi_ipc_cpu_on(unsigned int cpu, unsigned int cluster);
void hisi_ipc_cpu_off(unsigned int cpu, unsigned int cluster);
void hisi_ipc_cpu_suspend(unsigned int cpu, unsigned int cluster);
void hisi_ipc_cluster_on(unsigned int cpu, unsigned int cluster);
void hisi_ipc_cluster_off(unsigned int cpu, unsigned int cluster);
void hisi_ipc_cluster_suspend(unsigned int cpu, unsigned int cluster);
void hisi_ipc_psci_system_off(void);
int hisi_ipc_init(void);
#endif /* HISI_IPC_H */