9
0
Fork 0

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:
Sascha Hauer 2013-08-25 15:49:49 +02:00
parent 7fe0ab2818
commit c2ef478873
2 changed files with 11 additions and 4 deletions

View File

@ -21,5 +21,6 @@
/** omapmmc platform data structure */
struct omap_hsmmc_platform_data {
unsigned f_max; /* host interface upper limit */
char *devname; /* The mci device name, optional */
};
#endif /* __ASM_OMAP_HSMMC_H */

View File

@ -611,10 +611,16 @@ static int omap_mmc_probe(struct device_d *dev)
hsmmc->mci.f_min = 400000;
pdata = (struct omap_hsmmc_platform_data *)dev->platform_data;
if (pdata && pdata->f_max)
hsmmc->mci.f_max = pdata->f_max;
else
hsmmc->mci.f_max = 52000000;
if (pdata) {
if (pdata->f_max)
hsmmc->mci.f_max = pdata->f_max;
else
hsmmc->mci.f_max = 52000000;
if (pdata->devname)
hsmmc->mci.devname = pdata->devname;
}
dev->priv = hsmmc;
dev->detect = omap_mmc_detect,