diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_opp_data.h')
| -rw-r--r-- | arch/arm/mach-omap2/omap_opp_data.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h new file mode 100644 index 000000000000..46ac27dd6c84 --- /dev/null +++ b/arch/arm/mach-omap2/omap_opp_data.h | |||
| @@ -0,0 +1,72 @@ | |||
| 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 | /* | ||
| 25 | * *BIG FAT WARNING*: | ||
| 26 | * USE the following ONLY in opp data initialization common to an SoC. | ||
| 27 | * DO NOT USE these in board files/pm core etc. | ||
| 28 | */ | ||
| 29 | |||
| 30 | /** | ||
| 31 | * struct omap_opp_def - OMAP OPP Definition | ||
| 32 | * @hwmod_name: Name of the hwmod for this domain | ||
| 33 | * @freq: Frequency in hertz corresponding to this OPP | ||
| 34 | * @u_volt: Nominal voltage in microvolts corresponding to this OPP | ||
| 35 | * @default_available: True/false - is this OPP available by default | ||
| 36 | * | ||
| 37 | * OMAP SOCs have a standard set of tuples consisting of frequency and voltage | ||
| 38 | * pairs that the device will support per voltage domain. This is called | ||
| 39 | * Operating Points or OPP. The actual definitions of OMAP Operating Points | ||
| 40 | * varies over silicon within the same family of devices. For a specific | ||
| 41 | * domain, you can have a set of {frequency, voltage} pairs and this is denoted | ||
| 42 | * by an array of omap_opp_def. As the kernel boots and more information is | ||
| 43 | * available, a set of these are activated based on the precise nature of | ||
| 44 | * device the kernel boots up on. It is interesting to remember that each IP | ||
| 45 | * which belongs to a voltage domain may define their own set of OPPs on top | ||
| 46 | * of this - but this is handled by the appropriate driver. | ||
| 47 | */ | ||
| 48 | struct omap_opp_def { | ||
| 49 | char *hwmod_name; | ||
| 50 | |||
| 51 | unsigned long freq; | ||
| 52 | unsigned long u_volt; | ||
| 53 | |||
| 54 | bool default_available; | ||
| 55 | }; | ||
| 56 | |||
| 57 | /* | ||
| 58 | * Initialization wrapper used to define an OPP for OMAP variants. | ||
| 59 | */ | ||
| 60 | #define OPP_INITIALIZER(_hwmod_name, _enabled, _freq, _uv) \ | ||
| 61 | { \ | ||
| 62 | .hwmod_name = _hwmod_name, \ | ||
| 63 | .default_available = _enabled, \ | ||
| 64 | .freq = _freq, \ | ||
| 65 | .u_volt = _uv, \ | ||
| 66 | } | ||
| 67 | |||
| 68 | /* Use this to initialize the default table */ | ||
| 69 | extern int __init omap_init_opp_table(struct omap_opp_def *opp_def, | ||
| 70 | u32 opp_def_size); | ||
| 71 | |||
| 72 | #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ | ||
