From patchwork Wed Jul 21 17:33:46 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: 113422 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 o6LHZPtL008254 for ; Wed, 21 Jul 2010 17:35:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758669Ab0GURfO (ORCPT ); Wed, 21 Jul 2010 13:35:14 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:59315 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758499Ab0GURfG (ORCPT ); Wed, 21 Jul 2010 13:35:06 -0400 Received: by mail-bw0-f46.google.com with SMTP id 1so374531bwz.19 for ; Wed, 21 Jul 2010 10:35:05 -0700 (PDT) Received: by 10.204.34.133 with SMTP id l5mr293679bkd.180.1279733704858; Wed, 21 Jul 2010 10:35:04 -0700 (PDT) Received: from localhost.localdomain (93-172-119-238.bb.netvision.net.il [93.172.119.238]) by mx.google.com with ESMTPS id f10sm29348743bkl.5.2010.07.21.10.35.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jul 2010 10:35:04 -0700 (PDT) From: Ohad Ben-Cohen To: , , Cc: , , Chikkature Rajashekar Madhusudhan , Luciano Coelho , , San Mehat , Roger Quadros , Tony Lindgren , Nicolas Pitre , Pandita Vikram , Kalle Valo , Ohad Ben-Cohen Subject: [PATCH v2 12/20] omap: hsmmc: allow board-specific settings of private mmc data Date: Wed, 21 Jul 2010 20:33:46 +0300 Message-Id: <1279733634-21974-13-git-send-email-ohad@wizery.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1279733634-21974-1-git-send-email-ohad@wizery.com> References: <1279733634-21974-1-git-send-email-ohad@wizery.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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]); Wed, 21 Jul 2010 17:35:25 +0000 (UTC) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 5d3d789..f06ddd2 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -284,6 +284,8 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) if (c->vcc_aux_disable_is_sleep) mmc->slots[0].vcc_aux_disable_is_sleep = 1; + mmc->slots[0].priv_data = c->priv_data; + /* NOTE: MMC slots should have a Vcc regulator set up. * This may be from a TWL4030-family chip, another * controllable regulator, or a fixed supply. diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 36f0ba8..434a3ed 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h @@ -23,6 +23,7 @@ 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); + void *priv_data; /* private data to SDIO function driver */ }; #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..9db1617 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h @@ -140,6 +140,8 @@ struct omap_mmc_platform_data { unsigned int ban_openended:1; + /* card private data that should be used by function driver */ + void *priv_data; } slots[OMAP_MMC_MAX_SLOTS]; }; diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4c5a669..4ac548e 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2157,6 +2157,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) if (mmc_slot(host).nonremovable) mmc->caps |= MMC_CAP_NONREMOVABLE; + mmc_set_embedded_data(mmc, mmc_slot(host).priv_data); + omap_hsmmc_conf_bus_power(host); /* Select DMA lines */