All of lore.kernel.org
 help / color / mirror / Atom feed
* writing a frequency scaling processor module
@ 2007-09-07 17:04 Leisner, Martin
  2007-09-24 23:31 ` Dave Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Leisner, Martin @ 2007-09-07 17:04 UTC (permalink / raw)
  To: cpufreq

I'm writing a cpufreq module for the ppc 7448 processor.

Its very nice the way cpufreq is laid out with the governors...is there
a 
"cookbook" approach to writing a processor interface?

I looked at cpu-drivers.txt in the kernel tree, and it's somewhat vague
and 
confusing (IMHO).

I'm using p4-clocmod.c as an example, are there better examples?

marty

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: writing a frequency scaling processor module
  2007-09-07 17:04 writing a frequency scaling processor module Leisner, Martin
@ 2007-09-24 23:31 ` Dave Jones
  2007-09-25 16:48   ` Leisner, Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2007-09-24 23:31 UTC (permalink / raw)
  To: Leisner, Martin; +Cc: cpufreq

On Fri, Sep 07, 2007 at 01:04:51PM -0400, Leisner, Martin wrote:
 > I'm writing a cpufreq module for the ppc 7448 processor.
 > 
 > Its very nice the way cpufreq is laid out with the governors...is there
 > a 
 > "cookbook" approach to writing a processor interface?

Not really. Rumour has it that kernel programmers hate writing
documentation ;^)

 > I looked at cpu-drivers.txt in the kernel tree, and it's somewhat vague
 > and confusing (IMHO).
 > 
 > I'm using p4-clocmod.c as an example, are there better examples?
 
that, longhaul and powernow-k7 are fairly simple to understand.
Is there anything in particular you have problems understanding ?

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: writing a frequency scaling processor module
  2007-09-24 23:31 ` Dave Jones
@ 2007-09-25 16:48   ` Leisner, Martin
  2007-09-25 17:02     ` Dave Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Leisner, Martin @ 2007-09-25 16:48 UTC (permalink / raw)
  To: Dave Jones; +Cc: cpufreq

Its pretty much written...it could (should) be very simple...
in a simple case...

All it really needed was:
   1) a method to set the frequency
   2) a method to get the frequency
   3) a frequency array

I copied some code from the powernow-k7...and banged on it until it worked...

Why does 
cpufreq_frequency_table have an index entry on each entry?

marty



-----Original Message-----
From: Dave Jones [mailto:davej@redhat.com]
Sent: Mon 9/24/2007 7:31 PM
To: Leisner, Martin
Cc: cpufreq@lists.linux.org.uk
Subject: Re: writing a frequency scaling processor module
 
On Fri, Sep 07, 2007 at 01:04:51PM -0400, Leisner, Martin wrote:
 > I'm writing a cpufreq module for the ppc 7448 processor.
 > 
 > Its very nice the way cpufreq is laid out with the governors...is there
 > a 
 > "cookbook" approach to writing a processor interface?

Not really. Rumour has it that kernel programmers hate writing
documentation ;^)

 > I looked at cpu-drivers.txt in the kernel tree, and it's somewhat vague
 > and confusing (IMHO).
 > 
 > I'm using p4-clocmod.c as an example, are there better examples?
 
that, longhaul and powernow-k7 are fairly simple to understand.
Is there anything in particular you have problems understanding ?

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: writing a frequency scaling processor module
  2007-09-25 16:48   ` Leisner, Martin
@ 2007-09-25 17:02     ` Dave Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Jones @ 2007-09-25 17:02 UTC (permalink / raw)
  To: Leisner, Martin; +Cc: cpufreq

On Tue, Sep 25, 2007 at 12:48:55PM -0400, Leisner, Martin wrote:
 > Its pretty much written...it could (should) be very simple...
 > in a simple case...
 > 
 > All it really needed was:
 >    1) a method to set the frequency
 >    2) a method to get the frequency
 >    3) a frequency array
 > 
 > I copied some code from the powernow-k7...and banged on it until it worked...
 > 
 > Why does 
 > cpufreq_frequency_table have an index entry on each entry?

When searching through the table for an entry, it's used as
a 'key' to find the match.

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-25 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-07 17:04 writing a frequency scaling processor module Leisner, Martin
2007-09-24 23:31 ` Dave Jones
2007-09-25 16:48   ` Leisner, Martin
2007-09-25 17:02     ` Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.