public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] PowerOP Take 3, ARM OMAP1 platform support 3/5
@ 2006-07-20 20:01 Eugeny S. Mints
  2006-07-23 16:24 ` David Brownell
  0 siblings, 1 reply; 13+ messages in thread
From: Eugeny S. Mints @ 2006-07-20 20:01 UTC (permalink / raw)
  To: linux-pm; +Cc: patrick.mochel, Matthew Locke, linux, sampsa.fabritius

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

PowerOP support for OMAP1 platforms.  Currently handles these power
parameters:

  v                 voltage (in mV)
  dpll              dpll frequency in kHz
  cpu              cpu frequency in kHz
  tc                 traffic controller frequency in kHz
  per               peripherial frequency in kHz
  dsp              dsp frequency in kHz
  dspmmu      dsp mmu frequency in kHz
  lcd               LCD frequency in kHz

Example usage will be shown with a follow-on OMAP1 PM Core and cpufreq
patches.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: OMAP1.arch.PowerOP.support.patch --]
[-- Type: text/x-patch; name="OMAP1.arch.PowerOP.support.patch", Size: 1816 bytes --]

diff --git a/include/asm-arm/arch-omap/powerop.h b/include/asm-arm/arch-omap/powerop.h
new file mode 100644
index 0000000..391e165
--- /dev/null
+++ b/include/asm-arm/arch-omap/powerop.h
@@ -0,0 +1,34 @@
+/*
+ * PowerOP support for OMAP1
+ *
+ * Based on DPM OMAP code by Matthew Locke, Dmitry Chigirev, Vladimir
+ * Barinov, and Todd Poynor.
+ *
+ * 2005 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#ifndef __ASM_ARCH_OMAP_POWEROP_H__
+#define __ASM_ARCH_OMAP_POWEROP_H__
+
+/* 
+ * Instances of this structure define operating points
+ *
+ * -1 for any following fields indicates no change from current op 
+ */
+
+struct powerop_point {
+	unsigned int v;         /* voltage in mV */
+	unsigned int dpll;	/* in KHz */
+	unsigned int cpu;	/* CPU frequency in KHz */
+	unsigned int tc;	/* in KHz */
+	unsigned int per;	/* in KHz */
+	unsigned int dsp;	/* in KHz */
+	unsigned int dspmmu;	/* in KHz */
+	unsigned int lcd;	/* in KHz */
+};
+
+#endif /* __ASM_ARCH_OMAP_POWEROP_H__ */
+
diff --git a/include/asm-arm/powerop.h b/include/asm-arm/powerop.h
new file mode 100644
index 0000000..c1090e6
--- /dev/null
+++ b/include/asm-arm/powerop.h
@@ -0,0 +1,19 @@
+/*
+ * include/asm-arm/powerop.h
+ *
+ * Copyright 2006 (c) Eugeny S. Mints <eugeny.mints@gmail.com>. 
+ * 
+ * This file is licensed under  the terms of the GNU General Public 
+ * License version 2. This program is licensed "as is" without any 
+ * warranty of any kind, whether express or implied.
+ */
+#ifndef __ASM_POWEROP_H__
+#define __ASM_POWEROP_H__
+
+/*
+ * include sub-arch specific bits
+ */
+#include <asm/arch/powerop.h>
+
+#endif /* __ASM_POWEROP_H__ */
+

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 13+ messages in thread
* Re: [RFC] PowerOP Take 3, ARM OMAP1 platform support 3/5
@ 2006-07-27  0:03 Gross, Mark
  0 siblings, 0 replies; 13+ messages in thread
From: Gross, Mark @ 2006-07-27  0:03 UTC (permalink / raw)
  To: David Brownell, linux-pm
  Cc: Matthew Locke, Mochel, Patrick, sampsa.fabritius, linux



>-----Original Message-----
>From: linux-pm-bounces@lists.osdl.org [mailto:linux-pm-bounces@lists.osdl.org] On Behalf Of David
>Brownell
>Sent: Sunday, July 23, 2006 9:25 AM
>To: linux-pm@lists.osdl.org
>Cc: Matthew Locke; Mochel, Patrick; sampsa.fabritius@nokia.com; linux@dominikbrodowski.net
>Subject: Re: [linux-pm] [RFC] PowerOP Take 3, ARM OMAP1 platform support 3/5
>
>On Thursday 20 July 2006 1:01 pm, Eugeny S. Mints wrote:
>> +struct powerop_point {
>> +       unsigned int v;         /* voltage in mV */
>> +       unsigned int dpll;      /* in KHz */
>> +       unsigned int cpu;       /* CPU frequency in KHz */
>> +       unsigned int tc;        /* in KHz */
>> +       unsigned int per;       /* in KHz */
>> +       unsigned int dsp;       /* in KHz */
>> +       unsigned int dspmmu;    /* in KHz */
>> +       unsigned int lcd;       /* in KHz */
>> +};
>
>A few comments:
>
> - This should be part of patch #4; it's not truly separate.
>
> - I take it "v" is CPU voltage rather than some random component?
>   Either way, there seems to be an omission here since boards
>   could have multiple voltages to care about ...

I think the components be exposed in a stand alone manner in addition to the structure.  Also, could we have a driver module per element to expose each one to the system and user.  That way you can just load the drivers for the control knobs you care about, and add more for your platform more easily.

>
> - In general, shouldn't an operating point be board-specific, so
>   that the parts of the system outside the SOC can be included?
>
> - I'd still rather see operating points be identified by a name
>   string of some kind so that the userspace API resembles that
>   of /sys/power/state:  just write the state name to that file.
>

What would you name an n-tuple of integers?  I can't think how this would work.

--mgross

>Still looking at the patches, otherwise.
>

Me too...

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

end of thread, other threads:[~2006-08-03 13:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-20 20:01 [RFC] PowerOP Take 3, ARM OMAP1 platform support 3/5 Eugeny S. Mints
2006-07-23 16:24 ` David Brownell
2006-07-26 21:02   ` Eugeny S. Mints
2006-07-27  0:28     ` David Brownell
2006-07-30 19:32       ` Eugeny S. Mints
2006-07-31  1:58         ` David Brownell
2006-07-31  6:59           ` Vitaly Wool
2006-07-31 21:24             ` David Brownell
2006-08-01 20:52           ` Core PowerOP Interface Update [Was: Re: [RFC] PowerOP Take 3, ARM OMAP1 platform support 3/5] Eugeny S. Mints
2006-08-03  2:07             ` Eugeny S. Mints
2006-08-03 11:26               ` Vitaly Wool
2006-08-03 13:46                 ` Eugeny S. Mints
  -- strict thread matches above, loose matches on Subject: below --
2006-07-27  0:03 [RFC] PowerOP Take 3, ARM OMAP1 platform support 3/5 Gross, Mark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox