linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] [RFC] ARM: shmobile: koelsch-reference: Work around core clock issues
Date: Fri, 14 Mar 2014 18:20:10 +0000	[thread overview]
Message-ID: <5323485A.6050606@codethink.co.uk> (raw)
In-Reply-To: <1394720970-4749-1-git-send-email-geert@linux-m68k.org>

On 14/03/14 17:55, Ben Dooks wrote:
> On 14/03/14 17:33, Ben Dooks wrote:
>> On 14/03/14 16:48, Magnus Damm wrote:
>>> Hi Ben,
>>>
>>> That would not surprise me. But it would trigger both for
>>> multiplatform and legacy in such case, don't you think?
>>>
>>> If static enablement using the clock workaround fixes the
>>> multiplatform case then it is most likely related to that the driver
>>> assumes that Runtime PM controls the clock. Or perhaps some hidden
>>> clock dependency that only triggers with CCF?
>>
>> It seems very sensitive to code (or possibly compiler) in some but
>> not all cases we are seeing the system pm the device and then the
>> driver does something that requires clocks.
>>
>> At the moment the depending on how much debug it either works, or
>> does not.
>
> So far I am down to the following being executed
>
>          pm_runtime_enable(&pdev->dev);
>          pm_runtime_resume(&pdev->dev);
>
> and by the time it gets to:
>
>      read_mac_address(ndev, pd->mac_addr);
>
> the ethernet unit's clock has already been disabled.

 From investigation, the pm is running a work-queue that
is causing the clock to be disabled. The only thing I can
think is we need to change the

 >          pm_runtime_enable(&pdev->dev);
 >          pm_runtime_resume(&pdev->dev);

to include a pm_runtime_get_sync() call.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  parent reply	other threads:[~2014-03-14 18:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 14:29 [PATCH] [RFC] ARM: shmobile: koelsch-reference: Work around core clock issues Geert Uytterhoeven
2014-03-14  8:51 ` Simon Horman
2014-03-14  8:53 ` Magnus Damm
2014-03-14  9:09 ` Geert Uytterhoeven
2014-03-14  9:23 ` Magnus Damm
2014-03-14 11:02 ` Laurent Pinchart
2014-03-14 11:10 ` Ben Dooks
2014-03-14 12:39 ` Geert Uytterhoeven
2014-03-14 12:43 ` Laurent Pinchart
2014-03-14 13:02 ` Geert Uytterhoeven
2014-03-14 14:13 ` Ben Dooks
2014-03-14 14:26 ` Laurent Pinchart
2014-03-14 14:43 ` Laurent Pinchart
2014-03-14 14:45 ` Ben Dooks
2014-03-14 15:51 ` Ben Dooks
2014-03-14 16:48 ` Magnus Damm
2014-03-14 17:11 ` Ben Dooks
2014-03-14 17:33 ` Ben Dooks
2014-03-14 17:55 ` Ben Dooks
2014-03-14 18:20 ` Ben Dooks [this message]
2014-03-17  1:15 ` Simon Horman
2014-03-18  0:25 ` Simon Horman

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=5323485A.6050606@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=linux-sh@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).