diff mbox

[2/2] mmc: sdhci-esdhc: OR mmc->caps with platform data caps

Message ID 1309562019-32707-2-git-send-email-troy.kisky@boundarydevices.com (mailing list archive)
State New, archived
Headers show

Commit Message

Troy Kisky July 1, 2011, 11:13 p.m. UTC
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 arch/arm/plat-mxc/include/mach/esdhc.h |    5 +++++
 drivers/mmc/host/sdhci-esdhc-imx.c     |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/plat-mxc/include/mach/esdhc.h b/arch/arm/plat-mxc/include/mach/esdhc.h
index 86003f4..9c0dd1d 100644
--- a/arch/arm/plat-mxc/include/mach/esdhc.h
+++ b/arch/arm/plat-mxc/include/mach/esdhc.h
@@ -22,5 +22,10 @@ 
 struct esdhc_platform_data {
 	unsigned int wp_gpio;
 	unsigned int cd_gpio;
+	/*
+	 * 4/8 wires and any additional host
+	 * capabilities OR'd
+	 */
+	u32	caps;
 };
 #endif /* __ASM_ARCH_IMX_ESDHC_H */
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ad53041..c42ba83 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -261,6 +261,7 @@  static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 			imx_data->cd_gpio = boarddata->cd_gpio;
 		if (gpio_is_valid(boarddata->wp_gpio))
 			imx_data->wp_gpio = boarddata->wp_gpio;
+		host->mmc->caps |= boarddata->caps;
 	}
 	if (imx_data->wp_gpio != -EINVAL) {
 		err = gpio_request_one(imx_data->wp_gpio, GPIOF_IN, "ESDHC_WP");