Re: [PATCH 20/32] omap_hsmmc: put MMC regulator to sleep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Jul 2009 15:42:27 +0300
Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote:

> +static int omap_mmc_regsleep_to_enabled(struct mmc_omap_host *host)
> +{
> +	unsigned long timeout;
> +
> +	dev_dbg(mmc_dev(host->mmc), "REGSLEEP -> ENABLED\n");
> +
> +	clk_enable(host->fclk);
> +	clk_enable(host->iclk);
> +
> +	if (clk_enable(host->dbclk))
> +		dev_dbg(mmc_dev(host->mmc),
> +			"Enabling debounce clk failed\n");
> +
> +	omap_mmc_restore_ctx(host);
> +
> +	/*
> +	 * We turned off interrupts and bus power.  Interrupts
> +	 * are turned on by 'mmc_omap_start_command()' so we
> +	 * just need to turn on the bus power here.
> +	 */
> +	OMAP_HSMMC_WRITE(host->base, HCTL,
> +			 OMAP_HSMMC_READ(host->base, HCTL) | SDBP);
> +
> +	timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
> +	while ((OMAP_HSMMC_READ(host->base, HCTL) & SDBP) != SDBP &&
> +	       time_before(jiffies, timeout))
> +		;
> +
> +	if (mmc_slot(host).set_sleep)
> +		mmc_slot(host).set_sleep(host->dev, host->slot_id,
> +					 0, host->vdd, 0);
> +
> +	host->dpm_state = ENABLED;
> +
> +	return 0;
> +}

We take no action if the wait for SDBP timed out?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux