mxsmmc.c (47f75cf2e1d8648e3438630f3a4bddf9b5caa25d) | mxsmmc.c (ab769f227f79bedae7840f99b6c0c4d66aafc78e) |
---|---|
1/* 2 * Freescale i.MX28 SSP MMC driver 3 * 4 * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com> 5 * on behalf of DENX Software Engineering GmbH 6 * 7 * Based on code from LTIB: 8 * (C) Copyright 2008-2010 Freescale Semiconductor, Inc. --- 349 unchanged lines hidden (view full) --- 358 /* Send initial 74 clock cycles (185 us @ 400 KHz)*/ 359 writel(SSP_CMD0_CONT_CLKING_EN, &ssp_regs->hw_ssp_cmd0_set); 360 udelay(200); 361 writel(SSP_CMD0_CONT_CLKING_EN, &ssp_regs->hw_ssp_cmd0_clr); 362 363 return 0; 364} 365 | 1/* 2 * Freescale i.MX28 SSP MMC driver 3 * 4 * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com> 5 * on behalf of DENX Software Engineering GmbH 6 * 7 * Based on code from LTIB: 8 * (C) Copyright 2008-2010 Freescale Semiconductor, Inc. --- 349 unchanged lines hidden (view full) --- 358 /* Send initial 74 clock cycles (185 us @ 400 KHz)*/ 359 writel(SSP_CMD0_CONT_CLKING_EN, &ssp_regs->hw_ssp_cmd0_set); 360 udelay(200); 361 writel(SSP_CMD0_CONT_CLKING_EN, &ssp_regs->hw_ssp_cmd0_clr); 362 363 return 0; 364} 365 |
366static const struct mmc_ops mxsmmc_ops = { 367 .send_cmd = mxsmmc_send_cmd, 368 .set_ios = mxsmmc_set_ios, 369 .init = mxsmmc_init, 370}; 371 |
|
366int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int)) 367{ 368 struct mmc *mmc = NULL; 369 struct mxsmmc_priv *priv = NULL; 370 int ret; 371 const unsigned int mxsmmc_clk_id = mxs_ssp_clock_by_bus(id); 372 373 if (!mxs_ssp_bus_id_valid(id)) --- 21 unchanged lines hidden (view full) --- 395 return ret; 396 397 priv->mmc_is_wp = wp; 398 priv->mmc_cd = cd; 399 priv->id = id; 400 priv->regs = mxs_ssp_regs_by_bus(id); 401 402 sprintf(mmc->name, "MXS MMC"); | 372int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int)) 373{ 374 struct mmc *mmc = NULL; 375 struct mxsmmc_priv *priv = NULL; 376 int ret; 377 const unsigned int mxsmmc_clk_id = mxs_ssp_clock_by_bus(id); 378 379 if (!mxs_ssp_bus_id_valid(id)) --- 21 unchanged lines hidden (view full) --- 401 return ret; 402 403 priv->mmc_is_wp = wp; 404 priv->mmc_cd = cd; 405 priv->id = id; 406 priv->regs = mxs_ssp_regs_by_bus(id); 407 408 sprintf(mmc->name, "MXS MMC"); |
403 mmc->send_cmd = mxsmmc_send_cmd; 404 mmc->set_ios = mxsmmc_set_ios; 405 mmc->init = mxsmmc_init; 406 mmc->getcd = NULL; 407 mmc->getwp = NULL; | 409 mmc->ops = &mxsmmc_ops; |
408 mmc->priv = priv; 409 410 mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; 411 412 mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT | 413 MMC_MODE_HS_52MHz | MMC_MODE_HS | 414 MMC_MODE_HC; 415 --- 13 unchanged lines hidden --- | 410 mmc->priv = priv; 411 412 mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; 413 414 mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT | 415 MMC_MODE_HS_52MHz | MMC_MODE_HS | 416 MMC_MODE_HC; 417 --- 13 unchanged lines hidden --- |