+static void
+mmc_omap_abort_xfer(struct mmc_omap_host *host, struct mmc_data *data)
+{
+ int loops;
+ u16 ie;
+
+ if (host->dma_in_use)
+ mmc_omap_release_dma(host, data, 1);
+
+ host->data = NULL;
+ host->sg_len = 0;
+
+ ie = OMAP_MMC_READ(host, IE);
+ OMAP_MMC_WRITE(host, IE, 0);
+ OMAP_MMC_WRITE(host, CMD, 1 << 7);
+ loops = 0;
+ while (!(OMAP_MMC_READ(host, STAT) & OMAP_MMC_STAT_END_OF_CMD)) {
+ udelay(1);
+ loops++;
+ if (loops == 100000)
+ break;
+ }
+ OMAP_MMC_WRITE(host, STAT, OMAP_MMC_STAT_END_OF_CMD);
+ OMAP_MMC_WRITE(host, IE, ie);
+}
+