[U-Boot] [PATCH 6/7] mx35: Fix eSDHC clocks
Stefano Babic
sbabic at denx.de
Mon Aug 20 14:07:29 CEST 2012
On 14/08/2012 22:33, Benoît Thébaudeau wrote:
> Each eSDHC instance has a dedicated clock.
>
> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
Hi Benoît,
> .../arch/arm/cpu/arm1136/mx35/generic.c | 14 ++++++++++++--
> .../arch/arm/include/asm/arch-mx35/clock.h | 4 +++-
> 2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git u-boot-4d3c95f.orig/arch/arm/cpu/arm1136/mx35/generic.c u-boot-4d3c95f/arch/arm/cpu/arm1136/mx35/generic.c
> index 4af052c..15a0098 100644
> --- u-boot-4d3c95f.orig/arch/arm/cpu/arm1136/mx35/generic.c
> +++ u-boot-4d3c95f/arch/arm/cpu/arm1136/mx35/generic.c
> @@ -368,8 +368,12 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
> return get_ipg_per_clk();
> case MXC_UART_CLK:
> return imx_get_uartclk();
> - case MXC_ESDHC_CLK:
> + case MXC_ESDHC1_CLK:
> return mxc_get_peri_clock(ESDHC1_CLK);
> + case MXC_ESDHC2_CLK:
> + return mxc_get_peri_clock(ESDHC2_CLK);
> + case MXC_ESDHC3_CLK:
> + return mxc_get_peri_clock(ESDHC3_CLK);
> case MXC_USB_CLK:
> return mxc_get_main_clock(USB_CLK);
> case MXC_FEC_CLK:
Your change let understand that we can have different clocks among the
ESDHC controllers. One thing is not clear to me is that the MX35 have
two ESDHC controllers, and you define here a thitd one. Where is it ?
Even if the two controllers can have different clocks, this is not
supported by the driver. In fact, in drivers/mmc/fsl_esdhc.c:
int sdhc_clk = gd->sdhc_clk;
The driver uses always the same clock, stored in the global structure.
Before extending the code as in this patch, the driver should be
modified to handle separate clocks. Currently the driver supports
multiple controller, but they share the same clock or at least the same
frequency.
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list