mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
The Dynamic Voltage and Frequency Scaling Resource Collector (DVFSRC) is a Hardware module used to collect all the requests from both software and the various remote processors embedded into the SoC and decide about a minimum operating voltage and a minimum DRAM frequency to fulfill those requests in an effort to provide the best achievable performance per watt. This hardware IP is capable of transparently performing direct register R/W on all of the DVFSRC-controlled regulators and SoC bandwidth knobs. This driver includes support for MT8183, MT8192 and MT8195. Co-Developed-by: Dawei Chien <dawei.chien@mediatek.com> [Angelo: Partial refactoring and cleanups] Reviewed-by: Georgi Djakov <djakov@kerenl.org> Link: https://lore.kernel.org/r/20240610085735.147134-5-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
32 lines
829 B
C
32 lines
829 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2019 MediaTek Inc.
|
|
*/
|
|
#ifndef __MTK_SIP_SVC_H
|
|
#define __MTK_SIP_SVC_H
|
|
|
|
/* Error Code */
|
|
#define SIP_SVC_E_SUCCESS 0
|
|
#define SIP_SVC_E_NOT_SUPPORTED -1
|
|
#define SIP_SVC_E_INVALID_PARAMS -2
|
|
#define SIP_SVC_E_INVALID_RANGE -3
|
|
#define SIP_SVC_E_PERMISSION_DENIED -4
|
|
|
|
#ifdef CONFIG_ARM64
|
|
#define MTK_SIP_SMC_CONVENTION ARM_SMCCC_SMC_64
|
|
#else
|
|
#define MTK_SIP_SMC_CONVENTION ARM_SMCCC_SMC_32
|
|
#endif
|
|
|
|
#define MTK_SIP_SMC_CMD(fn_id) \
|
|
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, MTK_SIP_SMC_CONVENTION, \
|
|
ARM_SMCCC_OWNER_SIP, fn_id)
|
|
|
|
/* DVFSRC SMC calls */
|
|
#define MTK_SIP_DVFSRC_VCOREFS_CONTROL MTK_SIP_SMC_CMD(0x506)
|
|
|
|
/* IOMMU related SMC call */
|
|
#define MTK_SIP_KERNEL_IOMMU_CONTROL MTK_SIP_SMC_CMD(0x514)
|
|
|
|
#endif
|