devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tushar Behera <trblinux@gmail.com>
To: Mike Turquette <mturquette@linaro.org>,
	Tushar Behera <tushar.b@samsung.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	ML Devicetree <devicetree@vger.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Tomasz Figa <t.figa@samsung.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Kevin Hilman <khilman@linaro.org>,
	Doug Anderson <dianders@google.com>,
	Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Shaik Ameer Basha <shaik.ameer@samsung.com>,
	ML Arch-Arm <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] clk: exynos-audss: Keep the parent of mout_audss always enabled
Date: Fri, 11 Jul 2014 11:48:54 +0530	[thread overview]
Message-ID: <53BF81CE.60507@gmail.com> (raw)
In-Reply-To: <20140612210920.6562.96815@quantum>

On 06/13/2014 02:39 AM, Mike Turquette wrote:
> Quoting Tushar Behera (2014-06-12 00:29:23)
>> On Wed, Jun 11, 2014 at 10:20 PM, Mike Turquette <mturquette@linaro.org> wrote:
>>> Quoting Tushar Behera (2014-06-10 22:32:17)
>>>> When the output clock of AUDSS mux is disabled, we are getting kernel
>>>> oops while doing a clk_get() on other clocks provided by AUDSS. Though
>>>> user manual doesn't specify this dependency, we came across this issue
>>>> while disabling the parent of AUDSS mux clocks.
>>>
>>> Hi Tushar,
>>>
>>> Can you help me understand better what the actual problem is? What is
>>> the root cause of the kernel oops?
>>
>> Currently AUDSS mux has two parents, XXTI crystal and MAU_EPLL clock.
>> As per observation, when the output of AUDSS mux is gated, we are not
>> able to do any operation on the clocks provided by MAU block (mostly
>> the clocks used by ADMA and audio blocks).
> 
> I tried to get a datasheet for Exynos 54xx but could not find it. I even
> looked at the public 5250 data sheet, but it is completely missing
> Chapter 34, "Audio Subsystem", which apparently contains Figure 34-3,
> "Clock names and clock tree diagram of MAUDIO_BLK".
> 
> So without any clue about your hardware (not for lack of trying) I would
> guess that somewhere in the parent hierarchy you have an interface clock
> which must be enabled in order for you to touch the registers pertaining
> to the downstream audio clocks.
> 

Yes, right. As per observation, we need to keep the output of AUDSS mux
enabled to access the registers present in MAU block.

> The right way to handle this requires two steps:
> 
> 1) model your interface clock in the Linux clock framework if you
> haven't already (I assume it is a gate clock, or the child of a gate
> clock)
> 

The interface clock is already part of the clock framework.

> 2) the clk_ops callbacks for the affected audio clocks should wrap their
> operations (i.e. critical secion) with a clk_enable/clk_disable pair,
> where the clock being enables/disable is the interface clock mentioned
> above in #1
> 
> The CCF is reentrant, so you can do this by simply using the top-level
> clk.h API from within your clk_ops callbacks.
> 

Right now, the clocks are registered with clk_register_mux,
clk_register_div and clk_register_gate calls which in turn set
appropriate clk_ops callbacks. If I need to wrap the register access
during these clk_ops callbacks with clk_enable/clk_disable of interface
lock, I would have to reimplement the clk_ops callbacks in
clk-exynos-audss driver.

Is that the approach that you are suggesting?

> I might be totally wrong about the cause of the hang, but that's my best
> guess based on everyone's bug reports.
> 

There are 5 gate clocks within MAU block. While disabling the unused
clocks, if CLK_MAU_EPLL is disabled first, then we are getting this
system hang.


> Regards,
> Mike
> 
>>
>>>
>>> You mention calling clk_get on child clocks of the AUDSS mux fails, but
>>> I cannot imagine why. How can the enable/disable state of a clock affect
>>> the ability to clk_get other clocks?
>>>
>>
>> I might have a little vogue while updating the commit message
>> (mentioning about clk_get which surely is only a s/w operation), but
>> there is definitely some issue with handling those clocks under given
>> scenario.
>>
>> I am on leave till end of this week, so I will update you more with
>> the logs on Monday.
>>
>> Thanks,
>> --
>> Tushar
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


