From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Tinghan Shen <tinghan.shen@mediatek.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Daisuke Nojiri <dnojiri@chromium.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
"Dustin L. Howett" <dustin@howett.net>,
Tzung-Bi Shih <tzungbi@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Prashant Malani <pmalani@chromium.org>,
Brian Norris <briannorris@chromium.org>
Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
chrome-platform@lists.linux.dev,
Project_Global_Chrome_Upstream_Group@mediatek.com,
weishunc@google.com
Subject: Re: [PATCH v1 05/15] remoteproc: mediatek: Add SCP core 1 driver for dual-core scp
Date: Mon, 6 Jun 2022 12:08:14 +0200 [thread overview]
Message-ID: <4062e8be-3ac7-c6e5-dc15-bb11bd6051fc@collabora.com> (raw)
In-Reply-To: <fe9fae165443f0db55f2bac2bbe214f3b018052d.camel@mediatek.com>
Il 06/06/22 11:52, Tinghan Shen ha scritto:
> On Mon, 2022-06-06 at 11:15 +0200, AngeloGioacchino Del Regno wrote:
>> Il 01/06/22 13:21, Tinghan Shen ha scritto:
>>> MT8195 SCP is a dual-core processor. The mtk_scp.c driver only controls
>>> SCP core 0. This patch adds a basic driver to control the another core.
>>>
>>> Core 1 and core 0 of the SCP are housed in the same subsys.They see
>>> registers and memory in the same way.
>>>
>>> Core 1 of the SCP features its own set of core configuration registers,
>>> interrupt controller, timers, and DMAs. The rest of the peripherals
>>> in this subsystem are shared by core 0 and core 1.
>>>
>>> As for memory, core 1 has its own cache memory, and the SCP SRAM is shared
>>> by core 0 and core 1.
>>>
>>
>> Hello Tinghan,
>>
>> checking all the patches that are introducing support for the secondary SCP core,
>> it's clear that you're practically reusing *most of* mtk_scp in mtk_scp_dual.
>>
>> I don't think that adding a new configuration option for MTK_SCP_DUALCORE (nor a
>> new file just for that) is a good idea... the code is "short enough" so you should
>> really just add support for multi-core SCP in mtk_scp.c instead.
>>
>> After doing so, I have a hunch that we'll be able to reduce the size of this
>> implementation even more, as I see literally too much common code :-)
>>
>
> Hi Angelo,
>
> Thanks for your review.
>
> This series has 2 new files, mtk_scp_dual.c and mtk_scp_subdev.c.
> Is your advice to merge both files into mtk_scp.c,
> or to merely merge mtk_scp_dual.c to mtk_scp.c?
>
> Thanks,
> TingHan
>
>
>
I suggest to merge both into mtk_scp.c and commonize/generalize functions inside
of there as much as possible... including the removal of #if IS_ENABLED(...)
macro usages, as you can simply check that during runtime by setting a bool
variable to true when it's dual-core.
Let's do this first step.
I'll give you a more exhaustive review on v2, when this main step is done.
Cheers,
Angelo
next prev parent reply other threads:[~2022-06-06 10:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 11:21 [PATCH v1 00/15] Add support for MT8195 SCP 2nd core Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 01/15] dt-binding: remoteproc: mediatek: Support dual-core SCP Tinghan Shen
2022-06-01 11:50 ` Krzysztof Kozlowski
2022-06-02 5:21 ` Tinghan Shen
2022-06-02 6:55 ` Krzysztof Kozlowski
2022-06-02 8:58 ` Tinghan Shen
2022-06-02 10:37 ` Krzysztof Kozlowski
2022-06-02 11:29 ` Tinghan Shen
2022-06-02 12:02 ` Krzysztof Kozlowski
2022-06-01 11:21 ` [PATCH v1 02/15] remoteproc: Kconfig: Add mt8195 SCP dual core configuration Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 03/15] remoteproc: mediatek: Support hanlding scp core 1 wdt timeout Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 04/15] remoteproc: mediatek: Add SCP core 1 register definitions Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 05/15] remoteproc: mediatek: Add SCP core 1 driver for dual-core scp Tinghan Shen
2022-06-06 9:15 ` AngeloGioacchino Del Regno
2022-06-06 9:52 ` Tinghan Shen
2022-06-06 10:08 ` AngeloGioacchino Del Regno [this message]
2022-06-06 10:41 ` Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 06/15] remoteproc: mediatek: Add SCP core 1 rproc operations Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 07/15] remoteproc: mediatek: Add SCP core 1 reserved memory support Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 08/15] remoteproc: mediatek: Add SCP core 1 interrupt support Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 09/15] remoteproc: mediatek: Register SCP core 1 initialization ipi Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 10/15] remoteproc: mediatek: Add chip dependent operations for SCP core 1 Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 11/15] remoteproc: mediatek: Add SCP core 1 SRAM offset Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 12/15] remoteproc: mediatek: Add SCP core 1 as a rproc subdevice Tinghan Shen
2022-06-01 11:21 ` [PATCH v1 13/15] remoteproc: mediatek: Wait SCP core 1 probe done Tinghan Shen
2022-06-01 11:22 ` [PATCH v1 14/15] remoteproc: mediatek: Support rpmsg for SCP core 1 Tinghan Shen
2022-06-01 11:22 ` [PATCH v1 15/15] mfd: cros_ec: Add SCP core 1 as a new CrOS EC MCU Tinghan Shen
2022-06-15 22:28 ` Lee Jones
2022-06-01 11:46 ` [PATCH v1 00/15] Add support for MT8195 SCP 2nd core Krzysztof Kozlowski
2022-06-02 3:52 ` Tinghan Shen
2022-06-02 6:56 ` Krzysztof Kozlowski
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=4062e8be-3ac7-c6e5-dc15-bb11bd6051fc@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=bjorn.andersson@linaro.org \
--cc=bleung@chromium.org \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=devicetree@vger.kernel.org \
--cc=dnojiri@chromium.org \
--cc=dustin@howett.net \
--cc=groeck@chromium.org \
--cc=gustavoars@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee.jones@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=pmalani@chromium.org \
--cc=robh+dt@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=tinghan.shen@mediatek.com \
--cc=tzungbi@kernel.org \
--cc=weishunc@google.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