[PATCH 4/5] mci i.MX esdhc: Allow to specify devicename from platformdata

Sascha Hauer s.hauer at pengutronix.de
Thu Nov 29 14:02:27 EST 2012


For boards which need to have persistent names for the device file.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-imx/include/mach/esdhc.h |    1 +
 drivers/mci/imx-esdhc.c                |    3 +++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/mach-imx/include/mach/esdhc.h b/arch/arm/mach-imx/include/mach/esdhc.h
index b4c1aa9..06863c8 100644
--- a/arch/arm/mach-imx/include/mach/esdhc.h
+++ b/arch/arm/mach-imx/include/mach/esdhc.h
@@ -41,5 +41,6 @@ struct esdhc_platform_data {
 	enum wp_types wp_type;
 	enum cd_types cd_type;
 	unsigned caps;
+	char *devname;
 };
 #endif /* __ASM_ARCH_IMX_ESDHC_H */
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index dccffc6..eced162 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -552,6 +552,9 @@ static int fsl_esdhc_probe(struct device_d *dev)
 	else
 		mci->host_caps = MMC_MODE_4BIT;
 
+	if (pdata && pdata->devname)
+		mci->devname = pdata->devname;
+
 	if (caps & ESDHC_HOSTCAPBLT_HSS)
 		mci->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
 
-- 
1.7.10.4




More information about the barebox mailing list