Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1758167iof; Tue, 7 Jun 2022 10:54:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0hTnSxw4b6QLaOpGJ0dbhOUXtahdu5uPUkal0oyAa7ZkuBa8bdZD5UotUzDJHkt0LaGpN X-Received: by 2002:a17:906:c797:b0:711:8c01:32d4 with SMTP id cw23-20020a170906c79700b007118c0132d4mr14736149ejb.205.1654624495325; Tue, 07 Jun 2022 10:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654624495; cv=none; d=google.com; s=arc-20160816; b=TeGnqamSgjMu19wAm3J8rRYCeY3pmvijly754al9kjN4OYjYRAqZb4xkeFldGBaTza 9/MXomggmRX6oBtsYehrWr1rauHfMweTrg5z7Q09w1BIuEWZk2pplpcp1RkydbhrWEmd a2lVg0ljgHQckvS/GH5y+PnxBpdvd1FpVec5Zgcei3aZLrLkFurkOlKa6UqKLs9YLdB5 HXp4+QSjV23QBzqIQNYrj3yAdur+fdcrULXP0EbhE/m3zR/fr+nk59fUce7NaCb+hSd9 aGzrY3EQWhfyVBZXvw0OikLFJhVA9AUJxwcxlhpWVnQdNPe71FC6JFC2CumUD886CHAd CqEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=GfGv0OL/piQpxMJzszkHBhvE9ywouf21874u1EEIDs0=; b=uKlA6j0mrdofY1t5ckwD5PzfSARQFWm9juM3E2TEBu9jckKevujk+UYnKBl3ZcUla8 zvReEmEXP+r+0/p8YQ/olczpnwgiaMnjVIB5Do5BhKrDdP/qs0wrDJlvjNQJRrDMi/30 y05QzEvNUvzXSIxpwx0/WgqwyOexrCqLpMsD4K7YFnCyHg3u2z3lUpQLiHsAII8C7wsS ixP1OTb5tOHsIk6emt0JLZT3cBNFBgzNBN5bPOJWxfVGCyLVMnPMNiw87sqzYzei4q2y BuG5iY68qES/nCirXzQXHx8hHYqtnosXJtRrDHJGF6rmp/Mv+jXxXXMMTjcelOXmvhw2 /bDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WPGHCQ2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a89-20020a509ee2000000b0042b345a1834si63517edf.259.2022.06.07.10.54.28; Tue, 07 Jun 2022 10:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WPGHCQ2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237492AbiFGHJI (ORCPT + 99 others); Tue, 7 Jun 2022 03:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237463AbiFGHJG (ORCPT ); Tue, 7 Jun 2022 03:09:06 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD11F20192 for ; Tue, 7 Jun 2022 00:09:03 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 680DB20009; Tue, 7 Jun 2022 07:09:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1654585742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GfGv0OL/piQpxMJzszkHBhvE9ywouf21874u1EEIDs0=; b=WPGHCQ2coYbcJho+/fJ5X+dPXDBV6uoIWxTUlvXLrZWAvxViSe9mRviRBckrd69Yt+r96o JWaW3/u4ivPSMN0bQWmEOaO7v8FcLbKoZjxiADddM60cfc6TTTpY16TrIa1LQ0pmWY//7H CBzUO/GYXylwthtBKH4on/rQ5hVwFA4ogaYNNmeIMInYoger/ivcmf8pgUCofsEoJFhU+I M+U7TOkUTInoO9878BiA0H3eM+HiC7jMtijXIX+nof+QrQFmRnKYoOf820DKfWw0sTL5UO /4vWzbqQsgpSbmTHAjpW0dTyTPcnDcDkuu5GGB3bc+lq0UWriGEKQ+CUSq1YYg== Date: Tue, 7 Jun 2022 09:07:59 +0200 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Alan Stern Cc: Greg Kroah-Hartman , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , 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 Message-ID: <20220607090759.3fc0b003@fixe.home> In-Reply-To: References: <20220606141802.165252-1-clement.leger@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le Mon, 6 Jun 2022 14:12:52 -0400, Alan Stern a =C3=A9crit : > On Mon, Jun 06, 2022 at 04:18:02PM +0200, Cl=C3=A9ment L=C3=A9ger 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. > >=20 > > Signed-off-by: Cl=C3=A9ment L=C3=A9ger > > --- =20 >=20 > Acked-by: Alan Stern >=20 > However, this is a little weird... You've written=20 > usb_hcd_at91_probe() so that the SMC is detected in preference to the=20 > regmap, but then you wrote ohci_at91_port_suspend() so that the regmap=20 > is used in preference to the SMC. It's not wrong, but it is confusing=20 > to read. >=20 > Do you want to rewrite the patch to make the two routines agree on which= =20 > mechanism to use by default? >=20 > 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, --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com