Patchwork [U-Boot] am335x: Enable MMC1 clock

login
register
mail settings
Submitter Tom Rini
Date April 3, 2013, 6:50 p.m.
Message ID <1365015001-21917-1-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/233569/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - April 3, 2013, 6:50 p.m.
We must not assume ROM has enabled the clock for MMC1.

Reported-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
---
 arch/arm/cpu/armv7/am33xx/clock_am33xx.c |    5 +++++
 1 file changed, 5 insertions(+)
Peter Korsgaard - April 4, 2013, 6:22 p.m.
>>>>> "Tom" == Tom Rini <trini@ti.com> writes:

 Tom> We must not assume ROM has enabled the clock for MMC1.
 Tom> Reported-by: Koen Kooi <koen@dominion.thruhere.net>
 Tom> Signed-off-by: Tom Rini <trini@ti.com>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Tom Rini - April 8, 2013, 4:57 p.m.
On Wed, Apr 03, 2013 at 08:50:01AM -0000, Tom Rini wrote:

> We must not assume ROM has enabled the clock for MMC1.
> 
> Reported-by: Koen Kooi <koen@dominion.thruhere.net>
> Signed-off-by: Tom Rini <trini@ti.com>
> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

Applied to u-boot-ti/master, thanks!

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
index afc0d92..a1efc75 100644
--- a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
+++ b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
@@ -195,6 +195,11 @@  static void enable_per_clocks(void)
 	while (readl(&cmper->mmc0clkctrl) != PRCM_MOD_EN)
 		;
 
+	/* MMC1 */
+	writel(PRCM_MOD_EN, &cmper->mmc1clkctrl);
+	while (readl(&cmper->mmc1clkctrl) != PRCM_MOD_EN)
+		;
+
 	/* i2c0 */
 	writel(PRCM_MOD_EN, &cmwkup->wkup_i2c0ctrl);
 	while (readl(&cmwkup->wkup_i2c0ctrl) != PRCM_MOD_EN)