summaryrefslogtreecommitdiff
path: root/drivers/mmc/fsl_esdhc.c
diff options
context:
space:
mode:
authorJerry Huang <Chang-Ming.Huang@freescale.com>2012-05-17 23:57:02 +0000
committerAndy Fleming <afleming@freescale.com>2012-07-13 17:04:50 -0500
commit975324a7d9abd26423594b596d8cd7b83699171a (patch)
treea439b90bca1b5126a09cb7290d8323d0dab4af74 /drivers/mmc/fsl_esdhc.c
parentd2d8afae338664958b0ab68741419c0f8be26e80 (diff)
downloadu-boot-imx-975324a7d9abd26423594b596d8cd7b83699171a.zip
u-boot-imx-975324a7d9abd26423594b596d8cd7b83699171a.tar.gz
u-boot-imx-975324a7d9abd26423594b596d8cd7b83699171a.tar.bz2
FSL/eSDHC: enable the clock to detect the SD card
For FSL low-end processors (VVN2.2), in order to detect the SD card, we should enable PEREN, HCKEN and IPGEN to enable the clock. Otherwise, after booting the u-boot, and then inserting the SD card, the SD card can't be detected. For SDHC VVN2.3 IP, these bits are reserved, and SDCLKEN is used. And when accessing to these reserved bit, no any impact happened. Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> CC: Andy Fleming <afleming@gmail.com> CC: Marek Vasut <marex@denx.de> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/mmc/fsl_esdhc.c')
-rw-r--r--drivers/mmc/fsl_esdhc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 105ffb1..b6c969d 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -543,6 +543,9 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
/* First reset the eSDHC controller */
esdhc_reset(regs);
+ esdhc_setbits32(&regs->sysctl, SYSCTL_PEREN | SYSCTL_HCKEN
+ | SYSCTL_IPGEN | SYSCTL_CKEN);
+
mmc->priv = cfg;
mmc->send_cmd = esdhc_send_cmd;
mmc->set_ios = esdhc_set_ios;