From: "Clément Léger" <clement.leger@bootlin.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: host: ohci-at91: add support to enter suspend using SMC
Date: Tue, 7 Jun 2022 09:07:59 +0200 [thread overview]
Message-ID: <20220607090759.3fc0b003@fixe.home> (raw)
In-Reply-To: <Yp5DpPpW5/3SnuJl@rowland.harvard.edu>
Le Mon, 6 Jun 2022 14:12:52 -0400,
Alan Stern <stern@rowland.harvard.edu> a écrit :
> On Mon, Jun 06, 2022 at 04:18:02PM +0200, Clément Léger wrote:
> > When Linux is running under OP-TEE, the SFR is set as secured and thus
> > the AT91_OHCIICR_USB_SUSPEND register isn't accessible. Add a SMC to
> > do the appropriate call to suspend the controller.
> > The SMC id is fetched from the device-tree property
> > "microchip,suspend-smc-id". if present, then the syscon regmap is not
> > used to enter suspend and a SMC is issued.
> >
> > Signed-off-by: Clément Léger <clement.leger@bootlin.com>
> > ---
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
>
> However, this is a little weird... You've written
> usb_hcd_at91_probe() so that the SMC is detected in preference to the
> regmap, but then you wrote ohci_at91_port_suspend() so that the regmap
> is used in preference to the SMC. It's not wrong, but it is confusing
> to read.
>
> Do you want to rewrite the patch to make the two routines agree on which
> mechanism to use by default?
>
> Alan Stern
Hi Alan,
I'll rewrite that ! I did it in this specific order in the probe to
allow overloading the device-tree with a SMC ID without removing the
syscon property. This way, the regmap stays the default if no
"microchip,suspend-smc-id" property is provided.
Does it sounds good to you ?
Thanks,
--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: "Clément Léger" <clement.leger@bootlin.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] usb: host: ohci-at91: add support to enter suspend using SMC
Date: Tue, 7 Jun 2022 09:07:59 +0200 [thread overview]
Message-ID: <20220607090759.3fc0b003@fixe.home> (raw)
In-Reply-To: <Yp5DpPpW5/3SnuJl@rowland.harvard.edu>
Le Mon, 6 Jun 2022 14:12:52 -0400,
Alan Stern <stern@rowland.harvard.edu> a écrit :
> On Mon, Jun 06, 2022 at 04:18:02PM +0200, Clément Léger wrote:
> > When Linux is running under OP-TEE, the SFR is set as secured and thus
> > the AT91_OHCIICR_USB_SUSPEND register isn't accessible. Add a SMC to
> > do the appropriate call to suspend the controller.
> > The SMC id is fetched from the device-tree property
> > "microchip,suspend-smc-id". if present, then the syscon regmap is not
> > used to enter suspend and a SMC is issued.
> >
> > Signed-off-by: Clément Léger <clement.leger@bootlin.com>
> > ---
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
>
> However, this is a little weird... You've written
> usb_hcd_at91_probe() so that the SMC is detected in preference to the
> regmap, but then you wrote ohci_at91_port_suspend() so that the regmap
> is used in preference to the SMC. It's not wrong, but it is confusing
> to read.
>
> Do you want to rewrite the patch to make the two routines agree on which
> mechanism to use by default?
>
> Alan Stern
Hi Alan,
I'll rewrite that ! I did it in this specific order in the probe to
allow overloading the device-tree with a SMC ID without removing the
syscon property. This way, the regmap stays the default if no
"microchip,suspend-smc-id" property is provided.
Does it sounds good to you ?
Thanks,
--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-07 7:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 14:18 [PATCH] usb: host: ohci-at91: add support to enter suspend using SMC Clément Léger
2022-06-06 14:18 ` Clément Léger
2022-06-06 18:12 ` Alan Stern
2022-06-06 18:12 ` Alan Stern
2022-06-07 7:07 ` Clément Léger [this message]
2022-06-07 7:07 ` Clément Léger
2022-06-07 13:22 ` Alan Stern
2022-06-07 13:22 ` Alan Stern
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=20220607090759.3fc0b003@fixe.home \
--to=clement.leger@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.