From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55D8CC43334 for ; Tue, 7 Jun 2022 13:23:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z70VeUqj9RLT6jiDezqNBl9vBE7T1PQ0p4cxARTXS6k=; b=jNOgOTefnX8jAX FjRTI8vxL9EG7WukBXG6wZnmkIlrb8BCMFgIY9bmBK9pN8kP64b/kkA1AMP97cMKk8z0O02J+6YIb gyBGbdegTLNR+2nVaocJjHqiq1IPknh264zGUczBJwtU1AIIUQFYnf6Ne0uTM6DHzHY6vPXjuwYIN /LId1G4E/DA2PP1zYGurZAT7KmBhmqYla1gJu8Et63fH+RMDyi3I4Qo+8Gd3b6WL3E0rSq37LWERl uzlqE5H/VN82gOG9zUIVU9jI9dIP1LlzE0p6YD1LvWRJN9f6ma/DJUlgRUDZjoZv7Lr3VV4fRS3fZ 5cYQaTmLMams7S8NASUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyZA1-007fXL-CL; Tue, 07 Jun 2022 13:22:17 +0000 Received: from netrider.rowland.org ([192.131.102.5]) by bombadil.infradead.org with smtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyZ9x-007fS6-Tw for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 13:22:15 +0000 Received: (qmail 402115 invoked by uid 1000); 7 Jun 2022 09:22:08 -0400 Date: Tue, 7 Jun 2022 09:22:08 -0400 From: Alan Stern To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= Subject: Re: [PATCH] usb: host: ohci-at91: add support to enter suspend using SMC Message-ID: References: <20220606141802.165252-1-clement.leger@bootlin.com> <20220607090759.3fc0b003@fixe.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220607090759.3fc0b003@fixe.home> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_062214_168532_D684095F X-CRM114-Status: GOOD ( 24.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 07, 2022 at 09:07:59AM +0200, Cl=E9ment L=E9ger wrote: > Le Mon, 6 Jun 2022 14:12:52 -0400, > Alan Stern a =E9crit : > = > > On Mon, Jun 06, 2022 at 04:18:02PM +0200, Cl=E9ment L=E9ger 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=E9ment L=E9ger > > > --- = > > = > > Acked-by: Alan Stern > > = > > 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 whic= h = > > 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 ? Sure. Just make ohci_at91_port_suspend() try to use the SMC first, and = then use the regmap only if the SMC ID hasn't been set. Alan Stern _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel