Hi Paul,

> On Oct 28, 2014, at 19:25 , Paul Kocialkowski <cont...@paulk.fr> wrote:
> 
> Some devices may use non-standard combinations of regulators to power MMC:
> this allows these devices to provide a board-specific MMC power init function
> to set everything up in their own way.
> 
> Signed-off-by: Paul Kocialkowski <cont...@paulk.fr>
> ---
> arch/arm/include/asm/omap_mmc.h |    4 +++-
> drivers/mmc/omap_hsmmc.c        |    4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h
> index 617e22f..b6a8325 100644
> --- a/arch/arm/include/asm/omap_mmc.h
> +++ b/arch/arm/include/asm/omap_mmc.h
> @@ -164,5 +164,7 @@ struct hsmmc {
> int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
>               int wp_gpio);
> 
> -
> +#ifdef CONFIG_OMAP_HSMMC_BOARD_POWER_INIT
> +void omap_hsmmc_board_power_init(void);
> +#endif
> #endif /* OMAP_MMC_H_ */
> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> index ef2cbf9..ef4c5cf 100644
> --- a/drivers/mmc/omap_hsmmc.c
> +++ b/drivers/mmc/omap_hsmmc.c
> @@ -136,7 +136,9 @@ static unsigned char mmc_board_init(struct mmc *mmc)
>       pbias_lite &= ~(PBIASLITEPWRDNZ1 | PBIASLITEPWRDNZ0);
>       writel(pbias_lite, &t2_base->pbias_lite);
> #endif
> -#if defined(CONFIG_TWL4030_POWER)
> +#if defined(CONFIG_OMAP_HSMMC_BOARD_POWER_INIT)
> +     omap_hsmmc_board_power_init();
> +#elif defined(CONFIG_TWL4030_POWER)
>       twl4030_power_mmc_init();
>       mdelay(100);    /* ramp-up delay from Linux code */
> #endif
> -- 
> 1.7.9.5
> 

Igor covered most of what I was going to whine about.

I’m not a big fun of the define maze here, let’s not add to it, shall we?

A common board_mmc_power_init() function would be fine in this occasion.

Regards

— Pantelis

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to