blob: 9a40df1cab80cc78a01b936f4d5e86672b7c1415 [file] [log] [blame]
developer555ed552019-08-21 22:49:49 +08001/*
2 * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __MTK_MCDI_H__
8#define __MTK_MCDI_H__
9
10#include <stdbool.h>
11
12void sspm_set_bootaddr(uint32_t bootaddr);
13void sspm_standbywfi_irq_enable(uint32_t cpu_idx);
14void sspm_cluster_pwr_off_notify(uint32_t cluster);
15void sspm_cluster_pwr_on_notify(uint32_t cluster);
16
17uint32_t mcdi_avail_cpu_mask_read(void);
18uint32_t mcdi_avail_cpu_mask_write(uint32_t mask);
19uint32_t mcdi_avail_cpu_mask_set(uint32_t mask);
20uint32_t mcdi_avail_cpu_mask_clr(uint32_t mask);
21uint32_t mcdi_cpu_cluster_pwr_stat_read(void);
22
23void mcdi_pause(void);
24void mcdi_unpause(void);
25void mcdi_pause_set(int cluster, int cpu_idx, bool on);
26void mcdi_pause_clr(int cluster, int cpu_idx, bool on);
27void mcdi_hotplug_set(int cluster, int cpu_idx, bool on);
28void mcdi_hotplug_clr(int cluster, int cpu_idx, bool on);
29void mcdi_hotplug_wait_ack(int cluster, int cpu_idx, bool on);
30
31bool check_mcdi_ctl_stat(void);
32void mcdi_init(void);
33
34#endif /* __MTK_MCDI_H__ */