blob: 7ed2e62209dac2ae5f68459ff8da18a2355ec4e5 [file] [log] [blame]
developer31f56a72020-06-16 13:28:28 +08001/*
2 * Copyright (c) 2020, MediaTek Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef MTSPMC_H
8#define MTSPMC_H
9
10#include <stdint.h>
11
12int spmc_init(void);
13
14void spm_poweron_cpu(uint32_t cluster, uint32_t cpu);
15void spm_poweroff_cpu(uint32_t cluster, uint32_t cpu);
16
17void spm_poweroff_cluster(uint32_t cluster);
18void spm_poweron_cluster(uint32_t cluster);
19
20bool spm_get_cpu_powerstate(uint32_t cluster, uint32_t cpu);
21bool spm_get_cluster_powerstate(uint32_t cluster);
22bool spm_get_powerstate(uint32_t mask);
23
24void mcucfg_init_archstate(uint32_t cluster, uint32_t cpu, bool arm64);
25void mcucfg_set_bootaddr(uint32_t cluster, uint32_t cpu, uintptr_t bootaddr);
26uintptr_t mcucfg_get_bootaddr(uint32_t cluster, uint32_t cpu);
27
28void mcucfg_disable_gic_wakeup(uint32_t cluster, uint32_t cpu);
29void mcucfg_enable_gic_wakeup(uint32_t cluster, uint32_t cpu);
30
31#endif /* MTSPMC_H */