[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3024a2a8-8e64-dfab-a9a3-0d4f51b345d9@collabora.com>
Date: Wed, 7 Jun 2023 09:49:32 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Tinghan Shen <tinghan.shen@...iatek.com>,
Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>
Cc: linux-remoteproc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH v13 07/11] remoteproc: mediatek: Add scp_boot_peers and
scp_shutdown_peers operations
Il 07/06/23 09:22, Tinghan Shen ha scritto:
> Due to that SCP core 0 controls the SCP clock and SRAM power, add two
> new mtk_scp_of_data operations, scp_boot_peers and scp_shutdown_peers,
> to manage the boot sequence and watchdog timeout handling of SCP core 1.
> It ensures that core 1 boots after or shuts down before core 0 for
> maintaining the proper control flow over SCP core 1.
>
> Signed-off-by: Tinghan Shen <tinghan.shen@...iatek.com>
> ---
> drivers/remoteproc/mtk_common.h | 3 ++
> drivers/remoteproc/mtk_scp.c | 55 +++++++++++++++++++++++++++++++++
> 2 files changed, 58 insertions(+)
>
> diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
> index 56395e8664cb..0bfd242c41cc 100644
> --- a/drivers/remoteproc/mtk_common.h
> +++ b/drivers/remoteproc/mtk_common.h
> @@ -93,6 +93,8 @@ struct mtk_scp_of_data {
> void (*scp_reset_deassert)(struct mtk_scp *scp);
> void (*scp_stop)(struct mtk_scp *scp);
> void *(*scp_da_to_va)(struct mtk_scp *scp, u64 da, size_t len);
> + void (*scp_boot_peers)(struct mtk_scp *scp);
> + void (*scp_shutdown_peers)(struct mtk_scp *scp);
>
> u32 host_to_scp_reg;
> u32 host_to_scp_int_bit;
> @@ -130,6 +132,7 @@ struct mtk_scp {
> struct rproc_subdev *rpmsg_subdev;
>
> struct list_head elem;
> + struct list_head *cluster;
> };
>
> /**
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index d644e232dfec..edbf71f4c21e 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -74,8 +74,21 @@ void scp_put(struct mtk_scp *scp)
> }
> EXPORT_SYMBOL_GPL(scp_put);
>
> +static void mt8195_scp_shutdown_peers(struct mtk_scp *scp)
> +{
> + struct mtk_scp *next_scp;
> +
> + next_scp = list_next_entry(scp, elem);
> + list_for_each_entry_from(next_scp, scp->cluster, elem) {
> + rproc_shutdown(next_scp->rproc);
> + }
braces are not needed here; after fixing that,
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Powered by blists - more mailing lists