From patchwork Tue Jun 29 13:49:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 108628 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 o5TDi2bl017060 for ; Tue, 29 Jun 2010 13:57:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756004Ab0F2Nth (ORCPT ); Tue, 29 Jun 2010 09:49:37 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:34970 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755928Ab0F2Ntf (ORCPT ); Tue, 29 Jun 2010 09:49:35 -0400 Received: by mail-wy0-f174.google.com with SMTP id 38so2714736wyb.19 for ; Tue, 29 Jun 2010 06:49:34 -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=2jos8v73AYoSPC4ce1wROS77VxOT2BDSLuSuSmMzj+Y=; b=ClGFAm2ZzeLu9m5D5TB+oKvU02g7VVL2NgULeqVd7u0PQxMhCi6CDXzDBjdV4H0z6A zVNUIve2V/T/CtFu//MPpiW6NbNOtFUbcoVlceSXrPO+65G6vHfWb4Bew81jbqli3d7I SUoTkjezDpl0SzbtraMNBKxKa1eGYxqaK66fc= 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=n52Ru2YAzCDH459rMOef+iPs1ufz783MGtL/9zhWUCnUV1ohP18ad1ZXGMKYUUZOsk P/7T+2wlDj7ED3AH6ss67pszvuKgFla1hqKHiKXaGIQZ663jbfxk55TkdURPXF/9zN4n UT2kj521U/cpHqVChbWXqFRJgnyrd4Z55JgvU= Received: by 10.216.85.68 with SMTP id t46mr5127960wee.75.1277819374408; Tue, 29 Jun 2010 06:49:34 -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.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Jun 2010 06:49:33 -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 2/3] omap_hsmmc: add init_card pass-through callback Date: Tue, 29 Jun 2010 16:49:24 +0300 Message-Id: <1277819365-2761-3-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 13:58:00 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index c835f1e..9b89ec6 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h @@ -122,6 +122,8 @@ struct omap_mmc_platform_data { /* Call back after enabling / disabling regulators */ void (*after_set_reg)(struct device *dev, int slot, int power_on, int vdd); + /* if we have special card, init it using this callback */ + void (*init_card)(struct mmc_card *card); /* return MMC cover switch state, can be NULL if not supported. * diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index b032828..e8eb39e 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1598,6 +1598,14 @@ static int omap_hsmmc_get_ro(struct mmc_host *mmc) return mmc_slot(host).get_ro(host->dev, 0); } +static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card) +{ + struct omap_hsmmc_host *host = mmc_priv(mmc); + + if (mmc_slot(host).init_card) + mmc_slot(host).init_card(card); +} + static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) { u32 hctl, capa, value; @@ -1869,6 +1877,7 @@ static const struct mmc_host_ops omap_hsmmc_ops = { .set_ios = omap_hsmmc_set_ios, .get_cd = omap_hsmmc_get_cd, .get_ro = omap_hsmmc_get_ro, + .init_card = omap_hsmmc_init_card, /* NYET -- enable_sdio_irq */ }; @@ -1879,6 +1888,7 @@ static const struct mmc_host_ops omap_hsmmc_ps_ops = { .set_ios = omap_hsmmc_set_ios, .get_cd = omap_hsmmc_get_cd, .get_ro = omap_hsmmc_get_ro, + .init_card = omap_hsmmc_init_card, /* NYET -- enable_sdio_irq */ };