All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: "Matt Mackall" <mpm@selenic.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Nicolas Saenz Julienne" <nsaenzjulienne@suse.de>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	"Mark Brown" <broonie@kernel.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"\"Nícolas F. R. A. Prado\"" <nfraprado@protonmail.com>,
	"Rikard Falkeborn" <rikard.falkeborn@gmail.com>,
	"Stefan Wahren" <stefan.wahren@i2se.com>,
	linux-crypto@vger.kernel.org,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] hwrng: bcm2835: add reset support
Date: Wed, 3 Mar 2021 15:06:48 +0100	[thread overview]
Message-ID: <7B6F49A9-A31D-4126-8CB1-11EE3B2B7950@gmail.com> (raw)
In-Reply-To: <cb7e29012e15ff10916374f911c74430fc3f5b32.camel@pengutronix.de>

Hi Philipp,

> El 3 mar 2021, a las 14:52, Philipp Zabel <p.zabel@pengutronix.de> escribió:
> 
> Hi Álvaro,
> 
> On Wed, 2021-02-24 at 09:22 +0100, Álvaro Fernández Rojas wrote:
> [...]
>> @@ -115,6 +121,8 @@ static void bcm2835_rng_cleanup(struct hwrng *rng)
>> 	/* disable rng hardware */
>> 	rng_writel(priv, 0, RNG_CTRL);
>> 
>> +	reset_control_rearm(priv->reset);
>> +
>> 	if (!IS_ERR(priv->clk))
>> 		clk_disable_unprepare(priv->clk);
>> }
>> @@ -159,6 +167,10 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
>> 	if (PTR_ERR(priv->clk) == -EPROBE_DEFER)
>> 		return -EPROBE_DEFER;
>> 
>> +	priv->reset = devm_reset_control_get_optional_exclusive(dev, NULL);
>> +	if (IS_ERR(priv->reset))
>> +		return PTR_ERR(priv->reset);
>> +
>> 	priv->rng.name = pdev->name;
>> 	priv->rng.init = bcm2835_rng_init;
>> 	priv->rng.read = bcm2835_rng_read;
> 
> That doesn't seem right. reset_control_rearm() doesn't do anything if
> the reset control is exclusive. Either the reset control should be
> requested as shared, or the _rearm should be removed.

In only added reset_control_rearm() because Florian requested it…
I think it’s not needed, so we can use v3, since it was the only change between v3 and v4...

> 
> regards
> Philipp

Best regards,
Álvaro.

WARNING: multiple messages have this Message-ID (diff)
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: "Matt Mackall" <mpm@selenic.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Nicolas Saenz Julienne" <nsaenzjulienne@suse.de>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	"Mark Brown" <broonie@kernel.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"\"Nícolas F. R. A. Prado\"" <nfraprado@protonmail.com>,
	"Rikard Falkeborn" <rikard.falkeborn@gmail.com>,
	"Stefan Wahren" <stefan.wahren@i2se.com>,
	linux-crypto@vger.kernel.org,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] hwrng: bcm2835: add reset support
Date: Wed, 3 Mar 2021 15:06:48 +0100	[thread overview]
Message-ID: <7B6F49A9-A31D-4126-8CB1-11EE3B2B7950@gmail.com> (raw)
In-Reply-To: <cb7e29012e15ff10916374f911c74430fc3f5b32.camel@pengutronix.de>

Hi Philipp,

> El 3 mar 2021, a las 14:52, Philipp Zabel <p.zabel@pengutronix.de> escribió:
> 
> Hi Álvaro,
> 
> On Wed, 2021-02-24 at 09:22 +0100, Álvaro Fernández Rojas wrote:
> [...]
>> @@ -115,6 +121,8 @@ static void bcm2835_rng_cleanup(struct hwrng *rng)
>> 	/* disable rng hardware */
>> 	rng_writel(priv, 0, RNG_CTRL);
>> 
>> +	reset_control_rearm(priv->reset);
>> +
>> 	if (!IS_ERR(priv->clk))
>> 		clk_disable_unprepare(priv->clk);
>> }
>> @@ -159,6 +167,10 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
>> 	if (PTR_ERR(priv->clk) == -EPROBE_DEFER)
>> 		return -EPROBE_DEFER;
>> 
>> +	priv->reset = devm_reset_control_get_optional_exclusive(dev, NULL);
>> +	if (IS_ERR(priv->reset))
>> +		return PTR_ERR(priv->reset);
>> +
>> 	priv->rng.name = pdev->name;
>> 	priv->rng.init = bcm2835_rng_init;
>> 	priv->rng.read = bcm2835_rng_read;
> 
> That doesn't seem right. reset_control_rearm() doesn't do anything if
> the reset control is exclusive. Either the reset control should be
> requested as shared, or the _rearm should be removed.

In only added reset_control_rearm() because Florian requested it…
I think it’s not needed, so we can use v3, since it was the only change between v3 and v4...

> 
> regards
> Philipp

Best regards,
Álvaro.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-03-04  0:08 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 19:45 [PATCH] hwrng: bcm2835: add reset support Álvaro Fernández Rojas
2021-02-22 19:45 ` Álvaro Fernández Rojas
2021-02-23 16:01 ` [PATCH 0/2] " Álvaro Fernández Rojas
2021-02-23 16:01   ` Álvaro Fernández Rojas
2021-02-23 16:01   ` [PATCH 1/2] dt-bindings: rng: bcm2835: document " Álvaro Fernández Rojas
2021-02-23 16:01     ` Álvaro Fernández Rojas
2021-02-23 16:36     ` Florian Fainelli
2021-02-23 16:36       ` Florian Fainelli
2021-02-23 17:17       ` Scott Branden
2021-02-23 17:17         ` Scott Branden
2021-02-23 17:22         ` Álvaro Fernández Rojas
2021-02-23 17:22           ` Álvaro Fernández Rojas
2021-02-23 16:01   ` [PATCH 2/2] hwrng: bcm2835: add " Álvaro Fernández Rojas
2021-02-23 16:01     ` Álvaro Fernández Rojas
2021-02-24  8:22   ` [PATCH v4 0/2] " Álvaro Fernández Rojas
2021-02-24  8:22     ` Álvaro Fernández Rojas
2021-02-24  8:22     ` [PATCH v4 1/2] dt-bindings: rng: bcm2835: document " Álvaro Fernández Rojas
2021-02-24  8:22       ` Álvaro Fernández Rojas
2021-02-24  8:22     ` [PATCH v4 2/2] hwrng: bcm2835: add " Álvaro Fernández Rojas
2021-02-24  8:22       ` Álvaro Fernández Rojas
2021-03-03 13:52       ` Philipp Zabel
2021-03-03 13:52         ` Philipp Zabel
2021-03-03 14:06         ` Álvaro Fernández Rojas [this message]
2021-03-03 14:06           ` Álvaro Fernández Rojas
2021-03-03 19:16           ` Florian Fainelli
2021-03-03 19:16             ` Florian Fainelli
2021-02-23 17:00 ` [PATCH v3 0/2] " Álvaro Fernández Rojas
2021-02-23 17:00   ` Álvaro Fernández Rojas
2021-02-23 17:00   ` [PATCH v3 1/2] dt-bindings: rng: bcm2835: document " Álvaro Fernández Rojas
2021-02-23 17:00     ` Álvaro Fernández Rojas
2021-02-23 19:34     ` Rob Herring
2021-02-23 19:34       ` Rob Herring
2021-02-23 20:48       ` Álvaro Fernández Rojas
2021-02-23 20:48         ` Álvaro Fernández Rojas
2021-03-04 12:07     ` Nicolas Saenz Julienne
2021-03-04 12:07       ` Nicolas Saenz Julienne
2021-03-04 12:18       ` Álvaro Fernández Rojas
2021-03-04 12:18         ` Álvaro Fernández Rojas
2021-03-04 13:30         ` Nicolas Saenz Julienne
2021-03-04 13:30           ` Nicolas Saenz Julienne
2021-03-04 14:57           ` Álvaro Fernández Rojas
2021-03-04 14:57             ` Álvaro Fernández Rojas
2021-03-04 19:58       ` Rob Herring
2021-03-04 19:58         ` Rob Herring
2021-02-23 17:00   ` [PATCH v3 2/2] hwrng: bcm2835: add " Álvaro Fernández Rojas
2021-02-23 17:00     ` Álvaro Fernández Rojas
2021-02-23 20:43     ` Florian Fainelli
2021-02-23 20:43       ` Florian Fainelli

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=7B6F49A9-A31D-4126-8CB1-11EE3B2B7950@gmail.com \
    --to=noltari@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=mpm@selenic.com \
    --cc=nfraprado@protonmail.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=p.zabel@pengutronix.de \
    --cc=rikard.falkeborn@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=stefan.wahren@i2se.com \
    /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.