Commit 53a366ec authored by Kevin Hilman's avatar Kevin Hilman

MMC: davinci: drop cpu_is_* in favor of platform_data

Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent c951c42f
...@@ -213,6 +213,8 @@ static struct davinci_mmc_config dm355evm_mmc_config = { ...@@ -213,6 +213,8 @@ static struct davinci_mmc_config dm355evm_mmc_config = {
.get_cd = dm355evm_mmc_get_cd, .get_cd = dm355evm_mmc_get_cd,
.get_ro = dm355evm_mmc_get_ro, .get_ro = dm355evm_mmc_get_ro,
.wires = 4, .wires = 4,
.max_freq = 50000000,
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
}; };
/* Don't connect anything to J10 unless you're only using USB host /* Don't connect anything to J10 unless you're only using USB host
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define _DAVINCI_MMC_H #define _DAVINCI_MMC_H
#include <linux/types.h> #include <linux/types.h>
#include <linux/mmc/host.h>
struct davinci_mmc_config { struct davinci_mmc_config {
/* get_cd()/get_wp() may sleep */ /* get_cd()/get_wp() may sleep */
...@@ -13,6 +14,11 @@ struct davinci_mmc_config { ...@@ -13,6 +14,11 @@ struct davinci_mmc_config {
int (*get_ro)(int module); int (*get_ro)(int module);
/* wires == 0 is equivalent to wires == 4 (4-bit parallel) */ /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
u8 wires; u8 wires;
u32 max_freq;
/* any additional host capabilities: OR'd in to mmc->f_caps */
u32 caps;
}; };
void davinci_setup_mmc(int module, struct davinci_mmc_config *config); void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
......
...@@ -1158,10 +1158,10 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) ...@@ -1158,10 +1158,10 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
mmc->ops = &mmc_davinci_ops; mmc->ops = &mmc_davinci_ops;
mmc->f_min = 312500; mmc->f_min = 312500;
mmc->f_max = 25000000; mmc->f_max = 25000000;
if (cpu_is_davinci_dm355()) { if (pdata->max_freq)
mmc->f_max = 50000000; mmc->f_max = pdata->max_freq;
mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; if (pdata->caps)
} mmc->caps |= pdata->caps;
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
/* With no iommu coalescing pages, each phys_seg is a hw_seg. /* With no iommu coalescing pages, each phys_seg is a hw_seg.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment