aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorDorian Snyder <dastin1015@gmail.com>2013-06-12 02:24:45 -0700
committerDorian Snyder <dastin1015@gmail.com>2013-06-20 00:06:04 -0700
commit4b2308ce699b9c599dd6e6acf57ac11f483381d9 (patch)
tree4c31179b06d094887b1c8ca70264cf8f184a5981 /drivers/mmc/host
parent855d6a6c1f7c54ef073caac3f6c5f9b1ed72eb4d (diff)
downloadkernel_samsung_smdk4412-4b2308ce699b9c599dd6e6acf57ac11f483381d9.zip
kernel_samsung_smdk4412-4b2308ce699b9c599dd6e6acf57ac11f483381d9.tar.gz
kernel_samsung_smdk4412-4b2308ce699b9c599dd6e6acf57ac11f483381d9.tar.bz2
d710: initial support for the Epic 4G Touch (SPH-D710)
Change-Id: Iafbd9fb45253b02d539ac0ba114f57b3bf9eeed4
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/mshci-s3c.c9
-rw-r--r--drivers/mmc/host/sdhci-s3c.c28
2 files changed, 36 insertions, 1 deletions
diff --git a/drivers/mmc/host/mshci-s3c.c b/drivers/mmc/host/mshci-s3c.c
index 58670ca..2c890c9 100644
--- a/drivers/mmc/host/mshci-s3c.c
+++ b/drivers/mmc/host/mshci-s3c.c
@@ -488,6 +488,7 @@ static int __devinit mshci_s3c_probe(struct platform_device *pdev)
if (pdata->cd_type == S3C_MSHCI_CD_PERMANENT) {
host->quirks |= MSHCI_QUIRK_BROKEN_PRESENT_BIT;
host->mmc->caps |= MMC_CAP_NONREMOVABLE;
+#ifndef CONFIG_WIMAX_CMC
if (pdata->int_power_gpio) {
gpio_set_value(pdata->int_power_gpio, 1);
s3c_gpio_cfgpin(pdata->int_power_gpio,
@@ -495,6 +496,7 @@ static int __devinit mshci_s3c_probe(struct platform_device *pdev)
s3c_gpio_setpull(pdata->int_power_gpio,
S3C_GPIO_PULL_NONE);
}
+#endif
}
/* IF SD controller's WP pin donsn't connected with SD card and there
@@ -511,12 +513,15 @@ static int __devinit mshci_s3c_probe(struct platform_device *pdev)
if (pdata->cd_type == S3C_MSHCI_CD_GPIO &&
gpio_is_valid(pdata->ext_cd_gpio)) {
+#ifdef CONFIG_WIMAX_CMC
+ gpio_request(pdata->ext_cd_gpio, "SDHCI EXT CD");
+#else
ret = gpio_request(pdata->ext_cd_gpio, "MSHCI EXT CD");
if (ret) {
dev_err(&pdev->dev, "cannot request gpio for card detect\n");
goto err_add_host;
}
-
+#endif
sc->ext_cd_gpio = pdata->ext_cd_gpio;
sc->ext_cd_irq = gpio_to_irq(pdata->ext_cd_gpio);
@@ -537,7 +542,9 @@ static int __devinit mshci_s3c_probe(struct platform_device *pdev)
goto err_add_host;
}
+#ifndef CONFIG_WIMAX_CMC
device_enable_async_suspend(dev);
+#endif
return 0;
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 712c8c6..eba9825 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -608,6 +608,11 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
* transfers, not sure if this is a problem with this specific
* SDHCI block, or a missing configuration that needs to be set. */
host->quirks |= SDHCI_QUIRK_NO_BUSY_IRQ;
+
+#ifdef CONFIG_WIMAX_CMC
+ /* This host supports the Auto CMD12 */
+ host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12;
+#endif
if (pdata->cd_type == S3C_SDHCI_CD_NONE)
host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
@@ -706,6 +711,10 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
pdata->ext_pdev(pdev);
#endif
}
+#ifdef CONFIG_MACH_U1_NA_SPR
+ if (pdata->cd_type == S3C_SDHCI_CD_GPIO && pdata->ext_cd_init)
+ pdata->ext_cd_init(&sdhci_s3c_notify_change);
+#endif
if (pdata->cd_type == S3C_SDHCI_CD_GPIO &&
gpio_is_valid(pdata->ext_cd_gpio))
sdhci_s3c_setup_card_detect_gpio(sc);
@@ -742,6 +751,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
if (pdata->cd_type == S3C_SDHCI_CD_EXTERNAL && pdata->ext_cd_cleanup)
pdata->ext_cd_cleanup(&sdhci_s3c_notify_change);
+#ifdef CONFIG_MACH_U1_NA_SPR
+ if (pdata->cd_type == S3C_SDHCI_CD_GPIO && pdata->ext_cd_cleanup)
+ pdata->ext_cd_cleanup(&sdhci_s3c_notify_change);
+#endif
if (sc->ext_cd_irq)
free_irq(sc->ext_cd_irq, sc);
@@ -792,9 +805,24 @@ static void sdhci_s3c_shutdown(struct platform_device *dev)
static int sdhci_s3c_resume(struct platform_device *dev)
{
struct sdhci_host *host = platform_get_drvdata(dev);
+#if defined(CONFIG_WIMAX_CMC)/* && defined(CONFIG_TARGET_LOCALE_NA)*/
+ struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
+ u32 ier;
+#endif
int ret = 0;
ret = sdhci_resume_host(host);
+
+#if defined(CONFIG_WIMAX_CMC)/* && defined(CONFIG_TARGET_LOCALE_NA)*/
+
+
+ if (pdata->enable_intr_on_resume) {
+ ier = sdhci_readl(host, SDHCI_INT_ENABLE);
+ ier |= SDHCI_INT_CARD_INT;
+ sdhci_writel(host, ier, SDHCI_INT_ENABLE);
+ sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE);
+ }
+#endif
return ret;
}