Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3329342pxb; Mon, 9 Nov 2020 08:23:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwD2GqfVIdB4lCDGrA6hE4pap37uHyYMmmC8anpOeC7EErRS8e+QPqgfQrCqT07gzG7xSc7 X-Received: by 2002:a17:906:f1d8:: with SMTP id gx24mr15612647ejb.73.1604939037656; Mon, 09 Nov 2020 08:23:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604939037; cv=none; d=google.com; s=arc-20160816; b=uTWj4YLM3aXTURtRwoAFSPnf+WWZPWjlIIYYJY4W4/8RTBsiqWLzvOO7n6Fv50o+dZ qWjHfLtU67B766U78weRxVMu4nkNDsy0HCCXiFCTL9vbf7wTRHo+E2KW4XLCyiuN8xMS JUpOuDAtAcokcBoxuqEGxj2F9isBQ1CZGUWzXdC+ASxB6xQN3CfSepQMdWH8d+sHWu5M r56NmqbpS8meX4bseHjAmSfmWHj1sykTFGqZdqlk1sBO/4BAIwiOOyFcOV/r6TgxXwpA jndZi+/Fnwcy98BBMIS5zlhYZzECV++Aldw4YTI7MYLASot9xwB4J2nxj1ic8AgjVTDW Pv3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=X2ghCghzfgavC7PqfaJTuv5Itogj5au+Xw7N+bWnNus=; b=ANKx2Ga0MUj0MgGd5nTJqriNLDWK1nZ03QcCUHCHgWVykU5HPIq1NYKD6Vyr2M655R CYCsiOObeK45drb/XX2H/M562tP4hPi9YleogGVZQMe0+DtYzq/vXjk9jvLRtoFkd9/O WpK1YnR6cUkyu+0biTdALGzkODz4CMk/VNrSL2jbMMc4wtCowues8Kokr+iqaWKDO0PD kUnpx8my1iWDJOKFviQgadY8ISLKMmPW5lO/lOwpJtlsVOrTv+OaeFyFNN9SetESAHxt 1OcFowSo/MtwqFN8qQKsTxw29LVFN1oNrLEfjyjJQbflt3JYbzyGHljZwxZBz9coeO/O iIgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=bLMSrdod; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si6872332edx.393.2020.11.09.08.23.33; Mon, 09 Nov 2020 08:23:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=bLMSrdod; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730130AbgKIQWM (ORCPT + 99 others); Mon, 9 Nov 2020 11:22:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729875AbgKIQWM (ORCPT ); Mon, 9 Nov 2020 11:22:12 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F6E3C0613CF for ; Mon, 9 Nov 2020 08:22:12 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id s13so8473628wmh.4 for ; Mon, 09 Nov 2020 08:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X2ghCghzfgavC7PqfaJTuv5Itogj5au+Xw7N+bWnNus=; b=bLMSrdodPV6wPjrI4CdQKFEd/r574WY1z/pyx3H5PaA4G3sBwsE3J2r77a2rrr7nsv YRkdjU+r6cGU1lX3Gz8rBaUYUtVWpfJc25P7HIcQ6WwLE8Ce+eac9EUs+HXkZL3kIN9A CeOV2rnMcOkq7AaUQBfuqzzDG5BWCZbePenmo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X2ghCghzfgavC7PqfaJTuv5Itogj5au+Xw7N+bWnNus=; b=mjZyOK6FUYA8KVGpn6JF8DFF/TEo9RJarWdW3ys0y5iPgT1AS8v3MFhnk+raz1kiSO 5m85P+NNItitpOTX+6FgZs7yrQTTwrZAxpaW6WK3/yuDwNH00KVLE8Ju7+sID+ZUqsPf Pqm+9cGZY1fmBLvAvk3YltwdJG0Rsa/+2QBArGWEDCBx8qCoQXWgcu5X1OOzC188tA9t 2bNZJYDNHVWcn5cfP41pmElFXDnVaQjP9iIwdOjJmv9bdbJxWfevBIOacxIJIhDht0DK hzrDjG3tDA6PByM7lHLb11k2LxyzGR1WZzNww/ji4oGBMIAul1unxBLEQ7UFZzP6JlUn /ayA== X-Gm-Message-State: AOAM531jLa18bKrIwuFSk+2rW0wZ2I2yO1mcqNEftV2HO+/qHousANc3 FOJpRU7SLVI6Ri8cy3tdC/xbvdoQJQoJ0kJURCS1Jw== X-Received: by 2002:a7b:c255:: with SMTP id b21mr149352wmj.72.1604938930561; Mon, 09 Nov 2020 08:22:10 -0800 (PST) MIME-Version: 1.0 References: <20201106191743.40457-1-james.quinlan@broadcom.com> <20201106191743.40457-2-james.quinlan@broadcom.com> <64aa1f860bf60ddac7a2015c87896c8a7b13b161.camel@pengutronix.de> In-Reply-To: <64aa1f860bf60ddac7a2015c87896c8a7b13b161.camel@pengutronix.de> From: Jim Quinlan Date: Mon, 9 Nov 2020 11:21:59 -0500 Message-ID: Subject: Re: [PATCH v2 1/2] reset: brcmstb rescal: implement {de}assert() instead of reset() To: Philipp Zabel , Amjad Ouled-Ameur Cc: Hans de Goede , Jens Axboe , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Florian Fainelli , "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" , open list Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000dcf8e805b3aef669" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000dcf8e805b3aef669 Content-Type: text/plain; charset="UTF-8" On Mon, Nov 9, 2020 at 5:05 AM Philipp Zabel wrote: > > Hi Jim, > > On Fri, 2020-11-06 at 14:17 -0500, Jim Quinlan wrote: > > Before, only control_reset() was implemented. However, the reset core only > > invokes control_reset() once in its lifetime. Because we need it to invoke > > control_reset() again after resume out of S2 or S3, we have switched to > > putting the reset functionality into the control_deassert() method and > > having an empty control_assert() method. > > > > Signed-off-by: Jim Quinlan > > You are switching to the wrong abstraction to work around a deficiency > of the reset controller framework. Instead, it would be better to allow > to "reactivate" shared pulsed resets so they can be triggered again. True. > > > Could you please have a look at [1], which tries to implement this with > a new API call, and check if this can fix your problem? If so, it would > be great if you could coordinate with Amjad to see this fixed in the > core. > > [1] https://lore.kernel.org/lkml/20201001132758.12280-1-aouledameur@baylibre.com/ Yes, this would work for our usage. Amjad please let me know if I can help here. The only "nit" I have is that I favor the name 'unreset' over 'resettable' but truly I don't care one way or the other. Thanks and kind regards, Jim Quinaln Broadcom STB > > > > regards > Philipp > > > --- > > drivers/reset/reset-brcmstb-rescal.c | 13 ++++++++++--- > > 1 file changed, 10 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/reset/reset-brcmstb-rescal.c b/drivers/reset/reset-brcmstb-rescal.c > > index b6f074d6a65f..1f54ae4f91fe 100644 > > --- a/drivers/reset/reset-brcmstb-rescal.c > > +++ b/drivers/reset/reset-brcmstb-rescal.c > > @@ -20,8 +20,8 @@ struct brcm_rescal_reset { > > struct reset_controller_dev rcdev; > > }; > > > > -static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev, > > - unsigned long id) > > +static int brcm_rescal_reset_deassert(struct reset_controller_dev *rcdev, > > + unsigned long id) > > { > > struct brcm_rescal_reset *data = > > container_of(rcdev, struct brcm_rescal_reset, rcdev); > > @@ -52,6 +52,12 @@ static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev, > > return 0; > > } > > > > +static int brcm_rescal_reset_assert(struct reset_controller_dev *rcdev, > > + unsigned long id) > > +{ > > + return 0; > > +} > > + > > static int brcm_rescal_reset_xlate(struct reset_controller_dev *rcdev, > > const struct of_phandle_args *reset_spec) > > { > > @@ -60,7 +66,8 @@ static int brcm_rescal_reset_xlate(struct reset_controller_dev *rcdev, > > } > > > > static const struct reset_control_ops brcm_rescal_reset_ops = { > > - .reset = brcm_rescal_reset_set, > > + .deassert = brcm_rescal_reset_deassert, > > + .assert = brcm_rescal_reset_assert, > > }; > > > > static int brcm_rescal_reset_probe(struct platform_device *pdev) --000000000000dcf8e805b3aef669 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQQwYJKoZIhvcNAQcCoIIQNDCCEDACAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2YMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEz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