mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-26 14:55:16 +00:00

Add MCDI driver to manage CPU idle states and optimize power consumption. Signed-off-by: Kai Liang <kai.liang@mediatek.com> Change-Id: I3a2e163730dd997dd72f2ebc1375dea38d728cb7
33 lines
809 B
C
33 lines
809 B
C
/*
|
|
* Copyright (c) 2025, Mediatek Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef MT_LPM_DISPATCH_H
|
|
#define MT_LPM_DISPATCH_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "mt_lpm_smc.h"
|
|
#include <mtk_sip_svc.h>
|
|
|
|
#define MTK_DISPATCH_ID_MAX 32
|
|
|
|
typedef uint64_t (*mt_lpm_dispatch_fn)(u_register_t x1, u_register_t x2,
|
|
u_register_t x3, u_register_t x4,
|
|
void *handle,
|
|
struct smccc_res *smccc_ret);
|
|
|
|
struct mt_dispatch_ctrl {
|
|
unsigned int enable;
|
|
mt_lpm_dispatch_fn fn[MT_LPM_SMC_USER_MAX];
|
|
};
|
|
|
|
void mt_lpm_dispatcher_registry(unsigned int id, mt_lpm_dispatch_fn fn);
|
|
|
|
void mt_secure_lpm_dispatcher_registry(unsigned int id, mt_lpm_dispatch_fn fn);
|
|
|
|
extern struct mt_dispatch_ctrl mt_dispatcher;
|
|
extern struct mt_dispatch_ctrl mt_secure_dispatcher;
|
|
#endif
|