public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: w.sang@pengutronix.de
Cc: Hong-Xing.Zhu@freescale.com, cjb@laptop.org,
	linux-mmc@vger.kernel.org,
	Troy Kisky <troy.kisky@boundarydevices.com>
Subject: [PATCH 2/2] mmc: sdhci-esdhc: OR mmc->caps with platform data caps
Date: Fri,  1 Jul 2011 16:13:39 -0700	[thread overview]
Message-ID: <1309562019-32707-2-git-send-email-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <1309562019-32707-1-git-send-email-troy.kisky@boundarydevices.com>

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 arch/arm/plat-mxc/include/mach/esdhc.h |    5 +++++
 drivers/mmc/host/sdhci-esdhc-imx.c     |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-mxc/include/mach/esdhc.h b/arch/arm/plat-mxc/include/mach/esdhc.h
index 86003f4..9c0dd1d 100644
--- a/arch/arm/plat-mxc/include/mach/esdhc.h
+++ b/arch/arm/plat-mxc/include/mach/esdhc.h
@@ -22,5 +22,10 @@
 struct esdhc_platform_data {
 	unsigned int wp_gpio;
 	unsigned int cd_gpio;
+	/*
+	 * 4/8 wires and any additional host
+	 * capabilities OR'd
+	 */
+	u32	caps;
 };
 #endif /* __ASM_ARCH_IMX_ESDHC_H */
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ad53041..c42ba83 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -261,6 +261,7 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 			imx_data->cd_gpio = boarddata->cd_gpio;
 		if (gpio_is_valid(boarddata->wp_gpio))
 			imx_data->wp_gpio = boarddata->wp_gpio;
+		host->mmc->caps |= boarddata->caps;
 	}
 	if (imx_data->wp_gpio != -EINVAL) {
 		err = gpio_request_one(imx_data->wp_gpio, GPIOF_IN, "ESDHC_WP");
-- 
1.7.0.4


  reply	other threads:[~2011-07-01 23:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01 23:13 [PATCH 1/2] mmc: sdhci-esdhc: simplify cd_gpio, wp_gpio Troy Kisky
2011-07-01 23:13 ` Troy Kisky [this message]
2011-07-03  8:22 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309562019-32707-2-git-send-email-troy.kisky@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=Hong-Xing.Zhu@freescale.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox