From: Philipp Zabel <p.zabel@pengutronix.de>
To: Niklas Cassel <Niklas.Cassel@wdc.com>
Cc: Serge Semin <fancer.lancer@gmail.com>,
Serge Semin <Sergey.Semin@baikalelectronics.ru>,
Mark Brown <broonie@kernel.org>,
"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: Re: [PATCH] spi: dw: assert reset before deasserting reset
Date: Tue, 22 Mar 2022 12:08:37 +0100 [thread overview]
Message-ID: <8b9aaabebc65a91e7700f2bd232e48b853aff9e8.camel@pengutronix.de> (raw)
In-Reply-To: <YjmlsZl1Xg/Xkg37@x1-carbon>
Hi Niklas,
On Di, 2022-03-22 at 10:32 +0000, Niklas Cassel wrote:
[...]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c?h=v5.17#n7035
>
Thank you.
[...]
I see your point. Many drivers should probably change assert() +
udelay(x) + deassert() with a reset_control_reset(), since .reset()
implementation should have the correct delay for each SoC.
..but I guess often the manual for some hardware block states the how long
reset has to be held. So for that to work the delay in .reset() has to be
greater equal the longest reset time needed for all hardware in that SoC?
Yes, exactly. The reset-simple driver was prepared for this in commit
a9701376ed0f ("reset: simple: Add reset callback"), for example.
Several of the custom reset drivers also implement .reset() with a
fixed delay.
regards
Philipp
prev parent reply other threads:[~2022-03-22 11:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 11:17 [PATCH] spi: dw: assert reset before deasserting reset Niklas Cassel
2022-03-11 14:25 ` Serge Semin
2022-03-11 15:51 ` Niklas Cassel
2022-03-11 16:06 ` Mark Brown
2022-03-11 17:05 ` Serge Semin
2022-03-16 14:11 ` Niklas Cassel
2022-03-17 10:17 ` Philipp Zabel
2022-03-22 10:32 ` Niklas Cassel
2022-03-22 11:08 ` Philipp Zabel [this message]
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=8b9aaabebc65a91e7700f2bd232e48b853aff9e8.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=Niklas.Cassel@wdc.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=broonie@kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=linux-spi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).