Commit cc4d1226585fa2544b5116702b02eacbb7aa48a1
1 parent
ffa37fc98d
Exists in
master
and in
56 other branches
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>
Showing 2 changed files with 4 additions and 10 deletions Side-by-side Diff
drivers/mmc/fsl_esdhc.c
1 | 1 | /* |
2 | - * Copyright 2007, Freescale Semiconductor, Inc | |
2 | + * Copyright 2007,2010 Freescale Semiconductor, Inc | |
3 | 3 | * Andy Fleming |
4 | 4 | * |
5 | 5 | * Based vaguely on the pxa mmc code: |
6 | 6 | |
... | ... | @@ -265,18 +265,13 @@ |
265 | 265 | |
266 | 266 | clk = (pre_div << 8) | (div << 4); |
267 | 267 | |
268 | - /* On imx the clock must be stopped before changing frequency */ | |
269 | - if (cfg->clk_enable) | |
270 | - esdhc_clrbits32(®s->sysctl, SYSCTL_CKEN); | |
268 | + esdhc_clrbits32(®s->sysctl, SYSCTL_CKEN); | |
271 | 269 | |
272 | 270 | esdhc_clrsetbits32(®s->sysctl, SYSCTL_CLOCK_MASK, clk); |
273 | 271 | |
274 | 272 | udelay(10000); |
275 | 273 | |
276 | - clk = SYSCTL_PEREN; | |
277 | - /* On imx systems the clock must be explicitely enabled */ | |
278 | - if (cfg->clk_enable) | |
279 | - clk |= SYSCTL_CKEN; | |
274 | + clk = SYSCTL_PEREN | SYSCTL_CKEN; | |
280 | 275 | |
281 | 276 | esdhc_setbits32(®s->sysctl, clk); |
282 | 277 | } |
include/fsl_esdhc.h
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | * FSL SD/MMC Defines |
3 | 3 | *------------------------------------------------------------------- |
4 | 4 | * |
5 | - * Copyright 2007-2008, Freescale Semiconductor, Inc | |
5 | + * Copyright 2007-2008,2010 Freescale Semiconductor, Inc | |
6 | 6 | * |
7 | 7 | * This program is free software; you can redistribute it and/or |
8 | 8 | * modify it under the terms of the GNU General Public License as |
... | ... | @@ -148,7 +148,6 @@ |
148 | 148 | struct fsl_esdhc_cfg { |
149 | 149 | u32 esdhc_base; |
150 | 150 | u32 no_snoop; |
151 | - u32 clk_enable; | |
152 | 151 | }; |
153 | 152 | |
154 | 153 | /* Select the correct accessors depending on endianess */ |