9
0
Fork 0

mci: mxs: support overwriting the device name via platform data

The current implementation of the bootloader specification depends on the
hardware name and the name of the device in /dev to match. As the default
hardware name is mciX and the device name is diskY the bootloader spec
cannot be used as is.

This patch implements a way to overwrite the device name similar to what is
possible for the imx-esdhc driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2013-11-08 01:11:57 +01:00 committed by Sascha Hauer
parent a84fbbe655
commit 3bd7f80d8f
3 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@
#define __MACH_MMC_H
struct mxs_mci_platform_data {
const char *devname;
unsigned caps; /**< supported operating modes (MMC_MODE_*) */
unsigned voltages; /**< supported voltage range (MMC_VDD_*) */
unsigned f_min; /**< min operating frequency in Hz (0 -> no limit) */

View File

@ -570,6 +570,7 @@ static int mxs_mci_probe(struct device_d *hw_dev)
/* feed forward the platform specific values */
host->voltages = pd->voltages;
host->host_caps = pd->caps;
host->devname = pd->devname;
mxs_mci->clk = clk_get(hw_dev, NULL);
if (IS_ERR(mxs_mci->clk))

View File

@ -286,7 +286,7 @@ struct mci;
struct mci_host {
struct device_d *hw_dev; /**< the host MCI hardware device */
struct mci *mci;
char *devname; /**< the devicename for the card, defaults to disk%d */
const char *devname; /**< the devicename for the card, defaults to disk%d */
unsigned voltages;
unsigned host_caps; /**< Host's interface capabilities, refer MMC_VDD_* */
unsigned f_min; /**< host interface lower limit */