From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] spi: cadence_qspi: add reset handling
Date: Sun, 27 Jan 2019 09:49:18 +0100 [thread overview]
Message-ID: <27eb5885-d7c2-c6a3-86ec-eaafc172da27@gmail.com> (raw)
In-Reply-To: <af11a079-7978-96f0-09b9-a7b9280f80d0@denx.de>
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 <simon.k.r.goldschmidt@gmail.com>
>> ---
>>
>> 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 <dm.h>
>> #include <fdtdec.h>
>> #include <malloc.h>
>> +#include <reset.h>
>> #include <spi.h>
>> #include <linux/errno.h>
>> #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.
Regards,
Simon
>
>> + else
>> + reset_deassert_bulk(&reset_bulk);
>> +
>> if (!priv->qspi_is_init) {
>> cadence_qspi_apb_controller_init(plat);
>> priv->qspi_is_init = 1;
>>
>
>
next prev parent reply other threads:[~2019-01-27 8:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 20:30 [U-Boot] [PATCH 0/5] arm: socfpga: implement proper peripheral reset handling Simon Goldschmidt
2019-01-25 20:30 ` [U-Boot] [PATCH 1/5] arm: socfpga: gen5: add reset handles to devicetrees Simon Goldschmidt
2019-01-26 8:57 ` Marek Vasut
2019-01-27 8:45 ` Simon Goldschmidt
2019-01-28 10:54 ` Marek Vasut
2019-01-28 11:46 ` Simon Goldschmidt
2019-01-28 11:48 ` Marek Vasut
2019-01-25 20:30 ` [U-Boot] [PATCH 2/5] arm: socfpga: move SDR reset handling to driver Simon Goldschmidt
2019-01-26 8:58 ` Marek Vasut
2019-01-27 8:47 ` Simon Goldschmidt
2019-01-28 10:55 ` Marek Vasut
2019-01-28 11:49 ` Simon Goldschmidt
2019-01-28 11:58 ` Marek Vasut
2019-01-28 12:38 ` Simon Goldschmidt
2019-01-28 19:02 ` Marek Vasut
2019-01-28 19:17 ` Simon Goldschmidt
2019-01-28 19:24 ` Marek Vasut
2019-01-29 8:23 ` Simon Goldschmidt
2019-01-29 9:52 ` Marek Vasut
2019-01-25 20:30 ` [U-Boot] [PATCH 3/5] mtd: rawnand: denali: add reset handling Simon Goldschmidt
2019-01-26 8:58 ` Marek Vasut
2019-01-28 9:08 ` Miquel Raynal
2019-01-28 9:16 ` Simon Goldschmidt
2019-01-28 9:22 ` Miquel Raynal
2019-01-28 9:30 ` Simon Goldschmidt
2019-01-28 9:33 ` Miquel Raynal
2019-01-25 20:30 ` [U-Boot] [PATCH 4/5] spi: cadence_qspi: " Simon Goldschmidt
2019-01-26 8:59 ` Marek Vasut
2019-01-27 8:49 ` Simon Goldschmidt [this message]
2019-01-28 10:56 ` Marek Vasut
2019-01-25 20:30 ` [U-Boot] [PATCH 5/5] arm: socfpga: implement proper peripheral reset Simon Goldschmidt
2019-01-26 9:00 ` Marek Vasut
2019-01-27 8:56 ` Simon Goldschmidt
2019-01-28 10:58 ` Marek Vasut
2019-01-28 11:50 ` Simon Goldschmidt
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=27eb5885-d7c2-c6a3-86ec-eaafc172da27@gmail.com \
--to=simon.k.r.goldschmidt@gmail.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox