mtspmc.h 981 Bytes
Newer Older
James Liao's avatar
James Liao committed
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * Copyright (c) 2020, MediaTek Inc. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef MTSPMC_H
#define MTSPMC_H

#include <stdint.h>

int spmc_init(void);

14
15
void spm_poweron_cpu(unsigned int cluster, unsigned int cpu);
void spm_poweroff_cpu(unsigned int cluster, unsigned int cpu);
James Liao's avatar
James Liao committed
16

17
18
void spm_poweroff_cluster(unsigned int cluster);
void spm_poweron_cluster(unsigned int cluster);
James Liao's avatar
James Liao committed
19

20
21
bool spm_get_cpu_powerstate(unsigned int cluster, unsigned int cpu);
bool spm_get_cluster_powerstate(unsigned int cluster);
James Liao's avatar
James Liao committed
22
23
bool spm_get_powerstate(uint32_t mask);

24
25
26
void mcucfg_init_archstate(unsigned int cluster, unsigned int cpu, bool arm64);
void mcucfg_set_bootaddr(unsigned int cluster, unsigned int cpu, uintptr_t bootaddr);
uintptr_t mcucfg_get_bootaddr(unsigned int cluster, unsigned int cpu);
James Liao's avatar
James Liao committed
27

28
29
void mcucfg_disable_gic_wakeup(unsigned int cluster, unsigned int cpu);
void mcucfg_enable_gic_wakeup(unsigned int cluster, unsigned int cpu);
James Liao's avatar
James Liao committed
30
31

#endif /* MTSPMC_H */