10d82eff6SJames Liao /* 20d82eff6SJames Liao * Copyright (c) 2020, MediaTek Inc. All rights reserved. 30d82eff6SJames Liao * 40d82eff6SJames Liao * SPDX-License-Identifier: BSD-3-Clause 50d82eff6SJames Liao */ 60d82eff6SJames Liao 70d82eff6SJames Liao #ifndef MTSPMC_H 80d82eff6SJames Liao #define MTSPMC_H 90d82eff6SJames Liao 100d82eff6SJames Liao #include <stdint.h> 110d82eff6SJames Liao 120d82eff6SJames Liao int spmc_init(void); 130d82eff6SJames Liao 14*fe985428SJames Liao void spm_poweron_cpu(unsigned int cluster, unsigned int cpu); 15*fe985428SJames Liao void spm_poweroff_cpu(unsigned int cluster, unsigned int cpu); 160d82eff6SJames Liao 17*fe985428SJames Liao void spm_poweroff_cluster(unsigned int cluster); 18*fe985428SJames Liao void spm_poweron_cluster(unsigned int cluster); 190d82eff6SJames Liao 20*fe985428SJames Liao bool spm_get_cpu_powerstate(unsigned int cluster, unsigned int cpu); 21*fe985428SJames Liao bool spm_get_cluster_powerstate(unsigned int cluster); 220d82eff6SJames Liao bool spm_get_powerstate(uint32_t mask); 230d82eff6SJames Liao 24*fe985428SJames Liao void mcucfg_init_archstate(unsigned int cluster, unsigned int cpu, bool arm64); 25*fe985428SJames Liao void mcucfg_set_bootaddr(unsigned int cluster, unsigned int cpu, uintptr_t bootaddr); 26*fe985428SJames Liao uintptr_t mcucfg_get_bootaddr(unsigned int cluster, unsigned int cpu); 270d82eff6SJames Liao 28*fe985428SJames Liao void mcucfg_disable_gic_wakeup(unsigned int cluster, unsigned int cpu); 29*fe985428SJames Liao void mcucfg_enable_gic_wakeup(unsigned int cluster, unsigned int cpu); 300d82eff6SJames Liao 310d82eff6SJames Liao #endif /* MTSPMC_H */ 32