diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2010-03-18 15:51:05 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-04-07 00:01:11 -0500 |
commit | cc4d1226585fa2544b5116702b02eacbb7aa48a1 (patch) | |
tree | 029d33f169cca5518765e362231974c734a694ff /drivers/mmc/fsl_esdhc.c | |
parent | ffa37fc98d71ef930bccd4e9eed37f6ce6b4d6af (diff) | |
download | u-boot-imx-cc4d1226585fa2544b5116702b02eacbb7aa48a1.zip u-boot-imx-cc4d1226585fa2544b5116702b02eacbb7aa48a1.tar.gz u-boot-imx-cc4d1226585fa2544b5116702b02eacbb7aa48a1.tar.bz2 |
fsl_esdhc: Always stop clock before changing frequency
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>
Diffstat (limited to 'drivers/mmc/fsl_esdhc.c')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index e665b5e..85354e8 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -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(®s->sysctl, SYSCTL_CKEN); + esdhc_clrbits32(®s->sysctl, SYSCTL_CKEN); esdhc_clrsetbits32(®s->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(®s->sysctl, clk); } |