diff options
author | Dong Aisheng <b29396@freescale.com> | 2013-09-04 03:32:31 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:05:36 -0400 |
commit | 81e96a15101346bcd217fb34bc491a1073a765e5 (patch) | |
tree | cce6b48299142ba4b04e8625fb7d793e6918763c /drivers/mmc/host | |
parent | 1514aaa90dae691fe218c5609b645926f08f574a (diff) |
ENGR00278646-1 mmc: sdhci: add hooks for platform specific tuning
The tuning of some platforms may not follow the standard host control
spec v3.0, e.g. Freescale uSDHC on i.MX6Q/DL.
Add a hook here to allow execute platform specific tuning instead of
standard host controller tuning.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ce8db607a85b..adc73b5e97de 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1859,6 +1859,14 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) | |||
1859 | return 0; | 1859 | return 0; |
1860 | } | 1860 | } |
1861 | 1861 | ||
1862 | if (host->ops->platform_execute_tuning) { | ||
1863 | spin_unlock(&host->lock); | ||
1864 | enable_irq(host->irq); | ||
1865 | err = host->ops->platform_execute_tuning(host, opcode); | ||
1866 | sdhci_runtime_pm_put(host); | ||
1867 | return err; | ||
1868 | } | ||
1869 | |||
1862 | sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); | 1870 | sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); |
1863 | 1871 | ||
1864 | /* | 1872 | /* |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 379e09d9f3c1..851c2fba3eb1 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -288,6 +288,7 @@ struct sdhci_ops { | |||
288 | unsigned int (*get_ro)(struct sdhci_host *host); | 288 | unsigned int (*get_ro)(struct sdhci_host *host); |
289 | void (*platform_reset_enter)(struct sdhci_host *host, u8 mask); | 289 | void (*platform_reset_enter)(struct sdhci_host *host, u8 mask); |
290 | void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); | 290 | void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); |
291 | int (*platform_execute_tuning)(struct sdhci_host *host, u32 opcode); | ||
291 | int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); | 292 | int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); |
292 | void (*hw_reset)(struct sdhci_host *host); | 293 | void (*hw_reset)(struct sdhci_host *host); |
293 | void (*platform_suspend)(struct sdhci_host *host); | 294 | void (*platform_suspend)(struct sdhci_host *host); |