All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] omap_hsmmc: Board-specific TWL4030 MMC power initializations
Date: Wed, 05 Nov 2014 18:37:52 +0100	[thread overview]
Message-ID: <1415209072.2355.8.camel@collins> (raw)
In-Reply-To: <20141104155601.GJ15133@bill-the-cat>

> > 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.
> [snip]
> > +int board_mmc_power_init(void)
> > +{
> > +#if defined(CONFIG_TWL4030_POWER)
> > +	twl4030_power_mmc_init();
> > +	mdelay(100);	/* ramp-up delay from Linux code */
> > +#endif
> > +	return 0;
> > +}
> >  #endif
> 
> I think we can do away with the #if defined(CONFIG_TWL4030_POWER) part
> here since all of these boards will fail pretty spectacularly without
> that being set and if someone does remove that a link error is better
> than a crazy runtime problem.

That makes sense, I'll do that in v5.

> [snip]
> > diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> > index 5b0c302..6e93a07 100644
> > --- a/drivers/mmc/omap_hsmmc.c
> > +++ b/drivers/mmc/omap_hsmmc.c
> > @@ -130,12 +130,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
> >  	pbias_lite = readl(&t2_base->pbias_lite);
> >  	pbias_lite &= ~(PBIASLITEPWRDNZ1 | PBIASLITEPWRDNZ0);
> >  	writel(pbias_lite, &t2_base->pbias_lite);
> > -#endif
> > -#if defined(CONFIG_TWL4030_POWER)
> > -	twl4030_power_mmc_init();
> > -	mdelay(100);	/* ramp-up delay from Linux code */
> > -#endif
> > -#if defined(CONFIG_OMAP34XX)
> > +
> >  	writel(pbias_lite | PBIASLITEPWRDNZ1 |
> >  		PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
> >  		&t2_base->pbias_lite);
> 
> Since it's not clear from the context here, it's OK to drop the check on
> CONFIG_OMAP34XX here since there's already a test on it above where diff
> cut us off?  Thanks!

Indeed, that's the case (not sure this was actually more of a question
than a statement).

Thanks for the review!
-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution

Website: http://www.replicant.us/
Redmine: 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/20141105/fb1440c8/attachment.pgp>

  reply	other threads:[~2014-11-05 17:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 17:25 [U-Boot] [PATCH] omap_hsmmc: Allow for board-specific MMC power init Paul Kocialkowski
2014-10-28 18:02 ` Igor Grinberg
2014-10-28 18:11   ` Paul Kocialkowski
2014-10-29 13:10     ` Igor Grinberg
2014-10-30 15:28 ` Pantelis Antoniou
2014-11-01 10:35 ` [U-Boot] [PATCH v2 1/2] mmc: Board-specific MMC power initializations Paul Kocialkowski
2014-11-01 10:35   ` [U-Boot] [PATCH v2 2/2] omap_hsmmc: Board-specific TWL4030 " Paul Kocialkowski
2014-11-04 15:56     ` Tom Rini
2014-11-05 17:37       ` Paul Kocialkowski [this message]
2014-11-04 15:56   ` [U-Boot] [PATCH v2 1/2] mmc: Board-specific " Tom Rini
2014-11-04 17:58     ` Igor Grinberg
2014-11-04 18:32       ` Tom Rini
2014-11-05 17:35         ` Paul Kocialkowski
2014-11-05 17:46           ` 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=1415209072.2355.8.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 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.