9 #include "v3_user_dvfs.h"
11 int v3_user_dvfs_acquire_direct(uint32_t core)
13 struct v3_dvfs_ctrl_request r;
15 r.cmd=V3_DVFS_ACQUIRE;
16 r.acq_type=V3_DVFS_DIRECT;
21 return v3_dev_ioctl(V3_DVFS_CTRL,&r);
24 int v3_user_dvfs_acquire_external(uint32_t core)
26 struct v3_dvfs_ctrl_request r;
28 r.cmd=V3_DVFS_ACQUIRE;
29 r.acq_type=V3_DVFS_EXTERNAL;
34 return v3_dev_ioctl(V3_DVFS_CTRL,&r);
37 int v3_user_dvfs_release(uint32_t core)
39 struct v3_dvfs_ctrl_request r;
41 r.cmd=V3_DVFS_RELEASE;
42 r.acq_type=V3_DVFS_DIRECT;
47 return v3_dev_ioctl(V3_DVFS_CTRL,&r);
51 int v3_user_dvfs_set_pstate(uint32_t core, uint8_t pstate)
53 struct v3_dvfs_ctrl_request r;
55 r.cmd=V3_DVFS_SETPSTATE;
56 r.acq_type=V3_DVFS_DIRECT;
61 return v3_dev_ioctl(V3_DVFS_CTRL,&r);
64 int v3_user_dvfs_set_freq(uint32_t core, uint64_t freq_khz)
66 struct v3_dvfs_ctrl_request r;
68 r.cmd=V3_DVFS_SETFREQ;
69 r.acq_type=V3_DVFS_EXTERNAL;
74 return v3_dev_ioctl(V3_DVFS_CTRL,&r);