mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Dmitry Rokosov <ddrokosov@sberdevices.ru>
To: <neil.armstrong@linaro.org>
Cc: <krzysztof.kozlowski@linaro.org>, <robh@kernel.org>,
	<khilman@baylibre.com>, <jbrunet@baylibre.com>,
	<martin.blumenstingl@googlemail.com>, <jianxin.pan@amlogic.com>,
	<kernel@sberdevices.ru>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-amlogic@lists.infradead.org>, <devicetree@vger.kernel.org>,
	<rockosov@gmail.com>
Subject: Re: [PATCH v1] arm64: dts: meson: a1: place pwrc and secure-monitor under /firmware
Date: Fri, 24 Mar 2023 15:06:12 +0300	[thread overview]
Message-ID: <20230324120612.tpb3uga56ilz7yqx@CAB-WSD-L081021> (raw)
In-Reply-To: <d180c7d5-7db9-a961-e519-cca5ccf6f013@linaro.org>

Hello Neil,

On Fri, Mar 24, 2023 at 11:11:02AM +0100, neil.armstrong@linaro.org wrote:
> Hi,
> 
> On 23/03/2023 19:55, Dmitry Rokosov wrote:
> > Before, meson power secure controller was a child of secure monitor node.
> > But secure monitor isn't the bus in terms of device tree subsystem, so
> > of_platform initialization code doesn't populate its children
> > (of_platform_default_populate() API).
> > 
> > Therefore in the current device tree meson power secure controller isn't
> > probed at all.
> > 
> > If we place meson power secure controller and secure monitor nodes under
> > '/firmware', they will be populated automatically from of_platform
> > initialization.
> > 
> > Fixes: 04dd0b6584cd ("arm64: dts: meson: a1: add secure power domain controller")
> > Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
> > ---
> >   arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 6 ++++--
> >   1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> > index 77023a29b6e7..44c651254dc5 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> > +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> > @@ -72,8 +72,10 @@ linux,cma {
> >   		};
> >   	};
> > -	sm: secure-monitor {
> > -		compatible = "amlogic,meson-gxbb-sm";
> > +	firmware {
> > +		sm: secure-monitor {
> > +			compatible = "amlogic,meson-gxbb-sm";
> > +		};
> >   		pwrc: power-controller {
> >   			compatible = "amlogic,meson-a1-pwrc";
> 
> The amlogic,meson-gxbb-sm bindings says the power-controller node should be
> a subnode of secure-monitor, so instead please fix the sm driver by calling:
> 
> of_platform_populate(dev->of_node, NULL, NULL, dev);

This is second option which I was thinking of. I supposing this API is
used from SoC platform drivers and bus drivers only.
But if this approach is okay, I will rework the patch to
of_platform_populate().

Thank you for pointing out it.

-- 
Thank you,
Dmitry

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      reply	other threads:[~2023-03-24 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 18:55 Dmitry Rokosov
2023-03-24 10:11 ` neil.armstrong
2023-03-24 12:06   ` Dmitry Rokosov [this message]

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=20230324120612.tpb3uga56ilz7yqx@CAB-WSD-L081021 \
    --to=ddrokosov@sberdevices.ru \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=jianxin.pan@amlogic.com \
    --cc=kernel@sberdevices.ru \
    --cc=khilman@baylibre.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=rockosov@gmail.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

all inboxes | Powered by JetHome®