Commit 544f277b authored by Philipp Zabel's avatar Philipp Zabel Committed by Pierre Ossman

tmio_mmc: map SD control registers after enabling the MFD cell

ASIC3 can disable the memory, so we need to wait for mfd_cell->enable
to enable the memory before we can map the SD control registers.
Signed-off-by: default avatarPhilipp Zabel <philipp.zabel@gmail.com>
Acked-by: default avatarIan Molton <ian@mnementh.co.uk>
Signed-off-by: default avatarPierre Ossman <pierre@ossman.eu>
parent d6c9b5ed
...@@ -493,11 +493,6 @@ static int tmio_mmc_resume(struct platform_device *dev) ...@@ -493,11 +493,6 @@ static int tmio_mmc_resume(struct platform_device *dev)
struct tmio_mmc_host *host = mmc_priv(mmc); struct tmio_mmc_host *host = mmc_priv(mmc);
int ret = 0; int ret = 0;
/* Enable the MMC/SD Control registers */
sd_config_write16(host, CNF_CMD, SDCREN);
sd_config_write32(host, CNF_CTL_BASE,
(dev->resource[0].start >> host->bus_shift) & 0xfffe);
/* Tell the MFD core we are ready to be enabled */ /* Tell the MFD core we are ready to be enabled */
if (cell->enable) { if (cell->enable) {
ret = cell->enable(dev); ret = cell->enable(dev);
...@@ -505,6 +500,11 @@ static int tmio_mmc_resume(struct platform_device *dev) ...@@ -505,6 +500,11 @@ static int tmio_mmc_resume(struct platform_device *dev)
goto out; goto out;
} }
/* Enable the MMC/SD Control registers */
sd_config_write16(host, CNF_CMD, SDCREN);
sd_config_write32(host, CNF_CTL_BASE,
(dev->resource[0].start >> host->bus_shift) & 0xfffe);
mmc_resume_host(mmc); mmc_resume_host(mmc);
out: out:
...@@ -563,11 +563,6 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) ...@@ -563,11 +563,6 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
mmc->f_min = mmc->f_max / 512; mmc->f_min = mmc->f_max / 512;
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
/* Enable the MMC/SD Control registers */
sd_config_write16(host, CNF_CMD, SDCREN);
sd_config_write32(host, CNF_CTL_BASE,
(dev->resource[0].start >> host->bus_shift) & 0xfffe);
/* Tell the MFD core we are ready to be enabled */ /* Tell the MFD core we are ready to be enabled */
if (cell->enable) { if (cell->enable) {
ret = cell->enable(dev); ret = cell->enable(dev);
...@@ -575,6 +570,11 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) ...@@ -575,6 +570,11 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
goto unmap_cnf; goto unmap_cnf;
} }
/* Enable the MMC/SD Control registers */
sd_config_write16(host, CNF_CMD, SDCREN);
sd_config_write32(host, CNF_CTL_BASE,
(dev->resource[0].start >> host->bus_shift) & 0xfffe);
/* Disable SD power during suspend */ /* Disable SD power during suspend */
sd_config_write8(host, CNF_PWR_CTL_3, 0x01); sd_config_write8(host, CNF_PWR_CTL_3, 0x01);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment