mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00

LPM means low power module, it will connect idle and SPM to achieve lower power consumption in some scenarios, and this patch is LPM second version Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.corp-partner.google.com> Change-Id: I6ae5b5b4c2056d08c29efab5116be3a92351d8f1
35 lines
842 B
C
35 lines
842 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 <lpm_v2/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 /* MT_LPM_DISPATCH_H */
|
|
|