From: Marek Vasut <marex@denx.de>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] spi: cadence: Correct initialisation of runtime PM again
Date: Mon, 19 Jul 2021 15:31:02 +0200 [thread overview]
Message-ID: <1381361a-8a0f-e164-ad16-9ea6b423d047@denx.de> (raw)
In-Reply-To: <20210719090124.GI9223@ediswmail.ad.cirrus.com>
On 7/19/21 11:01 AM, Charles Keepax wrote:
> On Fri, Jul 16, 2021 at 08:21:33PM +0200, Marek Vasut wrote:
>> The original implementation of RPM handling in probe() was mostly
>> correct, except it failed to call pm_runtime_get_*() to activate the
>> hardware. The subsequent fix, 734882a8bf98 ("spi: cadence: Correct
>> initialisation of runtime PM"), breaks the implementation further,
>> to the point where the system using this hard IP on ZynqMP hangs on
>> boot, because it accesses hardware which is gated off.
>>
>> Undo 734882a8bf98 ("spi: cadence: Correct initialisation of runtime
>> PM") and instead add missing pm_runtime_get_noresume() and move the
>> RPM disabling all the way to the end of probe(). That makes ZynqMP
>> not hang on boot yet again.
>>
>> Fixes: 734882a8bf98 ("spi: cadence: Correct initialisation of runtime PM")
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
>> Cc: Mark Brown <broonie@kernel.org>
>> ---
>
> For my own edification do you know exactly what the problem was
> on your system here? I am assuming my mistake was that without the
> pm_runtime reference being taken, some required parent doesn't get
> enabled, which is convienently fine on my Zynq but not your ZynqMP?
Yes, the hardware got suspended a bit too early.
> The inclusion of the IRQ stuff in the pm_runtime block makes me a
> little nervous as if the problem is that your hardware generates
> a spurious IRQ on boot and that is where the bad access comes from
> this code feels racy. The original code did the put before the IRQ
> registers as well.
You could get an interrupt indeed, but that's not the case here.
> All that said, works on my Zynq:
>
> Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks !
next prev parent reply other threads:[~2021-07-19 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 18:21 [PATCH] spi: cadence: Correct initialisation of runtime PM again Marek Vasut
2021-07-19 9:01 ` Charles Keepax
2021-07-19 13:31 ` Marek Vasut [this message]
2021-07-19 14:37 ` Mark Brown
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=1381361a-8a0f-e164-ad16-9ea6b423d047@denx.de \
--to=marex@denx.de \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.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