|
@@ -179,7 +179,7 @@ static void mmc_retune_timer(unsigned long data)
|
|
|
int mmc_of_parse(struct mmc_host *host)
|
|
|
{
|
|
|
struct device *dev = host->parent;
|
|
|
- u32 bus_width;
|
|
|
+ u32 bus_width, drv_type;
|
|
|
int ret;
|
|
|
bool cd_cap_invert, cd_gpio_invert = false;
|
|
|
bool ro_cap_invert, ro_gpio_invert = false;
|
|
@@ -321,6 +321,15 @@ int mmc_of_parse(struct mmc_host *host)
|
|
|
if (device_property_read_bool(dev, "no-mmc"))
|
|
|
host->caps2 |= MMC_CAP2_NO_MMC;
|
|
|
|
|
|
+ /* Must be after "non-removable" check */
|
|
|
+ if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) {
|
|
|
+ if (host->caps & MMC_CAP_NONREMOVABLE)
|
|
|
+ host->fixed_drv_type = drv_type;
|
|
|
+ else
|
|
|
+ dev_err(host->parent,
|
|
|
+ "can't use fixed driver type, media is removable\n");
|
|
|
+ }
|
|
|
+
|
|
|
host->dsr_req = !device_property_read_u32(dev, "dsr", &host->dsr);
|
|
|
if (host->dsr_req && (host->dsr & ~0xffff)) {
|
|
|
dev_err(host->parent,
|
|
@@ -393,6 +402,8 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
|
|
|
host->max_blk_size = 512;
|
|
|
host->max_blk_count = PAGE_SIZE / 512;
|
|
|
|
|
|
+ host->fixed_drv_type = -EINVAL;
|
|
|
+
|
|
|
return host;
|
|
|
}
|
|
|
|