[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93c9b325c9178e5452734a1befcfc76f073f23a3.camel@bootlin.com>
Date: Mon, 23 Oct 2023 19:32:19 +0200
From: Thomas Perrot <thomas.perrot@...tlin.com>
To: claudiu beznea <claudiu.beznea@...on.dev>,
Russell King <linux@...linux.org.uk>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
clement.leger@...tlin.com
Subject: Re: [PATCH] ARM: at91: pm: set soc_pm.data.mode in
at91_pm_secure_init()
Hello Claudiu,
On Mon, 2023-10-23 at 09:01 +0300, claudiu beznea wrote:
> > Hi, Thomas,
> >
> > > >
> > > > diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> > > > index 1a26af0fabc7..345b91dc6627 100644
> > > > --- a/arch/arm/mach-at91/pm.c
> > > > +++ b/arch/arm/mach-at91/pm.c
> > > > @@ -1103,6 +1103,7 @@ static void __init
> > > > at91_pm_secure_init(void)
> > > > if (res.a0 == 0) {
> > > > pr_info("AT91: Secure PM: suspend mode set to
> > > > %s\n",
> > > > pm_modes[suspend_mode].pattern);
> > > > + soc_pm.data.mode = suspend_mode;
> > > > return;
> > > > }
> > > >
> > > > @@ -1112,6 +1113,7 @@ static void __init
> > > > at91_pm_secure_init(void)
> > > > res = sam_smccc_call(SAMA5_SMC_SIP_GET_SUSPEND_MODE, 0,
> > > > 0);
> > > > if (res.a0 == 0) {
> > > > pr_warn("AT91: Secure PM: failed to get default
> > > > mode\n");
> > > > + soc_pm.data.mode = -1;
> >
> > As this variable's type is unsigned int setting it -1 will make
> > at91_suspend_entering_slow_clock() return true all the time. Is
> > this
> > what
> > you intend?
> >
Yes, to set it at the same default value, as in at91_pm_begin() [1],
when an unsupported mode is used and can’t get the default value from
the secure monitor.
[1]https://elixir.bootlin.com/linux/latest/source/arch/arm/mach-at91/pm.c#L470
Kind regards,
Thomas Perrot
> > Thank you,
> > Claudiu Beznea
> >
> > > > return;
> > > > }
> > > >
> > > > @@ -1119,6 +1121,7 @@ static void __init
> > > > at91_pm_secure_init(void)
> > > > pm_modes[suspend_mode].pattern);
> > > >
> > > > soc_pm.data.suspend_mode = res.a1;
> > > > + soc_pm.data.mode = soc_pm.data.suspend_mode;
> > > > }
> > > > static const struct of_device_id atmel_shdwc_ids[] = {
> > > > { .compatible = "atmel,sama5d2-shdwc" },
--
Thomas Perrot, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
--
Thomas Perrot, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Download attachment "signature.asc" of type "application/pgp-signature" (660 bytes)
Powered by blists - more mailing lists