-- 
Tushar Behera

  reply	other threads:[~2014-07-11  6:18 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11  5:32 [PATCH 0/3] Fix boot-hang on Peach-pit and Enable audio Tushar Behera
2014-06-11  5:32 ` [PATCH 1/3] clk: exynos-audss: Keep the parent of mout_audss always enabled Tushar Behera
2014-06-11 15:58   ` Javier Martinez Canillas
     [not found]   ` <1402464739-19044-2-git-send-email-tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-06-11 16:50     ` Mike Turquette
2014-06-12  7:29       ` Tushar Behera
2014-06-12 21:09         ` Mike Turquette
2014-07-11  6:18           ` Tushar Behera [this message]
2014-07-29  6:58             ` Mike Turquette
2014-06-11 16:50   ` Kevin Hilman
2014-06-12  7:40     ` Tushar Behera
2014-06-24 22:59       ` Doug Anderson
2014-06-25  3:09         ` Tushar Behera
2014-06-25  4:02           ` Doug Anderson
2014-06-11 17:28   ` Tomasz Figa
2014-06-12  7:30     ` Tushar Behera
2014-06-11  5:32 ` [PATCH 2/3] ARM: dts: Update the parent for Audss clocks in Exynos5420 Tushar Behera
2014-06-11 15:58   ` Javier Martinez Canillas
2014-06-16 11:26     ` Tushar Behera
2014-06-22 15:53       ` Tushar Behera
2014-06-24 23:00   ` Doug Anderson
2014-06-25 23:21     ` Kevin Hilman
2014-06-26  3:20       ` Tushar Behera
2014-06-26 16:08         ` Kevin Hilman
2014-06-27  3:38           ` Tushar Behera
2014-06-27 14:18             ` Kevin Hilman
2014-06-27 14:48               ` Kevin Hilman
2014-07-01 11:59                 ` Tushar Behera
2014-07-07 23:34                   ` Kukjin Kim
2014-07-08  3:00                     ` Tushar Behera
2014-07-09 10:14                       ` Javier Martinez Canillas
2014-07-09 12:11                         ` Tushar Behera
     [not found]                           ` <53BD3157.7030804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-09 13:03                             ` Javier Martinez Canillas
2014-07-09 16:01                               ` Doug Anderson
2014-07-09 17:46                                 ` Javier Martinez Canillas
     [not found]                                   ` <CABxcv==v9whax3oraJQnTiDwfAUznjQP6WHK-auPv3q-LOmdnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-09 17:52                                     ` Doug Anderson
     [not found] ` <1402464739-19044-1-git-send-email-tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-06-11  5:32   ` [PATCH 3/3] ARM: dts: Enable audio support for Peach-pi board Tushar Behera
2014-06-13 17:03     ` Doug Anderson
2014-06-13 17:05       ` Mark Brown
2014-06-13 17:13         ` Doug Anderson
     [not found]           ` <CAD=FV=VvkvH1TPiKttm9VXbBRnBo7kmTVK8bZZvexK=bAvaO4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-13 21:58             ` Doug Anderson
2014-06-13 22:04               ` Mark Brown
     [not found]                 ` <20140613220421.GD5099-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-06-13 22:50                   ` Doug Anderson
2014-06-16 11:19       ` Tushar Behera
     [not found]         ` <539ED2C0.8030405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-16 16:49           ` Doug Anderson
2014-06-16 16:51             ` Mark Brown
2014-06-16 17:02               ` Doug Anderson
2014-06-17  3:39                 ` Tushar Behera
2014-06-17  3:36             ` Tushar Behera
2014-06-17  4:07               ` Doug Anderson

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=53BF81CE.60507@gmail.com \
    --to=trblinux@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@google.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kgene.kim@samsung.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shaik.ameer@samsung.com \
    --cc=t.figa@samsung.com \
    --cc=tushar.b@samsung.com \
    /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).