]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE
authorChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 22 Feb 2024 15:41:09 +0000 (15:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:32:02 +0000 (13:32 +0200)
[ Upstream commit ed4d5ab179b9f0a60da87c650a31f1816db9b4b4 ]

For cmdq jump command, offset 0 means relative jump and offset 1
means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the
typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump().

Fixes: 946f1792d3d7 ("soc: mediatek: cmdq: add jump function")
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-2-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/mediatek/mtk-cmdq-helper.c

index 505651b0d715feca283ea4c06fb5421037a36e08..c0b2f9397ea8a009c7a482506f31899909383f1e 100644 (file)
@@ -13,7 +13,8 @@
 #define CMDQ_POLL_ENABLE_MASK  BIT(0)
 #define CMDQ_EOC_IRQ_EN                BIT(0)
 #define CMDQ_REG_TYPE          1
-#define CMDQ_JUMP_RELATIVE     1
+#define CMDQ_JUMP_RELATIVE     0
+#define CMDQ_JUMP_ABSOLUTE     1
 
 struct cmdq_instruction {
        union {
@@ -414,7 +415,7 @@ int cmdq_pkt_jump(struct cmdq_pkt *pkt, dma_addr_t addr)
        struct cmdq_instruction inst = {};
 
        inst.op = CMDQ_CODE_JUMP;
-       inst.offset = CMDQ_JUMP_RELATIVE;
+       inst.offset = CMDQ_JUMP_ABSOLUTE;
        inst.value = addr >>
                cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan);
        return cmdq_pkt_append_command(pkt, inst);