LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v3] soc: mediatek: cmdq: add address shift in jump
@ 2021-08-02  7:52 Yongqiang Niu
  0 siblings, 0 replies; only message in thread
From: Yongqiang Niu @ 2021-08-02  7:52 UTC (permalink / raw)
  To: Chun-Kuang Hu, Jassi Brar
  Cc: Rob Herring, Matthias Brugger, Philipp Zabel, David Airlie,
	Daniel Vetter, Yongqiang Niu, Fabien Parent, Dennis YC Hsieh,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	dri-devel, Project_Global_Chrome_Upstream_Group, Hsin-Yi Wang

Add address shift when compose jump instruction
to compatible with 35bit format.

Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
---
 drivers/mailbox/mtk-cmdq-mailbox.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 8d39b98..d03bfaf 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -174,7 +174,8 @@ static void cmdq_task_insert_into_thread(struct cmdq_task *task)
 	dma_sync_single_for_cpu(dev, prev_task->pa_base,
 				prev_task->pkt->cmd_buf_size, DMA_TO_DEVICE);
 	prev_task_base[CMDQ_NUM_CMD(prev_task->pkt) - 1] =
-		(u64)CMDQ_JUMP_BY_PA << 32 | task->pa_base;
+		(u64)CMDQ_JUMP_BY_PA << 32 |
+		(task->pa_base >> task->cmdq->shift_pa);
 	dma_sync_single_for_device(dev, prev_task->pa_base,
 				   prev_task->pkt->cmd_buf_size, DMA_TO_DEVICE);
 
-- 
1.8.1.1.dirty


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-02  7:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02  7:52 [PATCH v3] soc: mediatek: cmdq: add address shift in jump Yongqiang Niu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).