]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting
authorJason-JH Lin <jason-jh.lin@mediatek.com>
Mon, 21 Apr 2025 03:55:47 +0000 (11:55 +0800)
committerJassi Brar <jassisinghbrar@gmail.com>
Mon, 26 May 2025 21:23:39 +0000 (16:23 -0500)
commit9fcebcb37c3e0a4b6eb40768cc5a5faebf166fbe
tree5f784caec39c6bc4a9116cc287a2a092db3c079e
parentf5cb07ec6aabd1bb56adbdeb5f0d70cb524db2cd
mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting

Add cmdq_gctl_value_toggle() to configure GCE_CTRL_BY_SW and GCE_DDR_EN
together in the same GCE_GCTL_VALUE register.

For the SoCs whose GCE is located in MMINFRA and uses MMINFRA_AO power,
this allows it to be written without enabling the clocks. Otherwise, all
GCE registers should be written after the GCE clocks are enabled.
Move this function into cmdq_runtime_resume() and cmdq_runtime_suspend()
to ensure it is called when the GCE clock is enabled.

Fixes: 7abd037aa581 ("mailbox: mtk-cmdq: add gce ddr enable support flow")
Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/mtk-cmdq-mailbox.c