lkml.org 
[lkml]   [2008]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] Clocklib: add generic framework for managing clocks.
On Thu, 27 Mar 2008 09:18:10 +0000
Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> On Thu, Mar 27, 2008 at 10:06:23AM +0100, Haavard Skinnemoen wrote:
> > > + int users;
> >
> > Reference counting, probably need that too.
> >
> > > + unsigned long rate;
> >
> > This one is redundant. Use getrate() instead.
>
> ... which means a separate getrate() functions for every clock. Not really
> practical for PXA.

You can extend the struct, put the rate there and use the same
getrate() function for all the clocks that need to keep track of the
current rate this way.

> > > + int delay;
> >
> > Huh? A delay after enabling the clock? Why can't the enable() hook do
> > that if it's really necessary?
>
> ... which means a separate enable() function for each clock. The delay
> there has not a lot to do with the actual register you're frobbing, but
> the resy of the SoC. So, again, not really practical for PXA.

Same thing, extend the struct and use the same enable() function for
all the clocks that need this delay. We can't add fields to the generic
struct clk for every platform quirk out there...

Haavard


\
 
 \ /
  Last update: 2008-03-27 10:31    [W:0.049 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site