mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "CK Hu (胡俊光)" <ck.hu@mediatek.com>,
	"jassisinghbrar@gmail.com" <jassisinghbrar@gmail.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>
Cc: "treapking@chromium.org" <treapking@chromium.org>,
	"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
	"Yongqiang Niu (牛永强)" <yongqiang.niu@mediatek.com>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
	"Xavier Chang (張獻文)" <Xavier.Chang@mediatek.com>,
	"Sirius Wang (王皓昱)" <Sirius.Wang@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"wenst@chromium.org" <wenst@chromium.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"Xiandong Wang (王先冬)" <Xiandong.Wang@mediatek.com>
Subject: Re: [PATCH] mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting
Date: Mon, 24 Feb 2025 09:57:06 +0000	[thread overview]
Message-ID: <16e058721ed0bc4a2ccec7d4b9c5eb35d646b2be.camel@mediatek.com> (raw)
In-Reply-To: <3077494e5e989db6e347bc7c681bb584ab20e593.camel@mediatek.com>

Hi CK,

Thanks for the reviews.

On Mon, 2025-02-24 at 06:04 +0000, CK Hu (胡俊光) wrote:
> On Mon, 2025-02-24 at 13:01 +0800, Jason-JH Lin wrote:
> > Add cmdq_gctl_value_toggle() to configure GCE_CTRL_BY_SW and
> > GCE_DDR_EN
> > together in same the GCE_GCTL_VALUE register.
> > 
> > Move this function into cmdq_runtime_resume() and
> > cmdq_runtime_suspend()
> > to ensure it can be called when the GCE clock is enabled.
> 
> Why need GCE clock to be enabled when toggle GCE_GCTL_VALUE register?

All the GCE registers should be written after GCE clocks enabled.

> In some hardware, just need power on to access register. It's not
> necessary to enable clock.

MT8196 GCE is placed in MMINFRA and using MMINFRA_AO power, so it can
be written without enabling the clocks.

> If GCE need to enable clock to access register, add information here.

OK, I'll add the description above into the commit message.

> 
> > 
> > Fixes: 7abd037aa581 ("mailbox: mtk-cmdq: add gce ddr enable support
> > flow")
> > Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
> > ---
> >  drivers/mailbox/mtk-cmdq-mailbox.c | 41 +++++++++++++-------------
> > ----
> >  1 file changed, 17 insertions(+), 24 deletions(-)
> > 
> > diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> > b/drivers/mailbox/mtk-cmdq-mailbox.c
> > index d186865b8dce..be17697d7785 100644
> > --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> > +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> > @@ -92,16 +92,17 @@ struct gce_plat {
> >  	u32 gce_num;
> >  };
> >  
> > -static void cmdq_sw_ddr_enable(struct cmdq *cmdq, bool enable)
> > +static void cmdq_gctl_value_toggle(struct cmdq *cmdq, bool
> > ddr_enable)
> >  {
> > -	WARN_ON(clk_bulk_enable(cmdq->pdata->gce_num, cmdq-
> > >clocks));
> > +	u32 val = (cmdq->pdata->control_by_sw) ? GCE_CTRL_BY_SW :
> > 0;
> 
> u32 val = cmdq->pdata->control_by_sw ? GCE_CTRL_BY_SW : 0;
> 

OK, I'll change to this.

Regards,
Jason-JH Lin


      reply	other threads:[~2025-02-24  9:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24  5:01 Jason-JH Lin
2025-02-24  6:04 ` CK Hu (胡俊光)
2025-02-24  9:57   ` Jason-JH Lin (林睿祥) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16e058721ed0bc4a2ccec7d4b9c5eb35d646b2be.camel@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Singo.Chang@mediatek.com \
    --cc=Sirius.Wang@mediatek.com \
    --cc=Xavier.Chang@mediatek.com \
    --cc=Xiandong.Wang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=ck.hu@mediatek.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=treapking@chromium.org \
    --cc=wenst@chromium.org \
    --cc=yongqiang.niu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®