mci: omap: Allow to set mmc devname via platformdata
To be able to get persistent names for the sd/mmc devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
7fe0ab2818
commit
c2ef478873
|
@ -21,5 +21,6 @@
|
||||||
/** omapmmc platform data structure */
|
/** omapmmc platform data structure */
|
||||||
struct omap_hsmmc_platform_data {
|
struct omap_hsmmc_platform_data {
|
||||||
unsigned f_max; /* host interface upper limit */
|
unsigned f_max; /* host interface upper limit */
|
||||||
|
char *devname; /* The mci device name, optional */
|
||||||
};
|
};
|
||||||
#endif /* __ASM_OMAP_HSMMC_H */
|
#endif /* __ASM_OMAP_HSMMC_H */
|
||||||
|
|
|
@ -611,10 +611,16 @@ static int omap_mmc_probe(struct device_d *dev)
|
||||||
hsmmc->mci.f_min = 400000;
|
hsmmc->mci.f_min = 400000;
|
||||||
|
|
||||||
pdata = (struct omap_hsmmc_platform_data *)dev->platform_data;
|
pdata = (struct omap_hsmmc_platform_data *)dev->platform_data;
|
||||||
if (pdata && pdata->f_max)
|
if (pdata) {
|
||||||
hsmmc->mci.f_max = pdata->f_max;
|
if (pdata->f_max)
|
||||||
else
|
hsmmc->mci.f_max = pdata->f_max;
|
||||||
hsmmc->mci.f_max = 52000000;
|
else
|
||||||
|
hsmmc->mci.f_max = 52000000;
|
||||||
|
|
||||||
|
if (pdata->devname)
|
||||||
|
hsmmc->mci.devname = pdata->devname;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
dev->priv = hsmmc;
|
dev->priv = hsmmc;
|
||||||
dev->detect = omap_mmc_detect,
|
dev->detect = omap_mmc_detect,
|
||||||
|
|
Loading…
Reference in New Issue