Skip to content
Snippets Groups Projects
Commit cc4d1226 authored by Kumar Gala's avatar Kumar Gala
Browse files

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: default avatarKumar Gala <galak@kernel.crashing.org>
Acked-by: default avatarStefano Babic <sbabic@denx.de>
parent ffa37fc9
No related branches found
No related tags found
No related merge requests found
/* /*
* Copyright 2007, Freescale Semiconductor, Inc * Copyright 2007,2010 Freescale Semiconductor, Inc
* Andy Fleming * Andy Fleming
* *
* Based vaguely on the pxa mmc code: * Based vaguely on the pxa mmc code:
...@@ -265,18 +265,13 @@ void set_sysctl(struct mmc *mmc, uint clock) ...@@ -265,18 +265,13 @@ void set_sysctl(struct mmc *mmc, uint clock)
clk = (pre_div << 8) | (div << 4); clk = (pre_div << 8) | (div << 4);
/* On imx the clock must be stopped before changing frequency */ esdhc_clrbits32(&regs->sysctl, SYSCTL_CKEN);
if (cfg->clk_enable)
esdhc_clrbits32(&regs->sysctl, SYSCTL_CKEN);
esdhc_clrsetbits32(&regs->sysctl, SYSCTL_CLOCK_MASK, clk); esdhc_clrsetbits32(&regs->sysctl, SYSCTL_CLOCK_MASK, clk);
udelay(10000); udelay(10000);
clk = SYSCTL_PEREN; clk = SYSCTL_PEREN | SYSCTL_CKEN;
/* On imx systems the clock must be explicitely enabled */
if (cfg->clk_enable)
clk |= SYSCTL_CKEN;
esdhc_setbits32(&regs->sysctl, clk); esdhc_setbits32(&regs->sysctl, clk);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* FSL SD/MMC Defines * 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
...@@ -148,7 +148,6 @@ ...@@ -148,7 +148,6 @@
struct fsl_esdhc_cfg { struct fsl_esdhc_cfg {
u32 esdhc_base; u32 esdhc_base;
u32 no_snoop; u32 no_snoop;
u32 clk_enable;
}; };
/* Select the correct accessors depending on endianess */ /* Select the correct accessors depending on endianess */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment