Re: [PATCH 4/4] mmc: add MMC_QUIRK_NONSTD_FUNC_IF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pierre,

On Wed, Jan 5, 2011 at 12:48 AM, Pierre Tardy <tardyp@xxxxxxxxx> wrote:
> This sounds good, and may solve this problem we have with wl1271.
> Then, how do you tell the mmc stack the wl1271 has the quirk
> MMC_QUIRK_NONSTD_FUNC_IF?

Something like this:

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/
index 5a8311f..f9f9c8a 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -19,6 +19,7 @@
 #include <linux/regulator/fixed.h>
 #include <linux/wl12xx.h>
 #include <linux/mmc/host.h>
+#include <linux/mmc/card.h>

 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -196,6 +197,17 @@ struct wl12xx_platform_data omap_zoom_wlan_data __initdata
        .board_ref_clock = 1,
 };

+static void zoom_wl1271_init_card(struct mmc_card *card)
+{
+       /*
+        * Tell SDIO core to ignore the standard SDIO function interface
+        * codes indicated by the wl1271. This is required because the
+        * wl1271 erronouesly indicates its first function as a standard
+        * Bluetooth SDIO interface.
+        */
+       card->quirks |= MMC_QUIRK_NONSTD_FUNC_IF;
+}
+
 static struct omap2_hsmmc_info mmc[] __initdata = {
        {
                .name           = "external",
@@ -221,6 +233,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
                .gpio_wp        = -EINVAL,
                .gpio_cd        = -EINVAL,
                .nonremovable   = true,
+               .init_card      = zoom_wl1271_init_card,
        },
        {}      /* Terminator */
 };

This applies on the ZOOM board. in your case it would be a bit
different, but the core principle should stay the same.

Thanks,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux