[U-Boot] [PATCH v2 2/2] omap_hsmmc: Board-specific TWL4030 MMC power initializations
Tom Rini
trini at ti.com
Tue Nov 4 16:56:01 CET 2014
On Sat, Nov 01, 2014 at 11:35:44AM +0100, Paul Kocialkowski wrote:
> 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.
[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!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141104/ad6a1559/attachment.pgp>
More information about the U-Boot
mailing list