diff mbox series

[v8,2/4] mailbox: mtk-cmdq: instead magic number with GCE_CTRL_BY_SW

Message ID 20220930160638.7588-3-yongqiang.niu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series mailbox: mtk-cmdq: add MT8186 support | expand

Commit Message

Yongqiang Niu Sept. 30, 2022, 4:06 p.m. UTC
instead magic number with GCE_CTRL_BY_SW

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
---
 drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

CK Hu (胡俊光) Oct. 3, 2022, 3:56 a.m. UTC | #1
Hi, Yongqiang:

On Sat, 2022-10-01 at 00:06 +0800, Yongqiang Niu wrote:
> instead magic number with GCE_CTRL_BY_SW

This is a cleanup patch and I would like the cleanup patch to be the
first patch of this series because the cleanup patch could be applied
independently.

Regards,
CK

> 
> Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 88db6b4642db..04eb44d89119 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -133,7 +133,7 @@ static void cmdq_init(struct cmdq *cmdq)
>  
>  	WARN_ON(clk_bulk_enable(cmdq->gce_num, cmdq->clocks));
>  	if (cmdq->control_by_sw)
> -		writel(0x7, cmdq->base + GCE_GCTL_VALUE);
> +		writel(GCE_CTRL_BY_SW, cmdq->base + GCE_GCTL_VALUE);
>  
>  	if (cmdq->sw_ddr_en)
>  		writel(GCE_DDR_EN | GCE_CTRL_BY_SW, cmdq->base +
> GCE_GCTL_VALUE);
AngeloGioacchino Del Regno Oct. 3, 2022, 2:49 p.m. UTC | #2
Il 30/09/22 18:06, Yongqiang Niu ha scritto:
> instead magic number with GCE_CTRL_BY_SW
> 
> Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>

Please fix the commit title and description... an idea:

mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number

P.S.: I agree with CK, please send this as a separate commit.

Regards,
Angelo
Yongqiang Niu Oct. 4, 2022, 9:20 a.m. UTC | #3
On Mon, 2022-10-03 at 16:49 +0200, AngeloGioacchino Del Regno wrote:
> Il 30/09/22 18:06, Yongqiang Niu ha scritto:
> > instead magic number with GCE_CTRL_BY_SW
> > 
> > Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> 
> Please fix the commit title and description... an idea:
> 
> mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number
> 
> P.S.: I agree with CK, please send this as a separate commit.
> 
> Regards,
> Angelo
> 
> 


this clean up patch will be moved as the first patch and fix commit
title in next version
diff mbox series

Patch

diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 88db6b4642db..04eb44d89119 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -133,7 +133,7 @@  static void cmdq_init(struct cmdq *cmdq)
 
 	WARN_ON(clk_bulk_enable(cmdq->gce_num, cmdq->clocks));
 	if (cmdq->control_by_sw)
-		writel(0x7, cmdq->base + GCE_GCTL_VALUE);
+		writel(GCE_CTRL_BY_SW, cmdq->base + GCE_GCTL_VALUE);
 
 	if (cmdq->sw_ddr_en)
 		writel(GCE_DDR_EN | GCE_CTRL_BY_SW, cmdq->base + GCE_GCTL_VALUE);