summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h9
-rw-r--r--include/linux/mmc/host.h23
-rw-r--r--include/linux/mmc/sdio_func.h10
-rw-r--r--include/linux/mmc/sdio_ids.h5
4 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 403aa505f27e..8e691e5f619a 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -62,7 +62,12 @@ struct sdio_cccr {
low_speed:1,
wide_bus:1,
high_power:1,
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+ high_speed:1,
+ disable_cd:1;
+#else
high_speed:1;
+#endif
};
struct sdio_cis {
@@ -95,6 +100,10 @@ struct mmc_card {
#define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */
#define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+ u32 quirks; /* card quirks */
+#endif
+
u32 raw_cid[4]; /* raw card CID */
u32 raw_csd[4]; /* raw card CSD */
u32 raw_scr[2]; /* raw card SCR */
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 3e7615e9087e..024582ca344b 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -161,6 +161,20 @@ struct mmc_host {
struct dentry *debugfs_root;
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+ struct {
+ struct sdio_cis *cis;
+ struct sdio_cccr *cccr;
+ struct sdio_embedded_func *funcs;
+ int num_funcs;
+ unsigned int quirks; /* embedded sdio card quirks */
+/* do not ignore MMC_VDD_165_195 */
+#define MMC_QUIRK_VDD_165_195 (1<<0)
+/* allow SDIO FN0 writes outside of VS CCCR*/
+#define MMC_QUIRK_LENIENT_FUNC0 (1<<1)
+ } embedded_sdio_data;
+#endif
+
unsigned long private[0] ____cacheline_aligned;
};
@@ -169,6 +183,15 @@ extern int mmc_add_host(struct mmc_host *);
extern void mmc_remove_host(struct mmc_host *);
extern void mmc_free_host(struct mmc_host *);
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+extern void mmc_set_embedded_sdio_data(struct mmc_host *host,
+ struct sdio_cis *cis,
+ struct sdio_cccr *cccr,
+ struct sdio_embedded_func *funcs,
+ int num_funcs,
+ unsigned int quirks);
+#endif
+
static inline void *mmc_priv(struct mmc_host *host)
{
return (void *)host->private;
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 451bdfc85830..8a0dbf273268 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -20,6 +20,16 @@ struct sdio_func;
typedef void (sdio_irq_handler_t)(struct sdio_func *);
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+/*
+ * Structure used to hold embedded SDIO device data from platform layer
+ */
+struct sdio_embedded_func {
+ uint8_t f_class;
+ uint32_t f_maxblksize;
+};
+#endif
+
/*
* SDIO function CIS tuple (unknown to the core)
*/
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index 39751c8cde9c..e3da8ef517a1 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -28,6 +28,11 @@
#define SDIO_DEVICE_ID_MARVELL_8688WLAN 0x9104
#define SDIO_DEVICE_ID_MARVELL_8688BT 0x9105
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+#define SDIO_VENDOR_ID_TI 0x104c
+#define SDIO_DEVICE_ID_TI_WL12xx 0x9066
+#endif
+
#define SDIO_VENDOR_ID_SIANO 0x039a
#define SDIO_DEVICE_ID_SIANO_NOVA_B0 0x0201
#define SDIO_DEVICE_ID_SIANO_NICE 0x0202