Linux没有cpufreq文件夹,cpufreq patch

本文档介绍了Linux内核中的emxx_cpufreq驱动程序,用于管理CPU频率。它包含了电压调节器的配置、频率验证、目标频率设置等功能。驱动程序与cpufreq_frequency_table配合工作,确保频率的正确转换,并处理与电压调节相关的操作。
摘要由CSDN通过智能技术生成

+

+#include +

+static struct regulator *vddarm;

+

+static unsigned long regulator_latency;

+static unsigned long emxx_cpufreq;

+struct emxx_dvfs {

+    unsigned int vddarm_min;

+    unsigned int vddarm_max;

+};

+

+static struct emxx_dvfs emxx_dvfs_table[] = {

+    [0] = { 1000000, 1150000 },

+    [1] = { 1050000, 1150000 },

+    [2] = { 1100000, 1150000 },

+    [3] = { 1200000, 1350000 },

+};

+

+static struct cpufreq_frequency_table emxx_freq_table[] = {

+    { 0, 1062000 },

+    { 0, 1062000 },

+    { 1, 1062000 },

+    { 1, 1062000 },

+    { 2, 1062000 },

+    { 2, 1062000 },

+    { 2, 1062000 },

+    { 2, 1062000 },

+    { 3, 1062000 },

+    { 0, CPUFREQ_TABLE_END },

+};

+

+static int emxx_cpufreq_verify_speed(struct cpufreq_policy *policy)

+{

+    return cpufreq_frequency_table_verify(policy, emxx_freq_table);

+}

+

+static unsigned int emxx_cpufreq_get_speed(unsigned int cpu)

+{

+    return emxx_cpufreq;

+}

+

+static int emxx_cpufreq_set_target(struct cpufreq_policy *policy,

+                      unsigned int target_freq,

+                      unsigned int rel

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值