summaryrefslogtreecommitdiff
path: root/drivers/mmc/tegra2_mmc.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-03 20:36:16 +0100
committerWolfgang Denk <wd@denx.de>2011-11-03 20:36:16 +0100
commit24769c151ef6cd068fcd6de7f13b62f92084b4c4 (patch)
tree15032187aba72588b707bccaed30854252b10968 /drivers/mmc/tegra2_mmc.c
parente84fb175f671d2dc9a0b2253ac28b85a2f3620cd (diff)
parentde71fbe468b5531914735c88834187ae4e64202f (diff)
Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc: tegra2: Move MMC clock initialization into MMC driver mmc: sdhci: fix sdma bug for large file transfer mmc: sdhci: add timeout for data transfer mmc: sdhci: add mmc structure for host mmc: sdhci: fix build warning mmc: sdhci: fix cache flush mmc: CMD7:MMC_CMD_SELECT_CARD response fix mmc: test mmc bus width on startup mmc: change magic number to macro define mmc: mv_sdhci: fix 8bus width access for 88SV331xV5 mmc: retry the cmd8 to meet 74 clocks requirement in the spec PXA: Add MMC driver using the generic MMC framework
Diffstat (limited to 'drivers/mmc/tegra2_mmc.c')
-rw-r--r--drivers/mmc/tegra2_mmc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mmc/tegra2_mmc.c b/drivers/mmc/tegra2_mmc.c
index 9e741f223c1..78b11900ed1 100644
--- a/drivers/mmc/tegra2_mmc.c
+++ b/drivers/mmc/tegra2_mmc.c
@@ -435,14 +435,22 @@ static int mmc_core_init(struct mmc *mmc)
static int tegra2_mmc_initialize(int dev_index, int bus_width)
{
+ struct mmc_host *host;
struct mmc *mmc;
debug(" mmc_initialize called\n");
+ host = &mmc_host[dev_index];
+
+ host->clock = 0;
+ tegra2_get_setup(host, dev_index);
+
+ clock_start_periph_pll(host->mmc_id, CLOCK_ID_PERIPH, 20000000);
+
mmc = &mmc_dev[dev_index];
sprintf(mmc->name, "Tegra2 SD/MMC");
- mmc->priv = &mmc_host[dev_index];
+ mmc->priv = host;
mmc->send_cmd = mmc_send_cmd;
mmc->set_ios = mmc_set_ios;
mmc->init = mmc_core_init;
@@ -465,8 +473,6 @@ static int tegra2_mmc_initialize(int dev_index, int bus_width)
mmc->f_min = 375000;
mmc->f_max = 48000000;
- mmc_host[dev_index].clock = 0;
- tegra2_get_setup(&mmc_host[dev_index], dev_index);
mmc_register(mmc);
return 0;