[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1577683950-1702-2-git-send-email-stanley.chu@mediatek.com>
Date: Mon, 30 Dec 2019 13:32:25 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: <linux-scsi@...r.kernel.org>, <martin.petersen@...cle.com>,
<avri.altman@....com>, <alim.akhtar@...sung.com>,
<pedrom.sousa@...opsys.com>, <jejb@...ux.ibm.com>,
<matthias.bgg@...il.com>, <bvanassche@....org>,
<f.fainelli@...il.com>
CC: <beanhuo@...ron.com>, <cang@...eaurora.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <kuohong.wang@...iatek.com>,
<peter.wang@...iatek.com>, <chun-hung.wu@...iatek.com>,
<andy.teng@...iatek.com>, <leon.chen@...iatek.com>,
Stanley Chu <stanley.chu@...iatek.com>
Subject: [PATCH v2 1/6] soc: mediatek: add header for SiP service interface
Add a common header for the SiP service interface in MediaTek Chipsets.
Cc: Alim Akhtar <alim.akhtar@...sung.com>
Cc: Avri Altman <avri.altman@....com>
Cc: Bart Van Assche <bvanassche@....org>
Cc: Bean Huo <beanhuo@...ron.com>
Cc: Can Guo <cang@...eaurora.org>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: Matthias Brugger <matthias.bgg@...il.com>
Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
---
include/linux/soc/mediatek/mtk_sip_svc.h | 25 ++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 include/linux/soc/mediatek/mtk_sip_svc.h
diff --git a/include/linux/soc/mediatek/mtk_sip_svc.h b/include/linux/soc/mediatek/mtk_sip_svc.h
new file mode 100644
index 000000000000..082398e0cfb1
--- /dev/null
+++ b/include/linux/soc/mediatek/mtk_sip_svc.h
@@ -0,0 +1,25 @@
+/* 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)
+
+#endif
--
2.18.0
Powered by blists - more mailing lists