From: Marek Vasut Date: Mon, 28 Jan 2019 11:56:14 +0100 Subject: [U-Boot] [PATCH 4/5] spi: cadence_qspi: add reset handling In-Reply-To: <27eb5885-d7c2-c6a3-86ec-eaafc172da27@gmail.com> References: <20190125203051.10943-1-simon.k.r.goldschmidt@gmail.com> <20190125203051.10943-5-simon.k.r.goldschmidt@gmail.com> <27eb5885-d7c2-c6a3-86ec-eaafc172da27@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On 1/27/19 9:49 AM, Simon Goldschmidt wrote: > Am 26.01.2019 um 09:59 schrieb Marek Vasut: >> On 1/25/19 9:30 PM, Simon Goldschmidt wrote: >>> This adds reset handling to the devicetree-enabled denalid nand driver. >>> >>> For backwards compatibility, only a warning is printed when failing to >>> get reset handles. >>> >>> Signed-off-by: Simon Goldschmidt >>> --- >>> >>>   drivers/spi/cadence_qspi.c | 9 +++++++++ >>>   1 file changed, 9 insertions(+) >>> >>> diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c >>> index 11fce9c4fe..f68c827e6d 100644 >>> --- a/drivers/spi/cadence_qspi.c >>> +++ b/drivers/spi/cadence_qspi.c >>> @@ -8,6 +8,7 @@ >>>   #include >>>   #include >>>   #include >>> +#include >>>   #include >>>   #include >>>   #include "cadence_qspi.h" >>> @@ -154,10 +155,18 @@ static int cadence_spi_probe(struct udevice *bus) >>>   { >>>       struct cadence_spi_platdata *plat = bus->platdata; >>>       struct cadence_spi_priv *priv = dev_get_priv(bus); >>> +    struct reset_ctl_bulk reset_bulk; >>> +    int ret; >>>         priv->regbase = plat->regbase; >>>       priv->ahbbase = plat->ahbbase; >>>   +    ret = reset_get_bulk(bus, &reset_bulk); >>> +    if (ret) >>> +        dev_warn(bus, "Cant' get reset: %d\n", ret); >> >> Can't > > Right. Copy & paste from 3/5... > >> >> Also, shouldn't there be some reset_release or reset_free somewhere ? >> What about .remove(), shouldn't that release the reset ? > > Ehrm, well... this is my first driver using the reset framework. I > haven't though of remove. I'll do a V2 for that soon. Thanks -- Best regards, Marek Vasut