if (pdata->caps & MMC_CAP_NONREMOVABLE)
pdata->is_in = 1;
- if (pdata->caps & MMC_PM_KEEP_POWER)
- mmc->pm_caps |= MMC_PM_KEEP_POWER;
-
/* data desc buffer */
#ifdef CFG_SDEMMC_PIO
pr_err(">>>>>>>>hostbase %p, dmode %s\n",
mmc->ocr_avail = pdata->ocr_avail;
mmc->caps = pdata->caps;
mmc->caps2 = pdata->caps2;
+ mmc->pm_caps = pdata->pm_caps;
mmc->f_min = pdata->f_min;
mmc->f_max = pdata->f_max;
mmc->max_current_180 = 300; /* 300 mA in 1.8V */
caps |= host_caps2[i].caps;
}
};
+
pdata->caps2 = caps;
pr_debug("%s:pdata->caps2 = %x\n", pdata->pinname, pdata->caps2);
return 0;
}
+static int amlsd_get_host_pm_caps(struct device_node *of_node,
+ struct amlsd_platform *pdata)
+{
+ const char *str_caps;
+ struct property *prop;
+ u32 caps = 0;
+
+ of_property_for_each_string(of_node, "caps", prop, str_caps) {
+ if (!strcasecmp("MMC_PM_KEEP_POWER", str_caps))
+ caps |= MMC_PM_KEEP_POWER;
+ };
+
+ pdata->pm_caps = caps;
+ pr_debug("%s:pdata->pm_caps = %x\n", pdata->pinname, pdata->pm_caps);
+ return 0;
+}
+
int amlsd_get_platform_data(struct platform_device *pdev,
struct amlsd_platform *pdata,
struct mmc_host *mmc, u32 index)
amlsd_get_host_caps(child, pdata);
amlsd_get_host_caps2(child, pdata);
+ amlsd_get_host_pm_caps(child, pdata);
pdata->port_init = of_amlsd_init;
#ifdef CARD_DETECT_IRQ
pdata->irq_init = of_amlsd_irq_init;