diff options
Diffstat (limited to 'arch/arm/mach-omap2/vp3xxx_data.c')
-rw-r--r-- | arch/arm/mach-omap2/vp3xxx_data.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/vp3xxx_data.c b/arch/arm/mach-omap2/vp3xxx_data.c index 645217094e51..260c554b1547 100644 --- a/arch/arm/mach-omap2/vp3xxx_data.c +++ b/arch/arm/mach-omap2/vp3xxx_data.c | |||
@@ -25,16 +25,20 @@ | |||
25 | #include "voltage.h" | 25 | #include "voltage.h" |
26 | 26 | ||
27 | #include "vp.h" | 27 | #include "vp.h" |
28 | #include "prm2xxx_3xxx.h" | ||
29 | |||
30 | static const struct omap_vp_ops omap3_vp_ops = { | ||
31 | .check_txdone = omap3_prm_vp_check_txdone, | ||
32 | .clear_txdone = omap3_prm_vp_clear_txdone, | ||
33 | }; | ||
28 | 34 | ||
29 | /* | 35 | /* |
30 | * VP data common to 34xx/36xx chips | 36 | * VP data common to 34xx/36xx chips |
31 | * XXX This stuff presumably belongs in the vp3xxx.c or vp.c file. | 37 | * XXX This stuff presumably belongs in the vp3xxx.c or vp.c file. |
32 | */ | 38 | */ |
33 | static const struct omap_vp_common_data omap3_vp_common = { | 39 | static const struct omap_vp_common omap3_vp_common = { |
34 | .vpconfig_erroroffset_shift = OMAP3430_ERROROFFSET_SHIFT, | 40 | .vpconfig_erroroffset_mask = OMAP3430_ERROROFFSET_MASK, |
35 | .vpconfig_errorgain_mask = OMAP3430_ERRORGAIN_MASK, | 41 | .vpconfig_errorgain_mask = OMAP3430_ERRORGAIN_MASK, |
36 | .vpconfig_errorgain_shift = OMAP3430_ERRORGAIN_SHIFT, | ||
37 | .vpconfig_initvoltage_shift = OMAP3430_INITVOLTAGE_SHIFT, | ||
38 | .vpconfig_initvoltage_mask = OMAP3430_INITVOLTAGE_MASK, | 42 | .vpconfig_initvoltage_mask = OMAP3430_INITVOLTAGE_MASK, |
39 | .vpconfig_timeouten = OMAP3430_TIMEOUTEN_MASK, | 43 | .vpconfig_timeouten = OMAP3430_TIMEOUTEN_MASK, |
40 | .vpconfig_initvdd = OMAP3430_INITVDD_MASK, | 44 | .vpconfig_initvdd = OMAP3430_INITVDD_MASK, |
@@ -47,36 +51,29 @@ static const struct omap_vp_common_data omap3_vp_common = { | |||
47 | .vlimitto_vddmin_shift = OMAP3430_VDDMIN_SHIFT, | 51 | .vlimitto_vddmin_shift = OMAP3430_VDDMIN_SHIFT, |
48 | .vlimitto_vddmax_shift = OMAP3430_VDDMAX_SHIFT, | 52 | .vlimitto_vddmax_shift = OMAP3430_VDDMAX_SHIFT, |
49 | .vlimitto_timeout_shift = OMAP3430_TIMEOUT_SHIFT, | 53 | .vlimitto_timeout_shift = OMAP3430_TIMEOUT_SHIFT, |
50 | }; | 54 | .vpvoltage_mask = OMAP3430_VPVOLTAGE_MASK, |
51 | 55 | ||
52 | static const struct omap_vp_prm_irqst_data omap3_vp1_prm_irqst_data = { | 56 | .ops = &omap3_vp_ops, |
53 | .prm_irqst_reg = OMAP3_PRM_IRQSTATUS_MPU_OFFSET, | ||
54 | .tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK, | ||
55 | }; | 57 | }; |
56 | 58 | ||
57 | struct omap_vp_instance_data omap3_vp1_data = { | 59 | struct omap_vp_instance omap3_vp_mpu = { |
58 | .vp_common = &omap3_vp_common, | 60 | .id = OMAP3_VP_VDD_MPU_ID, |
61 | .common = &omap3_vp_common, | ||
59 | .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET, | 62 | .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET, |
60 | .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET, | 63 | .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET, |
61 | .vstepmax = OMAP3_PRM_VP1_VSTEPMAX_OFFSET, | 64 | .vstepmax = OMAP3_PRM_VP1_VSTEPMAX_OFFSET, |
62 | .vlimitto = OMAP3_PRM_VP1_VLIMITTO_OFFSET, | 65 | .vlimitto = OMAP3_PRM_VP1_VLIMITTO_OFFSET, |
63 | .vstatus = OMAP3_PRM_VP1_STATUS_OFFSET, | 66 | .vstatus = OMAP3_PRM_VP1_STATUS_OFFSET, |
64 | .voltage = OMAP3_PRM_VP1_VOLTAGE_OFFSET, | 67 | .voltage = OMAP3_PRM_VP1_VOLTAGE_OFFSET, |
65 | .prm_irqst_data = &omap3_vp1_prm_irqst_data, | ||
66 | }; | ||
67 | |||
68 | static const struct omap_vp_prm_irqst_data omap3_vp2_prm_irqst_data = { | ||
69 | .prm_irqst_reg = OMAP3_PRM_IRQSTATUS_MPU_OFFSET, | ||
70 | .tranxdone_status = OMAP3430_VP2_TRANXDONE_ST_MASK, | ||
71 | }; | 68 | }; |
72 | 69 | ||
73 | struct omap_vp_instance_data omap3_vp2_data = { | 70 | struct omap_vp_instance omap3_vp_core = { |
74 | .vp_common = &omap3_vp_common, | 71 | .id = OMAP3_VP_VDD_CORE_ID, |
72 | .common = &omap3_vp_common, | ||
75 | .vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET, | 73 | .vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET, |
76 | .vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET, | 74 | .vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET, |
77 | .vstepmax = OMAP3_PRM_VP2_VSTEPMAX_OFFSET, | 75 | .vstepmax = OMAP3_PRM_VP2_VSTEPMAX_OFFSET, |
78 | .vlimitto = OMAP3_PRM_VP2_VLIMITTO_OFFSET, | 76 | .vlimitto = OMAP3_PRM_VP2_VLIMITTO_OFFSET, |
79 | .vstatus = OMAP3_PRM_VP2_STATUS_OFFSET, | 77 | .vstatus = OMAP3_PRM_VP2_STATUS_OFFSET, |
80 | .voltage = OMAP3_PRM_VP2_VOLTAGE_OFFSET, | 78 | .voltage = OMAP3_PRM_VP2_VOLTAGE_OFFSET, |
81 | .prm_irqst_data = &omap3_vp2_prm_irqst_data, | ||
82 | }; | 79 | }; |