]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fsl_esdhc: Always stop clock before changing frequency
authorKumar Gala <galak@kernel.crashing.org>
Thu, 18 Mar 2010 20:51:05 +0000 (15:51 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 7 Apr 2010 05:01:11 +0000 (00:01 -0500)
We need to stop the clocks on 83xx/85xx as well as imx.  No need to make
this code conditional to just imx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefano Babic <sbabic@denx.de>
drivers/mmc/fsl_esdhc.c
include/fsl_esdhc.h

index e665b5ebd8a7f10d62877c5e97482ceabc07e095..85354e893a4483ada568967b997d94f3105e6185 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007, Freescale Semiconductor, Inc
+ * Copyright 2007,2010 Freescale Semiconductor, Inc
  * Andy Fleming
  *
  * Based vaguely on the pxa mmc code:
@@ -265,18 +265,13 @@ void set_sysctl(struct mmc *mmc, uint clock)
 
        clk = (pre_div << 8) | (div << 4);
 
-       /* On imx the clock must be stopped before changing frequency */
-       if (cfg->clk_enable)
-               esdhc_clrbits32(&regs->sysctl, SYSCTL_CKEN);
+       esdhc_clrbits32(&regs->sysctl, SYSCTL_CKEN);
 
        esdhc_clrsetbits32(&regs->sysctl, SYSCTL_CLOCK_MASK, clk);
 
        udelay(10000);
 
-       clk = SYSCTL_PEREN;
-       /* On imx systems the clock must be explicitely enabled */
-       if (cfg->clk_enable)
-               clk |= SYSCTL_CKEN;
+       clk = SYSCTL_PEREN | SYSCTL_CKEN;
 
        esdhc_setbits32(&regs->sysctl, clk);
 }
index 01b7dec18875696bd3911a8ff54836bb6a2b3800..57a08cd4c55a8198f45e1d879d1014d74c120b27 100644 (file)
@@ -2,7 +2,7 @@
  * FSL SD/MMC Defines
  *-------------------------------------------------------------------
  *
- * Copyright 2007-2008, Freescale Semiconductor, Inc
+ * Copyright 2007-2008,2010 Freescale Semiconductor, Inc
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
 struct fsl_esdhc_cfg {
        u32     esdhc_base;
        u32     no_snoop;
-       u32     clk_enable;
 };
 
 /* Select the correct accessors depending on endianess */