[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240307013458.23550-2-jason-jh.lin@mediatek.com>
Date: Thu, 7 Mar 2024 09:34:55 +0800
From: Jason-JH.Lin <jason-jh.lin@...iatek.com>
To: Jassi Brar <jassisinghbrar@...il.com>, Chun-Kuang Hu
<chunkuang.hu@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>
CC: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Jason-ch Chen <jason-ch.chen@...iatek.com>, "Jason-JH . Lin"
<jason-jh.lin@...iatek.com>, Singo Chang <singo.chang@...iatek.com>, Nancy
Lin <nancy.lin@...iatek.com>, Shawn Sung <shawn.sung@...iatek.com>,
<linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: [PATCH v2 1/4] soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE
Add specific purpose register definitions for GCE, so CMDQ users can
use them as a buffer to store data.
Signed-off-by: Jason-JH.Lin <jason-jh.lin@...iatek.com>
---
include/linux/soc/mediatek/mtk-cmdq.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
index 649955d2cf5c..1dae80185f9f 100644
--- a/include/linux/soc/mediatek/mtk-cmdq.h
+++ b/include/linux/soc/mediatek/mtk-cmdq.h
@@ -14,6 +14,15 @@
#define CMDQ_ADDR_HIGH(addr) ((u32)(((addr) >> 16) & GENMASK(31, 0)))
#define CMDQ_ADDR_LOW(addr) ((u16)(addr) | BIT(1))
+/*
+ * Every cmdq thread has its own SPRs (Specific Purpose Registers),
+ * so there are 4 * N (threads) SPRs in GCE that shares the same indexes below.
+ */
+#define CMDQ_THR_SPR_IDX0 (0)
+#define CMDQ_THR_SPR_IDX1 (1)
+#define CMDQ_THR_SPR_IDX2 (2)
+#define CMDQ_THR_SPR_IDX3 (3)
+
struct cmdq_pkt;
struct cmdq_client_reg {
--
2.18.0
Powered by blists - more mailing lists