Re: [PATCH] regulator: core: Keep boot_on regulators powered duringinit

From: Ulf Hansson
Date: Wed Apr 25 2012 - 11:44:42 EST


On 04/25/2012 05:34 PM, Jassi Brar wrote:
On Mon, Apr 23, 2012 at 02:45:10PM +0200, Ulf Hansson wrote:

If the platform already have booted from the eMMC card, the card is
already powered an initialized from a bootloader. Cutting the power
without first notifying the card by sending commands to it, must be
prevented and also violates the eMMC specification. In the end, it
will mean that the detect and initialization procedure fails.

Shouldn't the bootloader be responsible for ensuring MMC is
put down after using it and before passing control to the kernel.

This is kind of complicated. eMMC is powered by two regulators. VCC and VCCQ. Cutting VCC uncontrolled is not allowed. If doing so anyway there is two options to recover.

1. Cut VCCQ as well and do full reinit of the eMMC
2. Pull a hw-reset pin to the eMMC and do a full reinit of the eMMC.

In some cases neither is possible due to HW constraints. Thus we have to make sure VCC is not cut.


Even if the bootloader didn't power off properly, unless there is
some outstanding data to be written when the kernel is passed
control, perhaps it's not that serious?

The kernel will not be to re-init the eMMC... quite serious. :-)

Kind regards
Ulf Hansson
--
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/