devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Tinghan Shen <tinghan.shen@mediatek.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v13 07/11] remoteproc: mediatek: Add scp_boot_peers and scp_shutdown_peers operations
Date: Wed, 7 Jun 2023 09:49:32 +0200	[thread overview]
Message-ID: <3024a2a8-8e64-dfab-a9a3-0d4f51b345d9@collabora.com> (raw)
In-Reply-To: <20230607072222.8628-8-tinghan.shen@mediatek.com>

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@mediatek.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@collabora.com>



  reply	other threads:[~2023-06-07  7:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07  7:22 [PATCH v13 00/11] Add support for MT8195 SCP 2nd core Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 01/11] dt-bindings: remoteproc: mediatek: Improve the rpmsg subnode definition Tinghan Shen
2023-06-07  7:39   ` AngeloGioacchino Del Regno
2023-06-07  7:22 ` [PATCH v13 02/11] arm64: dts: mediatek: Update the node name of SCP rpmsg subnode Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 03/11] dt-bindings: remoteproc: mediatek: Support MT8195 dual-core SCP Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 04/11] remoteproc: mediatek: Add MT8195 SCP core 1 operations Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 05/11] remoteproc: mediatek: Introduce cluster on single-core SCP Tinghan Shen
2023-06-07  7:43   ` AngeloGioacchino Del Regno
2023-06-07  8:00     ` TingHan Shen (沈廷翰)
2023-06-07  8:01       ` AngeloGioacchino Del Regno
2023-06-12 17:25   ` Mathieu Poirier
2023-06-14  8:13     ` TingHan Shen (沈廷翰)
2023-06-15 16:48       ` Mathieu Poirier
2023-06-07  7:22 ` [PATCH v13 06/11] remoteproc: mediatek: Probe multi-core SCP Tinghan Shen
2023-06-07  7:44   ` AngeloGioacchino Del Regno
2023-06-07  7:22 ` [PATCH v13 07/11] remoteproc: mediatek: Add scp_boot_peers and scp_shutdown_peers operations Tinghan Shen
2023-06-07  7:49   ` AngeloGioacchino Del Regno [this message]
2023-06-12 17:54   ` Mathieu Poirier
2023-06-07  7:22 ` [PATCH v13 08/11] remoteproc: mediatek: Setup MT8195 SCP core 1 SRAM offset Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 09/11] remoteproc: mediatek: Handle MT8195 SCP core 1 watchdog timeout Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 10/11] remoteproc: mediatek: Refine ipi handler error message Tinghan Shen
2023-06-07  7:22 ` [PATCH v13 11/11] arm64: dts: mediatek: mt8195: Add SCP 2nd core Tinghan Shen
2023-06-22 10:00 ` [PATCH v13 00/11] Add support for MT8195 " AngeloGioacchino Del Regno
2023-06-22 17:17   ` Mathieu Poirier
2023-06-23  8:11     ` AngeloGioacchino Del Regno

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=3024a2a8-8e64-dfab-a9a3-0d4f51b345d9@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=tinghan.shen@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;
as well as URLs for NNTP newsgroup(s).