Lines Matching refs:vp

8 #include "vp.h"
15 struct omap_vp_instance *vp = voltdm->vp;
21 vpconfig = voltdm->read(vp->vpconfig);
22 vpconfig &= ~(vp->common->vpconfig_initvoltage_mask |
23 vp->common->vpconfig_forceupdate |
24 vp->common->vpconfig_initvdd);
25 vpconfig |= vsel << __ffs(vp->common->vpconfig_initvoltage_mask);
26 voltdm->write(vpconfig, vp->vpconfig);
29 voltdm->write((vpconfig | vp->common->vpconfig_initvdd),
30 vp->vpconfig);
33 voltdm->write(vpconfig, vp->vpconfig);
41 struct omap_vp_instance *vp = voltdm->vp;
56 vp->enabled = false;
77 __ffs(voltdm->vp->common->vpconfig_erroroffset_mask)) |
78 vp->common->vpconfig_timeouten;
79 voltdm->write(val, vp->vpconfig);
82 val = (waittime << vp->common->vstepmin_smpswaittimemin_shift) |
83 (vstepmin << vp->common->vstepmin_stepmin_shift);
84 voltdm->write(val, vp->vstepmin);
87 val = (vstepmax << vp->common->vstepmax_stepmax_shift) |
88 (waittime << vp->common->vstepmax_smpswaittimemax_shift);
89 voltdm->write(val, vp->vstepmax);
92 val = (vddmax << vp->common->vlimitto_vddmax_shift) |
93 (vddmin << vp->common->vlimitto_vddmin_shift) |
94 (timeout << vp->common->vlimitto_timeout_shift);
95 voltdm->write(val, vp->vlimitto);
103 if (!voltdm->vp)
111 /* Setting vp errorgain based on the voltage */
112 voltdm->rmw(voltdm->vp->common->vpconfig_errorgain_mask,
114 __ffs(voltdm->vp->common->vpconfig_errorgain_mask),
115 voltdm->vp->vpconfig);
124 struct omap_vp_instance *vp = voltdm->vp;
138 vp->common->ops->clear_txdone(vp->id);
139 if (!vp->common->ops->check_txdone(vp->id))
152 voltdm->write(vpconfig | vp->common->vpconfig_forceupdate,
153 voltdm->vp->vpconfig);
160 omap_test_timeout(vp->common->ops->check_txdone(vp->id),
174 vp->common->ops->clear_txdone(vp->id);
175 if (!vp->common->ops->check_txdone(vp->id))
185 voltdm->write(vpconfig, vp->vpconfig);
199 struct omap_vp_instance *vp;
207 vp = voltdm->vp;
215 if (vp->enabled)
228 vpconfig |= vp->common->vpconfig_vpenable;
229 voltdm->write(vpconfig, vp->vpconfig);
231 vp->enabled = true;
243 struct omap_vp_instance *vp;
252 vp = voltdm->vp;
260 if (!vp->enabled) {
267 vpconfig = voltdm->read(vp->vpconfig);
268 vpconfig &= ~vp->common->vpconfig_vpenable;
269 voltdm->write(vpconfig, vp->vpconfig);
274 omap_test_timeout((voltdm->read(vp->vstatus)),
280 vp->enabled = false;