blob: 34e93d0ef7d0801d52a6a23c034b13f5ce541557 [file] [log] [blame]
developer2a56b2c2020-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
developer1c2a2102020-06-16 11:48:36 +080014void spm_poweron_cpu(unsigned int cluster, unsigned int cpu);
15void spm_poweroff_cpu(unsigned int cluster, unsigned int cpu);
developer2a56b2c2020-06-16 13:28:28 +080016
developer1c2a2102020-06-16 11:48:36 +080017void spm_poweroff_cluster(unsigned int cluster);
18void spm_poweron_cluster(unsigned int cluster);
developer2a56b2c2020-06-16 13:28:28 +080019
developer1c2a2102020-06-16 11:48:36 +080020bool spm_get_cpu_powerstate(unsigned int cluster, unsigned int cpu);
21bool spm_get_cluster_powerstate(unsigned int cluster);
developer2a56b2c2020-06-16 13:28:28 +080022bool spm_get_powerstate(uint32_t mask);
23
developer1c2a2102020-06-16 11:48:36 +080024void mcucfg_init_archstate(unsigned int cluster, unsigned int cpu, bool arm64);
25void mcucfg_set_bootaddr(unsigned int cluster, unsigned int cpu, uintptr_t bootaddr);
26uintptr_t mcucfg_get_bootaddr(unsigned int cluster, unsigned int cpu);
developer2a56b2c2020-06-16 13:28:28 +080027
developer1c2a2102020-06-16 11:48:36 +080028void mcucfg_disable_gic_wakeup(unsigned int cluster, unsigned int cpu);
29void mcucfg_enable_gic_wakeup(unsigned int cluster, unsigned int cpu);
developer2a56b2c2020-06-16 13:28:28 +080030
31#endif /* MTSPMC_H */