* Re: [PATCH 0/2] Add SCP support for mt8186
[not found] <20220104114706.27461-1-allen-kh.cheng@mediatek.com>
@ 2022-01-04 16:53 ` Mathieu Poirier
[not found] ` <20220104114706.27461-3-allen-kh.cheng@mediatek.com>
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2022-01-04 16:53 UTC (permalink / raw)
To: allen-kh.cheng
Cc: Ohad Ben-Cohen, Bjorn Andersson, Rob Herring, Matthias Brugger,
Tinghan Shen, Project_Global_Chrome_Upstream_Group, linux-kernel,
devicetree, linux-mediatek, linux-arm-kernel, linux-remoteproc
Hi Allen,
On Tue, Jan 04, 2022 at 07:47:04PM +0800, allen-kh.cheng wrote:
> From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
>
> changes since v1:
> - use mt8192_power_on_sram() helper
> - add MT8186_SCP_L1_SRAM_PD_P1 in mtk_common.h
> - add MT8186_SCP_L1_SRAM_PD_P2 in mtk_common.h
It is quite hard to follow the evolution of this patchset. The second revision
had a "v2" tag but this one doesn't, which can be confused with the patchset
sent on January 3rd. Please send another one (v4) with:
1) A cover letter.
2) The right SoB.
3) The right version tag.
>
> Based on v5.16-rc8
This should be based on rproc-next[1].
Thanks,
Mathieu
https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=rproc-next
>
> allen-kh.cheng (2):
> dt-bindings: remoteproc: mediatek: Add binding for mt8186 scp
> remoteproc: mediatek: Support mt8186 scp
>
> .../bindings/remoteproc/mtk,scp.yaml | 1 +
> drivers/remoteproc/mtk_common.h | 3 ++
> drivers/remoteproc/mtk_scp.c | 35 +++++++++++++++++++
> 3 files changed, 39 insertions(+)
>
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] remoteproc: mediatek: Support mt8186 scp
[not found] ` <20220104114706.27461-3-allen-kh.cheng@mediatek.com>
@ 2022-01-05 9:19 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-01-05 9:19 UTC (permalink / raw)
To: allen-kh.cheng, Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier,
Rob Herring, Matthias Brugger
Cc: Tinghan Shen, Project_Global_Chrome_Upstream_Group, linux-kernel,
devicetree, linux-mediatek, linux-arm-kernel, linux-remoteproc
Il 04/01/22 12:47, allen-kh.cheng ha scritto:
> Add SCP support for mt8186
>
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-By: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] remoteproc: mediatek: Support mt8186 scp
[not found] ` <20220103075854.10438-2-allen-kh.cheng@mediatek.com>
@ 2022-01-04 8:43 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-01-04 8:43 UTC (permalink / raw)
To: allen-kh.cheng, Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier,
Rob Herring, Matthias Brugger, Tinghan Shen
Cc: Mark Brown, linux-remoteproc,
Project_Global_Chrome_Upstream_Group, linux-kernel, devicetree,
linux-arm-kernel, linux-mediatek
Il 03/01/22 08:58, allen-kh.cheng ha scritto:
> Add SCP support for mt8186
>
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Hello! Thanks for the patch!
However, there's something to improve...
> ---
> drivers/remoteproc/mtk_scp.c | 39 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index 36e48cf58ed6..38eab6b86fd7 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -365,6 +365,31 @@ static int mt8183_scp_before_load(struct mtk_scp *scp)
> return 0;
> }
>
> +static int mt8186_scp_before_load(struct mtk_scp *scp)
> +{
> + int i;
> +
> + /* Clear SCP to host interrupt */
> + writel(MT8183_SCP_IPC_INT_BIT, scp->reg_base + MT8183_SCP_TO_HOST);
> +
> + /* Reset clocks before loading FW */
> + writel(0x0, scp->reg_base + MT8183_SCP_CLK_SW_SEL);
> + writel(0x0, scp->reg_base + MT8183_SCP_CLK_DIV_SEL);
> +
.............
> + /* Turn on the power of SCP's SRAM before using it. Enable 1 block per time*/
> + for (i = 31; i >= 0; i--)
> + writel(GENMASK(i, 0), scp->reg_base + MT8183_SCP_SRAM_PDN);
> + writel(0, scp->reg_base + MT8183_SCP_SRAM_PDN);
> +
.............
This snippet corresponds exactly to the mt8192_power_on_sram() helper:
please avoid code duplication by simply calling that function instead.
Thanks,
- Angelo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-05 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220104114706.27461-1-allen-kh.cheng@mediatek.com>
2022-01-04 16:53 ` [PATCH 0/2] Add SCP support for mt8186 Mathieu Poirier
[not found] ` <20220104114706.27461-3-allen-kh.cheng@mediatek.com>
2022-01-05 9:19 ` [PATCH 2/2] remoteproc: mediatek: Support mt8186 scp AngeloGioacchino Del Regno
[not found] <20220103075854.10438-1-allen-kh.cheng@mediatek.com>
[not found] ` <20220103075854.10438-2-allen-kh.cheng@mediatek.com>
2022-01-04 8:43 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).