From: "Stanley.Miao" <stanley.miao@windriver.com>
To: linux-omap@vger.kernel.org
Cc: stanley.miao@windriver.com, tony@atomide.com
Subject: [PATCH 2/3] omap: init the gpio pinmux for mmc
Date: Thu, 13 May 2010 20:39:30 +0800 [thread overview]
Message-ID: <1273754371-26014-3-git-send-email-stanley.miao@windriver.com> (raw)
In-Reply-To: <1273754371-26014-2-git-send-email-stanley.miao@windriver.com>
There is two gpio for mmc use, one is for card detecting, another is
used for checking write protect. Intialize its pinmux in case the bootloader
doesn't set it.
Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
arch/arm/mach-omap2/devices.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 10f3a3c..3d30f22 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -591,6 +591,15 @@ static inline void omap_hsmmc_reset(void) {}
static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
int controller_nr)
{
+ if ((mmc_controller->slots[0].switch_pin > 0) && \
+ (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
+ omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
+ OMAP_PIN_INPUT_PULLUP);
+ if ((mmc_controller->slots[0].gpio_wp > 0) && \
+ (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
+ omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
+ OMAP_PIN_INPUT_PULLUP);
+
if (cpu_is_omap2420() && controller_nr == 0) {
omap_cfg_reg(H18_24XX_MMC_CMD);
omap_cfg_reg(H15_24XX_MMC_CLKI);
--
1.5.4.3
next prev parent reply other threads:[~2010-05-13 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 12:39 [PATCH 0/3] Some am3517 related patches [V4] Stanley.Miao
2010-05-13 12:39 ` [PATCH 1/3] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
2010-05-13 12:39 ` Stanley.Miao [this message]
2010-05-13 12:39 ` [PATCH 3/3] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
2010-05-14 21:30 ` [PATCH 0/3] Some am3517 related patches [V4] Tony Lindgren
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=1273754371-26014-3-git-send-email-stanley.miao@windriver.com \
--to=stanley.miao@windriver.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).