* [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards
@ 2012-03-19 13:50 Grazvydas Ignotas
2012-03-19 16:44 ` Tom Rini
2012-03-19 23:45 ` Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Grazvydas Ignotas @ 2012-03-19 13:50 UTC (permalink / raw)
To: u-boot
According to OMAP3 TRM, PBIASLITEPWRDNZ bits must be cleared while MMC
power supply is being enabled and is ramping up (those bits might be
left set by the previous bootloader). It doesn't say what happens if
this procedure is violated, but better not to risk here and do things
as required.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/mmc/omap_hsmmc.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 12ff0a2..e9e1d2a 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -62,15 +62,21 @@ static void omap4_vmmc_pbias_config(struct mmc *mmc)
unsigned char mmc_board_init(struct mmc *mmc)
{
-#if defined(CONFIG_TWL4030_POWER)
- twl4030_power_mmc_init();
-#endif
-
#if defined(CONFIG_OMAP34XX)
t2_t *t2_base = (t2_t *)T2_BASE;
struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
+ u32 pbias_lite;
- writel(readl(&t2_base->pbias_lite) | PBIASLITEPWRDNZ1 |
+ 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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards
2012-03-19 13:50 [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards Grazvydas Ignotas
@ 2012-03-19 16:44 ` Tom Rini
2012-03-19 16:53 ` Grazvydas Ignotas
2012-03-19 23:45 ` Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2012-03-19 16:44 UTC (permalink / raw)
To: u-boot
On 03/19/2012 06:50 AM, Grazvydas Ignotas wrote:
> According to OMAP3 TRM, PBIASLITEPWRDNZ bits must be cleared while MMC
> power supply is being enabled and is ramping up (those bits might be
> left set by the previous bootloader). It doesn't say what happens if
> this procedure is violated, but better not to risk here and do things
> as required.
While in favor of correctness (and putting / moving up reconciling Linux
and U-Boot omap MMC drivers on my TODO list), does this help with the
problem you had reported before? Thanks!
--
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards
2012-03-19 16:44 ` Tom Rini
@ 2012-03-19 16:53 ` Grazvydas Ignotas
0 siblings, 0 replies; 4+ messages in thread
From: Grazvydas Ignotas @ 2012-03-19 16:53 UTC (permalink / raw)
To: u-boot
On Mon, Mar 19, 2012 at 6:44 PM, Tom Rini <trini@ti.com> wrote:
> On 03/19/2012 06:50 AM, Grazvydas Ignotas wrote:
>>
>> According to OMAP3 TRM, PBIASLITEPWRDNZ bits must be cleared while MMC
>> power supply is being enabled and is ramping up (those bits might be
>> left set by the previous bootloader). It doesn't say what happens if
>> this procedure is violated, but better not to risk here and do things
>> as required.
>
>
> While in favor of correctness (and putting / moving up reconciling Linux and
> U-Boot omap MMC drivers on my TODO list), does this help with the problem
> you had reported before? ?Thanks!
Unfortunately not, but I'm still looking for a cause and might have
some more similar patches.
--
Gra?vydas
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards
2012-03-19 13:50 [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards Grazvydas Ignotas
2012-03-19 16:44 ` Tom Rini
@ 2012-03-19 23:45 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2012-03-19 23:45 UTC (permalink / raw)
To: u-boot
On Mon, Mar 19, 2012 at 03:50:53PM +0200, Grazvydas Ignotas wrote:
> According to OMAP3 TRM, PBIASLITEPWRDNZ bits must be cleared while MMC
> power supply is being enabled and is ramping up (those bits might be
> left set by the previous bootloader). It doesn't say what happens if
> this procedure is violated, but better not to risk here and do things
> as required.
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Tom Rini <trini@ti.com>
Andy, please take this via your tree, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120319/98fde4bf/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-19 23:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 13:50 [U-Boot] [PATCH] mmc: omap: follow TRM procedure to power on cards Grazvydas Ignotas
2012-03-19 16:44 ` Tom Rini
2012-03-19 16:53 ` Grazvydas Ignotas
2012-03-19 23:45 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox