Revert "mmc: Add concept of an 'embedded' SDIO device."
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:53:07 +0000 (22:53 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:53:07 +0000 (22:53 +0800)
This reverts commit 6558addc2ad78c412d6791544305256d5f90784c.

drivers/mmc/core/Kconfig
drivers/mmc/core/core.c
drivers/mmc/core/sdio.c
drivers/mmc/core/sdio_bus.c
include/linux/amba/mmci.h
include/linux/mmc/host.h
include/linux/mmc/sdio_func.h

index 09a8766223af111a03fa7ceb920ff923fdf685c0..103be88956762ce1b2f591e48d2498332e1a9944 100644 (file)
@@ -14,19 +14,11 @@ config MMC_UNSAFE_RESUME
          This option is usually just for embedded systems which use
          a MMC/SD card for rootfs. Most people should say N here.
 
-config MMC_EMBEDDED_SDIO
-       boolean "MMC embedded SDIO device support (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
-       help
-         If you say Y here, support will be added for embedded SDIO
-         devices which do not contain the necessary enumeration
-         support in hardware to be properly detected.
-
 config MMC_PARANOID_SD_INIT
        bool "Enable paranoid SD card initialization (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
        help
          If you say Y here, the MMC layer will be extra paranoid
          about re-trying SD init requests. This can be a useful
          work-around for buggy controllers and hardware. Enable
          if you are experiencing issues with SD detection.
+
index e543f85deb79a773ec4900f9132c79f72c828adc..7dab2e5f4bc9c87c53779a3d49cf2cb368114ef7 100644 (file)
@@ -1312,22 +1312,6 @@ EXPORT_SYMBOL(mmc_resume_host);
 
 #endif
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-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)
-{
-       host->embedded_sdio_data.cis = cis;
-       host->embedded_sdio_data.cccr = cccr;
-       host->embedded_sdio_data.funcs = funcs;
-       host->embedded_sdio_data.num_funcs = num_funcs;
-}
-
-EXPORT_SYMBOL(mmc_set_embedded_sdio_data);
-#endif
-
 static int __init mmc_init(void)
 {
        int ret;
index f823bf793347ed397a7ea1f458cad645f5a04e42..cdb845b68ab5e37222048b47769014fa32186b8a 100644 (file)
 #include "sdio_ops.h"
 #include "sdio_cis.h"
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-#include <linux/mmc/sdio_ids.h>
-#endif
-
 static int sdio_read_fbr(struct sdio_func *func)
 {
        int ret;
@@ -283,35 +279,19 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
                        goto remove;
        }
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-       if (host->embedded_sdio_data.cccr)
-               memcpy(&card->cccr, host->embedded_sdio_data.cccr, sizeof(struct sdio_cccr));
-       else {
-#endif
-               /*
-                * Read the common registers.
-                */
-               err = sdio_read_cccr(card);
-               if (err)
-                       goto remove;
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-       }
-#endif
+       /*
+        * Read the common registers.
+        */
+       err = sdio_read_cccr(card);
+       if (err)
+               goto remove;
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-       if (host->embedded_sdio_data.cis)
-               memcpy(&card->cis, host->embedded_sdio_data.cis, sizeof(struct sdio_cis));
-       else {
-#endif
-               /*
-                * Read the common CIS tuples.
-                */
-               err = sdio_read_common_cis(card);
-               if (err)
-                       goto remove;
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-       }
-#endif
+       /*
+        * Read the common CIS tuples.
+        */
+       err = sdio_read_common_cis(card);
+       if (err)
+               goto remove;
 
        if (oldcard) {
                int same = (card->cis.vendor == oldcard->cis.vendor &&
@@ -538,11 +518,6 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
         */
        card->sdio_funcs = funcs = (ocr & 0x70000000) >> 28;
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-       if (host->embedded_sdio_data.funcs)
-               card->sdio_funcs = funcs = host->embedded_sdio_data.num_funcs;
-#endif
-
        /*
         * If needed, disconnect card detection pull-up resistor.
         */
@@ -554,27 +529,9 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
         * Initialize (but don't add) all present functions.
         */
        for (i = 0;i < funcs;i++) {
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-               if (host->embedded_sdio_data.funcs) {
-                       struct sdio_func *tmp;
-
-                       tmp = sdio_alloc_func(host->card);
-                       if (IS_ERR(tmp))
-                               goto remove;
-                       tmp->num = (i + 1);
-                       card->sdio_func[i] = tmp;
-                       tmp->class = host->embedded_sdio_data.funcs[i].f_class;
-                       tmp->max_blksize = host->embedded_sdio_data.funcs[i].f_maxblksize;
-                       tmp->vendor = card->cis.vendor;
-                       tmp->device = card->cis.device;
-               } else {
-#endif
-                       err = sdio_init_func(host->card, i + 1);
-                       if (err)
-                               goto remove;
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-               }
-#endif
+               err = sdio_init_func(host->card, i + 1);
+               if (err)
+                       goto remove;
        }
 
        mmc_release_host(host);
index 0b1d2143ed234dac3bb236967e54aebd08ea251c..d37464e296a507deb743182c3764714f83cdda9c 100644 (file)
 #include "sdio_cis.h"
 #include "sdio_bus.h"
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-#include <linux/mmc/host.h>
-#endif
-
 /* show configuration fields */
 #define sdio_config_attr(field, format_string)                         \
 static ssize_t                                                         \
@@ -203,14 +199,7 @@ static void sdio_release_func(struct device *dev)
 {
        struct sdio_func *func = dev_to_sdio_func(dev);
 
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-       /*
-        * If this device is embedded then we never allocated
-        * cis tables for this func
-        */
-       if (!func->card->host->embedded_sdio_data.funcs)
-#endif
-               sdio_free_func_cis(func);
+       sdio_free_func_cis(func);
 
        if (func->info)
                kfree(func->info);
index 2e4f1cf64f5212db2cc9e23600180b922f20fe1a..ee58a21b607589a7d80f671f8886de2798b73f88 100644 (file)
@@ -5,15 +5,6 @@
 #define AMBA_MMCI_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 mmci_platform_data {
        unsigned int ocr_mask;                  /* available voltages */
@@ -23,7 +14,6 @@ struct mmci_platform_data {
        int     gpio_cd;
        unsigned long capabilities;
        unsigned int status_irq;
-       struct embedded_sdio_data *embedded_sdio;
        int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
 };
 
index 94710905ec2c7004f615abeac3b617b21871ae4d..7456efeb1ae36b1732bb5508cfadfcd62ceb6bde 100644 (file)
@@ -211,15 +211,6 @@ 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;
-       } embedded_sdio_data;
-#endif
-
        unsigned long           private[0] ____cacheline_aligned;
 };
 
@@ -228,14 +219,6 @@ 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);
-#endif
-
 static inline void *mmc_priv(struct mmc_host *host)
 {
        return (void *)host->private;
index 4121c20cbe74bbaf238860e5dccd97c575d71c44..ac3ab683fec6707fec51881eb300fbe697239a3f 100644 (file)
@@ -20,14 +20,6 @@ struct sdio_func;
 
 typedef void (sdio_irq_handler_t)(struct sdio_func *);
 
-/*
- * Structure used to hold embedded SDIO device data from platform layer
- */
-struct sdio_embedded_func {
-       uint8_t f_class;
-       uint32_t f_maxblksize;
-};
-
 /*
  * SDIO function CIS tuple (unknown to the core)
  */