|
@@ -161,19 +161,14 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
|
|
|
{
|
|
|
/* FIXME - should we set stop clock reg here */
|
|
|
sd_ctrl_write16(host, CTL_RESET_SD, 0x0000);
|
|
|
- if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
|
|
|
- sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000);
|
|
|
usleep_range(10000, 11000);
|
|
|
sd_ctrl_write16(host, CTL_RESET_SD, 0x0001);
|
|
|
- if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
|
|
|
- sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001);
|
|
|
usleep_range(10000, 11000);
|
|
|
|
|
|
if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) {
|
|
|
sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
|
|
|
sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
static void tmio_mmc_reset_work(struct work_struct *work)
|
|
@@ -214,7 +209,7 @@ static void tmio_mmc_reset_work(struct work_struct *work)
|
|
|
|
|
|
spin_unlock_irqrestore(&host->lock, flags);
|
|
|
|
|
|
- tmio_mmc_reset(host);
|
|
|
+ host->reset(host);
|
|
|
|
|
|
/* Ready for new calls */
|
|
|
host->mrq = NULL;
|
|
@@ -1209,6 +1204,9 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
|
|
|
mmc->caps & MMC_CAP_NEEDS_POLL ||
|
|
|
!mmc_card_is_removable(mmc));
|
|
|
|
|
|
+ if (!_host->reset)
|
|
|
+ _host->reset = tmio_mmc_reset;
|
|
|
+
|
|
|
/*
|
|
|
* On Gen2+, eMMC with NONREMOVABLE currently fails because native
|
|
|
* hotplug gets disabled. It seems RuntimePM related yet we need further
|
|
@@ -1230,7 +1228,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
|
|
|
_host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
|
|
|
|
|
|
_host->set_clock(_host, 0);
|
|
|
- tmio_mmc_reset(_host);
|
|
|
+ _host->reset(_host);
|
|
|
|
|
|
_host->sdcard_irq_mask = sd_ctrl_read16_and_16_as_32(_host, CTL_IRQ_MASK);
|
|
|
tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL);
|
|
@@ -1330,7 +1328,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
|
|
|
{
|
|
|
struct tmio_mmc_host *host = dev_get_drvdata(dev);
|
|
|
|
|
|
- tmio_mmc_reset(host);
|
|
|
+ host->reset(host);
|
|
|
tmio_mmc_clk_enable(host);
|
|
|
|
|
|
if (host->clk_cache)
|