All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jassi Brar <jaswinder.singh@linaro.org>
To: Ulf Hansson <ulf.hansson@stericsson.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mattias WALLIN <mattias.wallin@stericsson.com>,
	Jonas ABERG <jonas.aberg@stericsson.com>,
	Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH] regulator: core: Keep boot_on regulators powered during init
Date: Wed, 25 Apr 2012 22:01:49 +0530	[thread overview]
Message-ID: <CAJe_ZhfVdHmEizL9X+VZzLq216uk2UzTq2sV3KnOxFwFrjQFTg@mail.gmail.com> (raw)
In-Reply-To: <4F981BDE.4050906@stericsson.com>

On 25 April 2012 21:14, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> On 04/25/2012 05:34 PM, Jassi Brar wrote:
>>>
>>  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.
>
I meant power-down to whatever extent your h/w permits. The rest you'll
have to take care by appropriately flagging supplies in the kernel.

If not full power-off, couldn't your bootloader atleast send eMMC the necessary
"power-down sequence of commands", so that it responds well to next
power-up sequence of commands ?

The point being, the board files, in both your bootloader and kernel, ought to
know the h/w constraints and program the regulator api accordingly.

Generalizing the case, IMHO it's not feasible for every stack in the kernel to
assume it has to first cleanly shutdown the h/w before probing it.

>>  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. :-)
>
Not unless your board files flag the supplies accordingly, always_on,
and the bootloader sent eMMC the "deadly command seq" ;)

  reply	other threads:[~2012-04-25 16:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  9:37 [PATCH] regulator: core: Keep boot_on regulators powered during init Ulf Hansson
2012-04-23 10:18 ` Mark Brown
2012-04-23 10:52   ` Ulf Hansson
2012-04-23 11:05     ` Mark Brown
2012-04-23 12:21       ` Ulf Hansson
2012-04-23 12:25         ` Mark Brown
2012-04-23 12:45           ` Ulf Hansson
2012-04-23 18:01             ` Mark Brown
2012-04-24  8:09               ` Ulf Hansson
2012-04-24 10:56                 ` Mark Brown
2012-04-24 12:43                   ` Ulf Hansson
2012-04-25  8:02                     ` Mark Brown
2012-04-25  9:37                       ` Ulf Hansson
2012-04-25  9:58                         ` Mark Brown
2012-04-25 16:45                           ` Jassi Brar
2012-04-25 15:34               ` Jassi Brar
2012-04-25 15:44                 ` Ulf Hansson
2012-04-25 16:31                   ` Jassi Brar [this message]
2012-04-26  8:35                 ` Mark Brown
2012-04-26  9:10                   ` Jassi Brar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJe_ZhfVdHmEizL9X+VZzLq216uk2UzTq2sV3KnOxFwFrjQFTg@mail.gmail.com \
    --to=jaswinder.singh@linaro.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jonas.aberg@stericsson.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=mattias.wallin@stericsson.com \
    --cc=ulf.hansson@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.