From 439c45acfde46ab914099a25bf0559567904f632 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 3 Nov 2008 20:18:58 +0000 Subject: SDHCI: Add set_ios hook Add a set_ios hook which is called when the SDHCI driver is called to change parameters such as clock or card width. Signed-off-by: Ben Dooks --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'drivers/mmc') diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 17a1ca18a59..2827ccd9f35 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1038,6 +1038,9 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) sdhci_init(host); } + if (host->ops->set_ios) + host->ops->set_ios(host, ios); + sdhci_set_clock(host, ios->clock); if (ios->power_mode == MMC_POWER_OFF) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index fb3931c88a3..9fbf0ddf241 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -269,6 +269,9 @@ struct sdhci_ops { int (*enable_dma)(struct sdhci_host *host); unsigned int (*get_max_clock)(struct sdhci_host *host); unsigned int (*get_timeout_clock)(struct sdhci_host *host); + + void (*set_ios)(struct sdhci_host *host, + struct mmc_ios *ios); }; -- cgit v1.2.3