Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
omap_opp_data.h
Go to the documentation of this file.
1 /*
2  * OMAP SoC specific OPP Data helpers
3  *
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
9  *
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.
13  *
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.
18  */
19 #ifndef __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H
20 #define __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H
21 
22 #include <plat/omap_hwmod.h>
23 
24 #include "voltage.h"
25 
26 /*
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.
30  */
31 
50 struct omap_opp_def {
51  char *hwmod_name;
52 
53  unsigned long freq;
54  unsigned long u_volt;
55 
57 };
58 
59 /*
60  * Initialization wrapper used to define an OPP for OMAP variants.
61  */
62 #define OPP_INITIALIZER(_hwmod_name, _enabled, _freq, _uv) \
63 { \
64  .hwmod_name = _hwmod_name, \
65  .default_available = _enabled, \
66  .freq = _freq, \
67  .u_volt = _uv, \
68 }
69 
70 /*
71  * Initialization wrapper used to define SmartReflex process data
72  * XXX Is this needed? Just use C99 initializers in data files?
73  */
74 #define VOLT_DATA_DEFINE(_v_nom, _efuse_offs, _errminlimit, _errgain) \
75 { \
76  .volt_nominal = _v_nom, \
77  .sr_efuse_offs = _efuse_offs, \
78  .sr_errminlimit = _errminlimit, \
79  .vp_errgain = _errgain \
80 }
81 
82 /* Use this to initialize the default table */
83 extern int __init omap_init_opp_table(struct omap_opp_def *opp_def,
84  u32 opp_def_size);
85 
86 
91 
95 
96 #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */