2 * (C) Copyright 2000-2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
6 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
8 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/imx-regs.h>
13 #include <asm/arch/clock.h>
15 #ifdef CONFIG_FSL_ESDHC
16 DECLARE_GLOBAL_DATA_PTR;
21 #ifdef CONFIG_FSL_ESDHC
22 #ifdef CONFIG_FSL_USDHC
23 #if CONFIG_SYS_FSL_ESDHC_ADDR == USDHC2_BASE_ADDR
24 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
25 #elif CONFIG_SYS_FSL_ESDHC_ADDR == USDHC3_BASE_ADDR
26 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
27 #elif CONFIG_SYS_FSL_ESDHC_ADDR == USDHC4_BASE_ADDR
28 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
30 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
33 #if CONFIG_SYS_FSL_ESDHC_ADDR == MMC_SDHC2_BASE_ADDR
34 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
35 #elif CONFIG_SYS_FSL_ESDHC_ADDR == MMC_SDHC3_BASE_ADDR
36 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
37 #elif CONFIG_SYS_FSL_ESDHC_ADDR == MMC_SDHC4_BASE_ADDR
38 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
40 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);