示例#1
0
void platform_boot_dev_cmdline(char *buf)
{
	uint32_t val = 0;
	void *dev;

	dev = target_mmc_device();

	val = platform_get_boot_dev();
	switch(val)
	{
		case BOOT_DEFAULT:
		case BOOT_EMMC:
			sprintf(buf, "%x.sdhci", ((struct mmc_device *)dev)->host.base);
			break;
		case BOOT_UFS:
			sprintf(buf, "%x.ufshc", ((struct ufs_dev *)dev)->base);
			break;
		case BOOT_NAND:
			sprintf(buf, "%x.nandc", nand_device_base());
			break;
		default:
			dprintf(CRITICAL,"ERROR: Unexpected boot_device val=%x",val);
			ASSERT(0);
	};
}
示例#2
0
/*
 * Return 1 if boot from emmc else 0
 */
uint32_t platform_boot_dev_isemmc()
{
	uint32_t boot_dev_type;

	boot_dev_type = platform_get_boot_dev();

	if (boot_dev_type == BOOT_EMMC || boot_dev_type == BOOT_DEFAULT)
		boot_dev_type = 1;
	else
		boot_dev_type = 0;

	return boot_dev_type;
}
示例#3
0
/*
 * Return 1 if boot from emmc else 0
 */
uint32_t platform_boot_dev_isemmc()
{
	uint32_t boot_dev_type;

	boot_dev_type = platform_get_boot_dev();

#if USE_MDM_BOOT_CFG
	/* For MDM default boot device is NAND */
	if (boot_dev_type == BOOT_EMMC)
#else
	if (boot_dev_type == BOOT_EMMC || boot_dev_type == BOOT_DEFAULT)
#endif
		boot_dev_type = 1;
	else
		boot_dev_type = 0;

	return boot_dev_type;
}
示例#4
0
void platform_boot_dev_cmdline(char *buf)
{
	uint32_t val = 0;
	void *dev = target_mmc_device();

	val = platform_get_boot_dev();
	switch(val)
	{
#if !USE_MDM_BOOT_CFG
		case BOOT_DEFAULT:
			snprintf(buf, ((sizeof((struct mmc_device *)dev)->host.base)*2) + 7,"%x.sdhci", ((struct mmc_device *)dev)->host.base);
			break;
		case BOOT_UFS:
			snprintf(buf, ((sizeof((struct ufs_dev *)dev)->base)*2) + 7, "%x.ufshc", ((struct ufs_dev *)dev)->base);
			break;
#endif
		case BOOT_EMMC:
			snprintf(buf, ((sizeof((struct mmc_device *)dev)->host.base)*2) + 7,"%x.sdhci", ((struct mmc_device *)dev)->host.base);
			break;
		default:
			dprintf(CRITICAL,"ERROR: Unexpected boot_device val=%x",val);
			ASSERT(0);
	};
}