#define ASMARM_MACH_MMC_H
#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
+#include <linux/mmc/sdio_func.h>
+
+struct embedded_sdio_data {
+ struct sdio_cis cis;
+ struct sdio_cccr cccr;
+ struct sdio_embedded_func *funcs;
+ int num_funcs;
+};
struct mmc_platform_data {
unsigned int ocr_mask; /* available voltages */
u32 (*translate_vdd)(struct device *, unsigned int);
unsigned int (*status)(struct device *);
+ struct embedded_sdio_data *embedded_sdio;
};
#endif
return 0;
}
+/*
+ * Hack: Hardcoded WL1251 embedded data for Pandora
+ * - passed up via a dirty hack to the MMC platform data.
+ */
+
+#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
+#include <linux/mmc/sdio_func.h>
+#include <linux/mmc/sdio_ids.h>
+
+static struct sdio_embedded_func wifi_func = {
+ .f_class = SDIO_CLASS_WLAN,
+ .f_maxblksize = 512,
+};
+
+static struct embedded_sdio_data pandora_wifi_emb_data = {
+ .cis = {
+ .vendor = 0x104c,
+ .device = 0x9066,
+ .blksize = 512,
+ .max_dtr = 20000000,
+ },
+ .cccr = {
+ .multi_block = 0,
+ .low_speed = 0,
+ .wide_bus = 1,
+ .high_power = 0,
+ .high_speed = 0,
+ },
+ .funcs = &wifi_func,
+ .num_funcs = 1,
+};
+
static struct omap_mmc_platform_data mmc3_data = {
.nr_slots = 1,
.dma_mask = 0xffffffff,
+ .embedded_sdio = &pandora_wifi_emb_data,
.slots[0] = {
.wire4 = 1,
.set_power = hsmmc3_set_power,
#define OMAP_MMC_MAX_SLOTS 2
+#include <linux/mmc/card.h>
+#include <linux/mmc/sdio_func.h>
+
+struct embedded_sdio_data {
+ struct sdio_cis cis;
+ struct sdio_cccr cccr;
+ struct sdio_embedded_func *funcs;
+ int num_funcs;
+};
+
struct omap_mmc_platform_data {
/* number of slots per controller */
u64 dma_mask;
+ struct embedded_sdio_data *embedded_sdio;
+
struct omap_mmc_slot_data {
/*
struct omap_mmc_platform_data *pdata;
};
-
-/*
- * Hack: hardcoded WL1251 embedded data
- */
-#include <linux/mmc/card.h>
-#include <linux/mmc/sdio_func.h>
-#include <linux/mmc/sdio_ids.h>
-
-static struct sdio_cis wifi_cis = {
- .vendor = 0x104c,
- .device = 0x9066,
- .blksize = 512,
- /*.max_dtr = 24000000, Max of chip - no worky on Trout */
- .max_dtr = 20000000,
-};
-
-static struct sdio_cccr wifi_cccr = {
- .multi_block = 0,
- .low_speed = 0,
- .wide_bus = 1,
- .high_power = 0,
- .high_speed = 0,
-};
-
-static struct sdio_embedded_func wifi_func = {
- .f_class = SDIO_CLASS_WLAN,
- .f_maxblksize = 512,
-};
-
/*
* A hack to have fake detect events on MMC3
* (needed for board embedded chip init)
void omap_mmc_fake_detect_mmc3(int is_in)
{
if (mmc3_host) {
- mmc_set_embedded_sdio_data(mmc3_host->mmc, &wifi_cis,
- &wifi_cccr, &wifi_func, 1);
-
printk(KERN_INFO "Sending %s event for MMC3...\n",
is_in ? "insert" : "remove");
mmc3_host->carddetect = !is_in;
sema_init(&host->sem, 1);
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+ if (pdata->embedded_sdio)
+ mmc_set_embedded_sdio_data(mmc,
+ &pdata->embedded_sdio->cis,
+ &pdata->embedded_sdio->cccr,
+ pdata->embedded_sdio->funcs,
+ pdata->embedded_sdio->num_funcs);
+#endif
+
host->iclk = clk_get(&pdev->dev, "mmchs_ick");
if (IS_ERR(host->iclk)) {
ret = PTR_ERR(host->iclk);