linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
Cc: Prashant Gaikwad
	<pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Peter De Schrijver
	<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Venu Byravarasu
	<vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] clk: tegra: remove USB from clk init table
Date: Mon, 28 Jan 2013 14:15:39 -0700	[thread overview]
Message-ID: <5106EA7B.5000800@wwwdotorg.org> (raw)
In-Reply-To: <1359400993.1558.8.camel@tellur>

On 01/28/2013 12:23 PM, Lucas Stach wrote:
> Am Montag, den 28.01.2013, 12:13 -0700 schrieb Stephen Warren:
>> On 01/28/2013 11:45 AM, Lucas Stach wrote:
>>> Am Montag, den 28.01.2013, 11:37 -0700 schrieb Stephen Warren:
>>>> On 01/27/2013 03:17 PM, Lucas Stach wrote:
>>>>> The USB clocks are just clock gates, so no need to set a specific clock.
>>>>> In fact trying to set a specific clock is just a NOP if the requested
>>>>> clockrate is the same as those of the parent (clk_m) or will trigger a
>>>>> WARN_ON() if rates don't match up.
>>>>>
>>>>> As we are not setting a specific rate, nor activating the clocks at
>>>>> init, there is no point in keeping the the usb entries in the clock init
>>>>> table.
>>>>
>>>> I'm not convinced here; aren't the USB clocks supposed to be driven by
>>>> PLL U?
>>>>
>>>> Prashant, Peter, Venu, can you please comment here.
>>>
>>> I was a bit confused at first, too. But what I am removing here is the
>>> clockgate init for the USB controllers. The clocks driven by PLL_U are
>>> the USB PHY clocks, which are a separate set of clocks.
>>
>> I don't think these are always separate.
>>
>> If you look at the USB driver drivers/usb/phy/tegra_usb_phy.c, you'll
>> see that for UTMI there's a clk_get_sys("utmip-pad"), which per
>> drivers/clk/tegra/clk-tegra20.c is an alias for clock "usbd" which is
>> the USB1 controller clock (it's also aliased to "tegra-ehci.0").
>> However, for ULPI, there's a clk_get_sys(ulpi_config->clk), which is
>> "cdev2", which is separate from any USB controller clock.
>>
> I'm not sure here. The TRM is not really clear on that one, but if you
> look at the schematic diagram of the USB complex PLL_U is really only
> used for the PHYs, not the controllers itself. Though I don't know if
> the controller gets it's clock from the PHY in the UTMI case (like
> ULPI). So I also would like some NVIDIA clock expert to comment on this.

> In either case the explicit init isn't needed.

My suspicion is that the usb* clocks are actually driven by pll_u_out*
rather than clk_m as the clock driver currently states. In which case,
these initializations are probably intended to have the side-effect of
filtering up and configuring pll_u itself. Perhaps the answer is still
to remove those entries and replace them with a pll_u initialization.

Anyway, hopefully Prashant can shed some light here.

  reply	other threads:[~2013-01-28 21:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 22:17 [PATCH 1/2] clk: tegra: remove USB from clk init table Lucas Stach
     [not found] ` <1359325055-5160-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2013-01-27 22:17   ` [PATCH 2/2] clk: tegra: add ac97 controller clock Lucas Stach
     [not found]     ` <1359325055-5160-2-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2013-01-28 18:38       ` Stephen Warren
2013-01-28 19:15       ` Stephen Warren
     [not found]         ` <5106CE6D.9030008-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-28 19:25           ` Lucas Stach
2013-01-28 21:17             ` Stephen Warren
     [not found]               ` <5106EB03.6080606-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-30  9:35                 ` Peter De Schrijver
     [not found]                   ` <20130130093525.GC2364-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2013-01-30 18:27                     ` Stephen Warren
     [not found]                       ` <51096618.3000100-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-21 14:01                         ` Lucas Stach
2013-03-21 17:48                           ` Stephen Warren
2013-01-28 18:37   ` [PATCH 1/2] clk: tegra: remove USB from clk init table Stephen Warren
     [not found]     ` <5106C583.7010204-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-28 18:45       ` Lucas Stach
2013-01-28 19:13         ` Stephen Warren
     [not found]           ` <5106CDCD.2020101-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-28 19:23             ` Lucas Stach
2013-01-28 21:15               ` Stephen Warren [this message]
2013-01-30  9:32       ` Peter De Schrijver
  -- strict thread matches above, loose matches on Subject: below --
2013-05-06 21:11 [PATCH 0/2] ARM: tegra: a couple clock bug-fixes Stephen Warren
     [not found] ` <1367874671-11474-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-06 21:11   ` [PATCH 1/2] clk: tegra: remove USB from clk init table Stephen Warren

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=5106EA7B.5000800@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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).