您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ tegra3_get_core_floor_mv函数代码示例

51自学网 2021-06-03 08:43:19
  C++
这篇教程C++ tegra3_get_core_floor_mv函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中tegra3_get_core_floor_mv函数的典型用法代码示例。如果您正苦于以下问题:C++ tegra3_get_core_floor_mv函数的具体用法?C++ tegra3_get_core_floor_mv怎么用?C++ tegra3_get_core_floor_mv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了tegra3_get_core_floor_mv函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: tegra3_dvfs_rel_vdd_cpu_vdd_core

/* vdd_core must be >= min_level as a function of vdd_cpu */static int tegra3_dvfs_rel_vdd_cpu_vdd_core(struct dvfs_rail *vdd_cpu,	struct dvfs_rail *vdd_core){	int core_floor = max(vdd_cpu->new_millivolts, vdd_cpu->millivolts);	core_floor = tegra3_get_core_floor_mv(core_floor);	return max(vdd_core->new_millivolts, core_floor);}
开发者ID:jareddantis,项目名称:pulsar-kernel_enrc2b,代码行数:8,


示例2: get_cpu_nominal_mv_index

static int __init get_cpu_nominal_mv_index(	int speedo_id, int process_id, struct dvfs **cpu_dvfs){	int i, j, mv;	struct dvfs *d;	struct clk *c;	/*	 * Start with nominal level for the chips with this speedo_id. Then,	 * make sure cpu nominal voltage is below core ("solve from cpu to	 * core at nominal").	 */	BUG_ON(speedo_id >= ARRAY_SIZE(cpu_speedo_nominal_millivolts));	mv = cpu_speedo_nominal_millivolts[speedo_id];	if (tegra3_dvfs_rail_vdd_core.nominal_millivolts) {		int core_mv = tegra3_dvfs_rail_vdd_core.nominal_millivolts;		while ((mv > tegra3_dvfs_rail_vdd_cpu.min_millivolts) &&		       (tegra3_get_core_floor_mv(mv) > core_mv))			mv -= 25;	}	/*	 * Find matching cpu dvfs entry, and use it to determine index to the	 * final nominal voltage, that satisfies the following requirements:	 * - allows CPU to run at minimum of the maximum rates specified in	 *   the dvfs entry and clock tree	 * - does not violate cpu_to_core dependency as determined above	 */	for (i = 0, j = 0; j <  ARRAY_SIZE(cpu_dvfs_table); j++) {		d = &cpu_dvfs_table[j];		if (match_dvfs_one(d, speedo_id, process_id)) {			c = tegra_get_clock_by_name(d->clk_name);			BUG_ON(!c);			for (; i < MAX_DVFS_FREQS; i++) {				if ((d->freqs[i] == 0) ||				    (cpu_millivolts[i] == 0) ||				    (mv < cpu_millivolts[i]))					break;				if (c->max_rate <= d->freqs[i]*d->freqs_mult) {					i++;					break;				}			}			break;		}	}	BUG_ON(i == 0);	if (j == (ARRAY_SIZE(cpu_dvfs_table) - 1))		pr_err("tegra3_dvfs: WARNING!!!/n"		       "tegra3_dvfs: no cpu dvfs table found for chip speedo_id"		       " %d and process_id %d: set CPU rate limit at %lu/n"		       "tegra3_dvfs: WARNING!!!/n",		       speedo_id, process_id, d->freqs[i-1] * d->freqs_mult);	*cpu_dvfs = d;	return (i - 1);}
开发者ID:0x0f,项目名称:android-tegra-nv-2.6.39,代码行数:60,


示例3: tegra_dvfs_rail_post_enable

int tegra_dvfs_rail_post_enable(struct dvfs_rail *rail){	if (tegra_emc_get_dram_type() != DRAM_TYPE_DDR3)		return 0;	if (((&tegra3_dvfs_rail_vdd_core == rail) &&	     (rail->nominal_millivolts > TEGRA_EMC_BRIDGE_MVOLTS_MIN)) ||	    ((&tegra3_dvfs_rail_vdd_cpu == rail) &&	     (tegra3_get_core_floor_mv(rail->nominal_millivolts) >	      TEGRA_EMC_BRIDGE_MVOLTS_MIN))) {		struct clk *bridge = tegra_get_clock_by_name("bridge.emc");		BUG_ON(!bridge);		clk_disable(bridge);		pr_info("%s: %s: disabled bridge.emc/n",			__func__, rail->reg_id);	}	return 0;}
开发者ID:jareddantis,项目名称:pulsar-kernel_enrc2b,代码行数:19,


示例4: get_cpu_nominal_mv_index

static int __init get_cpu_nominal_mv_index(	int speedo_id, int process_id, struct dvfs **cpu_dvfs){	int i, j, mv, nom_index;	struct dvfs *d;	struct clk *c;	/*	 * Find maximum cpu voltage that satisfies cpu_to_core dependency for	 * nominal core voltage ("solve from cpu to core at nominal"). Clip	 * result to the nominal cpu level for the chips with this speedo_id.	 */	mv = tegra3_dvfs_rail_vdd_core.nominal_millivolts;	for (i = 0; i < MAX_DVFS_FREQS; i++) {		if ((cpu_millivolts[i] == 0) ||		    tegra3_get_core_floor_mv(cpu_millivolts[i]) > mv)			break;	}	BUG_ON(i == 0);	mv = cpu_millivolts[i - 1];	pr_info("cpu_nominal_mv: %i/n", mv);	BUG_ON(mv < tegra3_dvfs_rail_vdd_cpu.min_millivolts);	mv = min(mv, tegra_cpu_speedo_mv());	pr_info("cpu_nominal_mv_min: %i/n", mv);	/*	 * Find matching cpu dvfs entry, and use it to determine index to the	 * final nominal voltage, that satisfies the following requirements:	 * - allows CPU to run at minimum of the maximum rates specified in	 *   the dvfs entry and clock tree	 * - does not violate cpu_to_core dependency as determined above	 */	for (i = 0, j = 0; j <  ARRAY_SIZE(cpu_dvfs_table); j++) {		d = &cpu_dvfs_table[j];		if (match_dvfs_one(d, speedo_id, process_id)) {			c = tegra_get_clock_by_name(d->clk_name);			BUG_ON(!c);			for (; i < MAX_DVFS_FREQS; i++) {				if ((d->freqs[i] == 0) ||				    (cpu_millivolts[i] == 0) ||				    (mv < cpu_millivolts[i]))					break;				if (c->max_rate <= d->freqs[i]*d->freqs_mult) {					i++;					break;				}			}			break;		}	}	pr_info("dvfs: freqs_mult: %i/n", d->freqs_mult);	BUG_ON(i == 0);	if (j == (ARRAY_SIZE(cpu_dvfs_table) - 1))		pr_err("tegra3_dvfs: WARNING!!!/n"		       "tegra3_dvfs: no cpu dvfs table found for chip speedo_id"		       " %d and process_id %d: set CPU rate limit at %lu/n"		       "tegra3_dvfs: WARNING!!!/n",		       speedo_id, process_id, d->freqs[i-1] * d->freqs_mult);	*cpu_dvfs = d;	nom_index = i - 1;	pr_info("cpu_nominal_mv_index: %i/n", nom_index);	pr_info("cpu_dvfs->speedo_id: %i/n", d->speedo_id);	pr_info("cpu_dvfs->process_id: %i/n", d->process_id);	for (i=0;i<MAX_DVFS_FREQS;i++) {		pr_info("cpu_dvfs->freqs: %lu/n", d->freqs[i]);	}	return nom_index;}
开发者ID:HuChundong,项目名称:Endeavor3.1.10,代码行数:76,



注:本文中的tegra3_get_core_floor_mv函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ tegra_asoc_utils_fini函数代码示例
C++ tear_down函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。