#define INIT_STREAM_CMD 0x00000000
#define DUAL_VOLT_OCR_BIT 7
#define SRC (1 << 25)
+#define SRD (1 << 26)
#define OMAP_MMC1_DEVID 1
#define OMAP_MMC2_DEVID 2
static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
{
struct mmc_omap_host *host = dev_id;
+ struct mmc_data *data;
int end_cmd = 0, end_trans = 0, status;
if (host->cmd == NULL && host->data == NULL) {
return IRQ_HANDLED;
}
+ data = host->data;
status = OMAP_HSMMC_READ(host->base, STAT);
dev_dbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status);
if (end_cmd || (status & CC))
mmc_omap_cmd_done(host, host->cmd);
if (end_trans || (status & TC))
- mmc_omap_xfer_done(host, host->data);
+ mmc_omap_xfer_done(host, data);
return IRQ_HANDLED;
}
host->mmc->ios.vdd = vdd;
}
mmc_detect_change(host->mmc, (HZ * 200) / 1000);
- } else
+ } else {
+ OMAP_HSMMC_WRITE(host->base, SYSCTL,
+ OMAP_HSMMC_READ(host->base, SYSCTL) | SRD);
+ while (OMAP_HSMMC_READ(host->base, SYSCTL) & SRD) ;
mmc_detect_change(host->mmc, (HZ * 50) / 1000);
+ }
}
/*