mxcmmc.c (0ce033d2582129243aca10d3072a221386bbba44) mxcmmc.c (ab769f227f79bedae7840f99b6c0c4d66aafc78e)
1/*
2 * This is a driver for the SDHC controller found in Freescale MX2/MX3
3 * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c).
4 * Unlike the hardware found on MX1, this hardware just works and does
5 * not need all the quirks found in imxmmc.c, hence the seperate driver.
6 *
7 * Copyright (C) 2009 Ilya Yanok, <yanok@emcraft.com>
8 * Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>

--- 471 unchanged lines hidden (view full) ---

480 /* recommended in data sheet */
481 writel(0x2db4, &host->base->read_to);
482
483 writel(0, &host->base->int_cntr);
484
485 return 0;
486}
487
1/*
2 * This is a driver for the SDHC controller found in Freescale MX2/MX3
3 * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c).
4 * Unlike the hardware found on MX1, this hardware just works and does
5 * not need all the quirks found in imxmmc.c, hence the seperate driver.
6 *
7 * Copyright (C) 2009 Ilya Yanok, <yanok@emcraft.com>
8 * Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>

--- 471 unchanged lines hidden (view full) ---

480 /* recommended in data sheet */
481 writel(0x2db4, &host->base->read_to);
482
483 writel(0, &host->base->int_cntr);
484
485 return 0;
486}
487
488static const struct mmc_ops mxcmci_ops = {
489 .send_cmd = mxcmci_request,
490 .set_ios = mxcmci_set_ios,
491 .init = mxcmci_init,
492};
493
488static int mxcmci_initialize(bd_t *bis)
489{
490 struct mmc *mmc = NULL;
491
492 mmc = malloc(sizeof(struct mmc));
493
494 if (!mmc)
495 return -ENOMEM;
496
497 sprintf(mmc->name, "MXC MCI");
494static int mxcmci_initialize(bd_t *bis)
495{
496 struct mmc *mmc = NULL;
497
498 mmc = malloc(sizeof(struct mmc));
499
500 if (!mmc)
501 return -ENOMEM;
502
503 sprintf(mmc->name, "MXC MCI");
498 mmc->send_cmd = mxcmci_request;
499 mmc->set_ios = mxcmci_set_ios;
500 mmc->init = mxcmci_init;
501 mmc->getcd = NULL;
502 mmc->getwp = NULL;
504 mmc->ops = &mxcmci_ops;
503 mmc->host_caps = MMC_MODE_4BIT;
504
505 host->base = (struct mxcmci_regs *)CONFIG_MXC_MCI_REGS_BASE;
506 mmc->priv = host;
507 host->mmc = mmc;
508
509 mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
510

--- 14 unchanged lines hidden ---
505 mmc->host_caps = MMC_MODE_4BIT;
506
507 host->base = (struct mxcmci_regs *)CONFIG_MXC_MCI_REGS_BASE;
508 mmc->priv = host;
509 host->mmc = mmc;
510
511 mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
512

--- 14 unchanged lines hidden ---