Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
* [RFC] Is runtime_pm in the RSPI driver broken?
@ 2019-09-05 17:06 Chris Brandt
  2019-09-06 11:29 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Brandt @ 2019-09-05 17:06 UTC (permalink / raw)
  To: linux-renesas-soc, linux-spi, Geert Uytterhoeven

Hello SPI and Renesas people (and Geert),

Before I submit a patch, is the rspi.c driver really broken or not?

I'm working with the RZ/A2M at the moment.

Runtime pm was added by Geert back in 2014. (commit 490c97747d5d)

But I'm noticing now that if I turn off all the clocks in u-boot before 
I boot, SPI does not work.

However, if I add a pm_runtime_get_sync() call do the driver, it works 
fine.

So, am I missing something? It seems that the driver is not going to 
work correctly unless pm_runtime_get_sync() gets called.

Thank you,
Chris


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Is runtime_pm in the RSPI driver broken?
  2019-09-05 17:06 [RFC] Is runtime_pm in the RSPI driver broken? Chris Brandt
@ 2019-09-06 11:29 ` Geert Uytterhoeven
  2019-09-06 11:37   ` Chris Brandt
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-09-06 11:29 UTC (permalink / raw)
  To: Chris Brandt; +Cc: linux-renesas-soc, linux-spi

Hi Chris,

On Thu, Sep 5, 2019 at 7:06 PM Chris Brandt <Chris.Brandt@renesas.com> wrote:
> Hello SPI and Renesas people (and Geert),
>
> Before I submit a patch, is the rspi.c driver really broken or not?
>
> I'm working with the RZ/A2M at the moment.
>
> Runtime pm was added by Geert back in 2014. (commit 490c97747d5d)
>
> But I'm noticing now that if I turn off all the clocks in u-boot before
> I boot, SPI does not work.
>
> However, if I add a pm_runtime_get_sync() call do the driver, it works
> fine.
>
> So, am I missing something? It seems that the driver is not going to
> work correctly unless pm_runtime_get_sync() gets called.

QSPI on Koelsch, which uses the same driver, is still working for me,
with debug patches to turn off all unneeded clocks during early boot.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [RFC] Is runtime_pm in the RSPI driver broken?
  2019-09-06 11:29 ` Geert Uytterhoeven
@ 2019-09-06 11:37   ` Chris Brandt
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Brandt @ 2019-09-06 11:37 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-renesas-soc, linux-spi

Hi Geert,

On Fri, Sep 06, 2019, Geert Uytterhoeven wrote:
> > So, am I missing something? It seems that the driver is not going to
> > work correctly unless pm_runtime_get_sync() gets called.
> 
> QSPI on Koelsch, which uses the same driver, is still working for me,
> with debug patches to turn off all unneeded clocks during early boot.

Thank you for checking.

After enabling the debug messages on my board, I can see that my clock 
is being enabled before transmission.
However, it seem like it is not working correctly for RZ/A2M.

So, I will change my focus from the RSPI driver to the RZ/A2M clock
driver.

Thank you for the suggestion!

Chris


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 17:06 [RFC] Is runtime_pm in the RSPI driver broken? Chris Brandt
2019-09-06 11:29 ` Geert Uytterhoeven
2019-09-06 11:37   ` Chris Brandt

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox