platform/msm_shared/mmc.c
unsigned int mmc_boot_init(struct mmc_boot_host *host)
{
	unsigned int mmc_ret = MMC_BOOT_E_SUCCESS;
	unsigned int mmc_pwr = 0;

	host->ocr = MMC_BOOT_OCR_27_36 | MMC_BOOT_OCR_SEC_MODE;
	host->cmd_retry = MMC_BOOT_MAX_COMMAND_RETRY;

	/* Initialize any clocks needed for SDC controller */
	clock_init_mmc(mmc_slot);

	/* Setup initial freq to 400KHz */
	clock_config_mmc(mmc_slot, MMC_CLK_400KHZ);

	host->mclk_rate = MMC_CLK_400KHZ;

	/* set power mode */
	/* give some time to reach minimum voltate */
	mdelay(2);
	mmc_pwr &= ~MMC_BOOT_MCI_PWR_UP;
	mmc_pwr |= MMC_BOOT_MCI_PWR_ON;
	mmc_pwr |= MMC_BOOT_MCI_PWR_UP;
	writel(mmc_pwr, MMC_BOOT_MCI_POWER);
	/* some more time to stabilize voltage */
	mdelay(2);

	return MMC_BOOT_E_SUCCESS;
}
/*
 * Initialize host structure, set and enable clock-rate and power mode.
 */
Initialize host structure, set and enable clock-rate and power mode.
Initialize host structure set and enable clock - rate and power mode .
unsigned int mmc_boot_init(struct mmc_boot_host *host)
{
	unsigned int mmc_ret = MMC_BOOT_E_SUCCESS;
	unsigned int mmc_pwr = 0;
	host->ocr = MMC_BOOT_OCR_27_36 | MMC_BOOT_OCR_SEC_MODE;
	host->cmd_retry = MMC_BOOT_MAX_COMMAND_RETRY;
	clock_init_mmc(mmc_slot);
	clock_config_mmc(mmc_slot, MMC_CLK_400KHZ);
	host->mclk_rate = MMC_CLK_400KHZ;
	mdelay(2);
	mmc_pwr &= ~MMC_BOOT_MCI_PWR_UP;
	mmc_pwr |= MMC_BOOT_MCI_PWR_ON;
	mmc_pwr |= MMC_BOOT_MCI_PWR_UP;
	writel(mmc_pwr, MMC_BOOT_MCI_POWER);
	mdelay(2);
	return MMC_BOOT_E_SUCCESS;
}
unsigned int mmc_boot_init ( struct mmc_boot_host * host ) { unsigned int mmc_ret = MMC_BOOT_E_SUCCESS ; unsigned int mmc_pwr = 0 ; host -> ocr = MMC_BOOT_OCR_27_36 | MMC_BOOT_OCR_SEC_MODE ; host -> cmd_retry = MMC_BOOT_MAX_COMMAND_RETRY ; clock_init_mmc ( mmc_slot ) ; clock_config_mmc ( mmc_slot , MMC_CLK_400KHZ ) ; host -> mclk_rate = MMC_CLK_400KHZ ; mdelay ( 2 ) ; mmc_pwr &= ~ MMC_BOOT_MCI_PWR_UP ; mmc_pwr |= MMC_BOOT_MCI_PWR_ON ; mmc_pwr |= MMC_BOOT_MCI_PWR_UP ; writel ( mmc_pwr , MMC_BOOT_MCI_POWER ) ; mdelay ( 2 ) ; return MMC_BOOT_E_SUCCESS ; }
Initialize host structure, set and enable clock-rate and power mode.
Initialize host structure set and enable clock - rate and power mode .
/* Initialize any clocks needed for SDC controller */ /* Setup initial freq to 400KHz */ /* set power mode */ /* give some time to reach minimum voltate */ /* some more time to stabilize voltage */