]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
omap: pandora: pass wl1251 information to SDIO core
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 11 Aug 2010 01:01:52 +0000 (18:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Aug 2010 15:59:04 +0000 (08:59 -0700)
Pandora has TI WL1251 attached on MMC3, which is non-standard SDIO chip.
Make use MMC_QUIRK_NONSTD_SDIO to tell SDIO core about it.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Kalle Valo <kvalo@adurom.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/hsmmc.h

index 55836fa3506014a20329ffad3d8eda0df722d3d3..dd3af2be13be2a79e14a52360088c8cbb9db575b 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/input.h>
 #include <linux/input/matrix_keypad.h>
 #include <linux/gpio_keys.h>
+#include <linux/mmc/card.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -258,6 +259,20 @@ static struct platform_device pandora_dss_device = {
        },
 };
 
+static void pandora_wl1251_init_card(struct mmc_card *card)
+{
+       /*
+        * We have TI wl1251 attached to MMC3. Pass this information to
+        * SDIO core because it can't be probed by normal methods.
+        */
+       card->quirks |= MMC_QUIRK_NONSTD_SDIO;
+       card->cccr.wide_bus = 1;
+       card->cis.vendor = 0x104c;
+       card->cis.device = 0x9066;
+       card->cis.blksize = 512;
+       card->cis.max_dtr = 20000000;
+}
+
 static struct omap2_hsmmc_info omap3pandora_mmc[] = {
        {
                .mmc            = 1,
@@ -279,6 +294,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
                .wires          = 4,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
+               .init_card      = pandora_wl1251_init_card,
        },
        {}      /* Terminator */
 };
index 1ef54b0361036bd0f9d0c690fa26be57a4d6deee..c8f647b6205e4707f432de5b0ec4ef4d014499da 100644 (file)
@@ -268,6 +268,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
                mmc->slots[0].gpio_wp = c->gpio_wp;
 
                mmc->slots[0].remux = c->remux;
+               mmc->slots[0].init_card = c->init_card;
 
                if (c->cover_only)
                        mmc->slots[0].cover = 1;
index 36f0ba8d89e2a6833e04fefbf00e1f2d6a26a8af..1fe6f0187177bba349be1573af8f906553e40989 100644 (file)
@@ -6,6 +6,8 @@
  * published by the Free Software Foundation.
  */
 
+struct mmc_card;
+
 struct omap2_hsmmc_info {
        u8      mmc;            /* controller 1/2/3 */
        u8      wires;          /* 1/4/8 wires */
@@ -23,6 +25,8 @@ struct omap2_hsmmc_info {
        int     ocr_mask;       /* temporary HACK */
        /* Remux (pad configuation) when powering on/off */
        void (*remux)(struct device *dev, int slot, int power_on);
+       /* init some special card */
+       void (*init_card)(struct mmc_card *card);
 };
 
 #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)