aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r--drivers/mmc/core/host.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index ad88deb2e8f3..35a9e4fd1a9f 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -111,12 +111,6 @@ void mmc_retune_hold(struct mmc_host *host)
111 host->hold_retune += 1; 111 host->hold_retune += 1;
112} 112}
113 113
114void mmc_retune_hold_now(struct mmc_host *host)
115{
116 host->retune_now = 0;
117 host->hold_retune += 1;
118}
119
120void mmc_retune_release(struct mmc_host *host) 114void mmc_retune_release(struct mmc_host *host)
121{ 115{
122 if (host->hold_retune) 116 if (host->hold_retune)
@@ -124,6 +118,7 @@ void mmc_retune_release(struct mmc_host *host)
124 else 118 else
125 WARN_ON(1); 119 WARN_ON(1);
126} 120}
121EXPORT_SYMBOL(mmc_retune_release);
127 122
128int mmc_retune(struct mmc_host *host) 123int mmc_retune(struct mmc_host *host)
129{ 124{
@@ -184,7 +179,7 @@ static void mmc_retune_timer(unsigned long data)
184int mmc_of_parse(struct mmc_host *host) 179int mmc_of_parse(struct mmc_host *host)
185{ 180{
186 struct device *dev = host->parent; 181 struct device *dev = host->parent;
187 u32 bus_width; 182 u32 bus_width, drv_type;
188 int ret; 183 int ret;
189 bool cd_cap_invert, cd_gpio_invert = false; 184 bool cd_cap_invert, cd_gpio_invert = false;
190 bool ro_cap_invert, ro_gpio_invert = false; 185 bool ro_cap_invert, ro_gpio_invert = false;
@@ -326,6 +321,15 @@ int mmc_of_parse(struct mmc_host *host)
326 if (device_property_read_bool(dev, "no-mmc")) 321 if (device_property_read_bool(dev, "no-mmc"))
327 host->caps2 |= MMC_CAP2_NO_MMC; 322 host->caps2 |= MMC_CAP2_NO_MMC;
328 323
324 /* Must be after "non-removable" check */
325 if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) {
326 if (host->caps & MMC_CAP_NONREMOVABLE)
327 host->fixed_drv_type = drv_type;
328 else
329 dev_err(host->parent,
330 "can't use fixed driver type, media is removable\n");
331 }
332
329 host->dsr_req = !device_property_read_u32(dev, "dsr", &host->dsr); 333 host->dsr_req = !device_property_read_u32(dev, "dsr", &host->dsr);
330 if (host->dsr_req && (host->dsr & ~0xffff)) { 334 if (host->dsr_req && (host->dsr & ~0xffff)) {
331 dev_err(host->parent, 335 dev_err(host->parent,
@@ -398,6 +402,8 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
398 host->max_blk_size = 512; 402 host->max_blk_size = 512;
399 host->max_blk_count = PAGE_SIZE / 512; 403 host->max_blk_count = PAGE_SIZE / 512;
400 404
405 host->fixed_drv_type = -EINVAL;
406
401 return host; 407 return host;
402} 408}
403 409