From patchwork Tue Jun 29 13:49:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 108629 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5TDi2bn017060 for ; Tue, 29 Jun 2010 14:00:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756039Ab0F2Nti (ORCPT ); Tue, 29 Jun 2010 09:49:38 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:40737 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755153Ab0F2Nth (ORCPT ); Tue, 29 Jun 2010 09:49:37 -0400 Received: by mail-wy0-f174.google.com with SMTP id 38so2714778wyb.19 for ; Tue, 29 Jun 2010 06:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=Vc8b4ljeVeC5HYzO5eXP3UfDleCkEKCNpzkK+EOcV18=; b=BG7bmihrbWNwG4J/6qc7EEYuz1ETZbueYFLV9QHCA0WkljbY0mnromFp2DiParxHi2 F6jxVW1ME12vUGfU/D/TTXDgpc2Zd7HO+u01n5K1nYgH5Ngn3bhN1C9VSHhboDv8SRWZ 52yyBYgwvGDeYbJXt2pce92xZI0G73/M1S7jc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=BORZwg1SXB9c9coQUgpc01UyVBVoofX49+97XrEaO4UZwXavP25ROq56V6NZLTX3Fy LExev3cszD+8eYAxLL97bIfswLwUFudCM6MZMN/FWLN/rP4g4F3aBDWxx/4Wttir84b/ Qv8fO73YYgg2Z2ZMDZYcO7EJutzIeln62aYsc= Received: by 10.227.133.65 with SMTP id e1mr5329897wbt.76.1277819376154; Tue, 29 Jun 2010 06:49:36 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id n52sm3181251wee.31.2010.06.29.06.49.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Jun 2010 06:49:35 -0700 (PDT) From: Grazvydas Ignotas To: linux-mmc@vger.kernel.org Cc: linux-omap@vger.kernel.org, Andrew Morton , Adrian Hunter , Tony Lindgren , Bob Copeland , Kalle Valo , Grazvydas Ignotas Subject: [PATCH 3/3] omap: pandora: pass wl1251 information to SDIO core Date: Tue, 29 Jun 2010 16:49:25 +0300 Message-Id: <1277819365-2761-4-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1277819365-2761-1-git-send-email-notasas@gmail.com> References: <1277819365-2761-1-git-send-email-notasas@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 29 Jun 2010 14:00:11 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index db06dc9..ebbfb49 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -227,6 +228,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, @@ -248,6 +263,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = { .wires = 4, .gpio_cd = -EINVAL, .gpio_wp = -EINVAL, + .init_card = pandora_wl1251_init_card, }, {} /* Terminator */ }; diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 1ef54b0..c8f647b 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -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; diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 36f0ba8..1fe6f01 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h @@ -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)