ARM: cpu topology: Add debugfs interface for cpu_power
[cmplus.git] / arch / arm / mach-omap2 / omap_opp_data.h
blob37d16e1b1225e7e2557f8379d3aaa4aaf35a66e5
1 /*
2 * OMAP SoC specific OPP Data helpers
4 * Copyright (C) 2009-2010 Texas Instruments Incorporated - http://www.ti.com/
5 * Nishanth Menon
6 * Kevin Hilman
7 * Copyright (C) 2010 Nokia Corporation.
8 * Eduardo Valentin
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
15 * kind, whether express or implied; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 #ifndef __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H
20 #define __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H
22 #include <plat/omap_hwmod.h>
24 #include "voltage.h"
27 * *BIG FAT WARNING*:
28 * USE the following ONLY in opp data initialization common to an SoC.
29 * DO NOT USE these in board files/pm core etc.
32 /**
33 * struct omap_opp_def - OMAP OPP Definition
34 * @hwmod_name: Name of the hwmod for this domain
35 * @freq: Frequency in hertz corresponding to this OPP
36 * @u_volt: Nominal voltage in microvolts corresponding to this OPP
37 * @default_available: True/false - is this OPP available by default
39 * OMAP SOCs have a standard set of tuples consisting of frequency and voltage
40 * pairs that the device will support per voltage domain. This is called
41 * Operating Points or OPP. The actual definitions of OMAP Operating Points
42 * varies over silicon within the same family of devices. For a specific
43 * domain, you can have a set of {frequency, voltage} pairs and this is denoted
44 * by an array of omap_opp_def. As the kernel boots and more information is
45 * available, a set of these are activated based on the precise nature of
46 * device the kernel boots up on. It is interesting to remember that each IP
47 * which belongs to a voltage domain may define their own set of OPPs on top
48 * of this - but this is handled by the appropriate driver.
50 struct omap_opp_def {
51 char *hwmod_name;
52 char *voltdm_name;
53 char *clk_name;
55 unsigned long freq;
56 unsigned long u_volt;
58 bool default_available;
62 * Initialization wrapper used to define an OPP for OMAP variants.
64 #define OPP_INITIALIZER(_hwmod_name, _clk_name, _voltdm_name, _enabled, _freq, _uv) \
65 { \
66 .hwmod_name = _hwmod_name, \
67 .clk_name = _clk_name, \
68 .voltdm_name = _voltdm_name, \
69 .default_available = _enabled, \
70 .freq = _freq, \
71 .u_volt = _uv, \
75 * Initialization wrapper used to define SmartReflex process data
76 * XXX Is this needed? Just use C99 initializers in data files?
78 #define VOLT_DATA_DEFINE(_v_nom, _v_margin, _efuse_offs, _errminlimit, _errgain, _abb_type) \
79 { \
80 .volt_nominal = _v_nom, \
81 .volt_margin = _v_margin, \
82 .sr_efuse_offs = _efuse_offs, \
83 .sr_errminlimit = _errminlimit, \
84 .vp_errgain = _errgain, \
85 .abb_type = _abb_type, \
88 /* Use this to initialize the default table */
89 extern int __init omap_init_opp_table(struct omap_opp_def *opp_def,
90 u32 opp_def_size);
93 extern struct omap_volt_data omap34xx_vddmpu_volt_data[];
94 extern struct omap_volt_data omap34xx_vddcore_volt_data[];
95 extern struct omap_vdd_dep_info omap34xx_vddmpu_dep_info[];
96 extern struct omap_volt_data omap36xx_vddmpu_volt_data[];
97 extern struct omap_volt_data omap36xx_vddcore_volt_data[];
98 extern struct omap_vdd_dep_info omap36xx_vddmpu_dep_info[];
100 extern struct omap_volt_data omap443x_vdd_mpu_volt_data[];
101 extern struct omap_volt_data omap443x_vdd_iva_volt_data[];
102 extern struct omap_volt_data omap443x_vdd_core_volt_data[];
103 extern struct omap_volt_data omap446x_vdd_mpu_volt_data[];
104 extern struct omap_volt_data omap446x_vdd_iva_volt_data[];
105 extern struct omap_volt_data omap446x_vdd_core_volt_data[];
107 extern struct omap_vdd_dep_info omap443x_vddmpu_dep_info[];
108 extern struct omap_vdd_dep_info omap443x_vddiva_dep_info[];
109 extern struct omap_vdd_dep_info omap446x_vddmpu_dep_info[];
110 extern struct omap_vdd_dep_info omap446x_vddiva_dep_info[];
112 #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */