• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ cpu_is_omap54xx函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: voltdm_nominal_voltage_get

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		voltdm_nominal_voltage_get
 * @BRIEF		return the nominal voltage supplied to a voltage domain.
 * @RETURNS		nominal voltage in micro-volt (> 0) in case of success
 *			OMAPCONF_ERR_CPU
 *			OMAPCONF_ERR_ARG
 * @param[in]		voltdm: voltage domain name (as defined in voltdm.h)
 * @DESCRIPTION		return the nominal voltage supplied to a voltage domain.
 *			In case SmartReflex AVS Class3 is enabled,
 *			it may differ from the current supplied voltage.
 *//*------------------------------------------------------------------------ */
int voltdm_nominal_voltage_get(const char *voltdm)
{
	int id;
	int uvolt;

	CHECK_NULL_ARG(voltdm, OMAPCONF_ERR_ARG);

	voltdm_init();

	id = voltdm_s2id(voltdm);
	if (id < 0) {
		uvolt = OMAPCONF_ERR_ARG;
	} else if (cpu_is_omap44xx()) {
		uvolt = v2uv(voltdm44xx_nominal_voltage_get(
			(voltdm44xx_id) id));
	} else if (cpu_is_omap54xx()) {
		uvolt = v2uv(voltdm54xx_nominal_voltage_get(
			(voltdm54xx_id) id));
	} else {
		fprintf(stderr,
			"omapconf: %s(): cpu not supported!!!\n", __func__);
		uvolt = OMAPCONF_ERR_CPU;
	}

	dprintf("%s(%s) = %duV\n", __func__, voltdm, uvolt);
	return uvolt;
}
开发者ID:bcousson,项目名称:omapconf,代码行数:38,代码来源:voltdm.c


示例2: powerdm_init

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		powerdm_init
 * @BRIEF		initialize internal data
 * @DESCRIPTION		initialize internal data (architecture dependent)
 *//*------------------------------------------------------------------------ */
void powerdm_init(void)
{
	#ifdef PWRDM_DEBUG
	int i, count;
	const genlist *pwrdm_list;
	powerdm_info pwrdm;
	#endif

	if (cpu_is_omap44xx()) {
		pwrdm44xx_init();
	} else if (cpu_is_omap54xx()) {
		pwrdm54xx_init();
	} else {
		fprintf(stderr,
			"omapconf: %s(): cpu not supported!!!\n", __func__);
	}

	#ifdef PWRDM_DEBUG
	pwrdm_list = powerdm_list_get();
	count = genlist_getcount((genlist *) pwrdm_list);
	printf("Power Domain List:\n");
	for (i = 0; i < count; i++) {
		genlist_get((genlist *) pwrdm_list, i, (powerdm_info *) &pwrdm);
		printf(" %s:\n", pwrdm.name);
		printf("  ID:%d\n", pwrdm.id);
		printf("  VoltDM: %s\n", pwrdm.voltdm);
		printf("  PWRSTCTRL REG: %s\n", (pwrdm.pwrstctrl)->name);
		printf("  PWRSTST REG: %s\n", (pwrdm.pwrstst)->name);
		printf("  Properties: %d\n", pwrdm.properties);
		printf("\n\n");
	}
	printf("Power Domain count: %d\n\n", count);
	#endif
}
开发者ID:KunYi,项目名称:omapconf,代码行数:39,代码来源:powerdomain.c


示例3: sr54xx_is_accessible

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		sr54xx_is_accessible
 * @BRIEF		check if SR module is accessible
 * @RETURNS		1 if SR module is accessible, 0 otherwise
 * @param[in]		id: valid SR module ID
 * @DESCRIPTION		check if SR module is accessible
 *//*------------------------------------------------------------------------ */
unsigned int sr54xx_is_accessible(sr54xx_mod_id id)
{
	mod54xx_id module_id;

	if (!cpu_is_omap54xx())
		return 0;

	switch (id) {
	case SR54XX_SMARTREFLEX_MPU:
		module_id = OMAP5_SMARTREFLEX_MPU;
		break;
	case SR54XX_SMARTREFLEX_MM:
		module_id = OMAP5_SMARTREFLEX_MM;
		break;
	case SR54XX_SMARTREFLEX_CORE:
		module_id = OMAP5_SMARTREFLEX_CORE;
		break;
	default:
		return 0;
	}

	if (mod54xx_is_accessible(module_id) == 1) {
		dprintf("%s(%s): SR module is accessible\n", __func__,
			sr54xx_mod_name_get(id));
		return 1;
	} else {
		dprintf("%s(%s): SR module is NOT accessible\n", __func__,
			sr54xx_mod_name_get(id));
		return 0;
	}
}
开发者ID:bcousson,项目名称:omapconf,代码行数:38,代码来源:sr54xx.c


示例4: twl603x_is_twl6035

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		twl603x_is_twl6035
 * @BRIEF		return 1 if PMIC chip is TWL6035, 0 otherwise.
 * @RETURNS		1 PMIC chip is TWL6035
 *			0 otherwise
 * @DESCRIPTION		return 1 if PMIC chip is TWL6035, 0 otherwise.
 *//*------------------------------------------------------------------------ */
unsigned short twl603x_is_twl6035(void)
{
#if 0 /* FIXME: implement true detection when ID data available */
	int ret;
	unsigned int val1, val2;

	if (twl603x_data.chip_type != TWL603X_TYPE_MAX) {
		dprintf("%s(): flag=%d\n", __func__,
			(twl603x_data.chip_type == TWL6035));
		return twl603x_data.chip_type == TWL6035;
	}

	ret = i2cget(TWL6030_I2C_BUS, 0x49, 0x02, &val2);
	if (ret != 0)
		goto twl603x_is_twl6035_end;

	ret = i2cget(TWL6030_I2C_BUS, 0x49, 0x03, &val1);
	if (ret != 0)
		goto twl603x_is_twl6035_end;
	if ((val1 == 0xC0) && (val2 == 0x35))
		twl603x_data.chip_type = TWL6035;

twl603x_is_twl6035_end:
	dprintf("%s(): val1=0x%02X val2=0x%02X flag=%d\n",
		__func__, val1, val2, (twl603x_data.chip_type == TWL6035));
	return twl603x_data.chip_type == TWL6035;
#else
	/* FIXME: implement true detection when ID data available */
	if (cpu_is_omap54xx())
		return 1;
	else
		return 0;
#endif
}
开发者ID:IngenicC,项目名称:omapconf,代码行数:41,代码来源:twl603x.c


示例5: voltdm_voltage_get

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		voltdm_voltage_get
 * @BRIEF		return the current voltage supplied to a voltage domain.
 * @RETURNS		supplied voltage in micro-volt (> 0) in case of success
 *			OMAPCONF_ERR_CPU
 *			OMAPCONF_ERR_ARG
 *			OMAPCONF_ERR_REG_ACCESS
 *			OMAPCONF_ERR_NOT_AVAILABLE
 *			OMAPCONF_ERR_INTERNAL
 * @param[in]		voltdm: voltage domain name (as defined in voltdm.h)
 * @DESCRIPTION		return the current voltage supplied to a voltage domain.
 *//*------------------------------------------------------------------------ */
int voltdm_voltage_get(const char *voltdm)
{
	int id, ret;
	double volt;

	CHECK_NULL_ARG(voltdm, OMAPCONF_ERR_ARG);

	voltdm_init();

	id = voltdm_s2id(voltdm);
	if (id < 0)
		return (double) OMAPCONF_ERR_ARG;

	if (cpu_is_omap44xx()) {
		ret = voltdm44xx_get_voltage((voltdm44xx_id) id, &volt);
		if (ret < 0)
			return (double) ret;
		else
			return v2uv(volt);
	} else if (cpu_is_omap54xx()) {
		return v2uv(voltdm54xx_voltage_get((voltdm54xx_id) id));
	} else {
		fprintf(stderr,
			"omapconf: %s(): cpu not supported!!!\n", __func__);
		return (double) OMAPCONF_ERR_CPU;
	}
}
开发者ID:bcousson,项目名称:omapconf,代码行数:39,代码来源:voltdm.c


示例6: pwrdm54xx_has_last_power_state

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		pwrdm54xx_has_last_power_state
 * @BRIEF		return 1 if power domain has LASTPOWERSTATEENTERED
 * @RETURNS		1 if power domain has a LASTPOWERSTATEENTERED bitfield.
 *			0 if not available or in case of error.
 * @param[in]		id: valid power domain ID
 * @DESCRIPTION		return 1 if power domain has LASTPOWERSTATEENTERED
 *			in PM_xyz_PWRSTST register (not all power domains
 *			feature it).
 *			Return 0 if not available or in case of error.
 *			Does not make any access to any register.
 *//*------------------------------------------------------------------------ */
unsigned int pwrdm54xx_has_last_power_state(pwrdm54xx_id id)
{
	unsigned int prop;

	if (!cpu_is_omap54xx()) {
		fprintf(stderr, "%s(): CPU != 54XX\n", __func__);
		return 0;
	}

	if (id >= PWRDM54XX_ID_MAX) {
		fprintf(stderr, "%s(): id=%u >= PWRDM54XX_ID_MAX (%u)\n",
			__func__, id, PWRDM54XX_ID_MAX);
		return 0;
	}

	prop = pwrdm54xx_properties_get(id);
	if ((prop & PWRDM_HAS_LAST_STATE) != 0) {
		dprintf("%s(%u): mod %s HAS LASTPOWERSTATEENTERED bitfield\n",
			__func__, id, pwrdm54xx_name_get(id));
		return 1;
	} else {
		dprintf("%s(%u): mod %s does NOT have LASTPOWERSTATEENTERED"
			" bitfield\n", __func__, id, pwrdm54xx_name_get(id));
		return 0;
	}
}
开发者ID:bcousson,项目名称:omapconf,代码行数:38,代码来源:pwrdm54xx.c


示例7: voltdm_s2id

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		voltdm_s2id
 * @BRIEF		convert voltage domain provided as a string
 *			(as defined in voltdm.h) into a plaftorm-specific
 *			voltage domain ID (integer).
 * @RETURNS		plaftorm-specific voltage domain ID (> 0) if success
 *			OMAPCONF_ERR_CPU
 *			OMAPCONF_ERR_ARG
 * @param[in]		voltdm: voltage domain name (as defined in voltdm.h)
 * @DESCRIPTION		convert voltage domain provided as a string
 *			(as defined in voltdm.h) into a plaftorm-specific
 *			voltage domain ID (integer).
 *//*------------------------------------------------------------------------ */
int voltdm_s2id(const char *voltdm)
{
	CHECK_NULL_ARG(voltdm, OMAPCONF_ERR_ARG);

	if (cpu_is_omap44xx()) {
		if (strcmp(voltdm, VDD_WKUP) == 0)
			return (int) OMAP4_LDO_WKUP;
		else if (strcmp(voltdm, VDD_MPU) == 0)
			return (int) OMAP4_VDD_MPU;
		else if (strcmp(voltdm, VDD_IVA) == 0)
			return (int) OMAP4_VDD_IVA;
		else if (strcmp(voltdm, VDD_CORE) == 0)
			return (int) OMAP4_VDD_CORE;
		else
			return OMAPCONF_ERR_ARG;
	} else if (cpu_is_omap54xx()) {
		if (strcmp(voltdm, VDD_WKUP) == 0)
			return (int) VDD54XX_WKUP;
		else if (strcmp(voltdm, VDD_MPU) == 0)
			return (int) VDD54XX_MPU;
		else if (strcmp(voltdm, VDD_MM) == 0)
			return (int) VDD54XX_MM;
		else if (strcmp(voltdm, VDD_CORE) == 0)
			return (int) VDD54XX_CORE;
		else
			return OMAPCONF_ERR_ARG;
	} else {
		fprintf(stderr,
			"omapconf: %s(): cpu not supported!!!\n", __func__);
		return OMAPCONF_ERR_CPU;
	}
}
开发者ID:bcousson,项目名称:omapconf,代码行数:45,代码来源:voltdm.c


示例8: omap2_iommu_enable

static int omap2_iommu_enable(struct omap_iommu *obj)
{
	u32 l, pa;

	/*
	 * HACK: without this, we blow imprecise external abort on uEVM
	 * followed by L3 bus exception spew
	 */

	if (cpu_is_omap54xx()) {
		pr_info("omap2_iommu_enable: doing Benelli reset HACK\n");
		__raw_writel(3, OMAP2_L4_IO_ADDRESS(0x4AE06910));

		/* We need some ugly wait here as reread or mb() are not
		 * sufficient... */
		mdelay(500);
	}

	if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd,  SZ_16K))
		return -EINVAL;

	pa = virt_to_phys(obj->iopgd);
	if (!IS_ALIGNED(pa, SZ_16K))
		return -EINVAL;

	l = iommu_read_reg(obj, MMU_REVISION);
	dev_info(obj->dev, "%s: version %d.%d\n", obj->name,
		 (l >> 4) & 0xf, l & 0xf);

	iommu_write_reg(obj, pa, MMU_TTB);

	__iommu_set_twl(obj, true);

	return 0;
}
开发者ID:alessandroste,项目名称:testBSP,代码行数:35,代码来源:iommu2.c


示例9: omap5_opp_init

/**
 * omap4_opp_init() - initialize omap4 opp table
 */
static int __init omap5_opp_init(void)
{
	int r = -ENODEV;

	pr_info("Registering %d OPPs\n", ARRAY_SIZE(omap54xx_opp_def_list));

	if (!cpu_is_omap54xx())
		return r;

	r = omap_init_opp_table(omap54xx_opp_def_list,
			ARRAY_SIZE(omap54xx_opp_def_list));

	if (!cpu_is_omap5432()) {
		/* Enable scaling on the Core domain */
		struct omap_hwmod *oh_mpu = omap_hwmod_lookup("l3_main_1");
		struct platform_device *pdev;
		if (!oh_mpu || !oh_mpu->od) {
			return r;
		} else {
			pdev = oh_mpu->od->pdev;
			r = opp_enable(&pdev->dev, 133000000);
			if (r < 0) {
				dev_err(&pdev->dev,
						"unable to enable Core LOW OPP for 5430 device!\n");
				return r;
			}
		}
		pr_info("Added LOW OPP to CORE domain - this is expected on 5430 device\n");
	} else {
		pr_info("Did not LOW OPP to CORE domain - this is expected on 5432 device\n");
	}

	return r;
}
开发者ID:bossino,项目名称:panda_es_kernel,代码行数:37,代码来源:opp5xxx_data.c


示例10: pwrdm54xx_has_logic_ret_state_ctrl_bit

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		pwrdm54xx_has_logic_ret_state_ctrl_bit
 * @BRIEF		return 1 if power domain has LOGICRETSTATE bitfield
 * @RETURNS		1 if power domain has a LOGICRETSTATE bitfield.
 *			0 if not available or in case of error.
 * @param[in]		id: valid power domain ID
 * @DESCRIPTION		return 1 if power domain has LOGICRETSTATE bitfield
 *			in PM_xyz_PWRSTCTRL register (not all power domains
 *			feature it).
 *			Return 0 if not available or in case of error.
 *			Does not make any access to any register.
 *//*------------------------------------------------------------------------ */
unsigned int pwrdm54xx_has_logic_ret_state_ctrl_bit(pwrdm54xx_id id)
{
	unsigned int prop;

	if (!cpu_is_omap54xx()) {
		fprintf(stderr, "%s(): CPU != 54XX\n", __func__);
		return 0;
	}

	if (id >= PWRDM54XX_ID_MAX) {
		fprintf(stderr, "%s(): id=%u >= PWRDM54XX_ID_MAX (%u)\n",
			__func__, id, PWRDM54XX_ID_MAX);
		return 0;
	}

	prop = pwrdm54xx_properties_get(id);
	if ((prop & PWRDM_HAS_LOGIC_RET_STATE_CTRL_BIT) != 0) {
		dprintf("%s(%u): mod %s HAS LOGICRETSTATE bitfield\n",
			__func__, id, pwrdm54xx_name_get(id));
		return 1;
	} else {
		dprintf("%s(%u): mod %s does NOT have LOGICRETSTATE"
			" bitfield\n", __func__, id, pwrdm54xx_name_get(id));
		return 0;
	}
}
开发者ID:bcousson,项目名称:omapconf,代码行数:38,代码来源:pwrdm54xx.c


示例11: usbhs_omap_remove

/**
 * usbhs_omap_remove - shutdown processing for UHH & TLL HCDs
 * @pdev: USB Host Controller being removed
 *
 * Reverses the effect of usbhs_omap_probe().
 */
static int __devexit usbhs_omap_remove(struct platform_device *pdev)
{
	struct usbhs_hcd_omap *omap = platform_get_drvdata(pdev);

	omap_usbhs_deinit(&pdev->dev);
	iounmap(omap->uhh_base);
	clk_put(omap->usb_host_hs_hsic480m_p2_clk);
	clk_put(omap->usb_host_hs_hsic60m_p2_clk);
	clk_put(omap->usb_host_hs_hsic480m_p1_clk);
	clk_put(omap->usb_host_hs_hsic60m_p1_clk);
	clk_put(omap->init_60m_fclk);
	clk_put(omap->usbhost_p2_fck);
	clk_put(omap->usbhost_p1_fck);
	clk_put(omap->xclk60mhsp2_ck);
	clk_put(omap->utmi_p2_fck);
	clk_put(omap->xclk60mhsp1_ck);
	clk_put(omap->utmi_p1_fck);
	clk_put(omap->ehci_logic_fck);

	if (cpu_is_omap54xx()) {
		clk_put(omap->usbhost_p3_fck);
		clk_put(omap->usb_host_hs_hsic480m_p3_clk);
		clk_put(omap->usb_host_hs_hsic60m_p3_clk);
	}

	pm_runtime_disable(&pdev->dev);
	kfree(omap);

	return 0;
}
开发者ID:robacklin,项目名称:omap-android,代码行数:36,代码来源:omap-usb-host.c


示例12: voltdm_por_nominal_voltage_get

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		voltdm_por_nominal_voltage_get
 * @BRIEF		return the nominal voltage to be supplied to a
 *			voltage domain, as defined in Data Manual.
 * @RETURNS		nominal voltage in micro-volt (> 0) in case of success
 *			OMAPCONF_ERR_CPU
 *			OMAPCONF_ERR_ARG
 * @param[in]		voltdm: voltage domain name (as defined in voltdm.h)
 * @param[in]		opp: OPP provided as a string (as defined in opp.h)
 * @DESCRIPTION		return the nominal voltage to be supplied to a
 *			voltage domain, as defined in Data Manual.
 *			Not read from the platform, but from internal tables.
 *//*------------------------------------------------------------------------ */
int voltdm_por_nominal_voltage_get(const char *voltdm, const char *opp)
{
	int vdd_id, opp_id;

	CHECK_NULL_ARG(voltdm, OMAPCONF_ERR_ARG);

	voltdm_init();

	vdd_id = voltdm_s2id(voltdm);
	if (vdd_id < 0)
		return OMAPCONF_ERR_ARG;

	opp_id = opp_s2id(opp);
	if (opp_id < 0)
		return opp_id;

	if (cpu_is_omap44xx()) {
		return v2uv(voltdm44xx_por_nominal_voltage_get(
			(voltdm44xx_id) vdd_id, (opp44xx_id) opp_id));
	} else if (cpu_is_omap54xx()) {
		return v2uv(voltdm54xx_por_nominal_voltage_get(
			(voltdm54xx_id) vdd_id, (opp54xx_id) opp_id));
	} else {
		fprintf(stderr,
			"omapconf: %s(): cpu not supported!!!\n", __func__);
		return OMAPCONF_ERR_CPU;
	}
}
开发者ID:bcousson,项目名称:omapconf,代码行数:41,代码来源:voltdm.c


示例13: twl603x_main

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		twl603x_main
 * @BRIEF		TWL603x menu
 *			### DEPRECATED, DO NOT USE ANYMORE ###
 * @RETURNS		0 in case of success
 *			OMAPCONF_ERR_ARG
 *			OMAPCONF_ERR_CPU
 *			OMAPCONF_ERR_INTERNAL
 * @param[in]		argc: shell input argument number
 * @param[in]		argv: shell input argument(s)
 * @DESCRIPTION		TWL603x menu
 *			### DEPRECATED, DO NOT USE ANYMORE ###
 *//*------------------------------------------------------------------------ */
int twl603x_main(int argc, char *argv[])
{
	int ret;

	if (!cpu_is_omap44xx() && !cpu_is_omap54xx())
		return OMAPCONF_ERR_CPU;

	if (argc == 2) {
		static unsigned char init_done = 0;
		if (!init_done) {
			twl603x_init_regtable();
			init_done = 1;
		}

		if (strcmp(argv[1], "dump") == 0)
			ret = twl603x_dumpregs(stdout);
		else if (cpu_is_omap54xx())
			ret = OMAPCONF_ERR_ARG;
		else if (strcmp(argv[1], "cfg") == 0)
			ret = twl603x_config(stdout);
		else if (strcmp(argv[1], "ldocfg") == 0)
			ret = twl603x_config_ldo(stdout);
		else if (strcmp(argv[1], "smpscfg") == 0)
			ret = twl603x_config_smps(stdout);
		else if (strcmp(argv[1], "rescfg") == 0)
			ret = twl603x_config_resources(stdout);
		else if (strcmp(argv[1], "devpwrgrpstat") == 0)
			ret = twl603x_config_devpwrgrp_status(stdout);
		else if (strcmp(argv[1], "reset") == 0)
			ret = twl603x_reset(stdout);
		else
			ret = OMAPCONF_ERR_ARG;

	} else if (argc == 4) {
		if (strcmp(argv[1], "setpwrgrp") == 0) {
			ret = twl603x_pwrgrp_set(stdout, argv[2], argv[3]);
		} else {
			ret = OMAPCONF_ERR_ARG;
		}
	} else {
		ret = OMAPCONF_ERR_ARG;
	}

	if (ret == OMAPCONF_ERR_ARG)
		help(HELP_PMIC);
	return ret;
}
开发者ID:IngenicC,项目名称:omapconf,代码行数:60,代码来源:twl603x.c


示例14: pwrdm54xx_has_pwrstst_reg

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		pwrdm54xx_has_pwrstst_reg
 * @BRIEF		return 1 if power domain features PM_xyz_PWRSTST,
 *			0 otherwise.
 * @RETURNS		1 if power domain features PM_xyz_PWRSTST register
 *			0 otherwise
 * @param[in]		id: valid power domain ID
 * @DESCRIPTION		return 1 if power domain features PM_xyz_PWRSTST,
 *			0 otherwise.
 *//*------------------------------------------------------------------------ */
unsigned int pwrdm54xx_has_pwrstst_reg(pwrdm54xx_id id)
{
	if (!cpu_is_omap54xx())
		return 0;
	CHECK_ARG_LESS_THAN(id, PWRDM54XX_ID_MAX, 0);

	return (pwrdm54xx_pwrstst_table[id] != NULL);
}
开发者ID:bcousson,项目名称:omapconf,代码行数:18,代码来源:pwrdm54xx.c


示例15:

/* ------------------------------------------------------------------------*//**
 * @FUNCTION		pwrdm54xx_pwrstst_reg_get
 * @BRIEF		return pointer to power domain PM_xyz_PWRSTST register.
 * @RETURNS		pointer to power domain PM_xyz_PWRSTST register
 *			NULL in case of error
 * @param[in]		id: valid power domain ID
 * @DESCRIPTION		return pointer to power domain PM_xyz_PWRSTST register.
 *//*------------------------------------------------------------------------ */
reg *pwrdm54xx_pwrstst_reg_get(pwrdm54xx_id id)
{
	if (!cpu_is_omap54xx())
		return NULL;
	CHECK_ARG_LESS_THAN(id, PWRDM54XX_ID_MAX, NULL);

	return pwrdm54xx_pwrstst_table[id];
}
开发者ID:bcousson,项目名称:omapconf,代码行数:16,代码来源:pwrdm54xx.c


示例16: hdmi_compute_pll

static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
		struct hdmi_pll_info *pi)
{
	unsigned long clkin, refclk;
	u32 mf;

	clkin = clk_get_rate(hdmi.sys_clk) / 10000;
	/*
	 * Input clock is predivided by N + 1
	 * out put of which is reference clk
	 */
	if (dssdev->clocks.hdmi.regn == 0)
		pi->regn = HDMI_DEFAULT_REGN;
	else
		pi->regn = dssdev->clocks.hdmi.regn;

	refclk = clkin / pi->regn;

	if (dssdev->clocks.hdmi.regm2 == 0) {
		if (cpu_is_omap44xx()) {
			pi->regm2 = HDMI_DEFAULT_REGM2;
		} else if (cpu_is_omap54xx()) {
			if (phy <= 50000)
				pi->regm2 = 2;
			else
				pi->regm2 = 1;
		}
	} else {
		pi->regm2 = dssdev->clocks.hdmi.regm2;
	}

	/*
	 * multiplier is pixel_clk/ref_clk
	 * Multiplying by 100 to avoid fractional part removal
	 */
	pi->regm = phy * pi->regm2 / refclk;

	/*
	 * fractional multiplier is remainder of the difference between
	 * multiplier and actual phy(required pixel clock thus should be
	 * multiplied by 2^18(262144) divided by the reference clock
	 */
	mf = (phy - pi->regm / pi->regm2 * refclk) * 262144;
	pi->regmf = pi->regm2 * mf / refclk;

	/*
	 * Dcofreq should be set to 1 if required pixel clock
	 * is greater than 1000MHz
	 */
	pi->dcofreq = phy > 1000 * 100;
	pi->regsd = ((pi->regm * clkin / 10) / (pi->regn * 250) + 5) / 10;

	/* Set the reference clock to sysclk reference */
	pi->refsel = HDMI_REFSEL_SYSCLK;

	DSSDBG("M = %d Mf = %d\n", pi->regm, pi->regmf);
	DSSDBG("range = %d sd = %d\n", pi->dcofreq, pi->regsd);
}
开发者ID:alessandroste,项目名称:testBSP,代码行数:58,代码来源:hdmi.c


示例17: omapconf_emu_disable_domain

void omapconf_emu_disable_domain()
{
	if (cpu_is_omap44xx())
		//omap4conf_emu_disable_domain();
		mem_write(OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, 0);
	else if (cpu_is_omap54xx())
		//omap5conf_emu_disable_domain();
	        mem_write(OMAP5430_CM_L3INSTR_L3_MAIN_3_CLKCTRL, 0x0);
}
开发者ID:fturgis,项目名称:omapconf,代码行数:9,代码来源:sci_swcapture.c


示例18: omap_hsmmc_si_spec_caps2

static u32 __init omap_hsmmc_si_spec_caps2(struct omap2_hsmmc_info *c)
{
	u32 caps2 = 0;
	if (cpu_is_omap54xx()) {
		if (c->mmc == 2) {
			caps2 |= MMC_CAP2_HS200_1_8V_SDR;
		}
	}
	return caps2;
}
开发者ID:SciAps,项目名称:android-kernel,代码行数:10,代码来源:hsmmc.c


示例19: irq_save_context

/*
 * Save WakeupGen interrupt context in SAR BANK3. Restore is done by
 * ROM code. WakeupGen IP is integrated along with GIC to manage the
 * interrupt wakeups from CPU low power states. It manages
 * masking/unmasking of Shared peripheral interrupts(SPI). So the
 * interrupt enable/disable control should be in sync and consistent
 * at WakeupGen and GIC so that interrupts are not lost.
 */
static void irq_save_context(void)
{
	if (!sar_base)
		sar_base = omap4_get_sar_ram_base();

	if (cpu_is_omap54xx())
		omap5_irq_save_context();
	else
		omap4_irq_save_context();
}
开发者ID:karltsou,项目名称:omap4-panda-3.4,代码行数:18,代码来源:omap-wakeupgen.c


示例20: omap_hsmmc_max_min

static int __init
omap_hsmmc_max_min(u8 slot, unsigned long *max, unsigned long *min)
{
	if (cpu_is_omap54xx()) {
		switch (slot) {
		case 0:
		case 1:
			*max = 192000000;
			break;
		case 2:
		case 3:
		case 4:
			*max = 48000000;
			break;
		default:
			return -EINVAL;
		}
	} else if (cpu_is_omap44xx()) {
		switch (slot) {
		case 0:
		case 1:
			*max = 96000000;
			break;
		case 2:
		case 3:
		case 4:
			*max = 48000000;
			break;
		default:
			return -EINVAL;
		}
	} else if (cpu_is_omap34xx()) {
		switch (slot) {
		case 0:
		case 1:
		case 2:
			*max = 96000000;
			break;
		default:
			return -EINVAL;
		}
	} else if (cpu_is_omap24xx()) {
		switch (slot) {
		case 0:
		case 1:
			*max = 96000000;
			break;
		default:
			return -EINVAL;
		}
	} else
		return -EINVAL;
	*min = 40000;
	return 0;
}
开发者ID:SciAps,项目名称:android-kernel,代码行数:55,代码来源:hsmmc.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ cpu_is_pxa25x函数代码示例发布时间:2022-05-30
下一篇:
C++ cpu_is_omap44xx函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap