summaryrefslogtreecommitdiffstats
path: root/drivers/mci/imx-esdhc.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-26 15:34:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-30 12:18:28 +0200
commit86974b5d996a05133bde2bd8dc3e4638089aac56 (patch)
tree95730b6a8f5789254492c0e3734303f45ff39f2a /drivers/mci/imx-esdhc.c
parent1f0a3175eca42e7c93465b63bf1e88c6fc88cd43 (diff)
downloadbarebox-86974b5d996a05133bde2bd8dc3e4638089aac56.tar.gz
barebox-86974b5d996a05133bde2bd8dc3e4638089aac56.tar.xz
mci: imx-esdhc: allow to specify devicename via OF alias
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/imx-esdhc.c')
-rw-r--r--drivers/mci/imx-esdhc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 46bd6d295..1e3b30773 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -535,8 +535,13 @@ static int fsl_esdhc_probe(struct device_d *dev)
else
mci->host_caps = MMC_MODE_4BIT;
- if (pdata && pdata->devname)
+ if (pdata && pdata->devname) {
mci->devname = pdata->devname;
+ } else if (dev->device_node) {
+ const char *alias = of_alias_get(dev->device_node);
+ if (alias)
+ mci->devname = xstrdup(alias);
+ }
if (caps & ESDHC_HOSTCAPBLT_HSS)
mci->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;