mxcmmc.c (337d7c8a4ee7c966aba8e246d1b3096b03673a46) mxcmmc.c (2ee4f6200597bda9713e28a9c1e65a392615b4b5)
1/*
2 * linux/drivers/mmc/host/mxcmmc.c - Freescale i.MX MMCI driver
3 *
4 * This is a driver for the SDHC controller found in Freescale MX2/MX3
5 * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c).
6 * Unlike the hardware found on MX1, this hardware just works and does
7 * not need all the quirks found in imxmmc.c, hence the separate driver.
8 *

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

958 if (!imx_dma_is_general_purpose(chan))
959 return false;
960
961 chan->private = &host->dma_data;
962
963 return true;
964}
965
1/*
2 * linux/drivers/mmc/host/mxcmmc.c - Freescale i.MX MMCI driver
3 *
4 * This is a driver for the SDHC controller found in Freescale MX2/MX3
5 * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c).
6 * Unlike the hardware found on MX1, this hardware just works and does
7 * not need all the quirks found in imxmmc.c, hence the separate driver.
8 *

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

958 if (!imx_dma_is_general_purpose(chan))
959 return false;
960
961 chan->private = &host->dma_data;
962
963 return true;
964}
965
966static void mxcmci_watchdog(unsigned long data)
966static void mxcmci_watchdog(struct timer_list *t)
967{
967{
968 struct mmc_host *mmc = (struct mmc_host *)data;
969 struct mxcmci_host *host = mmc_priv(mmc);
968 struct mxcmci_host *host = from_timer(host, t, watchdog);
970 struct mmc_request *req = host->req;
971 unsigned int stat = mxcmci_readl(host, MMC_REG_STATUS);
972
973 if (host->dma_dir == DMA_FROM_DEVICE) {
974 dmaengine_terminate_all(host->dma);
975 dev_err(mmc_dev(host->mmc),
976 "%s: read time out (status = 0x%08x)\n",
977 __func__, stat);

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

1160
1161 if (host->pdata && host->pdata->init) {
1162 ret = host->pdata->init(&pdev->dev, mxcmci_detect_irq,
1163 host->mmc);
1164 if (ret)
1165 goto out_free_dma;
1166 }
1167
969 struct mmc_request *req = host->req;
970 unsigned int stat = mxcmci_readl(host, MMC_REG_STATUS);
971
972 if (host->dma_dir == DMA_FROM_DEVICE) {
973 dmaengine_terminate_all(host->dma);
974 dev_err(mmc_dev(host->mmc),
975 "%s: read time out (status = 0x%08x)\n",
976 __func__, stat);

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

1159
1160 if (host->pdata && host->pdata->init) {
1161 ret = host->pdata->init(&pdev->dev, mxcmci_detect_irq,
1162 host->mmc);
1163 if (ret)
1164 goto out_free_dma;
1165 }
1166
1168 setup_timer(&host->watchdog, &mxcmci_watchdog, (unsigned long)mmc);
1167 timer_setup(&host->watchdog, mxcmci_watchdog, 0);
1169
1170 mmc_add_host(mmc);
1171
1172 return 0;
1173
1174out_free_dma:
1175 if (host->dma)
1176 dma_release_channel(host->dma);

--- 79 unchanged lines hidden ---
1168
1169 mmc_add_host(mmc);
1170
1171 return 0;
1172
1173out_free_dma:
1174 if (host->dma)
1175 dma_release_channel(host->dma);

--- 79 unchanged lines hidden ---