aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/vp.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-28 13:52:04 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 15:02:04 -0400
commit58aaa599a97308c0f4a68ef07039157807fa8324 (patch)
tree584afba63279e12711f80989767a3287d6a7dd09 /arch/arm/mach-omap2/vp.h
parente74e44054f8297d60fbd2ed1d412d84055afee8c (diff)
OMAP2+: add PRM VP functions for checking/clearing VP TX done status
Add SoC specific PRM VP helper functions for checking and clearing the VP transaction done status. Longer term, these events should be handled by the forthcoming PRCM interrupt handler. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vp.h')
-rw-r--r--arch/arm/mach-omap2/vp.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h
index 025cf164da71..1ccf7419a36c 100644
--- a/arch/arm/mach-omap2/vp.h
+++ b/arch/arm/mach-omap2/vp.h
@@ -21,10 +21,28 @@
21 21
22struct voltagedomain; 22struct voltagedomain;
23 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
24/* XXX document */ 33/* XXX document */
25#define VP_IDLE_TIMEOUT 200 34#define VP_IDLE_TIMEOUT 200
26#define VP_TRANXDONE_TIMEOUT 300 35#define VP_TRANXDONE_TIMEOUT 300
27 36
37/**
38 * struct omap_vp_ops - per-VP operations
39 * @check_txdone: check for VP transaction done
40 * @clear_txdone: clear VP transaction done status
41 */
42struct omap_vp_ops {
43 u32 (*check_txdone)(u8 vp_id);
44 void (*clear_txdone)(u8 vp_id);
45};
28 46
29/** 47/**
30 * struct omap_vp_common_data - register data common to all VDDs 48 * struct omap_vp_common_data - register data common to all VDDs
@@ -68,41 +86,31 @@ struct omap_vp_common_data {
68 u8 vlimitto_vddmin_shift; 86 u8 vlimitto_vddmin_shift;
69 u8 vlimitto_vddmax_shift; 87 u8 vlimitto_vddmax_shift;
70 u8 vlimitto_timeout_shift; 88 u8 vlimitto_timeout_shift;
71};
72 89
73/** 90 const struct omap_vp_ops *ops;
74 * struct omap_vp_prm_irqst_data - PRM_IRQSTATUS_MPU.VP_TRANXDONE_ST data
75 * @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
76 *
77 * XXX Note that on OMAP3, VP_TRANXDONE interrupt may not work due to a
78 * hardware bug
79 * XXX This structure is probably not needed
80 */
81struct omap_vp_prm_irqst_data {
82 u32 tranxdone_status;
83}; 91};
84 92
85/** 93/**
86 * struct omap_vp_instance_data - VP register offsets (per-VDD) 94 * struct omap_vp_instance_data - VP register offsets (per-VDD)
87 * @vp_common: pointer to struct omap_vp_common_data * for this SoC 95 * @vp_common: pointer to struct omap_vp_common_data * for this SoC
88 * @prm_irqst_data: pointer to struct omap_vp_prm_irqst_data for this VDD
89 * @vpconfig: PRM_VP*_CONFIG reg offset from PRM start 96 * @vpconfig: PRM_VP*_CONFIG reg offset from PRM start
90 * @vstepmin: PRM_VP*_VSTEPMIN reg offset from PRM start 97 * @vstepmin: PRM_VP*_VSTEPMIN reg offset from PRM start
91 * @vlimitto: PRM_VP*_VLIMITTO reg offset from PRM start 98 * @vlimitto: PRM_VP*_VLIMITTO reg offset from PRM start
92 * @vstatus: PRM_VP*_VSTATUS reg offset from PRM start 99 * @vstatus: PRM_VP*_VSTATUS reg offset from PRM start
93 * @voltage: PRM_VP*_VOLTAGE reg offset from PRM start 100 * @voltage: PRM_VP*_VOLTAGE reg offset from PRM start
101 * @id: Unique identifier for VP instance.
94 * 102 *
95 * XXX vp_common is probably not needed since it is per-SoC 103 * XXX vp_common is probably not needed since it is per-SoC
96 */ 104 */
97struct omap_vp_instance_data { 105struct omap_vp_instance_data {
98 const struct omap_vp_common_data *vp_common; 106 const struct omap_vp_common_data *vp_common;
99 const struct omap_vp_prm_irqst_data *prm_irqst_data;
100 u8 vpconfig; 107 u8 vpconfig;
101 u8 vstepmin; 108 u8 vstepmin;
102 u8 vstepmax; 109 u8 vstepmax;
103 u8 vlimitto; 110 u8 vlimitto;
104 u8 vstatus; 111 u8 vstatus;
105 u8 voltage; 112 u8 voltage;
113 u8 id;
106}; 114};
107 115
108/** 116/**