summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2017-02-22 16:21:55 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 17:23:53 +0800
commit094aa8ced4eff7c4d52f829c70b8a53658c5164c (patch)
treedf3626c7250a2fbcc0be702ca0d5b75e5fcc191d /drivers
parent954e1dedc741a5e12306a85d1b30cf6d2ee73816 (diff)
downloadu-boot-imx-094aa8ced4eff7c4d52f829c70b8a53658c5164c.zip
u-boot-imx-094aa8ced4eff7c4d52f829c70b8a53658c5164c.tar.gz
u-boot-imx-094aa8ced4eff7c4d52f829c70b8a53658c5164c.tar.bz2
mmc: fsl_esdhc: support i.MX7ULP
Add compatible property for i.MX7ULP. Add a weak init_usdhc_clk function, i.MX7ULP use this to init the clock. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by : Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/fsl_esdhc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index b6e8828..2b148a7 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -964,6 +964,10 @@ void fdt_fixup_esdhc(void *blob, bd_t *bd)
#ifdef CONFIG_DM_MMC
#include <asm/arch/clock.h>
+__weak void init_clk_usdhc(u32 index)
+{
+}
+
static int fsl_esdhc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
@@ -1043,6 +1047,9 @@ static int fsl_esdhc_probe(struct udevice *dev)
* correctly get the seq as 2 and 3, then let mxc_get_clock
* work as expected.
*/
+
+ init_clk_usdhc(dev->seq);
+
priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq);
if (priv->sdhc_clk <= 0) {
dev_err(dev, "Unable to get clk for %s\n", dev->name);
@@ -1067,6 +1074,7 @@ static const struct udevice_id fsl_esdhc_ids[] = {
{ .compatible = "fsl,imx6sl-usdhc", },
{ .compatible = "fsl,imx6q-usdhc", },
{ .compatible = "fsl,imx7d-usdhc", },
+ { .compatible = "fsl,imx7ulp-usdhc", },
{ .compatible = "fsl,esdhc", },
{ /* sentinel */ }
};