Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vp.h
Go to the documentation of this file.
1 /*
2  * OMAP3/4 Voltage Processor (VP) structure and macro definitions
3  *
4  * Copyright (C) 2007, 2010 Texas Instruments, Inc.
5  * Rajendra Nayak <[email protected]>
6  * Lesly A M <[email protected]>
7  * Thara Gopinath <[email protected]>
8  *
9  * Copyright (C) 2008, 2011 Nokia Corporation
10  * Kalle Jokiniemi
11  * Paul Walmsley
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License version
15  * 2 as published by the Free Software Foundation.
16  */
17 #ifndef __ARCH_ARM_MACH_OMAP2_VP_H
18 #define __ARCH_ARM_MACH_OMAP2_VP_H
19 
20 #include <linux/kernel.h>
21 
22 struct voltagedomain;
23 
24 /*
25  * Voltage Processor (VP) identifiers
26  */
27 #define OMAP3_VP_VDD_MPU_ID 0
28 #define OMAP3_VP_VDD_CORE_ID 1
29 #define OMAP4_VP_VDD_CORE_ID 0
30 #define OMAP4_VP_VDD_IVA_ID 1
31 #define OMAP4_VP_VDD_MPU_ID 2
32 
33 /* XXX document */
34 #define VP_IDLE_TIMEOUT 200
35 #define VP_TRANXDONE_TIMEOUT 300
36 
42 struct omap_vp_ops {
43  u32 (*check_txdone)(u8 vp_id);
44  void (*clear_txdone)(u8 vp_id);
45 };
46 
84 
85  const struct omap_vp_ops *ops;
86 };
87 
102  const struct omap_vp_common *common;
110  bool enabled;
111 };
112 
113 extern struct omap_vp_instance omap3_vp_mpu;
114 extern struct omap_vp_instance omap3_vp_core;
115 
116 extern struct omap_vp_instance omap4_vp_mpu;
117 extern struct omap_vp_instance omap4_vp_iva;
118 extern struct omap_vp_instance omap4_vp_core;
119 
120 void omap_vp_init(struct voltagedomain *voltdm);
121 void omap_vp_enable(struct voltagedomain *voltdm);
122 void omap_vp_disable(struct voltagedomain *voltdm);
123 int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
124  unsigned long target_volt);
125 int omap_vp_update_errorgain(struct voltagedomain *voltdm,
126  unsigned long target_volt);
127 
128 #endif