From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 3/3] omap_hsmmc: Board-specific TWL4030 MMC power initializations
Date: Tue, 11 Nov 2014 14:13:54 +0100 [thread overview]
Message-ID: <1415711634.17396.7.camel@collins> (raw)
In-Reply-To: <20141111123321.GZ24724@bill-the-cat>
Le mardi 11 novembre 2014 ? 07:33 -0500, Tom Rini a ?crit :
> On Tue, Nov 11, 2014 at 12:57:45PM +0100, Paul Kocialkowski wrote:
> > Le lundi 10 novembre 2014 ? 13:46 -0500, Tom Rini a ?crit :
> > > On Sat, Nov 08, 2014 at 10:29:24PM +0100, Paul Kocialkowski wrote:
> > > > Le samedi 08 novembre 2014 ? 20:55 +0100, Paul Kocialkowski a ?crit :
> > > > > Boards using the TWL4030 regulator may not all use the LDOs the same way
> > > > > (e.g. MMC2 power can be controlled by another LDO than VMMC2).
> > > > > This delegates TWL4030 MMC power initializations to board-specific functions,
> > > > > that may still call twl4030_power_mmc_init for the default behavior.
> > > > >
> > > > > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > > > > ---
> > > > > board/comelit/dig297/dig297.c | 5 +++++
> > > > > board/compulab/cm_t35/cm_t35.c | 7 +++++++
> > > > > board/corscience/tricorder/tricorder.c | 7 +++++++
> > > > > board/isee/igep00x0/igep00x0.c | 7 +++++++
> > > > > board/logicpd/omap3som/omap3logic.c | 7 +++++++
> > > > > board/logicpd/zoom1/zoom1.c | 5 +++++
> > > > > board/matrix_vision/mvblx/mvblx.c | 6 ++++++
> > > > > board/nokia/rx51/rx51.c | 6 ++++++
> > > > > board/overo/overo.c | 7 +++++++
> > > > > board/pandora/pandora.c | 5 +++++
> > > > > board/technexion/tao3530/tao3530.c | 7 +++++++
> > > > > board/ti/beagle/beagle.c | 7 +++++++
> > > > > board/ti/evm/evm.c | 7 +++++++
> > > > > board/ti/sdp3430/sdp.c | 5 +++++
> > > > > board/timll/devkit8000/devkit8000.c | 7 +++++++
> > > > > drivers/mmc/omap_hsmmc.c | 7 +------
> > > > > 16 files changed, 96 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/board/comelit/dig297/dig297.c b/board/comelit/dig297/dig297.c
> > > > > index 2b826df..9d4c41b 100644
> > > > > --- a/board/comelit/dig297/dig297.c
> > > > > +++ b/board/comelit/dig297/dig297.c
> > > > > @@ -133,6 +133,11 @@ int board_mmc_init(bd_t *bis)
> > > > > {
> > > > > return omap_mmc_init(0, 0, 0, -1, -1);
> > > > > }
> > > > > +
> > > > > +void board_mmc_power_init(void)
> > > > > +{
> > > >
> > > > I just figured, in the context of the SPL, board_mmc_init will be called
> > > > from omap3/board.c instead of the board file, so perhaps it would be
> > > > worth adding, in board_mmc_power_init: #ifdef CONFIG_SPL_BUILD and then
> > > > checking spl_boot_device to only enable the relevant LDO.
> > >
> > > If we get to this point we can do the same thing we do for
> > > board_mmc_init which is have one in say
> > > arch/arm/cpu/armv7/omap-common/boot-common.c that checks
> > > spl_boot_device()
> >
> > That wouldn't work for my use case, on the Optimus Black, where
> > regulators are used in a non-standard way. The whole point of this to me
> > is to not have platform-common code to handle MMC regulators, because
> > the way those are wired to MMC devices is not the same for each
> > platform, but is instead board-specific.
> >
> > Is there any objection to making a v5 that takes the SPL context in
> > account on each of those boards?
>
> Oh that's right, hmm. I think the answer is that for the SPL case where
> we _need_ to do something different, the board can already provide that
> and do it, with v4. The general case is that ROM will have done what
> needs doing for MMCSD load and in your case you can always go and turn
> it on in the board code.
That should indeed cover most use cases. So let's let boards enable all
the regulators they may need for MMC in board_mmc_power_init.
I'm good with v4 then!
--
Paul Kocialkowski, Replicant developer
Replicant is a fully free Android distribution
Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141111/2109b36c/attachment.pgp>
next prev parent reply other threads:[~2014-11-11 13:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-08 19:55 [U-Boot] [PATCH v4 0/3] mmc: Board-specific MMC power initializations Paul Kocialkowski
2014-11-08 19:55 ` [U-Boot] [PATCH v4 1/3] " Paul Kocialkowski
2014-11-10 18:46 ` Tom Rini
2014-12-05 14:52 ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-11-08 19:55 ` [U-Boot] [PATCH v4 2/3] twl4030: device-index-specific MMC power initializations, common ramp-up delay Paul Kocialkowski
2014-11-10 18:46 ` Tom Rini
2014-12-05 14:52 ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-11-08 19:55 ` [U-Boot] [PATCH v4 3/3] omap_hsmmc: Board-specific TWL4030 MMC power initializations Paul Kocialkowski
2014-11-08 21:29 ` Paul Kocialkowski
2014-11-10 18:46 ` Tom Rini
2014-11-11 11:57 ` Paul Kocialkowski
2014-11-11 12:33 ` Tom Rini
2014-11-11 13:13 ` Paul Kocialkowski [this message]
2014-11-10 18:46 ` Tom Rini
2014-12-05 14:52 ` [U-Boot] [U-Boot, v4, " Tom Rini
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=1415711634.17396.7.camel@collins \
--to=contact@paulk.fr \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox