Re: MMC: Make the configuration memory resource optional
From: Ian Molton
Date: Wed Aug 05 2009 - 10:10:35 EST
Guennadi Liakhovetski wrote:
Hi Ian
Hi,
With my patches the tmio_mmc_clk_stop() function looked like this
(pseudocode):
tmio_mmc_clk_stop()
{
CTL_CLK_AND_WAIT_CTL = 0x0000;
msleep(10);
CTL_SD_CARD_CLK_CTL &= ~0x0100;
msleep(10);
clk_disable(clk);
}
I splitted the clk_disable() call out in a separate function and moved
_only_ it after the reset() call - it worked too. Does this answer your
question?
What is clk? HCLK?
If so, then I'm not surprised it didn't work. tmio_mmc_clk_stop/start()
are for controlling the card clock.
What you have done is too disable the host clock when you disable the
card clock. Frankly, I'm amazed it worked at all.
The correct fix would be to remove the clk_disable(clk) from your
function. The host clock should be running constantly (unless
suspended). The card clock is gated.
You should probably also check the placement of wherever your
clk_enable() is too.
-Ian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/