From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap_hsmmc: Allow for board-specific MMC power init
Date: Tue, 28 Oct 2014 20:02:29 +0200 [thread overview]
Message-ID: <544FDA35.2090901@compulab.co.il> (raw)
In-Reply-To: <1414517144-2183-1-git-send-email-contact@paulk.fr>
Hi Paul,
On 10/28/14 19:25, Paul Kocialkowski 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 <contact@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
I'm not a huge fan of that approach, but if you add
yet another CONFIG_ option, I think it is a requirement to add
a documentation for it.
> +void omap_hsmmc_board_power_init(void);
Anyway, I would suggest adding a default
__weak board_mmc_power_init() or something like this
(which would be transfered into a callback in pdata once omap_hsmmc.c is).
Or... just no need for this patch at all, as board_mmc_init()
can be used for this...
> +#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
>
--
Regards,
Igor.
next prev parent reply other threads:[~2014-10-28 18:02 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 [this message]
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
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=544FDA35.2090901@compulab.co.il \
--to=grinberg@compulab.co.il \
--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.