From patchwork Tue Jul 6 00:37:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ohad Ben Cohen X-Patchwork-Id: 110310 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 o660e8KU021890 for ; Tue, 6 Jul 2010 00:40:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756942Ab0GFAj5 (ORCPT ); Mon, 5 Jul 2010 20:39:57 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:37901 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756838Ab0GFAjz (ORCPT ); Mon, 5 Jul 2010 20:39:55 -0400 Received: by mail-bw0-f46.google.com with SMTP id 1so3098513bwz.19 for ; Mon, 05 Jul 2010 17:39:54 -0700 (PDT) Received: by 10.204.19.208 with SMTP id c16mr3014203bkb.30.1278376794484; Mon, 05 Jul 2010 17:39:54 -0700 (PDT) Received: from localhost.localdomain ([46.116.56.182]) by mx.google.com with ESMTPS id v6sm20227262bkx.11.2010.07.05.17.39.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jul 2010 17:39:53 -0700 (PDT) From: Ohad Ben-Cohen To: , , Cc: , , Chikkature Rajashekar Madhusudhan , Luciano Coelho , , San Mehat , Ohad Ben-Cohen Subject: [PATCH 03/15] omap: mmc: prepare for software card detect support Date: Tue, 6 Jul 2010 03:37:34 +0300 Message-Id: <1278376666-3509-4-git-send-email-ohad@wizery.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1278376666-3509-1-git-send-email-ohad@wizery.com> References: <1278376666-3509-1-git-send-email-ohad@wizery.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, 06 Jul 2010 00:40:09 +0000 (UTC) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 1ef54b0..1361128 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -269,6 +269,10 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) mmc->slots[0].remux = c->remux; + mmc->slots[0].register_embedded_control = + c->register_embedded_control; + mmc->slots[0].virtual_get_cd = c->virtual_get_cd; + 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..dc12c90 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h @@ -23,6 +23,11 @@ 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); + /* following methods are for embedded sdio devices, e.g. wl1271 */ + int (*register_embedded_control)(void *dev_id, + void (*set_virtual_cd)(void *dev_id, int card_present), + void (*set_embedded_data)(void *dev_id, void *priv)); + int (*virtual_get_cd)(void); }; #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index c835f1e..0f5bf12 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h @@ -140,6 +140,11 @@ struct omap_mmc_platform_data { unsigned int ban_openended:1; + /* Embedded SDIO devices control */ + int (*register_embedded_control)(void *dev_id, + void (*set_virtual_cd)(void *dev_id, int card_present), + void (*set_embedded_data)(void *dev_id, void *priv)); + int (*virtual_get_cd)(void); } slots[OMAP_MMC_MAX_SLOTS]; };