Skip to content

Commit 23ba2e7

Browse files
Yongqiang NiuJassiBrar
authored andcommitted
mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number
Use GCE_CTRL_BY_SW definition instead of number Signed-off-by: Yongqiang Niu <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: CK Hu <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 8b9b08b commit 23ba2e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mailbox/mtk-cmdq-mailbox.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define CMDQ_THR_PRIORITY 0x40
3939

4040
#define GCE_GCTL_VALUE 0x48
41+
#define GCE_CTRL_BY_SW GENMASK(2, 0)
4142

4243
#define CMDQ_THR_ACTIVE_SLOT_CYCLES 0x3200
4344
#define CMDQ_THR_ENABLED 0x1
@@ -129,7 +130,8 @@ static void cmdq_init(struct cmdq *cmdq)
129130

130131
WARN_ON(clk_bulk_enable(cmdq->gce_num, cmdq->clocks));
131132
if (cmdq->control_by_sw)
132-
writel(0x7, cmdq->base + GCE_GCTL_VALUE);
133+
writel(GCE_CTRL_BY_SW, cmdq->base + GCE_GCTL_VALUE);
134+
133135
writel(CMDQ_THR_ACTIVE_SLOT_CYCLES, cmdq->base + CMDQ_THR_SLOT_CYCLES);
134136
for (i = 0; i <= CMDQ_MAX_EVENT; i++)
135137
writel(i, cmdq->base + CMDQ_SYNC_TOKEN_UPDATE);

0 commit comments

Comments
 (0)