diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 17:43:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 17:43:51 +0000 |
commit | be58c81aff4cd4c0ccf43dbd7998da4a6a08c03b (patch) | |
tree | 779c248fb61c83f65d1f0dc867f2053d76b4e03a /plat/mediatek/include/lpm/mt_lp_rq.h | |
parent | Initial commit. (diff) | |
download | arm-trusted-firmware-upstream.tar.xz arm-trusted-firmware-upstream.zip |
Adding upstream version 2.10.0+dfsg.upstream/2.10.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plat/mediatek/include/lpm/mt_lp_rq.h')
-rw-r--r-- | plat/mediatek/include/lpm/mt_lp_rq.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plat/mediatek/include/lpm/mt_lp_rq.h b/plat/mediatek/include/lpm/mt_lp_rq.h new file mode 100644 index 0000000..2c4908c --- /dev/null +++ b/plat/mediatek/include/lpm/mt_lp_rq.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef MT_LP_RQ_H +#define MT_LP_RQ_H + +/* Determine the generic resource request public type */ +#define MT_LP_RQ_XO_FPM BIT(0) +#define MT_LP_RQ_26M BIT(1) +#define MT_LP_RQ_INFRA BIT(2) +#define MT_LP_RQ_SYSPLL BIT(3) +#define MT_LP_RQ_DRAM BIT(4) +#define MT_LP_RQ_ALL (0xFFFFFFFF) + +struct mt_lp_resource_user { + /* Determine the resource user mask */ + unsigned int umask; + /* Determine the resource request user identify */ + unsigned int uid; + /* Request the resource */ + int (*request)(struct mt_lp_resource_user *this, unsigned int resource); + /* Release the resource */ + int (*release)(struct mt_lp_resource_user *this); +}; + +int mt_lp_resource_user_register(char *uname, struct mt_lp_resource_user *ru); + +#endif /* MT_LP_RQ_H */ |