Re: [PATCH] mmc: mmci: Add new VE MMCI variant

Ulf Hansson
2013-01-24T13:17:01Z

On 24 January 2013 13:59, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Jan 24, 2013 at 01:48:39PM +0100, Ulf Hansson wrote:
>> Correct. ST-variants requires to use the POWER register to gate the
>> clock. So if this is not the case for VE you don't need to bother,
>> otherwise you should set "pwrreg_clkgate" for this variant as well.
>
> The ARM variant does gate the clock as well. It's all described in the
> TRM.
>
> When power is turned off, the clock and power is removed from the card.
> When power is applied, there is a defined sequence that must be gone
> through (which is partly handled by the device and partly by the software)
> through the OFF->POWER UP->POWER ON sequence.
>
> The clock can be masked independently too via the clock enable bit in
> the clock register.
>
> However, it's interesting to note: experiments that Linus did with having
> the primecell automatically masking the clock to the card did not prove
> worthwhile (see the comment in the code). We seem to be heading towards
> doing this in software and people suggesting it is worthwhile... Why is
> this?
>
> If the hardware can gate the clock and it doesn't produce the power
> savings we expect, how does then gating the clock via software then
> become worthwhile? It doesn't make sense.

For ST-variants it is clearly stated in specs that the power register
needs to be used to gate the clock. However for these variants the
power register is not used for controlling the power to the card, that
is handled by external regulators. In that sense the MMCI_POWER
register does not seems like the proper name at all for this register.
So, likely this is some legacy from the primecell. Just a guess
though. :-)

Kind regards
Ulf Hansson