[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200804260929.44928.david-b@pacbell.net>
Date: Sat, 26 Apr 2008 09:29:44 -0700
From: David Brownell <david-b@...bell.net>
To: Dmitry <dbaryshkov@...il.com>
Cc: "Paul Walmsley" <paul@...an.com>, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org,
"Haavard Skinnemoen" <haavard.skinnemoen@...el.com>,
"Russell King" <rmk+lkml@....linux.org.uk>,
"Paul Mundt" <lethal@...ux-sh.org>,
"pHilipp Zabel" <philipp.zabel@...il.com>,
"Pavel Machek" <pavel@....cz>, tony@...mide.com,
hiroshi.DOYU@...ia.com
Subject: Re: [PATCH 0/5] Clocklib: generic clocks framework
On Saturday 26 April 2008, Dmitry wrote:
> > > Also once we get to multiple chips providers/users, we'll see,
> > > that the clock simply can't have just one record in the clocks tree.
> >
> > I don't follow. Why not? If a clock has multiple records, I'd
> > expect its refcounts would easily get borked. I think I don't
> > like your notion of a "wrapper clock".
>
> It seems, I failed to describe it correctly.
> Let's suppose this situation:
> We have CLK, that is connected to the pin CK1 of the device dev_A and to the pin
> CK36M of the device dev_B.
>
> The we'll have these clocks:
> .CLK count=0
> \- CK1 count=0 for dev_A
> \- CK36M count=0 for dev_B
But that's incorrect. What we have is
CLK users=0
aliased as CK1 for dev_A
aliased as CK36M for dev_b
The difference being that you are showing that CK1 and CK36M have
independent clock gates ... which are not actually present.
The difference between this and the at91_clk_associate() example
is that with clk_associate(), there is only one alias per clock.
There are cases where multiple aliases would be better ... TCB
modules, the "system" clock, and so on.
> When device dev_A enables it's clock,
> we'll have this:
> .CLK count=1
> \- CK1 count=1 for dev_A
> \- CK36M count=0 for dev_B
No, we have
CLK users=1
... same aliases
> After that dev_B enables it's clock:
> .CLK count=2
> \- CK1 count=1 for dev_A
> \- CK36M count=1 for dev_B
Should be
CLK users=2
... same aliases
> So refcounting is correct.
No. When someone's looking at the clock tree to see what clocks
are active, and thus deduce which silicon is incurring switching
costs, these "wrapper clocks" are not telling the correct story.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists