lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A6BF8DB.2020100@nokia.com>
Date:	Sun, 26 Jul 2009 09:34:03 +0300
From:	Adrian Hunter <adrian.hunter@...ia.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	"pierre@...man.eu" <pierre@...man.eu>,
	"Lavinen Jarkko (Nokia-D/Helsinki)" <jarkko.lavinen@...ia.com>,
	"Karpov Denis.2 (EXT-Teleca/Helsinki)" <ext-denis.2.karpov@...ia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH 20/32] omap_hsmmc: put MMC regulator to sleep

Andrew Morton wrote:
> On Fri, 10 Jul 2009 15:42:27 +0300
> Adrian Hunter <adrian.hunter@...ia.com> 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?

Yeah that is on my TODO list, but SDBP (and other bits we wait for)
will not timeout unless the hardware is broken or there is a bug
in the driver.  In either of those cases we are ruined anyway.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